Documentação do Mercado Livre

Confira todas as informações necessárias sobre as APIs Mercado Livre.
circulos azuis em degrade

Documentação do

Última atualização em 21/12/2022

Manage questions & contacts

When users browse classified items (real state, cars and services), they are able to contact the item’s owner through a form displayed on the listing or they can see the owner’s phone (see phone). In the event of a question, when made, it is automatically sent to the message inbox, within the client account in Mercado Libre. It is very important that your integration reads the questions, and also enables users to answer them through your system. In order to learn how to manage questions and answers (leads), check our guide of Questions and answers management. Here you will find all the necessary content to execute the integration of leads of Mercado Libre. Apart from the guide mentioned above, you can check data on questions and record the number of clicks the option “See telephone” got. These methods are detailed below. Remember that the publications with the button "I want to be contacted", when this is pressed by the buyer, a new question will be generated in the same API of questions and answers.


Parameters description

Tipo Parámetro Descripción
Integer {userId} User ID.
Integer {itemId} Item ID.
Date {dateFrom} Date, ISO format, that defines the start of the query.
Date {dateTo} Date, ISO format, that defines the end of the query.
Integer {limit} Optional. Max amount of items to return.
Integer {offset} Optional. Pagination.
Integer {last} Optional. Denotes how many hours/days back the sample will cover.
String {unit} Query unit, possible values: [ “day” , “hour”].
Date {ending} Optional. Date, ISO format, which states the time of completion of the sample, by default it’s the current date and time.
String {order} Optional. It’s sorts the results by date: [“desc”, “asc”] (by default it’s “asc”).

Total questions

You can get the total questions an specific item had, or the total questions a seller had in all of his items between a date range.


By item

curl -X GET https://api.mercadolibre.com/items/$ITEM_ID/contacts/questions?date_from=$DATE_FROM&date_to=$DATE_TO

By user

curl -X GET https://api.mercadolibre.com/users/$USER_ID/contacts/questions?date_from=$DATE_FROM&date_to=$DATE_TO

Example:

curl -X GET https://api.mercadolibre.com/items/MLV421672596/contacts/questions?date_from=2014-08-01T00:00:00.000-03:00&date_to=2014-08-02T23:59:59.999

Response:

{
    "date_from": "2014-08-01T00:00:00.000-03:00",
    "date_to": "2014-08-02T23:59:59.999",
    "item_id": "MLV421672596",
    "total": 9
}

Questions dated

This resource let you get the questions on an specific item or by seller for a certain time window. Besides, you get details about contacts made on guest mode (unlogged or unregistered users) in between time intervals, by hour or by day.


By item

curl -X GET https://api.mercadolibre.com/items/$ITEM_ID/contacts/questions/time_window?last=$LAST&unit=$UNIT
If you need to concatenate items, do the following:
curl -X GET https://api.mercadolibre.com/items/$ITEM_ID/contacts/questions/time_window?ids=$ID1,ID2&last=$LAST&unit=$UNIT&ending=$ENDING_DATE

By user

curl -X GET https://api.mercadolibre.com/users/$USER_ID/contacts/questions/time_window?last=$LAST&unit=$UNIT

Example:

curl -X GET https://api.mercadolibre.com/items/MLA510272257/contacts/questions/time_window?last=2&unit=hour

Response:

{
    "item_id": "MLA510272257",
    "total": 0,
    "date_from": "2014-08-06T12:00:00Z",
    "date_to": "2014-08-06T14:00:00Z",
    "last": 2,
    "unit": "hour",
    "results": [
        {
            "date": "2014-08-06T12:00:00Z",
            "total": 0
        },
        {
            "date": "2014-08-06T13:00:00Z",
            "total": 0
        }
    ]
}

Contact phone totals

You can get the total times the ‘See phone’ option was clicked on an item or for every item of an user between date ranges.


By item

curl -X GET https://api.mercadolibre.com/items/$ITEM_ID/contacts/phone_views?date_from=$DATE_FROM&date_to=$DATE_TO

By user

curl -X GET https://api.mercadolibre.com/users/$USER_ID/contacts/phone_views?date_from=$DATE_FROM&date_to=$DATE_TO

Example:

curl -X GET https://api.mercadolibre.com/users/52366166/contacts/phone_views?date_from=2014-05-28T00:00:00.000-03:00&date_to=2014-05-29T23:59:59.999

Response:

{
    "date_from": "2014-05-28T00:00:00.000-03:00",
    "date_to": "2014-05-29T23:59:59.999",
    "total": 71,
    "user_id": "52366166"
}


Contacts phone dated

You can get the total times the ‘See phone’ option was clicked on an item or for every item of an user for a certain time window. Besides providing the total visits, the information is detailed and grouped by time intervals.


By item

curl -X GET https://api.mercadolibre.com/items/$ITEM_ID/contacts/phone_views/time_window?last=$LAST&unit=$UNIT

If you need to concatenate items:

curl -X GET https://api.mercadolibre.com/items/contacts/phone_views/time_window?ids=$ID1,ID2&last=$LAST&unit=$UNIT&ending=$ENDING_DATE


By user

curl -X GET https://api.mercadolibre.com/users/$USER_ID/contacts/phone_views/time_window?last=$LAST&unit=$UNIT

Example:

curl -X GET https://api.mercadolibre.com/items/contacts/phone_views/time_window?ids=MLA510272257,MLA489747739&last=2&unit=hour&ending=2014-05-28T00:00:00.000-03:00

