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
→Answer questions
→Get questions detail
→Delete questions
→How does your application know about any news on a question?
→Receiving a notification
→Error codes reference

Search questions

There are a few ways to search questions.

 

Questions received by a seller

Request:

curl -X GET https://api.mercadolibre.com/marketplace/questions/search?seller_id=$SELLER_ID&access_token=$ACCESS_TOKEN

Example:

curl -X GET https://api.mercadolibre.com/marketplace/questions/search?seller_id=523130418&access_token=$ACCESS_TOKEN

Response:

{
   "total": 80,
   "limit": 1,
   "questions": [
       {
           "id": 6789511129,
           "seller_id": 523130418,
           "text": "Ask from buyer",
           "text_translated": "Pregunta desde el comprador",
           "status": "ANSWERED",
           "item_id": "CBT910505150",
           "marketplace_item_id": "MLM755638064",
           "date_created": "2020-02-05T22:13:53.000-04:00",
           "hold": false,
           "deleted_from_listing": false,
           "answer": {
               "text": "Respuesta a question 6462231012",
               "text_translated": "answer to question 6462231012",
               "status": "ACTIVE",
               "date_created": "2020-02-05T22:27:23.052-04:00"
           },
           "from": {
               "id": 441782523
           },
           "site_id": "MLM"
       }
   ],
   "filters": {
       "limit": 1,
       "offset": 0,
       "is_admin": "false",
       "sorts": [],
       "caller": 523130418,
       "seller": 523130418
   },
   "available_filters": [
       {
           "id": "item",
           "name": "Item",
           "type": "text"
       },
       {
           "id": "from",
           "name": "From user id",
           "type": "number"
       },
       {
           "id": "totalDivisions",
           "name": "total divisions",
           "type": "number"
       },
       {
           "id": "division",
           "name": "Division",
           "type": "number"
       },
       {
           "id": "status",
           "name": "Status",
           "type": "text",
           "values": [
               "ANSWERED",
               "BANNED",
               "CLOSED_UNANSWERED",
               "DELETED",
               "DISABLED",
               "UNANSWERED",
               "UNDER_REVIEW"
           ]
       }
   ],
   "available_sorts": [
       "item_id",
       "from_id",
       "date_created",
       "seller_id"
   ]
}

Questions received on an item

Request:

curl -X GET https://api.mercadolibre.com/marketplace/questions/search?item=$ITEM_ID&access_token=$ACCESS_TOKEN

Example:

curl -X GET https://api.mercadolibre.com/marketplace/questions/search?item=CBT910505150&access_token=$ACCESS_TOKEN

Response:

{
   "total": 80,
   "limit": 1,
   "questions": [
       {
           "id": 6789511129,
           "seller_id": 523130418,
           "text": "Ask from buyer",
           "text_translated": "Pregunta desde el comprador",
           "status": "ANSWERED",
           "item_id": "CBT910505150",
           "marketplace_item_id": "MLM755638064",
           "date_created": "2020-02-05T22:13:53.000-04:00",
           "hold": false,
           "deleted_from_listing": false,
           "answer": {
               "text": "Respuesta a question 6462231012",
               "text_translated": "answer to question 6462231012",
               "status": "ACTIVE",
               "date_created": "2020-02-05T22:27:23.052-04:00"
           },
           "from": {
               "id": 441782523
           },
           "site_id": "MLM"
       }
   ],
   "filters": {
       "limit": 1,
       "offset": 0,
       "is_admin": "false",
       "sorts": [],
       "caller": 523130418,
       "seller": 523130418
   },
   "available_filters": [
       {
           "id": "item",
           "name": "Item",
           "type": "text"
       },
       {
           "id": "from",
           "name": "From user id",
           "type": "number"
       },
       {
           "id": "totalDivisions",
           "name": "total divisions",
           "type": "number"
       },
       {
           "id": "division",
           "name": "Division",
           "type": "number"
       },
       {
           "id": "status",
           "name": "Status",
           "type": "text",
           "values": [
               "ANSWERED",
               "BANNED",
               "CLOSED_UNANSWERED",
               "DELETED",
               "DISABLED",
               "UNANSWERED",
               "UNDER_REVIEW"
           ]
       }
   ],
   "available_sorts": [
       "item_id",
       "from_id",
       "date_created",
       "seller_id"
   ]
}

Questions made by a user on an item

Request:

curl -X GET https://api.mercadolibre.com/marketplace/questions/search?item=$ITEM_ID&from=$CUST_ID&access_token=$ACCESS_TOKEN

Example:

curl -X GET https://api.mercadolibre.com/marketplace/questions/search?item=CBT910505150&from=466076859&access_token=$ACCESS_TOKEN

Response:

