Documentación Mercado Libre
Descubre toda la información que debes conocer sobre las APIs de Mercado Libre.Documentación
Manage questions & contacts
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.