Query Carta Porte Information by Inbound Inventory from Mexico

Introduction

The Carta Porte data query API for inbound inventory is designed to provide fiscal data to logistics carriers that are part of the transportation and want to generate the fiscal document for Mexico (cfdi+carta-porte). Given an inventory ID, this API returns the product data for that inventory.

Important: Make sure you already have a valid application and token, and that you are authorized to use this endpoint. OAuth will be used for security.

Request

bash
1GET https://api.mercadolibre.com/inbound/inventory/{inventory_id}/carta-porte-details?access_token={access_token}
Parameter
Data Type
Description
Type
inventory_idStringInventory IDPath
access_tokenStringAccess tokenQuery

Response

json
1{ 2 "category": int, 3 "description": "string", 4 "unit_code": "string", 5 "dangerous_material": "string", 6 "dangerous_material_key": "string", 7 "package_key": "string", 8 "package_description": "string", 9 "dimensions": { 10 "height": float, 11 "width": float, 12 "length": float, 13 "weight": float 14 }, 15 "registration_istmo": "", 16 "origin_pole_location": "", 17 "destination_pole_location": "" 18}

The response is an array by entity/type. If fiscal data for a specific entity cannot be found, the error "Inventory id not found" is returned.

Parameter
Data Type
Description
Type
categoryIntSAT attribute to express the product key for goods or merchandise transported in different transportation media.Response
descriptionStringDescription of the merchandise.Response
unit_codeStringAttribute to specify the standardized unit of measure key applicable to the quantity of goods or merchandise being transported. The unit must correspond to the description of the goods or merchandise recorded.Response
dangerous_materialStringIndicates whether the product is hazardous material. Value "1" for hazardous material and "0" for non-hazardous.Response
dangerous_material_keyStringHazardous material code. Empty field when not hazardous.Response
package_keyStringPackage key.Response
package_descriptionStringPackage description.Response
dimensionsObjectInformation about the dimensions of the merchandise.Response
dimensions.heightFloatHeight of the merchandise.Response
dimensions.widthFloatWidth of the merchandise.Response
dimensions.lengthFloatLength of the merchandise.Response
dimensions.weightFloatWeight in grams of the merchandise.Response
registration_istmoStringIndicates whether the transfer of goods and/or merchandise takes place within the Tehuantepec Isthmus Welfare Development Zones. Values: Yes or "" (empty string).Response
origin_pole_locationStringIndicates where the transfer of goods and/or merchandise begins within the Tehuantepec Isthmus Welfare Development Zones. Values: (01 to 06).Response
destination_pole_locationStringIndicates the region where the transfer of goods and/or merchandise ends within the Tehuantepec Isthmus Welfare Development Zones. Values: (01 to 06).Response

Status Code Examples

If an error occurs, the API will return an HTTP status other than 200 with the error, message, and cause, and the content-type will be application/json.

403 (NOT_OK)

A 403 error occurs due to lack of access to this API.

json
1{ 2 "message": "Access revoked, consult staff to check your permissions", 3 "error": "unexpected_error", 4 "status": 403, 5 "cause": [""] 6}

404 (NOT_OK)

A 404 error occurs when an incorrect inventory ID is provided.

json
1{ 2 "message": "Error when trying to obtain inbound inventory information", 3 "error": "inventory_not_found", 4 "status": 404, 5 "cause": [""] 6}

500 (INTERNAL_ERROR)

A 500 error occurs when an internal failure happens in this API.

json
1{ 2 "message": "Error when trying to obtain inbound inventory information", 3 "error": "internal_server_error", 4 "status": 500, 5 "cause": ["INTERNAL_ERROR"] 6}
HTTP Code
Content Type
Response Body
Description
200application/jsonJSON (example above)When inventory data is retrieved successfully.
403application/json{"message": "Access revoked, consult staff to check your permissions"}When access to this API is missing.
404application/json{"message": "Error when trying to obtain inbound inventory information"...}When an incorrect inventory ID is provided.
500application/json{"message": "Error when trying to obtain inbound inventory information"}When an internal failure occurs in this API.