{
    "total": 3,
    "limit": 50,
    "questions": [
        {
            "id": 6789374377,
            "seller_id": 523130418,
            "text": "other",
            "status": "ANSWERED",
            "item_id": "CBT910505150",
            "date_created": "2020-02-05T22:28:26.000-04:00",
            "hold": false,
            "deleted_from_listing": false,
            "answer": {
                "text": "answer to question 6462231012",
                "status": "ACTIVE",
                "date_created": "2020-02-05T22:28:55.739-04:00"
            },
            "from": {
                "id": 466076859,
                "answered_questions": 3
            }
        },
        {
            "id": 6796663991,
            "seller_id": 523130418,
            "text": "Another test",
            "status": "ANSWERED",
            "item_id": "CBT910505150",
            "date_created": "2020-02-10T10:54:05.000-04:00",
            "hold": false,
            "deleted_from_listing": false,
            "answer": {
                "text": "It is a new test message",
                "status": "ACTIVE",
                "date_created": "2020-02-10T10:55:41.264-04:00"
            },
            "from": {
                "id": 466076859,
                "answered_questions": 3
            }
        },
        {
            "id": 6802857141,
            "seller_id": 523130418,
            "text": "Test Message to Reply",
            "status": "ANSWERED",
            "item_id": "CBT910505150",
            "date_created": "2020-02-13T10:40:14.000-04:00",
            "hold": false,
            "deleted_from_listing": false,
            "answer": {
                "text": "It is a new test message",
                "status": "ACTIVE",
                "date_created": "2020-02-13T10:40:58.589-04:00"
            },
            "from": {
                "id": 466076859,
                "answered_questions": 3
            }
        }
    ],
    "filters": {
        "limit": 50,
        "offset": 0,
        "is_admin": false,
        "sorts": [],
        "caller": 523130418,
        "seller": 0
    },
    "available_filters": [
        {
            "id": "seller",
            "name": "Seller id",
            "type": "number"
        },
        {
            "id": "totalDivisions",
            "name": "total divisions",
            "type": "number"
        },
        {
            "id": "division",
            "name": "Division",
            "type": "number"
        },
        {
            "id": "status",
            "name": "Status",
            "type": "text",
            "values": [
                "ANSWERED",
                "BANNED",
                "CLOSED_UNANSWERED",
                "DELETED",
                "DISABLED",
                "UNANSWERED",
                "UNDER_REVIEW"
            ]
        }
    ],
    "available_sorts": [
        "item_id",
        "from_id",
        "date_created",
        "seller_id"
    ]
}

Questions by ID

Request:

curl -X GET https://api.mercadolibre.com/marketplace/questions/$QUESTION_ID?access_token=$ACCESS_TOKEN

Example:

curl -X GET https://api.mercadolibre.com/marketplace/questions/6891108811?access_token=$ACCESS_TOKEN

Response:

{
   "id": 6891108811,
   "seller_id": 523130418,
   "text": "Test Question 2",
   "text_translated": "Pregunta de prueba 2",
   "status": "ANSWERED",
   "item_id": "CBT911087484",
   "marketplace_item_id": "MLM763996017",
   "date_created": "2020-03-17T22:33:32.000-04:00",
   "hold": false,
   "deleted_from_listing": false,
   "answer": {
       "text": "answer from seller 5",
       "text_translated": "respuesta del vendedor 5",
       "status": "ACTIVE",
       "date_created": "2020-03-18T17:42:36.138-04:00"
   },
   "from": {
       "id": 441782523
   },
   "site_id": "MLM"
}


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 /marketplace/questions/:id Returns a question with that id.
POST /marketplace/answers/ POST an answer to a given question.
DELETE /questions/:id Deletes a question.

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.

 

Answer questions

When you have a large amount of items listed on Mercado Libre 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 https://api.mercadolibre.com/marketplace/questions/search?item_id=$ITEM_ID&access_token=$ACCESS_TOKEN

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...",
  "text_translated": "Translated answer..."
}' https://api.mercadolibre.com/marketplace/answers?access_token=$ACCESS_TOKEN

Response:

{
   "id": 6894368802,
   "seller_id": 523130418,
   "text": "Hello, I like the product, do home deliveries?",
   "status": "ANSWERED",
   "item_id": "CBT911112427",
   "date_created": "2020-03-20T09:15:01.000-04:00",
   "hold": false,
   "deleted_from_listing": false,
   "answer": {
       "text": "This is the answer from the seller",
       "status": "ACTIVE",
       "date_created": "2020-11-24T15:27:07.321-04:00",
       "text_translated": "Esta es la respuesta del vendedor"
   }
}

Get questions detail

Request:

curl -X GET https://api.mercadolibre.com/marketplace/questions/$QUESTION_ID?access_token=$ACCESS_TOKEN

Example:

curl -X GET https://api.mercadolibre.com/marketplace/questions/3957150025?access_token=$ACCESS_TOKEN

Response:

{
   "id": 6891108811,
   "seller_id": 523130418,
   "text": "Test Question 2",
   "text_translated": "Pregunta de prueba 2",
   "status": "ANSWERED",
   "item_id": "CBT911087484",
   "marketplace_item_id": "MLM763996017",
   "date_created": "2020-03-17T22:33:32.000-04:00",
   "hold": false,
   "deleted_from_listing": false,
   "answer": {
       "text": "answer from seller 5",
       "text_translated": "respuesta del vendedor 5",
       "status": "ACTIVE",
       "date_created": "2020-03-18T17:42:36.138-04:00"
   },
   "from": {
       "id": 441782523
   },
   "site_id": "MLM"
}

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.

Note:
To answer questions, the maximum number of characters is 2000.

 

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.

Request:

curl -X DELETE http://api.mercadolibre.com/marketplace/questions/$QUESTION_ID?access_token=$ACCESS_TOKEN

Example:

curl -X DELETE http://api.mercadolibre.com/marketplace/questions/6988272427?access_token=$ACCESS_TOKEN

Response:

[
    "Question deleted."
]

How does your application know about any news on a question?

A question on an item is an event that occurs on Global Selling 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 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": "/marketplace/questions/139876",
  "topic": "marketplace_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_question: The question is invalid. Can not answer question. The parameter question_id must be a integer number. (To search your question call the resource /marketplace/questions/search).
invalid_post_body: Invalid JSON. Valid attributes are: {0}. Invalid parameters. Expected parameters are question_id and text.

 

Next: Manage sales.