Free shipping

Sellers using the MercadoEnvíos shipping module, mode 1 or mode 2, are able to list items offering one of the shipping methods for free.
This type of shipping has some benefits: it is a superior shopping experience for the buyer, it is highlighted in the search results, and buyers can filter listings that offer free shipping.
We’ve recently made some changes on the API and the JSON structure of the items adding the possibilities to set ‘Rules’ for the free_shipping option. Brazilian sellers with ME are now able to exclude the North and Northeast regions if they want to when they include free_shipping on their items. This is possible through the ‘exclude_regions’ rule. Other sites can only use the rule ‘country’, which means that if they include free shipping on their items, it applies for the whole country.

Contents:

Shipping modes

curl https://api.mercadolibre.com/users/{user_id}/shipping_modes?category_id={category_id}

This resource will return the shipping configuration available to the seller for a specific category.
Response:

{
"mode": "me2",
 "shipping_attributes": {
   "costs": "not_allowed",
   "dimensions": "clear",
   "free": {
      "methods": "optional",
      "accepted_methods": [100009,182],
      "rules": [{
         "free_mode":"exclude_region",
         "value": [’BR-NO’, ’BR-NE’],
         "default": true,
         "free_shipping_flag": false
      },{
         "free_mode":"country",
         "value": null,
         "default": false,
         "free_shipping_flag": true
      }]
   }
}


Calculate free shipping costs

Sites

Calculate free shipping costs by site & item dimensions
Example:

curl -X GET https://api.mercadolibre.com/sites/MLM/shipping_options/free?dimensions=2x11x25,500

Response:

{
"coverage": {
"all_country": {
"list_cost": 97,
"currency_id": "MXN"
}
}
}


Users & items

On México we offer seller’s a single flat rate option. When dimensions aren’t specified on the item, calculate is done basing on standard category dimensions.

Know standard dimensions for a given category

Example:

curl -X GET https://api.mercadolibre.com/categories/MLM165702/shipping

Response:

{
  "category_id": "MLM1055",
  "height": 10,
  "width": 10,
  "length": 15,
  "weight": 500
}


Calculate free shipping costs by user & item dimensions

Example:

curl -X GET https://api.mercadolibre.com/users/4422224/shipping_options/free?dimensions=10x10x10,500

Response:

{
"coverage": {
"all_country": {
"list_cost": 97,
"currency_id": "MXN"
}
}
}


Calculate free shipping costs by user & item_id

Example:

curl -X GET https://api.mercadolibre.com/users/4422224/shipping_options/free?item_id=MLM531425223
{
"coverage": {
"all_country": {
"list_cost": 97,
"currency_id": "MXN"
}
}
}


Calculate free shipping costs by item

Example:

curl -X GET https://api.mercadolibre.com/items/MLB739217081/shipping_options/free

Response:

{
"coverage": {
"all_country": {
"list_cost": 14.02,
"currency_id": "BRL"
}
}
}

Use multiget to calculate the cost of free shipping up to 50 items on one API call:
Example:

curl -X GET curl -X GET https://api.mercadolibre.com/items/shipping_options/free?ids=MLM531425223,MLM537956425,MLM537955922

Response:

{
"MLM537955922": {
"coverage": {
"all_country": {
"list_cost": 140,
"currency_id": "MXN"
}
}
},
"MLM531425223": {
"coverage": {
"all_country": {
"list_cost": 97,
"currency_id": "MXN"
}
}
},
"MLM537956425": {
"coverage": {
"all_country": {
"list_cost": 105,
"currency_id": "MXN"
}
}
}
}


Products with free shipping

curl https://api.mercadolibre.com/items/{item_id}



On the Item you will see that we’ve replaced the property “methods” for “free_methods” when “free_shipping” is true. Under free_methods you’ll have the method Id and into “rule”.
Under the “rules” section you should specify on “free_mode” whether you want to exclude regions or not. If you set “free_mode”:”exclude_region”, you must send the values, which by now will be ‘BR-NO’ and ‘BR-NE’.
GET Shipping Item

{
   "shipping":{
      "mode":"me2",
      "local_pick_up":true,
      "free_shipping":true,
      "free_methods":[
         {
            "id":182,
            "rule":{
                "free_mode":"exclude_region",
                "value":[’BR-NO’, ’BR-NE’]
             }
         },
      ],
      "dimensions":null
   }
}


Note:Even though the benefit by now it’s for MLB, the structure of the JSON will be updated in every country with MercadoEnvíos. We’ll give two months since the activation date to adapt to this changes, which means that the API will be accepting both JSONs during this period until the deadline – two months counting since June 30th – when the original JSON will be no longer valid. Items with the previous configuration will remain the same except for relistings.

Offer free_shipping “country” mode
Example:

{
"title": "Titulo del item",
...
"shipping": {
    "mode": "me2",
    "local_pick_up": false,
    "free_methods": [
        {
            "id": 100009,
            "rule": {
                "free_mode": "country",
                "value": null
            }
        }
    ]
}
}


Offer free_shipping excluding regions

Example:

{
    "shipping": {
        "free_methods": [
            {
                "id": 182,
                "rule": {
                    "free_mode": "exclude_region",
                    "value": [
                        "BR-NO",
                        "BR-NE"
                    ]
                }
            }
        }
    ],
    
}


Offer free_shipping for custom shipping

For countries where Mercado Envíos is active you can add custom shipping free in categories that do not accept ME.

"shipping": {
        "mode": "not_specified",
        "local_pick_up": false,
        "free_shipping": true,
        "methods": [],
        "costs": []
    }

Please rate this