Documentación Mercado Libre
Descubre toda la información que debes conocer sobre las APIs de Mercado Libre.Documentación
Manage users
Consultar mis datos personales
If you are logged into Mercado Libre and have a token, you can make the following call to retrieve information related to your user:
Example:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/users/me
Response:
{
"id": 202593498,
"nickname": "TETE2870021",
"registration_date": "2016-01-06T11:31:42.000-04:00",
"country_id": "AR",
"address": {
"state": "AR-C",
"city": "Palermo"
},
"user_type": "real_estate_agency",
"tags": [
"real_estate_agency",
"test_user",
"user_info_verified"
],
"logo": null,
"points": 100,
"site_id": "MLA",
"permalink": "http://perfil.mercadolibre.com.ar/TETE2870021",
"seller_reputation": {
"level_id": null,
"power_seller_status": null,
"transactions": {
"period": "historic",
"total": 0,
"completed": 0,
"canceled": 0,
"ratings": {
"positive": 0,
"negative": 0,
"neutral": 0
}
}
},
"buyer_reputation": {
"tags": [
]
},
"status": {
"site_status": "active"
}
}
As shown in the result, this is a test user from the real estate sector, active on the Argentine site since January 6, 2016, with no significant reputation data to date.
If you don't have the ID, but you know the nickname and the site to which a user belongs, you can retrieve it with the following search:
Call:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/sites/{Site_id}/search?nickname={Nickname}
Example:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/sites/MLA/search?nickname=TETE2870021
Response:
{
"site_id": "MLA",
"seller": {
"id": 202593498,
"seller_reputation": {
"power_seller_status": null
},
"real_estate_agency": false,
"car_dealer": false,
"tags": []
}
}
If you want to query third-party user data, you can identify two levels of information: public data, which you can find by browsing the MercadoLibre profile of any other user, and private data, which will not be visible unless you have user permissions and a valid token to act on their behalf. In both cases, the first thing you need to know is the user's ID.
How to obtain a User Id
If you don't have the ID, but you know the nickname and the site to which a user belongs, you can obtain their ID with the following search:
Call:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/sites/MLA/search?nickname=TETE2870021
Example:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/sites/MLA/search?nickname=TETE2870021
Response:
{
"site_id": "MLA",
"seller": {
"id": 202593498,
"seller_reputation": {
"power_seller_status": null
},
"real_estate_agency": false,
"car_dealer": false,
"tags": []
},
"paging": {
"total": 2,
"offset": 0,
"limit": 50
},
"results": [
{
"id": "MLA598903377",
"site_id": "MLA",
"title": "Test Item - Do Not Bid",
"seller": {
"id": 202593498,
"power_seller_status": null,
"car_dealer": false,
"real_estate_agency": false,
"tags": []
},
"price": 200,
"currency_id": "ARS",
"available_quantity": 1,
"sold_quantity": 0,
"buying_mode": "buy_it_now",
"listing_type_id": "bronze",
"stop_time": "2016-03-06T17:16:49.000Z",
"condition": "new",
"permalink": "http://articulo.mercadolibre.com.ar/MLA-598903377-test-item-nao-ofertar-_JM",
"thumbnail": "http://mla-s2-p.mlstatic.com/546311-MLA20539702714_012016-I.jpg",
"accepts_mercadopago": true,
"installments": {
"quantity": 6,
"amount": 42.33,
"currency_id": "ARS"
},
"address": {
"state_id": "AR-C",
"state_name": "Capital Federal",
"city_id": "",
"city_name": "Palermo"
},
"shipping": {
"free_shipping": false,
"mode": "not_specified"
},
"seller_address": {
"id": 175597910,
"comment": "",
"address_line": "",
"zip_code": "",
"country": {
"id": "AR",
"name": "Argentina"
},
"state": {
"id": "AR-C",
"name": "Capital Federal"
},
"city": {
"id": "",
"name": "Palermo"
},
"latitude": -34.571148,
"longitude": -58.423298
},
"attributes": [],
"original_price": null,
"category_id": "MLA374515",
"official_store_id": null
},
{
"id": "MLA599121050",
"site_id": "MLA",
"title": "Test Item - Do Not Bid",
"seller": {
"id": 202593498,
"power_seller_status": null,
"car_dealer": false,
"real_estate_agency": false,
"tags": []
},
"price": 1000,
"currency_id": "ARS",
"available_quantity": 1,
"sold_quantity": 0,
"buying_mode": "buy_it_now",
"listing_type_id": "bronze",
"stop_time": "2016-03-07T20:12:41.000Z",
"condition": "new",
"permalink": "http://articulo.mercadolibre.com.ar/MLA-599121050-item-de-test-no-ofertar-_JM",
"thumbnail": "http://mla-s2-p.mlstatic.com/493311-MLA20538550251_012016-I.jpg",
"accepts_mercadopago": true,
"installments": {
"quantity": 6,
"amount": 211.65,
"currency_id": "ARS"
},
"address": {
"state_id": "AR-C",
"state_name": "Capital Federal",
"city_id": "",
"city_name": "Palermo"
},
"shipping": {
"free_shipping": false,
"mode": "not_specified"
},
"seller_address": {
"id": 175597910,
"comment": "",
"address_line": "",
"zip_code": "",
"country": {
"id": "AR",
"name": "Argentina"
},
"state": {
"id": "AR-C",
"name": "Capital Federal"
},
"city": {
"id": "",
"name": "Palermo"
},
"latitude": -34.571148,
"longitude": -58.423298
},
"attributes": [],
"original_price": null,
"category_id": "MLA90105",
"official_store_id": null
}
],
"secondary_results": [],
"related_results": [],
"sort": {
"id": "relevance",
"name": "More relevant"
},
"available_sorts": [
{
"id": "price_asc",
"name": "Lower price"
},
{
"id": "price_desc",
"name": "Higher price"
}
],
"filters": [],
"available_filters": [
{
"id": "category",
"name": "Categories",
"type": "text",
"values": [
{
"id": "MLA1648",
"name": "Computers",
"results": 1
},
{
"id": "MLA1430",
"name": "Clothing and Accessories",
"results": 1
}
]
},
{
"id": "state",
"name": "Location",
"type": "text",
"values": [
{
"id": "TUxBUENBUGw3M2E1",
"name": "Capital Federal",
"results": 2
}
]
},
{
"id": "accepts_mercadopago",
"name": "MercadoPago filter",
"type": "boolean",
"values": [
{
"id": "yes",
"name": "With MercadoPago",
"results": 2
}
]
},
{
"id": "installments",
"name": "Payment",
"type": "text",
"values": [
{
"id": "yes",
"name": "Installments",
"results": 2
},
{
"id": "no_interest",
"name": "Interest-free",
"results": 0
}
]
},
{
"id": "condition",
"name": "Condition filter",
"type": "text",
"values": [
{
"id": "new",
"name": "New",
"results": 2
}
]
},
{
"id": "buying_mode",
"name": "Buying mode filter",
"type": "text",
"values": [
{
"id": "buy_it_now",
"name": "Buy it now",
"results": 2
}
]
},
{
"id": "has_pictures",
"name": "Items with images filter",
"type": "boolean",
"values": [
{
"id": "yes",
"name": "With pictures",
"results": 2
}
]
}
]
}
Query public information of a user
Alright, now that you have the user ID, you can make the call to the users resource like this and get the public information of the user you want:
Call:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/users/{User_id}
Example:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/users/205159033
Response:
{
"id": 205159033,
"nickname": "TETE4358231",
"registration_date": "2016-02-04T13:49:09.000-04:00",
"country_id": "AR",
"address": {
"state": "AR-C",
"city": "Palermo"
},
"user_type": "car_dealer",
"tags": [
"car_dealer",
"test_user",
"user_info_verified"
],
"logo": null,
"points": 100,
"site_id": "MLA",
"permalink": "http://perfil.mercadolibre.com.ar/TETE4358231",
"seller_reputation": {
"level_id": null,
"power_seller_status": null,
"transactions": {
"period": "historic",
"total": 0,
"completed": 0,
"canceled": 0,
"ratings": {
"positive": 0,
"negative": 0,
"neutral": 0
}
}
},
"buyer_reputation": {
"tags": []
},
"status": {
"site_status": "active"
}
}
Consulting private information of a user who has accepted the use of my application
To obtain the private data of a user, you just need to append the user's ACCESS_TOKEN at the end of the previous call.
Call:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/users/{User_id}
Example:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/users/202593498
Response:
{
"id": 202593498,
"nickname": "TETE2870021",
"registration_date": "2016-01-06T11:31:42.000-04:00",
"first_name": "Test",
"last_name": "Test",
"country_id": "AR",
"email": "test_user_50698062@testuser.com",
"identification": {
"type": "DNI",
"number": "1111111"
},
"address": {
"state": "AR-C",
"city": "Palermo",
"address": "Test Address 123",
"zip_code": "1414"
},
"phone": {
"area_code": "01",
"number": "1111-1111",
"extension": "",
"verified": false
},
"alternative_phone": {
"area_code": "",
"number": "",
"extension": ""
},
"user_type": "real_estate_agency",
"tags": [
"real_estate_agency",
"test_user",
"user_info_verified"
],
"logo": null,
"points": 100,
"site_id": "MLA",
"permalink": "http://perfil.mercadolibre.com.ar/TETE2870021",
"seller_experience": "ADVANCED",
"seller_reputation": {
"level_id": null,
"power_seller_status": null,
"transactions": {
"period": "historic",
"total": 0,
"completed": 0,
"canceled": 0,
"ratings": {
"positive": 0,
"negative": 0,
"neutral": 0
}
}
},
"buyer_reputation": {
"canceled_transactions": 0,
"transactions": {
"period": "historic",
"total": null,
"completed": null,
"canceled": {
"total": null,
"paid": null
},
"unrated": {
"total": null,
"paid": null
},
"not_yet_rated": {
"total": null,
"paid": null,
"units": null
}
},
"tags": []
},
"status": {
"site_status": "active",
"list": {
"allow": true,
"codes": [],
"immediate_payment": {
"required": false,
"reasons": []
}
},
"buy": {
"allow": true,
"codes": [],
"immediate_payment": {
"required": false,
"reasons": []
}
},
"sell": {
"allow": true,
"codes": [],
"immediate_payment": {
"required": false,
"reasons": []
}
},
"billing": {
"allow": true,
"codes": []
},
"mercadopago_tc_accepted": true,
"mercadopago_account_type": "personal",
"mercadoenvios": "not_accepted",
"immediate_payment": false,
"confirmed_email": false,
"user_type": "eventual",
"required_action": ""
},
"credit": {
"consumed": 100,
"credit_level_id": "MLA1"
}
}
As you can see, this time you got more user data: Their full name, email, phone, address, etc. Please do not disclose this data publicly as it may compromise the user.
Update user information
You can use our resources to update your user information after registration. This is important because at this stage you are not required to complete your address or personal identification, but they must be completed in order to list items on MercadoLibre. To update your user information, follow the example:
PUT:
curl -X PUT -H 'Authorization: Bearer $ACCESS_TOKEN' -H "Content-Type: application/json" -d
{
"identification_type": "DNI",
"identification_number": "33333333",
"address": "Triunvirato 5555",
"state":"AR-C",
"city":"Capital Federal",
"zip_code": "1431",
"phone":{
"area_code":"011",
"number":"4444-4444",
"extension":"001"
},
"first_name":"Pedro",
"last_name": "Picapiedras",
"company":{
"corporate_name":"Acme",
"brand_name":"Acme Company"
},
"mercadoenvios": "accepted"
}
https://api.mercadolibre.com/users/{User_id}
Congratulations, you have updated your user information! Remember to only send the fields you want to update.
User Seller S = P (Sell Equal Pay)
If you want all your transactions to be exclusively through Mercado Pago, you should indicate in your user information that you only accept the S = P (Sell Equal Pay) mode. This will disable the "Agreement with the seller" option.
PUT:
curl -XPUT -H 'Authorization: Bearer $ACCESS_TOKEN' -H "Content-type: application/json" -d
'{
"reason": "by_user"
}'
https://api.mercadolibre.com/users/{user_id}/immediate_payment
If you want to stop accepting Mercado Pago as the only option, you can remove the mark as follows:
curl -X DELETE -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/users/{user_id}/immediate_payment/by_user
Common Error Codes
206 – Partial content: In some cases, the API resource for users will return a 206 - Partial content code. This happens when the request for some data fails (e.g., user reputation), to let you know that you are receiving an incomplete response.
I want to register as a dealer (Optional)
If you are a seller interested in registering as a dealer on MercadoLibre.com, you can do so directly on our Marketplace. This process is exclusively for sellers who wish to operate as dealers.
To get started, go to the section: Help > My Account Settings > Register as a dealer or vehicle store on the Marketplace of your country of choice according to the image below:
Afterwards, you will be redirected to a form that must be completed with the correct information. We have special packages for your business! Check the available packages for stores.
Next topic: Manage packages
Related article: Learn how to manage user's addresses.