Manage users

If you registered your application and authenticated, the next step is to learn how to work with users (sellers and buyers).
There are 2 types of users in Global Selling:

  • Global user: is the that has the login to Global Selling and also the grants (get access token) to operate on marketplaces users. Per account, you can have a global user and one or more marketplaces users.
  • Marketplace user: each marketplace user corresponds to each local operation (i.e: Mexico Remote, Mexico Fulfillment, Brazil or Chile).

Global Selling Open Platform allows the integrator to operate over all these accounts with just one access token. The operations for each marketplace user can be managed using the global user’s access token.



*In Mercado Libre México you can have 2 (two) marketplaces users types: Mexico Remote and Mexico Fulfillment.


Contents

→Get my personal information
→Get public global user information
→Get private global user information
→Update global user information
→Common error codes


Get my personal information

If you are logged in Mercado Libre and have a token, you will be able to make the request below and learn about your user-related information:

Request:

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

Response:

 
{
    "id": 526124693,
    "nickname": "CNMOLMEDOTESTCBT",
    "registration_date": "2020-02-12T09:43:00.000-04:00",
    "first_name": "molmedotestcbt",
    "last_name": "MolmedoTestCBTOP",
    "gender": "",
    "country_id": "CN",
    "email": "6bdb83c0d0@emailtown.club",
    "identification": {
        "number": "12345678",
        "type": "TaxID"
    },
    "internal_tags": [
        "developer",
        "cbt_merchant",
        "global_seller"
    ],
    "address": {
        "address": "Calle falsa 212",
        "city": "Chongqing",
        "state": "CHONGQING",
        "zip_code": "22344"
    },
    "phone": {
        "area_code": null,
        "extension": "",
        "number": "532423424242",
        "verified": false
    },
    "alternative_phone": {
        "area_code": "",
        "extension": "",
        "number": ""
    },
    "user_type": "normal",
    "tags": [
        "normal",
        "messages_as_seller"
    ],
    "logo": null,
    "points": 0,
    "site_id": "CBT",
    "permalink": "nullCNMOLMEDOTESTCBT",
    "shipping_modes": [
        "custom",
        "not_specified"
    ],
    "seller_experience": "ADVANCED",
    "bill_data": {
        "accept_credit_note": null
    },
    "seller_reputation": {
        "level_id": null,
        "power_seller_status": null,
        "transactions": {
            "canceled": 0,
            "completed": 0,
            "period": "historic",
            "ratings": {
                "negative": 0,
                "neutral": 0,
                "positive": 0
            },
            "total": 0
        },
        "metrics": {
            "sales": {
                "period": "60 months",
                "completed": 0
            },
            "claims": {
                "period": "60 months",
                "rate": 0,
                "value": 0
            },
            "delayed_handling_time": {
                "period": "60 months",
                "rate": 0,
                "value": 0
            },
            "cancellations": {
                "period": "60 months",
                "rate": 0,
                "value": 0
            }
        }
    },
    "buyer_reputation": {
        "canceled_transactions": 0,
        "tags": [],
        "transactions": {
            "canceled": {
                "paid": null,
                "total": null
            },
            "completed": null,
            "not_yet_rated": {
                "paid": null,
                "total": null,
                "units": null
            },
            "period": "historic",
            "total": null,
            "unrated": {
                "paid": null,
                "total": null
            }
        }
    },
    "status": {
        "billing": {
            "allow": true,
            "codes": []
        },
        "buy": {
            "allow": true,
            "codes": [],
            "immediate_payment": {
                "reasons": [],
                "required": false
            }
        },
        "confirmed_email": false,
        "shopping_cart": {
            "buy": null,
            "sell": null
        },
        "immediate_payment": false,
        "list": {
            "allow": true,
            "codes": [],
            "immediate_payment": {
                "reasons": [],
                "required": false
            }
        },
        "mercadoenvios": "not_accepted",
        "mercadopago_account_type": null,
        "mercadopago_tc_accepted": false,
        "required_action": null,
        "sell": {
            "allow": true,
            "codes": [],
            "immediate_payment": {
                "reasons": [],
                "required": false
            }
        },
        "site_status": "active",
        "user_type": null
    },
    "secure_email": "mmolmed.hgxgj0@mail.mercadolibre.com",
    "company": {
        "brand_name": "molmedotestcbt",
        "city_tax_id": null,
        "corporate_name": "MolmedoTestCBTOP",
        "identification": "12345678",
        "state_tax_id": null,
        "soft_descriptor": null
    },
    "credit": {
        "consumed": 0,
        "credit_level_id": "CBT5",
        "rank": "newbie"
    },
    "pwd_generation_status": "none",
    "context": {
        "device": "desktop",
        "flow": "cbt-merchant",
        "source": "mercadolibre"
    }
}

Get public global user information

Now, as you already know the user ID, you can make a request to the users’ resource as shown below in order to get the public information of the user you want:

Request:

