Tracking Notifications
Contents
When a shipment’s status changes, the carrier must inform Mercado Libre of this transition by sending a corresponding event notification. There are two ways to report the event recorded for a shipment:
- PUSH: The carrier sends the corresponding event notification to our tracking endpoint.
- PULL: The carrier exposes all notifications already recorded for the shipment via API.
The notifications must reflect the actual transportation sequence and arrive in chronological order. Mercado Libre uses notification codes (code) associated with carrier event codes (carrier_code) to receive and validate each event.
It is critical to respect the notification flow and the order in which events occur, because some status codes are considered final. Once a notification for a final state is received, any subsequent events after that status will be disregarded.
Notification Payload
Notification Fields
The fields that can be included in the notification payload are:
| Name | Type of data | Description | Type |
|---|---|---|---|
| tracking_number | String | Shipping identifier. | Mandatory |
| code | String | Event code. | Mandatory |
| carrier_code | String | Carrier internal event code. | Mandatory |
| payload | Node | Contains information relevant to a particular event. | |
| payload.date | Date (ISO8601) | Event occurrence date. Valid values: UTC 2001-07-04T12:08:56.235Z or levative local time 2001-07-04T12:08:56.235-07:00. | Mandatory |
| payload.reason | String | Indicates the specific reason associated with the reported code, providing predefined additional information that explains the occurrence of the event. Possible values of 'reason' for code 0114:
| Mandatory for code 0114 (Proximity) or CBT-0272 (Consolidation) |
| payload.comment | String | Additional information on the status code. | Optional |
| payload.flight.awb | String | Air Waybill Number | Opcional |
| payload.declaration_number | String | Pedimento Number/Customs Document Number | Mandatory for code CBT-0283 |
| payload.agency_id | String | Agency identification code. | Mandatory codes CBT-0201 and CBT-0215. |
| payload.agency.phone_number | String | Agency phone number where the package can be picked up. The format must be a number of up to fifteen digits that begins with "+". [+] [country code] [subscriber number including area code]. Example: +541142345678 | Only available for notifications CBT-0215 of CBT |
| payload.cost | BigDecimal | shipping item cost. | Mandatory for codes CBT-0260 and CBT-0265. |
| payload.location | Node | Contains information relevant to the location where the event occurred. | |
| payload.location.zip_code | String | Zipcode where the event occurred. | Optional |
| payload.location.country_id | String | Country id where the event occurred. ISO 3166 for country names. | Mandatory for codes with prefix "CBT" |
| payload.location.state_name | String | Name of state / province where the event occurred. | Optional |
| payload.location.city_name | String | Name of city where the event occurred. | Optional |
| payload.location.neighborhood_name | String | Name of neighborhood where the event occurred. | Optional |
| payload.location.facility | String | Identifier of the Logistics Center where the event occurred. | Optional |
| payload.location.geolocation | Node | Geolocation of the place where the event occurred. | Optional |
| payload.location.geolocation.geolocation_type | String | Geolocation accuracy provided. May contain any of the following values:
| Optional |
| payload.location.geolocation.latitude | BigDecimal | Latitude of geolocalization. | Optional |
| payload.location.geolocation.longitude | BigDecimal | Longitude of geolocalization. | Optional |
| payload.dimensions | Node | ||
| payload.dimensions.height | BigDecimal | In centimetres. | Optional |
| payload.dimensions.width | BigDecimal | In centimetres. | Optional |
| payload.dimensions.length | BigDecimal | In centimetres. | Optional |
| payload.dimensions.weight | BigDecimal | Gross weight in grams. | Mandatory for code CBT-0260 |
| payload.redispatch | Node | Optional | |
| payload.redispatch.tracking_number | String | Redispatch carrier shipment identifier. | Optional |
| payload.redispatch.carrier_id | BigDecimal | Redispatch carrier identifier defined by Mercado Libre. | Optional |
| payload.redispatch.tracking_url | String | Web tracking URL of the redispatch carrier. | Optional |
| payload.estimated_delivery_date | Date (ISO8601) | Estimated delivery date of shipment. Valid values: UTC 2001-07-04T12:08:56.235Z or levative local time 2001-07-04T12:08:56.235-07:00. | Mandatory for codes CBT-0265. |
| payload.estimated_pickup_date | Date (ISO8601) | Estimated pick-up date of shipment. Valid values: UTC 2001-07-04T12:08:56.235Z or levative local time 2001-07-04T12:08:56.235-07:00. | Mandatory for codes CBT-0265 and CBT-0133. |
| payload.proof_of_delivery | Node | Optional | |
| payload.proof_of_delivery.receiver_document | Node | Optional | |
| payload.proof_of_delivery.receiver_document.type | String | Type of identity document of the person who receives the package. Valid values:
| Mandatory |
| payload.proof_of_delivery.receiver_document.number | String | Identity document number of the person who receives the package. | Mandatory |
| payload.proof_of_delivery.receiver_last_name | String | Surname of the person who receives the package. | Optional |
| payload.proof_of_delivery.receiver_name | String | Name of the person who receives the package. | Optional |
| payload.proof_of_delivery.receiver_relationship | String | Who received the package. Valid values:
| Optional |
| payload.proof_of_delivery.image | String | Image of receiver signature containing the full name and document number. The image must be sent encoded in Base64. | Optional |
| payload.driver | Node | Provider delivery information | Optional |
| payload.driver.id | String | Id of the delivery person in the carrier's registration | Mandatory for code 0133 |
| payload.driver.name | String | Delivery person name | Mandatory for code 0133 |
| payload.driver.email | String | Delivery person email | Optional |
| payload.driver.phone | String | Delivery person phone number. The format must be a number of up to fifteen digits that begins with "+". [+] [country code] [subscriber number including area code]. Example: +541142345678 | Optional |
| payload.driver.license_plate | String | Delivery vehicle identification | Optional |
| payload.vehicle | String | Provider delivery information | Optional |
| payload.vehicle.reference_type | String | Type of information related to the vehicle, which can be:
| Optional |
| payload.vehicle.reference | String | Information about the field payload.vehicle.reference_type | Optional |
| payload.consolidated_packages | Node | Node containing information about the consolidation. | Mandatory for code CBT-0272 |
| payload.consolidated_packages.consolidation_id | String | Identification sent in the consolidation flow. | Mandatory for code CBT-0272 |
| payload.consolidated_packages.tracking_number | String | Tracking number assigned to the consolidation. | Mandatory for code CBT-0272 |
| payload.consolidated_packages.shipments | List | List of shipment IDs included in the consolidation. | Mandatory for code CBT-0272 |
| payload.details.transport.content.restricted_item_type | String | Used to identify the type of special goods are included inside the package. Valid values are: CREAM, LIQUID, POWDER, BATTERY | Mandatory for code CBT-0270 |
Payload Example
{
"tracking_number":string,
"code":string,
"carrier_code":string,
"payload":{
"date":string (ISO8601),
"reason":string,
"comment":string,
"flight":{
"awb":string
},
"declaration_number":string,
"agency_id":string,
"agency":{
"phone_number":string
},
"cost":number,
"location":{
"zip_code":string,
"country_id":string,
"state_name":string,
"city_name":string,
"neighborhood_name":string,
"facility":string,
"geolocation":{
"geolocation_type":string,
"latitude":number,
"longitude":number
}
},
"dimensions":{
"height":number,
"width":number,
"length":number,
"weight":number
},
"redispatch":{
"tracking_number":string,
"carrier_id":number,
"tracking_url":string
},
"estimated_delivery_date":string (ISO8601),
"estimated_pickup_date":string (ISO8601),
"proof_of_delivery":{
"receiver_document":{
"type":string,
"number":string
},
"receiver_last_name":string,
"receiver_name":string,
"receiver_relationship":string,
"image":string
},
"driver":{
"id":string,
"name":string,
"email":string,
"phone":string,
"license_plate":string
},
"vehicle":{
"reference_type":string,
"reference":string
},
"consolidated_packages":{
"consolidation_id":string,
"tracking_number":string,
"shipments":array
},
"details":{
"transport":{
"content":{
"restricted_item_type":string
}
}
}
}
}