Documentación Mercado Libre

Descubre toda la información que debes conocer sobre las APIs de Mercado Libre.
circulos azuis em degrade

Documentación

Última actualización 29/09/2023

Manage questions & answers

Questions are the way buyers can communicate to sellers on the Item details page before making a transaction, and therefore, the way you handle interaction at this stage will be decisive to make a successful sale.

Search questions

Important:
We return the empty text in the questions and answers with the status: "BANNED".
Use the parameter api_version = 4 to get the new JSON structure.

There are a few ways to search questions.


Questions received by a seller

Request:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/questions/search?seller_id=$SELLER_ID&api_version=4

Example:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/questions/search?seller_id=419059118&api_version=4

Response:

 
{
   "total": 36,
   "limit": 2,
   "questions": [
       {
           "date_created": "2021-02-16T14:50:27.938-04:00",
           "item_id": "MLA903218023",
           "seller_id": 189394110,
           "status": "ANSWERED",
           "text": "Texto de la pregunta.",
           "id": 11764931832,
           "deleted_from_listing": false,
           "hold": false,
           "suspected_spam": false,
           "answer": {
               "text": "",
               "status": "BANNED",
               "date_created": "2021-02-16T14:52:13.580-04:00"
           },
           "from": {
               "id": 162981404
           }
       },
       {
           "date_created": "2021-02-16T14:47:58.950-04:00",
           "item_id": "MLA903218023",
           "seller_id": 189394110,
           "status": "BANNED",
           "text": "",
           "id": 11764926522,
           "deleted_from_listing": false,
           "hold": false,
           "suspected_spam": false,
           "answer": null,
           "from": {
               "id": 162981404
           }
       }
   ],
....
}
Note:
Please note that unanswered questions older than 7 months will be deleted.

Questions received on an item

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/questions/search?item=$ITEM_ID&api_version=4

How to order?

To order the results you can add the following query params:

sort_fields: allows sorting the search results by one or more specific fields. Accepts the item_id, seller_id, from_id, and date_created fields separated by commas.
Example:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/questions/search?seller_id=$SELLER_ID&sort_fields=item_id,date_created&api_version=4

sort_types: permite establecer si el ordenamiento de los campos establecidos en sort_fields será de forma ASC o DESC.
Example:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/questions/search?seller_id=$SELLER_ID&sort_fields=item_id,date_created&sort_types=ASC&api_version=4

Questions made by a user on an item

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/questions/search?item=$ITEM_ID&from=$CUST_ID&api_version=4

Questions by ID

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/questions/$QUESTION_ID&api_version=4
Note:
Get the reasons about any question or response that has "status": "BANNED” making a request /moderations/infractions.


Attributes description

seller_id: Product seller's ID id: Question ID

text: Question text

status: Question status 


Possibles values:

  • unanswered:The question has not been answered yet
  • answered:The question was not answered 
  • closed_unanswered:The product is closed and the question has never been answered 
  • under_review:Both product and question are under review 

item_id: ID of the question-related product 

date_created: Question creation date

answer: Seller's answer

text: Answer text 

status: Answer status 


Possible values:

  • active: The answer is available 
  • disabled: The answer was disabled.
  • date_created: Answer creation date.

Great! Now you know the aspects to take into account in terms of questions. Have a look at the available actions based on question search.

Allowed methods

Method Description
GET /questions/:id Returns a question with that id.
POST /questions Creates a question on an item.
DELETE /questions/:id Deletes a question.
POST /answers/ POST an answer to a given question.
POST /my/questions/hidden Hide questions.

As you can see, you can search questions by item, by seller, by the user who made them and filter them by status or period. You can also search all your received questions and hide them if you want.


Ask questions

This is a very simple task. You only need to know the item_id and send it along with a text String on the Json body like in the following example:

curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' -H "Content-Type: application/json" -d '{
   "text":"Test question.",
   "item_id":"MLA608007087"
}' https://api.mercadolibre.com/questions
Nota:
Remember make the POST with UTF-8 codification to avoid errors with special characters.

Answer questions

When you have a large amount of items listed on MercadoLibre you’re probably gonna receive lots of questions so we recommend you develop a way to answer those questions in a semi-automatic way, where answers are suggested to operators basing on frequent keywords. To do so, you need to know how to answer a question by API. This is gonna be easy. First, let’s check all the questions you got on your item. Just make a question search by item like in the example:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/questions/search?item_id=$ITEM_ID&api_version=4

