Documentation Mercado Libre

Check out all the necessary information about APIs Mercado Libre.
circulos azuis em degrade

Documentation

Last update 23/08/2024

Manage cart orders

With the shopping cart feature, buyers can combine multiple items into a single purchase. As they browse your listings, we’ll suggest additional products from your store for them to add to their cart.

For this reason, when you receive a notification from the marketplace_orders topic, it's essential to check the pack_id field in the response. If the pack_id field returns a value other than null, you should query the pack_id in the /marketplace/orders/pack/$PACK_ID resource. This way, you'll obtain all the orders associated with that pack_id. Additionally, it's necessary to validate the shipping id of the orders, as multiple orders may share the same shipping id. Below, we provide a flowchart explaining the correct procedure.



View cart sales

With this resource, you can consult all sales of the same pack (pack_id).

Request:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/marketplace/orders/pack/$PACK_ID

Example:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/marketplace/orders/pack/$PACK_ID

Response:

{
  "id": 2000003508553677,
  "status": "released",
  "status_detail": null,
  "date_created": "2022-04-08T17:00:48.000-0400",
  "last_updated": "2022-04-08T17:02:07.000-0400",
  "family_pack_id": null,
  "buyer": {
      "id": 266272126
  },
  "shipment": {
      "id": 41297142475
  },
  "orders": [
      {
          "id": 2000003508897196
      },
      {
          "id": 2000003508911076
      }
  ]
}

Response fields

  • ID: package identifier.
  • status: package status.
    • filling: the sale is paid and the pack is created, orders and shipments are created.
    • filled: the orders and shipments of the pack are created and the distribution of the payment to each entity begins.
    • released: all orders and shipments are paid, this is the most viewed status.
  • status_detail: status detail, it shows the reason for a cancellation.
  • family_pack_id: when a pack is split, new packs are generated. A child pack stores in this field the ID of the 'parent' pack.

  • Errors

    HTTP Code Error Message
    404 not_found Resource not found


    Next: Shipments.