Get current user with the Mercado Livre API
Returns 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.
- Identifier
- mercado_livre_get_current_user
The request
POST https://connect.reportei.com/api/tools/mercado_livre_get_current_user/execute
Authorization: Bearer <merchant token>
x-customer-token: <customer token>
Content-Type: application/json
Accept: application/json
{
"customer_toolkit": "<connection UUID>",
"arguments": {}
}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
This tool takes no arguments.
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_get_current_user. It becomes your agent's tool definition with no conversion.
Other Mercado Livre tools
- 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.
- Create itemPOSTPublishes 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.
- 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.
