Recursos Cross

Confira os principais recursos das nossas APIs
circulos azuis em degrade

Documentação do

Você pode usar esta documentação para as seguintes unidades de negócio:

Última atualização em 19/04/2024

Dados para emissão de Nota Fiscal

Importante:
- Para obter a resposta com a nova versão, envie o header 'x-version: 2'
- Este alteração para a v2 impacta somente os sites MLA, MLB, MLM, MLC, MCO y MEC, os outros sites (MLU, MPE, MLV) seguem com a primeira versão do recurso.
- Em breve removeremos a versão anterior do recurso /billing_info para os sites mencionados acima.
- Para MEC essa é a primeira vez que estamos publicando este recurso, por isso não é necessário substituir a versão anterior, somente adotar a nova versão.

Para realizar o faturamento de uma venda, são necessários os dados do comprador que estão disponíveis através do recurso Orders, mas especificamente /orders/order_id/billing_info.

Nota:
Os vendedores do Brasil podem criar cupons de desconto para vendas diretas e/ou de carrinho dentro do canal de Marketplace, saiba como faturar essas vendas.

Consultar os dados para faturamento

Para obter as informações do comprador para emissão da nota fiscal. Chamada:

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

Exemplo:

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

Exemplo:

curl -X GET \
  -H 'Authorization: Bearer $ACCESS_TOKEN' \
  -H 'x-version:2' \
  https://api.mercadolibre.com/orders/1691789796/billing_info

Resposta com os exemplos de pessoa física e pessoa jurídica.

MLB - Pessoa Física

{
  "site_id": "MLB",
  "buyer": {
    "cust_id": 234343545,
    "billing_info": {
      "name": "María Lupita",
      "last_name": "Gomez Blanco",
      "identification": {
        "type": "CPF",
        "number": "32659430" 
      },
      "address": {
        "street_name": "Nicolau de Marcos",
        "street_number": "05",
        "city_name": "Bom Jardim",
        "comment": "7b",
        "neighborhood": "Jardim Ornelas",
        "state": {
          "name": "Rio de Janeiro"
        },
        "zip_code": "28660000",
        "country_id": "BR"
      },
      "attributes": {
          "is_normalized": true,
          "cust_type": "CO"
      }
    }
  },
  "seller": {
    "cust_id": 34345454,
  }}

MLB - Pessoa Jurídica

{
  "site_id": "MLB",
  "buyer": {
    "cust_id": 234343545,
    "billing_info": {
      "name": "Apple Brasil",
   "identification": {
        "type": "CNPJ",
        "number": "326594309119203" 
      },
      "taxes": {
        "inscriptions": 
         {
            "state_registration": "30703088534",
         }
        , 
        "taxpayer_type": {
          "description": "Contribuinte" 
        }
      },
      "address": {
        "street_name": "Nicolau de Marcos",
        "street_number": "05",
        "city_name": "Bom Jardim",
        "comment": "7b",
        "neighborhood": "Jardim Ornelas",
        "state": {
          "name": "Rio de Janeiro"
        },
        "zip_code": "28660000",
        "country_id": "BR"
      },
      "attributes": {
          "is_normalized": true,
          "cust_type": "BU"
      }
    }
  },
  "seller": {
    "cust_id": 34345454,
  }}

MLA - Pessoa Física

