Mercado Envios 2

You already know some of the particularities of opting for Mercado Envios 2. This tutorial will help you list a product with this mode and manage the whole shipping process using the resources of our API. Note that package size is set by ME2 and it cannot be managed by the user.

Contents

→Opting in for using ME2
→Offering ME2 on your products
→Free shipping
→Shipping costs & handling time calculator
→Print shipping labels
→Considerations on label types by site
→Shipping status


Opting in for using ME2

If you want to use Mercado Envios mode 2, you may opt-in. Please check these links:
Argentina: http://envios.mercadolibre.com.ar/

Brasil: http://envios.mercadolivre.com.br/

Colombia: http://envios.mercadolibre.com.co/

México: http://envios.mercadolibre.com.mx/

Chile: http://envios.mercadolibre.cl/

Uruguay:  https://envios.mercadolibre.com.uy/


Offering ME2 on your products

Once you opt-in to work with ME you can add the option to your items. When a buyer buys your product he will need to introduce an address at checkout and pay for the product with the shipping costs included. We will follow the package and make sure it gets to the right place. The money for the payment will be available on your account two days after the delivery is successful. You will be able to add free shipping on your items and this will boost your listings on the search. Listing a product with ME2 is very simple, just list an item as usual, including me2 in the shipping array. Example:

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": {
  }
}
Example:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN'
https://api.mercadolibre.com/categories/MCO7159/shipping_preferences
Response:


{
  "category_id": "MCO7159",
  "dimensions": {
    "weight": 50000,
    "height": 20,
    "width": 60,
    "length": 130
  },
  "logistics": [
    {
      "types": [
        "default"
      ],
      "mode": "me1"
    },
    {
      "types": [
        "drop_off",
        "xd_drop_off",
        "cross_docking",
        "fulfillment"
      ],
      "mode": "me2"
    },
    {
      "types": [
        "not_specified"
      ],
      "mode": "not_specified"
    },
    {
      "types": [
        "custom"
      ],
      "mode": "custom"
    }
  ],
  "restricted": true
}

Free shipping

Sellers can list their products offering one of the shipping methods for free and Mercadolibre charges the seller for the shipping cost. Know the details and learn how to list with free shipping.


Shipping costs & handling time calculator

On our Marketplace sellers will have a shipping calculator on the item description page so buyers will know the cost for the shipping and estimated handling time. You can use our resources to calculate this basing on the information you have .


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.

or register to recieve the latest news about our API