Create item with the Mercado Livre API
Publishes a listing and returns it with its id. Under the User Products model, active for every seller, send family_name and no title: Mercado Livre builds the title. The description is added afterwards with Create item description.
- Identifier
- mercado_livre_create_item
The request
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>"
}
}Your system sends your customer's connection id and the tool arguments. The headers are the same as the rest of the Connect API: your product's token and your customer's token.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| family_name | string | Yes | Generic name of the product, shared by its variants, for example Apple iPhone 256GB. Up to the max_title_length of the category. |
| category_id | string | Yes | Id of the category, from Search categories. |
| price | number | Yes | Price in the currency of currency_id. |
| currency_id | string | Yes | Currency of the site, BRL in Brazil, as in the currency_id of the listings in List items. |
| available_quantity | integer | Yes | Stock. 0 creates the listing paused, with substatus out_of_stock. |
| buying_mode | string | Yes | buy_it_now, the only mode available.Values: buy_it_now |
| listing_type_id | string | Yes | Listing type, for example gold_special (Classic), gold_pro (Premium) or free, as in the listing_type_id of the listings in List items. |
| condition | string | No | Condition of the product. Mercado Livre is replacing it with the ITEM_CONDITION attribute, which is also the only way to say refurbished.Values: new, used, not_specified |
| pictures | array | No | Pictures of the product, in order. The max_pictures_per_item of the category sets the limit. |
| attributes | array | No | Technical attributes of the product, such as BRAND, MODEL, GTIN or SELLER_SKU. List category attributes says which ones the category requires. |
| sale_terms | array | No | Sale terms, such as the warranty: WARRANTY_TYPE (for example Garantia do vendedor) and WARRANTY_TIME (for example 90 dias). A refurbished item needs them. |
Supported connections
Your customer connects their Mercado Livre account once, with one of the modes below. The same connection serves every tool of the toolkit.
OAuth with your product's app
You register your product's OAuth app once, with POST /api/merchants/credentials/mercado_livre, and your customer authorizes the account on a consent screen. Connect renews the token when it is about to expire.
The response
On success, Connect preserves the app's response status and body. HTTP errors returned by the app use the {error, api_error} envelope; authentication or validation can fail before execution. The X-Toolkit-Execution-Id header identifies the recorded execution, available at GET /api/tools/executions/{uuid}.
Ready for AI agents
This tool's input is a JSON Schema, available at GET /api/tools/mercado_livre_create_item. It becomes your agent's tool definition with no conversion.
Other Mercado Livre tools
- Get current userGETReturns the connected seller account: id, nickname, email, site_id and seller reputation. The id is the user_id, seller and seller_id of the other tools, and site_id (MLB in Brazil) goes in Search categories.
- Search itemsGETLists the ids of the listings of the seller, 50 per page by default. results has only item ids: List items returns their details. Page with offset and limit; past 1000 results use search_type scan and the scroll_id of each response.
- List itemsGETReturns up to 20 listings by id in one call: title, price, available_quantity, sold_quantity, status, permalink, pictures and attributes. Each element has status_code, id and the listing in body.
- Search categoriesGETPredicts the category of a product from its title, with the domain and the attributes recognized in the text. The first result is the most likely. Its category_id goes in Create item and in List category attributes.
- List category attributesGETLists the attributes of a category with their id, value_type, accepted values and tags. Attributes tagged required must be sent in Create item, and new_required ones when the item is new.
- Update itemPUTChanges a listing and returns it. Only the fields sent change. status paused hides it, active brings it back and closed ends it for good. title and family_name only change while the listing has no sales.
- Get item descriptionGETReturns the description of a listing in plain_text, with date_created and last_updated.
- Create item descriptionPOSTAdds the description to a listing that has none, such as one just made with Create item. Fails with 400 when a description already exists: use Update item description.
See Connect applied to your product.
Try it for 15 days with no card, or walk our team through your use case.
