Nuevo logistic_type

15 mayo 2017

Logistic_type surge debido a que se están ampliando las opciones de envío por lo tanto es necesario organizar la estructura de los datos.

Si bien actualmente esta implementación se encuentra en estado de retrocompatibilidad a partir del 15 de junio no estará disponible.

Por lo tanto, si estás obteniendo shipping_mode de los recursos de user, categories, items o shipments tendrás que realizar el cambio de la forma que mostraremos a continuación caso contrario, tu integración tendrá errores.

Revisa cómo se encuentra actualmente en cada uno de los recursos en esta etapa de compatibilidad y cómo será el cambio a partir de la fecha anteriormente mencionada.

¿Dónde se implementará este nuevo sub modo?

shipping preferences
user

curl -X GET 'https://api.mercadolibre.com/users/{userID}/shipping_preferences'
JSON actualJSON nuevo
{
...
  local_pick_up: false, 
  modes: [
    "custom", 
    "not_specified", 
    "me2"
  ], 
  logistic: [
    {
      mode: "me2", 
      types: [
       {
          type:"cross_docking", 
          carrier_pickup: [ ], 
          services: [
            291, 
            292, 
            293
          ], 
          default: true
        }


      ]
    }, 
    {
     mode: "custom", 
     types: [
    {
          type: "custom", 
          carrier_pickup: [ ], 
          services: null, 
          default: true
        }
      ]
    }, 
    {
      mode: "not_specified", 
      types: [
        {
          type: "not_specified", 
          carrier_pickup: [ ], 
          services: null, 
          default: true
        }
      ]
, 
  services: [
    291, 
    292,
   293
  ]
…
}
{
...
  "local_pick_up": false, 
  logistics: [
    {
      mode: "me2", 
      types: [
        {
          type: "cross_docking", 
          carrier_pickup: [ ], 
          services: [
            291, 
            292, 
            293
          ], 
          default: true
        }
      ]
    }, 
    {
      mode: "custom", 
      types: [
        {
          type: "custom", 
          carrier_pickup: [ ], 
          services: null, 
          default: true
        }
      ]
    }, 
    {
      mode: "not_specified", 
      types: [
        {
          type: "not_specified", 
          carrier_pickup: [ ], 
          services: null, 
          default: true
        }
      ]
    }
  ]
…
}

categories

curl -X GET 'https://api.mercadolibre.com/categories/{categoryID}/shipping_preferences'
JSON actualJSON nuevo
{
  "id": "MLA1055",
  "name": "Celulares y Smartphones",
  ...
    "fragile": false,
    "shipping_modes": [
      "not_specified",
      "custom",
      "me2",
      "me1"
    ],
    "shipping_options": [
      "carrier",
      "custom"
    ],
    ...
}
{
  "category_id": "MLA1055",
  "dimensions": {
    "weight": 650,
    "height": 10,
    "width": 10,
    "length": 15
  },
  "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": false
}

shipping_modes
user

curl -X GET 'https://api.mercadolibre.com/users/{userID}/shipping_modes?category_id={categoryID}'
JSON actualJSON nuevo
[
  {
    "mode": "me2", 
shipping_attributes:{
    "dimensions": "optional", 
          "costs": "not_allowed", 
          "free": {
            "methods": "optional", 
            "accepted_methods": [
              501245
            ], 
            "rules": [
              {
                "default": true, 
                "free_mode": "country", 
                "value": null, 
                "free_shipping_flag": true
              }
            ], 
            "flat": true
          }, 
          "local_pick_up": "optional"
        }
}    
"logistic_types": [
      {
        "type": "drop_off", 
        "attributes": {
          "dimensions": "optional", 
          "costs": "not_allowed", 
          "free": {
            "methods": "optional", 
            "accepted_methods": [
              501245
            ], 
            "rules": [
              {
                "default": true, 
                "free_mode": "country", 
                "value": null, 
                "free_shipping_flag": true
              }
            ], 
            "flat": true
          }, 
          "local_pick_up": "optional"
        }
      }, 
      {
        "type": "fulfillment", 
        "attributes": {
          "dimensions": "optional", 
          "costs": "not_allowed", 
          "free": {
            "methods": "optional", 
            "accepted_methods": [
              501245
            ], 
            "rules": [
              {
                "default": true, 
                "free_mode": "country", 
                "value": null, 
                "free_shipping_flag": true
              }
            ], 
            "flat": true
          }, 
          "local_pick_up": "optional", 
          "mandatory_for_user": false, 
        }
      }, 
      {
        "type": "crossdocking", 
        "attributes": {
          "dimensions": "optional", 
          "costs": "not_allowed", 
          "free": {
            "methods": "optional", 
            "accepted_methods": [
              501245
            ], 
            "rules": [
              {
                "default": true, 
                "free_mode": "country", 
                "value": null, 
                "free_shipping_flag": true
              }
            ], 
            "flat": true
          }, 
          "local_pick_up": "optional", 
          "mandatory_for_user": false
        }
      }
    ]
  }, 
  {
    "mode": "custom", 
    "logistic_types": [
      {
        "type": "default", 
        "attributes": {
          "dimensions": "optional", 
          "costs": "not_allowed", 
          "free": {
            "methods": "optional", 
            "accepted_methods": [
              501245
            ], 
            "rules": [
              {
                "default": true, 
                "free_mode": "country", 
                "value": null, 
                "free_shipping_flag": true
              }
            ], 
            "flat": true
          }, 
          "local_pick_up": "optional", 
          "mandatory_for_user": false
        }
      }
    ]
  }, 
  {
    "mode": "not_specified", 
    "logistic_types": [
      {
        "type": "default", 
        "attributes": {
          "dimensions": "optional", 
          "costs": "not_allowed", 
          "free": {
            "methods": "optional", 
            "accepted_methods": [
              501245
            ], 
            "rules": [
              {
                "default": true, 
                "free_mode": "country", 
                "value": null, 
                "free_shipping_flag": true
              }
            ], 
            "flat": true
          }, 
          "local_pick_up": "optional", 
          "mandatory_for_user": false
        }
      }
    ]
  }
]
[
  {
    "mode": "me2", 
"logistic_types": [
      {
        "type": "drop_off", 
        "attributes": {
          "dimensions": "optional", 
          "costs": "not_allowed", 
          "free": {
            "methods": "optional", 
            "accepted_methods": [
              501245
            ], 
            "rules": [
              {
                "default": true, 
                "free_mode": "country", 
                "value": null, 
                "free_shipping_flag": true
              }
            ], 
            "flat": true
          }, 
          "local_pick_up": "optional"
        }
      }, 
      {
        "type": "fulfillment", 
        "attributes": {
          "dimensions": "optional", 
          "costs": "not_allowed", 
          "free": {
            "methods": "optional", 
            "accepted_methods": [
              501245
            ], 
            "rules": [
              {
                "default": true, 
                "free_mode": "country", 
                "value": null, 
                "free_shipping_flag": true
              }
            ], 
            "flat": true
          }, 
          "local_pick_up": "optional", 
          "mandatory_for_user": false, 
          "exceptions_by_strategy": {
            "fulfillment": {
              "local_pick_up": "not_allowed"
            }
          }
        }
      }, 
      {
        "type": "crossdocking", 
        "attributes": {
          "dimensions": "optional", 
          "costs": "not_allowed", 
          "free": {
            "methods": "optional", 
            "accepted_methods": [
              501245
            ], 
            "rules": [
              {
                "default": true, 
                "free_mode": "country", 
                "value": null, 
                "free_shipping_flag": true
              }
            ], 
            "flat": true
          }, 
          "local_pick_up": "optional", 
          "mandatory_for_user": false
        }
      }
    ]
  }, 
  {
    "mode": "custom", 
    "logistic_types": [
      {
        "type": "default", 
        "attributes": {
          "dimensions": "optional", 
          "costs": "not_allowed", 
          "free": {
            "methods": "optional", 
            "accepted_methods": [
              501245
            ], 
            "rules": [
              {
                "default": true, 
                "free_mode": "country", 
                "value": null, 
                "free_shipping_flag": true
              }
            ], 
            "flat": true
          }, 
          "local_pick_up": "optional", 
          "mandatory_for_user": false
        }
      }
    ]
  }, 
  {
    "mode": "not_specified", 
    "logistic_types": [
      {
        "type": "default", 
        "attributes": {
          "dimensions": "optional", 
          "costs": "not_allowed", 
          "free": {
            "methods": "optional", 
            "accepted_methods": [
              501245
            ], 
            "rules": [
              {
                "default": true, 
                "free_mode": "country", 
                "value": null, 
                "free_shipping_flag": true
              }
            ], 
            "flat": true
          }, 
          "local_pick_up": "optional", 
          "mandatory_for_user": false
        }
      }
    ]
  }
]

items

curl -X GET 'https://api.mercadolibre.com/items/{Item_id}'
JSON actualJSON nuevo
{
...
    shipping: {
        mode: "me2",
        local_pick_up: false, 
        free_shipping: false, 
        methods: null, 
        dimensions: null, 
        tags: [
            "me2_available"
        ]
    }
...
}
{
...
    shipping: {
        mode: "me2", 
       logistic_type: "fulfillment",  
        local_pick_up: false, 
        free_shipping: false, 
        methods: null, 
        dimensions: null, 
        tags: [
            "me2_available"
        ]
    }
...
}

shipments

curl -X GET 'https://api.mercadolibre.com/shipments/26186642113?access_token={access_token}'
JSON actualJSON nuevo
{
...
        mode: "me2",
       logistic_type: "fulfillment",  
       picking_type: "fulfillment",  
...
}
{
...
        mode: "me2", 
       logistic_type: "fulfillment",  
    }
...
}

Aclaración: Durante este año estaremos trabajando en la implementación de fulfillment en Mercado Libre por tal motivo estaremos haciendo varios cambios.
¡Quedate atento a nuestros mails y redes sociales para estar al tanto de todo!

¿Quieres saber más al respecto de este cambio?
Te invitamos a ver el siguiente video tutorial: