Generada por el marketplace
Este endpoint permite obtener la factura generada por el marketplace para una venta
Endpoint
GET https://api.tp.yuju.io/channel-invoices?id_channel=3901&id_order=50035
Parámetros:
Parámetro | Descripción |
---|---|
id_channel | id del canal |
id_order | id de la orden |
Ejemplo de respuesta:
[
{
"id_shop": 9227001,
"id_channel": 3901,
"id_order": "20XXXXXXXXXXXX4",
"id": "35XXXXXXX9",
"files": [
{
"type": "danfe",
"url": "https://XXXXXXXX.s3.us-east-1.amazonaws.com/9227001/3901/35XXXXXXX9-danfe.pdf"
},
{
"type": "invoice",
"url": "https://XXXXXXXX.s3.us-east-1.amazonaws.com/9227001/3901/35XXXXXXX9.xml"
}
],
"status": "authorized",
"transaction_status": "authorized",
"fiscal_data": {
"customer_type": "b2c",
"transaction_type": "sale",
"transaction_type_description": "Venda de mercadorias",
"messages": [
{
"type": "COMPL",
"content": "Enviado diretamente do depósito temporário - operador logístico: XXX XXX XXXX, Cnpj: 0XXXXXXXXXXX2, Inscrição Estadual: 13XXXXXXXX5 saindo do endereço: São Miguel, Número: 5553, Complemento: , B.......País: BR."
},
{
"type": "COMPL",
"content": "Nota fiscal de retorno simbólico nº ......, série 2, nos termos da Portaria CAT 31/2019"
},
{
"type": "COMPL",
"content": "Valor aproximado dos tributos (IBPT) R$363,77."
},
{
"type": "COMPL",
"content": "Valores totais do ICMS Interestadual: DIFAL da UF destino R$0,00 + FCP R$0,00; DIFAL da UF Origem R$0,00."
},
{
"type": "COMPL",
"content": "Luuna | Acorde melhor :)"
}
],
"fiscal_amounts": [
{
"name": "icms",
"attributes": {
"vicms": 118.69,
"vicmsufdest": 0,
"vfcp": 0,
"vicmsdeson": 0,
"vbcufdest": 0,
"vfcpufdest": 0,
"vbcst": 0,
"vbcfcpufdest": 0,
"vst": 0,
"vbc": 989.1,
"vfcpstret": 0,
"vfcpst": 0,
"vicmsufremet": 0
}
},
{
"name": "ipi",
"attributes": {
"vipi": 0
}
},
{
"name": "pis",
"attributes": {
"vpis": 14.36
}
},
{
"name": "ibpt",
"attributes": {
"vtottrib": 363.77
}
},
{
"name": "cofins",
"attributes": {
"vcofins": 66.15
}
},
{
"name": "discount",
"attributes": {
"amount": 109.9
}
}
],
"state_calculation_type": "technical_default",
"customer_transaction": "consumption",
"is_fiscal_order_split": null,
"billing_warehouse_id": null
},
"issuer": {
"name": "Mi Empresa S.A..",
"identifications": {
"cnpj": "42XXXXXXXXX04",
"crt": "normal",
"ie": "12XXXXXXX12",
"iest": null,
"ie_type": "contribuinte"
},
"phone": {
"area_code": "00",
"number": "11XXXXXX2"
},
"address": {
"street_name": "R XXXX XX XXX XXXXX XXX Jesus",
"street_number": "418",
"complement": "Sala 6A",
"neighborhood": "Bonsucesso",
"city": "Guarulhos",
"zip_code": "07175500",
"state": "SP",
"country": "BR"
},
"user_id": "1XXXXXX59",
"brand_name": null,
"start_activity_date": null
},
"recipient": {
"name": "Joao XXXX XXXX XXX",
"identifications": {
"cpf": "560XXXXXX39"
},
"phone": null,
"address": {
"street_name": "Américas",
"street_number": "88282",
"complement": "apt 999",
"neighborhood": "Guilhermina",
"city": "Praia Grande",
"zip_code": "11702090",
"state": "SP",
"country": "BR"
},
"external_recipient_id": "205XXXXX0",
"receiver": null,
"discriminated_billing": null
},
"shipment": {
"id": "4XXXXXXXXX3",
"site_id": "MLB",
"mode": "ME2",
"logistic_type": "fulfillment",
"buyer_cost": 0,
"paid_by": "issuer",
"carrier": {
"name": " XXX XXX XXXX",
"identifications": {
"cnpj": "0XXXXXXXXXX39",
"crt": null,
"ie": "1XXXXXXXXX6",
"iest": null,
"ie_type": "contribuinte"
},
"phone": null,
"address": {
"street_name": "AVENIDA",
"street_number": "77772",
"complement": null,
"neighborhood": null,
"city": "OSASCO",
"zip_code": null,
"state": "SP",
"country": "Brasil"
}
},
"volumes": [
{
"quantity": 1,
"net_weight": 12,
"gross_weight": 12,
"volume": null
}
],
"fiscal_model_id": "OLSS",
"cte": null,
"logistic_center": {
"id": "BRSP11",
"name": " XXX XXX XXXX",
"identifications": {
"cnpj": "0XXXXXXXXXXX2",
"crt": null,
"ie": "13XXXXXXXX5",
"iest": null,
"ie_type": null
},
"address": {
"street_name": "São Miguel",
"street_number": "5553",
"complement": null,
"neighborhood": "Jardim Arapongas",
"city": "Guarulhos",
"zip_code": "07210250",
"state": "SP",
"country": "BR"
}
},
"freight": null,
"shipping_locations": null,
"estimated_delivery_date": null
},
"items": [
{
"id": "1XXXXXX59_PRODUCTION_35XXXXXXX9_1",
"invoice_id": "35XXXXXXX9",
"seller_id": "1XXXXXX59",
"external_order_id": "20XXXXXXXXXXXX4",
"external_product_id": "MLB34XXXXXX61",
"external_user_product_id": "MLBU1XXXXXX042",
"external_variant_id": null,
"attributes": {
"sku": "LXXXXXX2",
"ean": "750XXXXXX54",
"tributary_ean": null,
"type": "single",
"bundle_quantity": 1,
"net_weight": 12,
"gross_weight": 12
},
"product_name": "Colchão Solteiro 88cm x 188cm",
"quantity": 1,
"tributary_quantity": null,
"total_amount": 1099,
"shipping_buyer_cost": 0,
"discount_amount": {
"unconditional": 109.9,
"conditional": null
},
"fiscal_data": {
"attributes": {
"tax_rule_id": 124660,
"ncm": "94XXXX00",
"cest": null,
"origin_type": "reseller",
"origin_detail": "1",
"cfop": "5106",
"measurement_unit": "UNID",
"tributary_measurement_unit": null,
"tax_substitution": null,
"extipi": null,
"fci": null,
"csosn": null
},
"messages": [
{
"type": "ITEM",
"content": "Total aproximado de tributos federais, estaduais e municipais: R$363,77"
}
],
"rules": [
{
"name": "ORIGINAL_VALUE",
"attributes": {
"value": 1099
}
},
{
"name": "IPI_COMPOSITION",
"attributes": null
},
{
"name": "IPI",
"attributes": {
"cst": "51",
"aggregate_invoice_amount": false,
"cenq": "999"
}
},
{
"name": "COFINS",
"attributes": {
"pcofins": 7.6,
"vcofins": 66.15,
"cst": "01",
"vbc": 870.41
}
},
{
"name": "IBPT",
"attributes": {
"municipal_tax": 0,
"vibpt": 363.77,
"pibpt": 33.1,
"federal_national_tax": 13.45,
"messages": [
{
"type": "item",
"value": "Total aproximado de tributos federais, estaduais e municipais: R$$IBPT_ITEM_VALUE"
}
],
"federal_imported_tax": 19.8,
"state_tax": 13.3
}
},
{
"name": "ICMS_ST_COMPOSITION",
"attributes": {
"composition": [
"item_amount",
"freight",
"discount",
"ipi"
]
}
},
{
"name": "PIS_COMPOSITION",
"attributes": {
"composition": [
"discount"
]
}
},
{
"name": "ICMS_COMPOSITION",
"attributes": {
"composition": [
"discount",
"ipi"
]
}
},
{
"name": "PIS",
"attributes": {
"vpis": 14.36,
"cst": "01",
"vbc": 870.41,
"ppis": 1.65
}
},
{
"name": "COFINS_COMPOSITION",
"attributes": {
"composition": [
"discount"
]
}
},
{
"name": "ICMS",
"attributes": {
"cst": "00",
"vicms": 118.69,
"vicmsufdest": 0,
"picms": 12,
"modbc": 3,
"vbcufdest": 0,
"vfcpufdest": 0,
"vbcfcpufdest": 0,
"vbc": 989.1,
"pfcp": 0,
"aggregate_invoice_amount": false,
"predbcdest": 0,
"vicmsufremet": 0
}
}
]
},
"original_item": null,
"other_amount": 0,
"reference_quantity": null,
"reference_measure": null,
"payments": null,
"pack_id": null,
"additional_info": null,
"batches": null
}
],
"issued_date": "2025-01-12T23:42:25.924Z",
"invoice_series": "2",
"invoice_number": 747538,
"attributes": {
"authorization_date": "2025-01-12T23:42:29",
"invoice_creation_date": "2025-01-12T23:42:25",
"order_source": "meli",
"invoice_source": "internal",
"environment_type": "production",
"tags": null,
"invoice_type": null,
"invoice_key": "35250142XXXXXXXXX0455002000074753818XXXXXX89",
"xml_version": "4.00",
"status_code": 100,
"status_description": "Autorizado o uso da NF-e",
"receipt": "351XXXXXXXXXX0",
"receipt_date": "2025-01-12T23:42:27",
"protocol": "1XXXXXXXXXXXX41",
"emission_type": "normal",
"cancellation_protocol": null,
"cancellation_date": null,
"cancellation_reason": null,
"cancellation_error_code": null,
"cancellation_error_description": null,
"cnf": "8XXXXXX8",
"correction_letter": null,
"reference_invoice": null,
"reference_invoices": [
{
"id": 35921393178,
"invoice_key": "35250142XXXXXXXXX04550020000183751348421600",
"document_type": null,
"issued_date": "2025-01-13T03:42:21.292Z"
}
],
"danfe_location": "/users/1XXXXXX59/invoices/sites/MLB/documents/danfe/35XXXXXXX9",
"xml_location": "/users/1XXXXXX59/invoices/documents/xml/35XXXXXXX9/authorized",
"include_freight": null,
"external_id": "SALE-sale-4XXXXXXXXX3-1-OLSS-1XXXXXX59",
"series_number_history": [],
"third_party_authorizations": [
{
"identifications": {
"cnpj": "42XXXXXXXXX04",
"crt": null,
"ie": null,
"iest": null,
"ie_type": null
}
}
],
"events": null
},
"payments": [
{
"id": "9XXXXXXXX1",
"payment_method_id": "pix",
"installments": "1",
"operation_type": null,
"payment_type": "bank_transfer",
"transaction_amount": 1099,
"taxes_amount": null,
"shipping_cost": null,
"coupon_amount": null,
"overpaid_amount": null,
"total_paid_amount": 989.1,
"installment_amount": null,
"total_calculated_amount": 989.1,
"seller_discount_amount": 109.9,
"meli_discount_amount": 109.9,
"date_created": null,
"date_approved": "2025-01-12T23:41:16",
"authorization_code": null
}
],
"amount": 989.1,
"items_amount": 1099,
"errors": [],
"items_quantity": 1,
"site_id": "mlb",
"other_amount": null,
"additional_info": null
}
]
Documentación de campos para Mercado Libre Brasil
Campo | Descripción |
---|---|
id | Identificador de la factura generado por Mercado Libre |
files | Contiene las url para descargar los archivo de la factura (xml) y danfe (pdf) |
type | Es el tipo de document (danfe, invoice) |
url | Link del archivo |
fiscal_data | |
transaction_type | Define el tipo de operación simplificada por MELI |
attributes | |
external_id | Es el tipo de operación oficial, mismo que viene en el XML |
Tipo de operaciones simplificadas por MELI
Las facturas tienen varios tipos que definen un tipo de operación. Los tipos de notas son:
Tipo de operación | Descripción |
---|---|
SALE | nota fiscal de saída. |
SALE_RETURN | nota fiscal de saída |
SALE_DEVOLUTION | nota fiscal de devolução. |
INBOUND | nota fiscal de entrada. |
INBOUND_DEVOLUTION | devolução entrada - (fulfillment). |
INBOUND_RETURN | retorno de entrada - (fulfillment). |
INBOUND_SUPPLIER_RETURN | nota de devolução ao fornecedor. Quando o fornecedor nos enviou uma nota errada essa anota ajuda devolvendo items a mais - (fulfillment)./li> |
DEVOLUTION | devolução de Mercadorias - (fulfillment / outros tipos logísticos). |
CORRECTION_LETTER | carta de correção. |
CTE | conhecimento de transporte. |
Tipos de facturas utilizadas en el proceso de Fulfullment:
Tipo de operación | Descripción |
---|---|
INBOUND | nota fiscal de entrada. |
INBOUND_DEVOLUTION | devolução entrada. |
INBOUND_RETURN | retorno de entrada. |
DEVOLUTION | devolução de Mercadorias. |
SYMBOLIC_INBOUND_RETURN | retornos simbólicos. |
Updated about 1 month ago