Response:


  [
      {
          "item_id": "MLA510272257",
          "total": 0,
          "date_from": "2014-05-28T02:00:00Z",
          "date_to": "2014-05-28T04:00:00Z",
          "last": 2,
          "unit": "hour",
          "results": [
              {
                  "date": "2014-05-28T02:00:00Z",
                  "total": 0
              },
              {
                  "date": "2014-05-28T03:00:00Z",
                  "total": 0
              }
          ]
      },
      {
          "item_id": "MLA489747739",
          "total": 0,
          "date_from": "2014-05-28T02:00:00Z",
          "date_to": "2014-05-28T04:00:00Z",
          "last": 2,
          "unit": "hour",
          "results": [
              {
                  "date": "2014-05-28T02:00:00Z",
                  "total": 0
              },
              {
                  "date": "2014-05-28T03:00:00Z",
                  "total": 0
              }
          ]
      }
  ]
  
Structure Errors 400:

Response:

{
 "code":"bad_request",
 "message":"error decoding 'user_id'. It must be string or number"
}

Clicks on Whatsapp button

You can access the total number of times the Whatsapp option was clicked for an item or for each item for a user in date ranges.


By item

Request:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN'  https://api.mercadolibre.com/items/$ITEM_ID/contacts/whatsapp?date_from=$DATE_FROM&date_to=$DATE_TO

Example:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN'  https://api.mercadolibre.com/items/MLA1116194549/contacts/whatsapp?date_from=2014-05-28T00:00:00.000-03:00&date_to=2014-05-29T23:59:59.999

Response:

{
    "total": 3,
    "date_from": "2022-10-14T17:01:00Z",
    "date_to": "2022-10-29T17:01:00Z",
    "item_id": "MLA1116194549"
}


By user

Request:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN'  https://api.mercadolibre.com/users/$USER_ID/contacts/phone_views?date_from=$DATE_FROM&date_to=$DATE_TO

Example:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN'  https://api.mercadolibre.com/users/127232529/contacts/phone_views?date_from=2014-05-28T00:00:00.000-03:00&date_to=2014-05-29T23:59:59.999

Response:

{
    "total": 174,
    "date_from": "2022-10-14T17:01:00Z",
    "date_to": "2022-10-29T17:01:00Z",
    "user_id": "127232529"
}


WhatsApp button clicks with date

You can access the total number of times the WhatsApp option was clicked for a publication or for each publication of a user during a certain period of time. In addition to providing total visits, the information is detailed and grouped by time interval.


By item

Request:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/items/$ITEM_ID/contacts/whatsapp/time_window?unit=$UNIT&last=$LAST


If you need to concatenate items:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/items/contacts/whatsapp/time_window?ids=$IDS&unit=$UNIT&last=$LAST&ending=$ENDING


Example:


  curl --location --request GET 'https://api.mercadolibre.com/items/contacts/whatsapp/time_window?ids=MLA1116194549,MLC1071924795&unit=day&last=3&ending=2022-10-23T04:00:00Z'


Response:


 
[
{
    "total": 3,
    "last": "5",
    "unit": "day",
    "date_from": "2022-10-24T04:00:00Z",
    "date_to": "2022-10-29T04:00:00Z",
    "item_id": "MLA1116194549",
    "results": [
        {
            "date": "2022-10-24T04:00:00Z",
            "total": 2
        },
        {
            "date": "2022-10-25T04:00:00Z",
            "total": 0
        },
        {
            "date": "2022-10-26T04:00:00Z",
            "total": 0
        },
        {
            "date": "2022-10-27T04:00:00Z",
            "total": 0
        },
        {
            "date": "2022-10-28T04:00:00Z",
            "total": 1
        }
    ]
},
{
    "total": 19,
    "last": "5",
    "unit": "day",
    "date_from": "2022-10-24T04:00:00Z",
    "date_to": "2022-10-29T04:00:00Z",
    "item_id": "MLC1071924795",
    "results": [
        {
            "date": "2022-10-24T04:00:00Z",
            "total": 5
        },
        {
            "date": "2022-10-25T04:00:00Z",
            "total": 6
        },
        {
            "date": "2022-10-26T04:00:00Z",
            "total": 3
        },
        {
            "date": "2022-10-27T04:00:00Z",
            "total": 3
        },
        {
            "date": "2022-10-28T04:00:00Z",
            "total": 2
        }
    ]
}
]

Parameters

ids:required. Indicates the ids of the Items when the search is for multiple items, separated by comma.

last: required. Denotes how many hours/days back the sample will cover.

unit: required. Query unit, possible values: ["day", "hour"].

ending: optional. Date, in ISO format, that sets the ending time of the sample; default is the current date and time.


By user

Request:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/users/$USER_ID/contacts/whatsapp/time_window?unit=$UNIT&last=$LAST

Example:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/users/127232529/contacts/whatsapp/time_window?unit=$UNIT&last=$LAST

Response:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN'
 {
    "total": 31,
    "last": "3",
    "unit": "day",
    "date_from": "2022-10-26T04:00:00Z",
    "date_to": "2022-10-29T04:00:00Z",
    "user_id": "127232529",
    "results": [
        {
            "date": "2022-10-26T04:00:00Z",
            "total": 7
        },
        {
            "date": "2022-10-27T04:00:00Z",
            "total": 16
        },
        {
            "date": "2022-10-28T04:00:00Z",
            "total": 8
        }
    ]
}

Visits per publication

To check the visits per posting, use the article Visits Resource.


Next topic:
Subscribe to our feeds.