Créer une annonce avec l'API Mercado Livre

Publie une annonce et la renvoie avec son id. Dans le modèle User Products, actif pour tous les vendeurs, envoyez family_name et aucun title : Mercado Livre construit le titre. La description s'ajoute ensuite avec Créer la description de l'annonce.

Identifiant
mercado_livre_create_item

L'appel

POST https://connect.reportei.com/api/tools/mercado_livre_create_item/execute
Authorization: Bearer <merchant token>
x-customer-token: <customer token>
Content-Type: application/json
Accept: application/json

{
  "customer_toolkit": "<connection UUID>",
  "arguments": {
    "family_name": "<family_name>",
    "category_id": "<category_id>",
    "price": 1,
    "currency_id": "<currency_id>",
    "available_quantity": 1,
    "buying_mode": "buy_it_now",
    "listing_type_id": "<listing_type_id>"
  }
}

Votre système envoie l'id de la connexion de votre client et les arguments de la tool. Les headers sont les mêmes que pour toute l'API Connect : le token de votre produit et celui de votre client.

Paramètres

Les descriptions des paramètres suivent la documentation officielle de l'app, en anglais.

ParamètreTypeObligatoireDescription
family_namestringOuiGeneric name of the product, shared by its variants, for example Apple iPhone 256GB. Up to the max_title_length of the category.
category_idstringOuiId of the category, from Search categories.
pricenumberOuiPrice in the currency of currency_id.
currency_idstringOuiCurrency of the site, BRL in Brazil, as in the currency_id of the listings in List items.
available_quantityintegerOuiStock. 0 creates the listing paused, with substatus out_of_stock.
buying_modestringOuibuy_it_now, the only mode available.Valeurs : buy_it_now
listing_type_idstringOuiListing type, for example gold_special (Classic), gold_pro (Premium) or free, as in the listing_type_id of the listings in List items.
conditionstringNonCondition of the product. Mercado Livre is replacing it with the ITEM_CONDITION attribute, which is also the only way to say refurbished.Valeurs : new, used, not_specified
picturesarrayNonPictures of the product, in order. The max_pictures_per_item of the category sets the limit.
attributesarrayNonTechnical attributes of the product, such as BRAND, MODEL, GTIN or SELLER_SKU. List category attributes says which ones the category requires.
sale_termsarrayNonSale terms, such as the warranty: WARRANTY_TYPE (for example Garantia do vendedor) and WARRANTY_TIME (for example 90 dias). A refurbished item needs them.

Connexions possibles

Votre client connecte son compte Mercado Livre une seule fois, avec l'un des modes ci-dessous. La même connexion sert à toutes les tools du toolkit.

OAuth avec l'app de votre produit

Vous enregistrez une fois l'app OAuth de votre produit, avec POST /api/merchants/credentials/mercado_livre, et votre client autorise le compte sur un écran de consentement. Connect renouvelle le token avant son expiration.

La réponse

En cas de succès, Connect conserve le statut et le corps de la réponse de l'app. Les erreurs HTTP renvoyées par l'app utilisent l'objet {error, api_error} ; l'authentification ou la validation peuvent échouer avant l'exécution. Le header X-Toolkit-Execution-Id identifie l'exécution enregistrée, consultable avec GET /api/tools/executions/{uuid}.

Prête pour les agents IA

L'input de cette tool est un JSON Schema, disponible via GET /api/tools/mercado_livre_create_item. Il devient la définition de tool de votre agent sans conversion.

Autres tools Mercado Livre

Voir les 14 tools

Toolkits de la même catégorie

Voir les 100 toolkits

Voyez Connect appliqué à votre produit.

Essayez-le pendant 15 jours sans carte, ou présentez votre cas à notre équipe.