Last update 28/12/2022

Optional holiday shipments

The shipping on optional holidays feature allows the seller to configure the days, predefined by Mercado Libre, in where they will not work and so as they do not have any impact on reputation.


List non-working days

Non-working days can be listed through the following request:


Request:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/shipping/seller/$SELLER_ID/working_day_middleend

Example:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/shipping/seller/12345678/working_day_middleend

Response:

{
    "dates": [
     {
      "finalized": false,
      "closed": false,
      "enabled": true,
      "checked": true,
      "description": "Día del perdón",
      "date": "2022-09-26", 
     },
     {
      "finalized": false,
      "closed": false,
      "enabled": true,
      "checked": true,
      "description": "Día del perdón",
      "date": "2022-09-27" 
     }
   ]
 } 
 

Response fields:

  • finalized: indicates that the non-working day is over.
  • closed: indicates whether that day is enabled on its configuration page.
  • enabled: indicates whether to show enabled or not the non-working day.
  • checked: indicates whether the checkbox should be checked or not.
  • description: name of the non-working day.
  • date: date in yyyy-mm-dd format of the non-working day.

Update non-working day

To update the non-working day, you must make the following request:


Request:

curl -X PUT -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/shipping/seller/$SELLER_ID/working_day_middleend

    {
       "site_id": "MLA",
       "dates":[
        {
         "checked": true,
         "description": "Día del perdón",
         "date": "2022-09-26"
        },
        {
         "checked": true,
         "description": "Día del perdón",
         "date": "2022-09-27"
        }
      ]
    }
    
    

Example:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/shipping/seller/12345678/working_day_middleend

    {
       "site_id": "MLA",
       "dates":[
        {
         "checked": true,
         "description": "Día del perdón",
         "date": "2022-09-26"
        },
        {
         "checked": true,
         "description": "Día del perdón",
         "date": "2022-09-27"
        }
      ]
    }    

Response Status 200 OK:

"all working days were saved"

Response fields:

  • checked: if true, the seller does not work that day.
  • description: name of the non-working day.
  • date: date in yyyy-mm-dd format of the non-working day.

Search by non-working day

Knowing the date, it is possible to search by non-working day. To do this you must make the following request:


Request:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/shipping/seller/$SELLER_ID/working_day_middleend/optout?date=AAAA-MM-DD

Example:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/shipping/seller/$SELLER_ID/working_day_middleend/optout?date=2022-10-17

Response:

{
    "dates": [
       {
        "description": "Día del perdón",
        "date": "2022-09-26", 
       }
    ]
    }

If the seller does not have any day configured, the resource returns an empty response with status 200 in the request.


In case you do not know the non-working day, with the same resource (without using the date parameter), you can know the non-working days configured by the seller.


Request:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/shipping/seller/$SELLER_ID/working_day_middleend/optout

Response:

{
    "dates": [
       {
        "description": "Día del perdón",
        "date": "2022-09-26", 
       }
    ]
    }