Documentación Mercado Libre

Descubre toda la información que debes conocer sobre las APIs de Mercado Libre.
circulos azuis em degrade

Documentación

Última actualización 13/04/2023

Order status and tracking

The new ME1 Order states resource aims to improve buyers' experience in accompanying product delivery. You can find out when the product was shipped, if the delivery was successful or not, in addition to the tracking number.

Shipping states and substates

The merging of the information from the status field and the shipping substate determines what will be notified to the buyers. Now it is possible to send the information of the dispatched order (shipped) or the failed delivery (not_delivered):

Status Substatus Description
shipped null Dispatched
not_delivered returning_to_sender Not delivered - Returned to seller
delivered null Delivered to buyer

Update the status of a ME1 shipment

To update the shipment status, you need to know the shipment_id of the order. To get it, make a request to the order resource.

Request:

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

Example:

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

Response:

{
    "id": 28264263908,
    "mode": "me1",
    "created_by": "receiver",
    "order_id": 2339711980,
    "order_cost": 99.9,
    "base_cost": 22.07,
    "site_id": "MLB",
    "status": "pending",
    "substatus": null,
    ...
}
Note:
We use the ID field of this response.


Mark order as dispatched

To mark the dispatched order it is necessary to report the status as "shipped" and the substate as "null".

Request:

curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/shipments/$SHIPMENT_ID/seller_notifications

Example:

curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' -H 'Content-Type: application/json' https://api.mercadolibre.com/shipments/28264263908/seller_notifications  \
{
  "payload": {
             "service_id": 154,
    "comment": "despachado",
    "date": "2023-01-16T13:03:51.175-04:00"
  },
  "tracking_number": "OP123456789AR",
  "tracking_url": "http://www.url.test/40886674732",
  "status": "shipped",
  "substatus": "null"
}

Response:

{
    "status": "OK"
}
Note:
There is a especific value to the field service_id for each country:
- MLB: 11
- MLA: 154
- MLM: 231876
- MLC: 282578
- MCO: 282579
- MLU: 282604
- MPE: 361180

Mark as undelivered

The status "not_delivered" is a final and irreversible status. It should only be used when there are no more delivery attempts. In this way, the seller has to align the flow so that the return of the buyer's money is made.
To mark the order as undelivered, you must report the status as "not_delivered" and the substate as "returning_to_sender".

Request:

curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/shipments/$SHIPMENT_ID/seller_notifications

Example:

curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' -H 'Content-Type: application/json' https://api.mercadolibre.com/shipments/28264263908/seller_notifications  \
{
   "payload":{
      "comment":"Não entregue",
      "date":"2020-03-05T16:17:51.175-04:00"
   },
   "status":"not_delivered",
   "substatus":"returning_to_sender"
}

Response:

{
    "status": "OK"
}

Mark order as delivered

Upon receiving the information that a product was delivered to the buyer, you must make a change in the status of the order for delivery. For that, it uses the "delivered" state with the "null" substate. This status is also finalizing and irreversible.

Request:

curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/shipments/$SHIPMENT_ID/seller_notifications

Example:

curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' -H 'Content-Type: application/json' https://api.mercadolibre.com/shipments/28264263908/seller_notifications  \
 {
   "payload":{
      "comment":"Pedido entregue",
      "date":"2020-03-06T16:17:51.175-04:00"
   },
   "status":"delivered",
   "substatus":"null"
}

Response:

{
    "status": "OK"
}