Documentation Mercado Libre

Check out all the necessary information about APIs Mercado Libre.
circulos azuis em degrade

Documentation

Last update 28/12/2022

Billing data

Important:
This feature isn't available in México, so we recommend using the Post-sale messages and choosing the “REQUEST_BILLING_INFO” template to request the billing information and attach the invoice.

To invoice a sale it’s necessary to have the buyer's data that is available within the Orders resource, more specifically using the /orders/order_id/billing_info resource.

Query billing data

To get the information about a buyer's billing data contained in an order, make the following request:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN'  https://api.mercadolibre.com/marketplace/orders/$ORDER_ID/billing_info

Example:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN'  https://api.mercadolibre.com/marketplace/orders/4469851203/billing_info

Response:

{
   "billing_info": {
       "doc_type": "RUT",
       "doc_number": "111112222",
       "additional_info": [
           {
               "type": "LAST_NAME",
               "value": "Test"
           },
           {
               "type": "FIRST_NAME",
               "value": "Test"
           },
           {
               "type": "DOC_TYPE",
               "value": "RUT"
           },
           {
               "type": "DOC_NUMBER",
               "value": "111112222"
           },
           {
               "type": "SITE_ID",
               "value": "MLC"
           }
       ]
   }
}

The Mercado Libre Brasil orders only return invoicing data under the following conditions:

  • Products with Pick up in Store, Fullfillment or CrossDocking.
  • Products from Tiendas Oficiales, Mercado Lideres.
  • Products with Global Selling.
  • Purchases con Garex.

Response: these examples are from persons categorized into: MLB Natural person/Legal entity.

MLB - Natural/physical person

{
   "billing_info": {
       "doc_type": "CPF",
       "doc_number": "15635614680",
       "additional_info": [
           {
               "type": "LAST_NAME",
               "value": "Test"
           },
           {
               "type": "DOC_TYPE",
               "value": "CPF"
           },
           {
               "type": "ZIP_CODE",
               "value": "04962010"
           },
           {
               "type": "NEIGHBORHOOD",
               "value": "Vila do Sol"
           },
           {
               "type": "SITE_ID",
               "value": "MLB"
           },
           {
               "type": "STREET_NAME",
               "value": "asd"
           },
           {
               "type": "CITY_NAME",
               "value": "São Paulo"
           },
           {
               "type": "FIRST_NAME",
               "value": "Test"
           },
           {
               "type": "DOC_NUMBER",
               "value": "15635614680"
           },
           {
               "type": "STREET_NUMBER",
               "value": "SN"
           },
           {
               "type": "STATE_NAME",
               "value": "São Paulo"
           }
       ]
   }
}
MLB - Legal Entity

{
  "billing_info": {
    "additional_info": [
      {
        "type": "DOC_NUMBER",
        "value": "30703088534"
      },
      {
        "type": "ZIP_CODE",
        "value": "1430"
      },
      {
        "type": "STATE_REGISTRATION",
        "value": "30703088534"
      },
      {
        "type": "TAXPAYER_TYPE_ID",
        "value": "IVA Responsable Inscripto"
      },
      {
        "type": "BUSINESS_NAME",
        "value": "Mercado Libre S.R.L"
      },
      {
        "type": "CITY_NAME",
        "value": "Saavedra"
      },
      {
        "type": "STREET_NAME",
        "value": "Arias"
      },
      {
        "type": "STREET_NUMBER",
        "value": "SN"
      },
      {
        "type": "COMMENT",
        "value": "7b"
      },
      {
        "type": "DOC_TYPE",
        "value": "CUIT"
      },
      {
        "type": "STATE_NAME",
        "value": "Capital Federal"
      },
      {
        "type": "SITE_ID",
        "value": "MLA"
      },
      {
        "type": "NEIGHBORHOOD",
        "value": "Divino"
      }
 ],
    "doc_number": "30703088534",
    "doc_type": "CUIT"
  }
}


Types and values ​​for additional_info

These are the possibles types and values ​​(type / value) for additional_info.

Natural person

first_name: the buyer's first name.
last_name: the buyer’s last name.
doc_type: the document type.
doc_number: the document number.
zip_code: the buyer's zip code.
street_name: the street name of the buyer's billing address.
street_number: the street number of the buyer's billing address, with possible values "SN" in case of street without number.
city_name: city of the buyer's billing address.


Legal Entity

business_name: name of the purchasing legal entity
taxpayer_type_id: position of the legal entity

For MLB: Contribuinte (Taxpayer) or Não contribuinte (Non-taxpayer) state_registration
doc_type: the document type.
doc_number: the document number.
zip_code: the buyer's zip code.
street_name: the street name of the buyer's billing address.
street_number: the street number of the buyer's billing address, with possible values "SN" in case of street without number.
comment: any extra comment of the buyer's billing address, like number apartment.
state_name: state of the buyer's billing address.
city_name: city of the buyer's billing address.


Possible DOC_TYPE values

  • Brasil (MLB): CPF, CNPJ.
  • Chile (MLC): RUT.
  • Colombia (MCO): CC, CE, NIT.

Errors

Status Message Detail Solution
400 - Bad_request Site not available The site doesn’t have Billing Info available. We recommend using the Post-sale messages and choose the “REQUEST_BILLING_INFO” template to request billing information and attach the invoice.