{
    "site_id":"MLA",
    "buyer":{
        "cust_id": "123123123"
       "billing_info":{
          "name":"Juan Soares",
          "last_name":"Sanchez",
          "identification":{
             "type":"DNI" / "CUIL",
             "number":"307722738"
          },
          "taxes": {
            "taxpayer_type": {
                "id": "01",
                "description": "Consumidor Final"
            }
          },
          "address":{
             "street_name":"Aysen",
             "street_number":"30",
             "city_name":"Buenos Aires",
             "state":{
                "code": "01",
                "name": "Buenos Aires"
            },
             "zip_code":"5000",
             "country_id":"AR"
          },
          "attributes": {
            "vat_discriminated_billing": "true",
            "doc_type_number": "123123123",
            "is_normalized": true,
            "cust_type": "CO"
          }
       }
    },
    "seller":{
        "cust_id": 0,
    }

MLA - Pessoa Jurídica

{
    "site_id":"MLA",
    "buyer":{
        "cust_id": "123123123",
       "billing_info":{
          "name":"Apple Argentina"
          "identification":{
             "type":"CUIT",
             "number":"307722738"
          },
          "taxes": {
            "taxpayer_type": {
                "description": "IVA Responsable Inscripto"
            }
          },
          "address":{
             "street_name":"Aysen",
             "street_number":"30",
             "city_name":"Buenos Aires",
             "state":{
                "code": "01",
                "name": "Buenos Aires"
            },
             "zip_code":"5000",
             "country_id":"AR"
          },
          "attributes": {
            "vat_discriminated_billing": "true",
            "doc_type_number": "123123123",
            "is_normalized": true,
            "cust_type": "BU"
          }
       }
    },
    "seller":{
        "cust_id": 0,
    }

MLM - Pessoa Física

{
  "site_id": "MLM",
  "buyer": {
    "cust_id": 234343545,
    "billing_info": {
      "name": "Juan Soraes",
   "last_name": "Sanchez"	
      "identification": {
        "type": "RFC",
        "number": "CUPU800825569"
      },
      "taxes": {
        "contributor": "PERSONA FÍSICA",
        "taxpayer_type": {
          "id": "606",
          "description": "Arrendamiento"
        },
        "cfdi": {
          "id": "G03",
          "description": "Gastos en general"
        }
      },
      "address": {
        "street_name": "Calle 134A #18A",
        "street_number": "05",
        "city_name": "Alvaro Obregón",
        "state": {
          "code": "DIF",
          "name": "Distrito Federal"
        },
        "zip_code": "01040",
        "country_id": "MX"
      },
      "attributes": {
        "vat_discriminated_billing": "true",
        "birth_date": "2000/02/03",
        "is_normalized": true,
        "customer_type": "CO"
      }
    }
  },
  "seller": {
    "cust_id": 34345454  }}

MLM - Pessoa Jurídica

{
  "site_id": "MLM",
  "buyer": {
    "cust_id": 234343545,
    "billing_info": {
      "name": "SALVADO HNOS S A",
      "identification": {
        "type": "RFC",
        "number": "CUPU800825569"
      },
      "taxes": {
        "contributor": "PERSONA MORAL",
        "taxpayer_type": {
          "id": "606",
          "description": "Arrendamiento"
        },
        "cfdi": {
          "id": "G03",
          "description": "Gastos en general"
        }
      },
      "address": {
        "street_name": "Calle 134A #18A",
        "street_number": "05",
        "city_name": "Alvaro Obregón",
        "state": {
          "code": "DIF",
          "name": "Distrito Federal"
        },
        "zip_code": "01040",
        "country_id": "MX"
      },
      "attributes": {
        "vat_discriminated_billing": "true",
        "birth_date": "2000/02/03",
        "is_normalized": true,
        "customer_type": "BU"
      }
    }
  },
  "seller": {
    "cust_id": 34345454,
 }
}

MLC - Pessoa Física

{
    "site_id": "MLC",
    "buyer": {
      "cust_id": 234343545,
      "billing_info": {
        "name": "Tamara nicolt",
        "last_name": "larenas reyes",
        "identification": {
          "type": "RUT",
          "number": "159321126"
        },
     "address": {
          "street_name": "Pasaje Beethoven",
          "street_number": "56",
          "city_name": "Maipú",
          "comment": "73",
          "neighborhood": "Maipú",
          "state": {
            "name": "RM (Metropolitana)"
          },
          "country_id": "CL"
        },
        "attributes": {
          "is_normalized": true,
           "cust_type": "CO"
       }
      }
    },
    "seller": {
      "cust_id": 34345454,
    }
  }

MLC - Pessoa Jurídica

{
    "site_id": "MLC",
    "buyer": {
      "cust_id": 234343545,
      "billing_info": {
        "name": "Apple",
        "identification": {
          "type": "RUT",
          "number": "159321126"
        },
        "taxes": {
           "economic_activity": "Vta.y arrdo artcls Electrónico",
        },
        "address": {
          "street_name": "Pasaje Beethoven",
          "street_number": "56",
          "city_name": "Maipú",
          "comment": "73",
          "neighborhood": "Maipú",
          "state": {
            "name": "RM (Metropolitana)"
          },
          "country_id": "CL"
        },
        "attributes": {
          "is_normalized": true,
      "cust_type": "BU" 
       }
      }
    },
    "seller": {
      "cust_id": 34345454,
    }
  }

MCO - Pessoa Física

{
  "site_id": "MCO",
  "buyer": {
    "cust_id": 234343545,
    "billing_info": {
      "name": "Adrian",
      "last_name": "Garces",
      "identification": {
        "type": "CC",
        "number": "73160000"
      },
      "address": {
        "country_id": "CO"
      },
  },
  "seller": {
    "cust_id": 34345454,
  }
}

MCO - Pessoa Jurídica

{
  "site_id": "MCO",
  "buyer": {
    "cust_id": 234343545,
    "billing_info": {
      "name": "Apple",
      "identification": {
        "type": "CC",
        "number": "73160000"
      },
      "address": {
        "country_id": "CO"
      },
      "attributes": {
        "is_normalized": true
      }
    }
  },
  "seller": {
    "cust_id": 34345454,
  }

MEC - Pessoa Física

{
  "site_id": "MEC",
  "buyer": {
    "cust_id": 234343545,
    "billing_info": {
      "name": "Adrian",
      "last_name": "Garces",
      "identification": {
        "type": "RUC" / "CI",
        "number": "1711168979001"
      },
      "address": {
        "country_id": "EC"
      },
      "attributes": {
        "is_normalized": true
    "email":"test_user_937841642@testuser.com"
      }
    }
  },
  "seller": {
    "cust_id": 34345454,
  }
}

MEC - Pessoa Jurídica

{
  "site_id": "MEC",
  "buyer": {
    "cust_id": 234343545,
    "billing_info": {
      "name": "Apple",
      "identification": {
        "type": "RUC",
        "number": "1711168979001"
      },
      "address": {
        "country_id": "EC"
      },
      "attributes": {
        "is_normalized": true
    	 "email":"test_user_937841642@testuser.com"
      }
    }
  },
  "seller": {
    "cust_id": 34345454,
  }
}

Tipos e valores

site_id : Id do site

buyer:

  • cust_id: Id do comprador

billing_info:

  • name: nome do comprador
  • last_name: último nome do comprador
  • identification:
    • type: tipo do documento
    • number: número do documento

taxes:

  • Inscriptions:
    • state_registration: inscrição estadual
  • economic_activity: atividade econômica
  • contributor: tipo de contribuinte
  • taxpayer_type
    • id:
    • description: situação fiscal do buyer

address:

  • street_name: nome da rua do comprador
  • street_number: número do endereço do comprador
  • city_name: nome da cidade do comprador
  • neighbhood: nome do bairro do comprador
  • zip_code: código postal do comprador
  • comment: comentário extra sobre endereço do comprador
  • country_id: Id do país
  • state:
    • code: código do estado
    • name: nome do estado

attirbutes:

  • birth_date: data de aniversário do comprador
  • doc_type_number: número do documento
  • cust_type: tipo de pessoa (Pessoa Jurídica ou Pessoa Física)

seller:

  • birth_date: cust_id: Id do vendedor

Os valores CO ou BU presentes no campo cust_type significam:
- CO : Customer
- BU : Business

Nota:
Recomendamos que revise os detalhes de todos os descontos aplicados em uma venda. É possível obter estes detalhes com o recurso /discount.