You’ll see questions have a status, so you’ll probably gonna have to keep those under “unanswered” status. Now let’s answer a single question:

curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' -H ""Content-Type: application/json"" -d '{
	"question_id": 3957150025,
	"text":"Test answer..."
}' https://api.mercadolibre.com/answers

Response time

The new “response time” resource calculates the time in minutes it takes a seller to answer a query. It can be in 3 periods:

  • Monday to Friday from 9 am to 6 pm (weekdays_working_hours).
  • Monday to Friday from 6 pm to 12 am (weekdays_extra_hours).
  • Saturday and Sunday (weekend).

Moreover, it shows the forecasted sales percentage a seller can have if he/she answers in less than 1 hour, viewing the percentage in the “sales_percent_increase” field.
The average is considered for each of the above periods, considering the last 14 days of questions and using the first question a buyer asked about an item.
Unanswered questions will be considered responded when calculating the response time, 1 week maximum.
Example: If one question remains unanswered for 4 days, it will consider that it took 4 days and the following day, 5 days, to answer a question.
For the “total” data from the past 14 days without periods will be considered. This also includes questions from 12 am to 9 am that do not fall into any of the periods viewed by the cutoff.

Call:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/users/$USER_ID/questions/response_time

Example:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/users/1111111/questions/response_time

Response:

{
 "user_id": 1111111,
 "total": {
   "response_time": 22
 },
 "weekend": {
   "response_time": 8,
   "sales_percent_increase": null
 },
 "weekdays_working_hours": {
   "response_time": 8,
   "sales_percent_increase": null
 },
 "weekdays_extra_hours": {
   "response_time": 72,
   "sales_percent_increase": 10
 }
}

Parameters description

user_id: ID of queried seller.
total: The seller's average response time, without considering time bands.
weekend: The seller's average response time on weekends.
weekdays_working_hours: The seller's average response time at business hours on business days (Monday to Friday, from 9 am to 6 pm).
weekdays_extra_hours: The seller's average response time out of business hours on business days (Monday to Friday, from 6 pm to 12 am).
sales_percent_increase: the sales percentage that might be increased if response times improve; provided that, response_time is over 60 in any segment, except for Total that does not have this parameter.

Note:
Please take into account that information is updated once a day.
In case the queried seller does not have questions about his/her items, the response will be Not Found 404.
Example:

{
 "message": "Response time not found for user id: 276274936",
 "error": "not_found",
 "status": 404,
 "cause": []
}

Get questions detail

Example:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/questions/3957150025

Response:

{
  "id": 3957150025,
  "answer": {
    "date_created": "2016-02-29T11:21:27.000-04:00",
    "status": "ACTIVE",
    "text": "Test answer..."
  },
  "date_created": "2016-02-29T11:19:42.000-04:00",
  "deleted_from_listing": false,
  "hold": false,
  "item_id": "MLA608007087",
  "seller_id": 202593498,
  "status": "ANSWERED",
  "text": "Test question.",
  "from": {
    "id": 207119838,
    "answered_questions": 1
  }
}

When working with questions is very useful to listen to Notifications since it enables you to have a real-time feed of events that occur regarding to them. Learn how to work with notifications. Note: To answer or ask questions, the maximum number of characters is 2,000.


Delete questions

If you have the need to delete a question an user made on your item just use the DELETE method with the question ID and the seller’s access token. Example:

curl -X DELETE -H 'Authorization: Bearer $ACCESS_TOKEN' 'https://api.mercadolibre.com/questions/${question_id}'

Response:

[
  "Question deleted."
]

If you wish, you can block users to prevent them from asking questions.


Notifications

Subscribe to question notifications through the questions topic. Learn more about question notifications.


Error codes reference

Error Description Possible solution
invalid_questionThe question is invalid. Can not answer question. The parameter question_id must be a integer number. (To search your question call the resource/questions/search).
invalid_post_bodyInvalid JSON. Valid attributes are: {0}. Invalid parameters. Expected parameters are question_id and text.

 

Visits by announcement

To consult as visits by announcement, use or article about or Resource Visits.


Next topic:
Manage sales.