curl -X GET https://api.mercadolibre.com/users/$USER_ID

Example:

curl -X GET https://api.mercadolibre.com/users/202593498

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": "normal",
  "tags": [
  "normal",
  "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"
  }
}

Get private global user information

Now, as you already know the user ID, you can make a request to the users’ resource as shown below in order to get the public information of the user you want:

Request:

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

Example:

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

Response:

{
    "id": 526124693,
    "nickname": "CNMOLMEDOTESTCBT",
    "registration_date": "2020-02-12T09:43:00.000-04:00",
    "first_name": "molmedotestcbt",
    "last_name": "MolmedoTestCBTOP",
    "gender": "",
    "country_id": "CN",
    "email": "6bdb83c0d0@emailtown.club",
    "identification": {
        "number": "12345678",
        "type": "TaxID"
    },
    "address": {
        "address": "false street 1212",
        "city": "Chongqing",
        "state": "CHONGQING",
        "zip_code": "22344"
    },
    "phone": {
        "area_code": null,
        "extension": "",
        "number": "5032423424242",
        "verified": false
    },
    "alternative_phone": {
        "area_code": "",
        "extension": "",
        "number": ""
    },
    "user_type": "normal",
    "tags": [
        "normal",
        "messages_as_seller"
    ],
    "logo": null,
    "points": 0,
    "site_id": "CBT",
    "permalink": "nullCNMOLMEDOTESTCBT",
    "shipping_modes": [
        "custom",
        "not_specified"
    ],
    "seller_experience": "ADVANCED",
    "bill_data": {
        "accept_credit_note": null
    },
    "seller_reputation": {
        "level_id": null,
        "power_seller_status": null,
        "transactions": {
            "canceled": 0,
            "completed": 0,
            "period": "historic",
            "ratings": {
                "negative": 0,
                "neutral": 0,
                "positive": 0
            },
            "total": 0
        },
        "metrics": {
            "sales": {
                "period": "60 months",
                "completed": 0
            },
            "claims": {
                "period": "60 months",
                "rate": 0,
                "value": 0
            },
            "delayed_handling_time": {
                "period": "60 months",
                "rate": 0,
                "value": 0
            },
            "cancellations": {
                "period": "60 months",
                "rate": 0,
                "value": 0
            }
        }
    },
    "buyer_reputation": {
        "canceled_transactions": 0,
        "tags": [],
        "transactions": {
            "canceled": {
                "paid": null,
                "total": null
            },
            "completed": null,
            "not_yet_rated": {
                "paid": null,
                "total": null,
                "units": null
            },
            "period": "historic",
            "total": null,
            "unrated": {
                "paid": null,
                "total": null
            }
        }
    },
    "status": {
        "billing": {
            "allow": true,
            "codes": []
        },
        "buy": {
            "allow": true,
            "codes": [],
            "immediate_payment": {
                "reasons": [],
                "required": false
            }
        },
        "confirmed_email": false,
        "shopping_cart": {
            "buy": null,
            "sell": null
        },
        "immediate_payment": false,
        "list": {
            "allow": true,
            "codes": [],
            "immediate_payment": {
                "reasons": [],
                "required": false
            }
        },
        "mercadoenvios": "not_accepted",
        "mercadopago_account_type": null,
        "mercadopago_tc_accepted": false,
        "required_action": null,
        "sell": {
            "allow": true,
            "codes": [],
            "immediate_payment": {
                "reasons": [],
                "required": false
            }
        },
        "site_status": "active",
        "user_type": null
    },
    "secure_email": "mmolmed.hgxgj0@mail.com",
    "company": {
        "brand_name": "molmedotestcbt",
        "city_tax_id": "",
        "corporate_name": "MolmedoTestCBTOP",
        "identification": "12345678",
        "state_tax_id": "",
        "cust_type_id": "BU",
        "soft_descriptor": null
    },
    "credit": {
        "consumed": 0,
        "credit_level_id": "CBT5",
        "rank": "newbie"
    },
    "pwd_generation_status": "none",
    "context": {
        "device": "desktop",
        "flow": "cbt-merchant",
        "source": "mercadolibre"
    }
}

As you can see, this time you got more information about the user: full name, e-mail, telephone, address, etc. Please do not disclose this data since it may jeopardize the user.


Update global user information

To update your user information, follow the next request:

Request:

curl -X PUT https://api.mercadolibre.com/users/$USER_ID?access_token=$ACCESS_TOKEN

Example:

curl -X PUT -H "Content-Type: application/json" -d
{
    "first_name": "Mister X"
} 
https://api.mercadolibre.com/users/526124693?access_token=$ACCESS_TOKEN

Response:

{
    "user_id": 526124693
}

Remember to only send the fields you want to update.


Common error codes

206 - Partial content: in some cases users-api will return a status code 206. This is going to happen when the request to some of the data fails or couldn’t get (for example, user reputation), to make you aware that you’re getting an incomplete response.



Next: Application manager.