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.

Contents:

→Search questions
    ↳Questions received by a seller
    ↳Questions received on an item
    ↳Questions made by a user on an item
    ↳Questions by ID
→Attributes description
→Allowed methods
→Ask questions
→Answer questions
→Response time
→Parameters description
→Get questions detail
→Delete questions
→Questions blacklist
→Send users to questions blacklist
→Get questions blacklist
→Remove a user from blacklist
→How to be aware of a question?
→Receiving a notification
→Error codes reference
→Visits by announcement


Search questions

There are a few ways to search questions.


Questions received by a seller

curl -X GET -H "Content-Type: application/json" 'https://api.mercadolibre.com/questions/search?seller_id={Seller_id}&access_token=$ACCESS_TOKEN'

Questions received on an item

curl -X GET -H "Content-Type: application/json" 'https://api.mercadolibre.com/questions/search?item={Item_id}&access_token=$ACCESS_TOKEN'

Questions made by a user on an item

curl -X GET -H "Content-Type: application/json" 'https://api.mercadolibre.com/questions/search?item={Item_id}&from={Cust_id}'&access_token=$ACCESS_TOKEN'

Questions by ID

curl -X GET -H "Content-Type: application/json" 'https://api.mercadolibre.com/questions/{question_id}?access_token=$ACCESS_TOKEN'
Note:
Bear in mind that if you query without an access token and the question status is DELETED or BANNED, you will get “question not found” Let’s take a look at the attributes we’ll found on the Search Questions resource.


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 "Content-Type: application/json" -d '{
   "text":"Test question.",
   "item_id":"MLA608007087"
}' https://api.mercadolibre.com/questions/MLA608007087?access_token=$ACCESS_TOKEN

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 'https://api.mercadolibre.com/questions/search?item_id=ITEM_ID&access_token=XXXX'

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 ""Content-Type: application/json"" -d '{
	"question_id": 3957150025,
	"text":"Test answer..."
}' https://api.mercadolibre.com/answers?access_token=$ACCESS_TOKEN

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 https://api.mercadolibre.com/users/$USER_ID/questions/response_time?access_token=$ACCESS_TOKEN

Example:

https://api.mercadolibre.com/users/1111111/questions/response_time?access_token=$ACCESS_TOKEN

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 https://api.mercadolibre.com/questions/3957150025?access_token=$ACCESS_TOKEN

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 'https://api.mercadolibre.com/questions/${question_id}?access_token=$ACCESS_TOKEN'

Response:

[
  "Question deleted."
]

Questions blacklist

Managing the question’s blacklist allows you to block users from asking questions on your items. Later on, you can remove them from the blacklist to allow questions. This blacklist is user-based and the seller has full control over the list of users on it. Let’s see a few examples of thing you can do with it.


Send users to questions blacklist

curl -X POST -H "Content-Type: application/json" -d
'{
  "user_id": blocked user id
}'
https://api.mercadolibre.com/users/$SELLER_ID/questions_blacklist?access_token=$ACCESS_TOKEN

Get questions blacklist

curl -X GET 'https://api.mercadolibre.com/users/$SELLER_ID/questions_blacklist?access_token=$ACCESS_TOKEN '

Remove a user from blacklist

curl -X DELETE 'https://api.mercadolibre.com/users/$SELLER_ID/questions_blacklist/$USER_ID?access_token=$ACCESS_TOKEN'

Perfect, now you know everything there’s is to know about our question blacklist. We hope it comes handy if it’s needed.


How to be aware of a question?

A question on an item is an event that occurs on MercadoLibre's side, so you'll need to subscribe to our questions feed to be aware in real time when that event occurs. First of all, we have to configure our application to be capable of getting notifications. This can be done by subscribing your application to questions notifications. Go to our Application Manager (http://applications.mercadolibre.com) and edit your application Notifications Settings. For more information about creating and configuring a new app, please check this guide. You must choose a Callback URL: configure the public URL of your domain where you want to receive all the notifications from MercadoLibre. E.g.: "https://backend.soleorigami.com/notification". Also you need to specify which “topic” you will list, in this case you must select questions. This configuration allows you to interact with MercadoLibre notifications. All the events regarding new questions will be notified to your callback URL.


Receiving a notification

Mercado Libre will send you notifications through a POST message with information inside items body. The most important attribute in the message is the user_id which is related to the notification and second one is the resource. The resource is the element that has been updated or it has been created.

{
  "user_id": 1234,
  "resource": "/questions/139876",
  "topic": "questions",
  "received": "2011-10-19T16:38:34.425Z",
  "sent" : "2011-10-19T16:40:34.425Z",
}

After receiving the notification you must send an acknowledgment (ACK 200) to MercadoLibre in order to stop receiving the notification. Check our Notifications tutorial to know further.


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.

Be part of our community