Mercado Envios 2

With these guides we will help you publish a product with Mercado Envíos 2 and manage the entire shipping process using our API resources. Remember that the dimensions of the packages are stipulated by Mercado Libre and cannot be manipulated by the user. If you want to activate Mercado Envíos 2, you can do it from each country (Argentina, Brasil, Colombia, México, Chile, Uruguay).





Logistic type

The different logistic types are:


Offering ME2 on your products

curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' -H "Content-Type: application/json" -d '{
    "title": "Item de teste",
    "category_id": "MLA91727",
    "price": 1200,
    "currency_id": "ARS",
    "available_quantity": 2,
    "buying_mode": "buy_it_now",
    "listing_type_id": "bronze",
    "condition": "new",
    "description": "test",
    "pictures": [
        {
            "source": "http://upload.wikimedia.org/wikipedia/commons/f/fd/Ray_Ban_Original_Wayfarer.jpg"
        },
        {
            "source": "http://en.wikipedia.org/wiki/File:Teashades.gif"
        }
    ],
   "shipping": {
   "mode": "me2",
   "local_pick_up": false,
   "free_shipping": false,
   "free_methods": []
 }
}' https://api.mercadolibre.com/items

Remember that to publish in categories marked as Fragile, the user should also be flagged as "fragile," and will need to have a business agreement. In the following API calls you must validate the fields that are shown below: "trusted_user": true (API users)

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/users/:user_id/shipping_preferences

{
  "local_pick_up": false,
  "modes": [
    "custom",
    "not_specified",
    "me1",
    "me2"
  ],
  "trusted_user": true,
  "custom_calculator": false,
  "picking_type": "cross_docking",
  "thermal_printer": null,
  "option": "in",
  "tags": [
  ],
  "carrier_pickup": false,
  "items_combination": "enabled",
  "services": [
    311,
    591,
    671,
    801,
    881,
    1181,
    1191,
    136261
  ],
  "logistics": [
    {
      "mode": "me1",
      "types": [
        {
          "type": "default",
          "carrier_pickup": [],
          "services": [
            21,
            23,
            22,
            11
          ],
          "default": true
        }
      ]
    },

      {"mode": "me2",
      "types": [
        {
          "type": "cross_docking",
          "carrier_pickup": [
            17501840
          ],
          "services": [
            311,
            591,
            671,
            801,
            881,
            1181,
            1191
          ],
          "default": false
        },
        {
          "type": "self_service",
          "carrier_pickup": [
          ],
          "services": [
            136261
          ],
          "default": false
        }
      ]
    },
    {
      "mode": "custom",
      "types": [
        {
          "type": "custom",
          "carrier_pickup": [
          ],
          "services": null,
          "default": true
        }
      ]
    },
    {
      "mode": "not_specified",
      "types": [
        {
          "type": "not_specified",
          "carrier_pickup": [
          ],
          "services": null,
          "default": true
        }
      ]
    }
  ],
  "content_declaration_disabled": false,
  "conciliation": {
    "type": null
  },
  "mandatory_invoice_data": false,
  "site_id": "MLA",
  "free_configurations": [
    {
      "condition": {
        "value": null,
        "type": "all"
      },
      "rule": {
        "default": true,
        "free_mode": "country",
        "value": null
      }
    }
  ],
  "mandatory_settings": {
  }
}

Check product delivery date

Important:
It is available in México, Brazil, Argentina and Chile.

To avoid exceeding the capacity of the carriers and that buyers receive the products on time, check the shipment date of the products. Identify shipments of this type by performing a GET to /shipments, incorporating the header 'X-Format-New: true', checking the “buffering” node.

Request:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' 'X-Format-New: true' https://api.mercadolibre.com/shipments/$SHIPMENT_ID

Example:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' 'X-Format-New: true' https://api.mercadolibre.com/shipments/40173236996

Response:

{
   "id":40173236996,
   "external_reference":null,
   "status":"pending",
   "substatus":"buffered",
   "date_created":"2020-10-20T10:08:30.000-04:00",
   "last_updated":"2020-10-20T15:09:22.000-04:00",
   "declared_value":7000,
   "dimensions":{
      "height":14,
      "width":19,
      "length":38,
      "weight":950
   },
   "logistic":{
      "direction":"forward",
      "mode":"me2",
      "type":"xd_drop_off"
   },
  []
   "lead_time":{
      "option_id":3628548109,
      "shipping_method":{
         "id":510545,
         "name":"Express a domicilio",
         "type":"two_days",
         "deliver_to":"address"
      },
      "currency_id":"ARS",
      "cost":0,
      "list_cost":504.99,
      "cost_type":"free",
      "service_id":831,
      "delivery_type":"estimated",
      "estimated_schedule_limit":{
         "date":null
      },
      "buffering":{
         "date":"2020-10-21T20:18:26.000Z" ---> Fecha que podrá realizar el envío
      },
      "estimated_delivery_time":{
         "type":"known",
         "date":"2020-10-22T00:00:00.000-03:00",
         "unit":"hour",
         "offset":{
            "date":null,
            "shipping":null
         },
         "time_frame":{
            "from":null,
            "to":null
         },
         "pay_before":"2020-10-21T00:00:00.000-03:00",
         "shipping":24,
         "handling":24,
         "schedule":null
      },
      "estimated_delivery_limit":{
         "date":null,
         "offset":null
      },
      "estimated_delivery_final":{
         "date":null,
         "offset":null
      },
      "estimated_delivery_extended":{
         "date":null,
         "offset":null
      },
      "estimated_handling_limit":{
         "date":"2020-10-21T00:00:00.000-03:00"
      }
   },
   "tags":[
      "test_shipment"
   ]
}

In the buffering “date” field from “buffering” node will be the corresponding date that the package has to be dispatched and that same day we will make the label available for printing.

Note:
For Drop Shipping, Cross Docking and Cross Docking Drop Off order shipments, if the substatus is “buffered” you must check the "buffering" node and inform the seller that he will be able to print the label on the date mentioned in the "date" field.

Important:
We recommend consulting up to 50 (fifty) shipment_ids. If you exceed the maximum amount allowed, you will receive a 400 error.

In the sale process, when the buyer completes his purchase (checkout), the seller must print the prepaid label to make the shipment. This tag can be a PDF or ZPL file and you can get it by consulting the shipment_labels resource.
Make the following GET request with the list of shipping ID and an access token. When the status of the shipments is ready_to_ship you will know that the payment has been processed and the prepaid tag is available.

To get labels in PDF format, make the following request:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/shipment_labels?shipment_ids=$SHIPPING_ID1,$SHIPPING_ID2&response_type=pdf

Example:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/shipment_labels?shipment_ids=20178600648,20182100995&response_type=pdf

If you want the tags in ZPL format, change response_type=pdf to response_type=zpl2:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/shipment_labels?shipment_ids=$SHIPPING_ID&response_type=zpl2

Example:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/shipment_labels?shipment_ids=20178600648&response_type=zpl2

This resource returns a ZIP file that includes a PDF with the PLP and a TXT file for a Zebra printer.

Note:
To reprint the label, perform the same GET.

Considerations on label types by site

Printing type Printer Availables sites Response type Output
PDF Common printer Argentina (MLA), México (MLM), Brasil (MLB), Colombia (MCO), Chile (MLC) and Uruguay (MLU) response_type=pdf PDF label
ZPL2 Thermal printer Argentina (MLA), México (MLM), Brasil (MLB), Chile (MLC), Uruguay (MLU), Colombia (MCO response_type=pdf Zip file with the tag in txt format and print summary in pdf format.

Shipping status

Shipping status may vary on the order depending the shipping mode selected for the product. For modes that support automatic tracking and tracking numbers are monitored, the shipping status will be updated by us, while for other shipping modes, you’ll be responsible for sending a tracking number and update the shipping status. This is not mandatory but we suggest you to do it so you improve your chances of getting better feedback from the buyers.


Status:

pending: Shipment is created with this state.

handling: Payment has been received for this shipment.

ready_to_ship: Authorization code has been received from carrier.

shipped: Carrier has informed shipment departure.

delivered: Carrier has informed shipment arrival.

not_delivered: Carrier was unable to deliver package.

cancelled: Shipment has been cancelled.

banner footer

Subscribe to our Newletter

or register to recieve the latest news about our API