Pruebas con Carrito de Compras

Ahora que ya conoces cuáles serán los cambios que se aproximan te invitamos a que empieces a probarlos y aplicarlos en tu integración.
En esta guía te mostraremos ejemplos (mocks) de cuáles serán los impactos tanto con una orden o dos.
Antes de comenzar te sugerimos que tengas en cuenta la siguiente lista de IDs para que puedas hacer todas las pruebas necesarias:

IDs utilizados para órdenes

  • 1289297747
  • 1289342697
  • 1289343339

IDs utilizados para envíos

  • 25943308795
  • 25943399273

IDs utilizados para pagos

  • 2574435134
  • 2574244194
  • 2574469257
  • 2574470905
  • 2574470881

Contenidos

Manejo de Órdenes

Tal como mencionamos en la documentación de Manejo de órdenes habrá cambios en la estructura del JSON debido a que la información del envío ya no estará aquí.

Caso de uso con una orden

Llamada:

curl -H "x-format-new:true" 'https://api.mercadolibre.com/carrito_mocks/orders/1289297747?access_token=

Respuesta:

{
  "id": 1289297747,
  "date_created": "2017-03-20T10:20:18-04:00",
  "date_closed": "2017-03-20T10:20:18-04:00",
  "last_updated": "2017-03-20T10:20:18-04:00",
  "feedback": {
    "sale": null,
    "purchase": null
  },
  "mediations": [],
  "comments": null,
  "order_request": {
    "return": null,
    "change": null
  },
  "fulfilled": null,
  "shipping": {
    "id": 25943399273
  },
  "expiration_date": "2017-03-22T10:20:18-04:00",
  "status": "paid",
  "status_detail": null,
  "order_items": [
    {
      "item": {
        "id": "MLM573965343",
        "title": "Item De Testeo, Por Favor No Ofertar",
        "category_id": "MLM1915",
        "variation_id": null,
        "seller_custom_field": null,
        "variation_attributes": [],
        "warranty": null,
        "condition": "new"
      },
      "quantity": 1,
      "unit_price": 200,
      "currency_id": "MXN"
    }
  ],
  "currency_id": "MXN",
  "buyer": {
    "id": 1234567890,
    "nickname": "BUYER_NICKNAME",
    "email": "buyermail@mail.mercadolibre.com.mx",
    "phone": {
      "area_code": "01",
      "number": "1111-1111",
      "extension": "",
      "verified": false
    },
    "alternative_phone": {
      "area_code": "",
      "number": "",
      "extension": ""
    },
    "first_name": "Buyer",
    "last_name": "Buyer",
    "billing_info": {
      "doc_type": null,
      "doc_number": null
    }
  },
  "seller": {
    "id": 246992682,
    "nickname": "TETE2428602",
    "email": "test_user_89782056@testuser.com",
    "phone": {
      "area_code": "01",
      "number": "1111-1111",
      "extension": "",
      "verified": false
    },
    "alternative_phone": {
      "area_code": "",
      "number": "",
      "extension": ""
    },
    "first_name": "Test",
    "last_name": "Test"
  },
  "payments": [
    {
      "id": 2574244194,
      "order_id": 1289297747,
      "payer_id": 238954822,
      "collector": {
        "id": 246992682
      },
      "card_id": null,
      "site_id": "MLM",
      "reason": "Item De Testeo, Por Favor No Ofertar",
      "payment_method_id": "account_money",
      "currency_id": "MXN",
      "installments": null,
      "issuer_id": null,
      "atm_transfer_reference": {
        "company_id": null,
        "transaction_id": null
      },
      "coupon_id": null,
      "activation_uri": null,
      "operation_type": "regular_payment",
      "payment_type": "account_money",
      "available_actions": [],
      "status": "approved",
      "status_code": null,
      "status_detail": "accredited",
      "shipping_cost": 0,
      "coupon_amount": 0,
      "overpaid_amount": 0,
      "total_paid_amount": 200,
      "installment_amount": null,
      "deferred_period": null,
      "date_approved": "2017-03-21T04:20:18-04:00",
      "authorization_code": null,
      "transaction_order_id": null,
      "date_created": "2017-03-21T04:20:18-04:00",
      "date_last_modified": "2017-03-21T04:20:18-04:00"
    }
  ],
  "coupon": {
    "id": null,
    "amount": 0
  },
  "tags": [
    "paid",
    "pack_order"
  ],
  "total_amount": 200,
  "paid_amount": 200
}

Caso de uso con dos órdenes

Orden 1:
Llamada:

curl -H "x-format-new:true" 'https://api.mercadolibre.com/carrito_mocks/orders/1289342697?access_token=

Respuesta:

{
  "id": 1289342697,
  "date_created": "2017-03-20T10:21:10-04:00",
  "date_closed": "2017-03-20T10:21:10-04:00",
  "last_updated": "2017-03-20T10:21:10-04:00",
  "feedback": {
    "sale": null,
    "purchase": null
  },
  "mediations": [],
  "comments": null,
  "order_request": {
    "return": null,
    "change": null
  },
  "fulfilled": null,
  "shipping": {
    "id": 25943308795
  },
  "expiration_date": "2017-03-22T10:21:10-04:00",
  "status": "paid",
  "status_detail": null,
  "order_items": [
    {
      "item": {
        "id": "MLM573965343",
        "title": "Item De Testeo, Por Favor No Ofertar",
        "category_id": "MLM1915",
        "variation_id": null,
        "seller_custom_field": null,
        "variation_attributes": [],
        "warranty": null,
        "condition": "new"
      },
      "quantity": 1,
      "unit_price": 200,
      "currency_id": "MXN"
    }
  ],
  "currency_id": "MXN",
  "buyer": {
    "id": 1234567890,
    "nickname": "BUYER_NICKNAME",
    "email": "buyermail@mail.mercadolibre.com.mx",
    "phone": {
      "area_code": "01",
      "number": "1111-1111",
      "extension": "",
      "verified": false
    },
    "alternative_phone": {
      "area_code": "",
      "number": "",
      "extension": ""
    },
    "first_name": "Buyer",
    "last_name": "Buyer",
    "billing_info": {
      "doc_type": null,
      "doc_number": null
    }
  },
  "seller": {
    "id": 246992682,
    "nickname": "TETE2428602",
    "email": "test_user_89782056@testuser.com",
    "phone": {
      "area_code": "01",
      "number": "1111-1111",
      "extension": "",
      "verified": false
    },
    "alternative_phone": {
      "area_code": "",
      "number": "",
      "extension": ""
    },
    "first_name": "Test",
    "last_name": "Test"
  },
  "payments": [
    {
      "id": 2574469257,
      "order_id": 1289342697,
      "payer_id": 238954822,
      "collector": {
        "id": 246992682
      },
      "card_id": null,
      "site_id": "MLM",
      "reason": "Item De Testeo, Por Favor No Ofertar",
      "payment_method_id": "account_money",
      "currency_id": "MXN",
      "installments": null,
      "issuer_id": null,
      "atm_transfer_reference": {
        "company_id": null,
        "transaction_id": null
      },
      "coupon_id": null,
      "activation_uri": null,
      "operation_type": "regular_payment",
      "payment_type": "account_money",
      "available_actions": [],
      "status": "approved",
      "status_code": null,
      "status_detail": "accredited",
      "shipping_cost": 0,
      "coupon_amount": 0,
      "overpaid_amount": 0,
      "total_paid_amount": 200,
      "installment_amount": null,
      "deferred_period": null,
      "date_approved": "2017-03-21T04:21:10-04:00",
      "authorization_code": null,
      "transaction_order_id": null,
      "date_created": "2017-03-21T04:21:10-04:00",
      "date_last_modified": "2017-03-21T04:21:10-04:00"
    }
  ],
  "coupon": {
    "id": null,
    "amount": 0
  },
  "tags": [
    "paid",
    "pack_order"
  ],
  "total_amount": 200,
  "paid_amount": 200
}

Orden 2:
Llamada:

curl -H "x-format-new:true" 'https://api.mercadolibre.com/carrito_mocks/orders/1289343339?access_token=

Respuesta:

{
  "id": 1289343339,
  "date_created": "2017-03-20T10:21:51-04:00",
  "date_closed": "2017-03-20T10:21:51-04:00",
  "last_updated": "2017-03-20T10:21:51-04:00",
  "feedback": {
    "sale": null,
    "purchase": null
  },
  "mediations": [],
  "comments": null,
  "order_request": {
    "return": null,
    "change": null
  },
  "fulfilled": null,
  "shipping": {
    "id": 25943308795
  },
  "expiration_date": "2017-03-22T10:21:51-04:00",
  "status": "paid",
  "status_detail": null,
  "order_items": [
    {
      "item": {
        "id": "MLM573981104",
        "title": "Item De Testeo -- No Ofertar --kc:off",
        "category_id": "MLM113790",
        "variation_id": 14465627367,
        "seller_custom_field": null,
        "variation_attributes": [
          {
            "id": "10000",
            "name": "Talle",
            "value_id": "cadbd3c",
            "value_name": "S"
          },
          {
            "id": "11000",
            "name": "Color Primario",
            "value_id": "11000-Rojo",
            "value_name": "Rojo"
          }
        ],
        "warranty": null,
        "condition": "not_specified"
      },
      "quantity": 3,
      "unit_price": 100,
      "currency_id": "MXN"
    }
  ],
  "currency_id": "MXN",
  "buyer": {
    "id": 1234567890,
    "nickname": "BUYER_NICKNAME",
    "email": "buyermail@mail.mercadolibre.com.mx",
    "phone": {
      "area_code": "01",
      "number": "1111-1111",
      "extension": "",
      "verified": false
    },
    "alternative_phone": {
      "area_code": "",
      "number": "",
      "extension": ""
    },
    "first_name": "Buyer",
    "last_name": "Buyer",
    "billing_info": {
      "doc_type": null,
      "doc_number": null
    }
  },
  "seller": {
    "id": 246992682,
    "nickname": "TETE2428602",
    "email": "test_user_89782056@testuser.com",
    "phone": {
      "area_code": "01",
      "number": "1111-1111",
      "extension": "",
      "verified": false
    },
    "alternative_phone": {
      "area_code": "",
      "number": "",
      "extension": ""
    },
    "first_name": "Test",
    "last_name": "Test"
  },
  "payments": [
    {
      "id": 2574470905,
      "order_id": 1289343339,
      "payer_id": 238954822,
      "collector": {
        "id": 246992682
      },
      "card_id": null,
      "site_id": "MLM",
      "reason": "Item De Testeo -- No Ofertar --kc:off",
      "payment_method_id": "account_money",
      "currency_id": "MXN",
      "installments": null,
      "issuer_id": null,
      "atm_transfer_reference": {
        "company_id": null,
        "transaction_id": null
      },
      "coupon_id": null,
      "activation_uri": null,
      "operation_type": "regular_payment",
      "payment_type": "account_money",
      "available_actions": [],
      "status": "approved",
      "status_code": null,
      "status_detail": "accredited",
      "shipping_cost": 0,
      "coupon_amount": 0,
      "overpaid_amount": 0,
      "total_paid_amount": 300,
      "installment_amount": null,
      "deferred_period": null,
      "date_approved": "2017-03-21T04:21:51-04:00",
      "authorization_code": null,
      "transaction_order_id": null,
      "date_created": "2017-03-21T04:21:51-04:00",
      "date_last_modified": "2017-03-21T04:21:51-04:00"
    }
  ],
  "coupon": {
    "id": null,
    "amount": 0
  },
  "tags": [
    "paid",
    "pack_order"
  ],
  "total_amount": 300,
  "paid_amount": 300
}

Manejo de Envíos

Según lo detallado en la documentación de Manejo de Envíos, con esta nueva funcionalidad podrás obtener toda la información para concluir la transacción.

Caso de uso con una orden

Shipments
Llamada:

curl -H "x-format-new:true" 'https://api.mercadolibre.com/carrito_mocks/shipments/25943399273?access_token=

Respuesta:

{
  "id": 25943399273,
  "external_reference": "1000000000036021",
  "status": "ready_to_ship",
  "substatus": "ready_to_print",
  "date_created": "2017-03-20T10:05:51-04:00",
  "last_updated": "2017-03-20T10:05:51-04:00",
  "declared_value": 200,
  "dimensions": {
    "height": 30,
    "width": 30,
    "length": 30,
    "weight": 1800
  },
  "logistic": {
    "direction": "forward",
    "mode": "me2",
    "type": null
  },
  "source": {
    "site_id": "MLM",
    "market_place": "MELI",
    "application_id": null
  },
  "tracking_number": "12345",
  "origin": {
    "type": "selling_address",
    "sender_id": 246992682,
    "shipping_address": {
      "address_id": 265420702,
      "address_line": "Testing Street 1450",
      "street_name": "Testing Street",
      "street_number": "1450",
      "comment": "",
      "zip_code": "1430",
      "city": {
        "id": "TUxBQlNBQTM3Mzda",
        "name": "Saavedra"
      },
      "state": {
        "id": "AR-C",
        "name": "Capital Federal"
      },
      "country": {
        "id": "AR",
        "name": "Argentina"
      },
      "neighborhood": {
        "id": null,
        "name": "The Neighborhood"
      },
      "municipality": {
        "id": null,
        "name": ""
      },
      "types": [
        "billing",
        "default_selling_address",
        "shipping"
      ],
      "agency": null,
      "latitude": 0,
      "longitude": 0,
      "geolocation_type": "",
      "is_valid_for_carrier": null
    }
  },
  "destination": {
    "type": "buying_address",
    "receiver_id": 238954822,
    "receiver_name": null,
    "receiver_phone": null,
    "shipping_address": {
      "address_id": 211540565,
      "address_line": "Test Avenue 1444",
      "street_name": "Test Avenue",
      "street_number": "1444",
      "comment": "",
      "zip_code": "45010",
      "city": {
        "id": "TUxNQ1pBUDM4NzE",
        "name": "Zapopan"
      },
      "state": {
        "id": "MX-JAL",
        "name": "Jalisco"
      },
      "country": {
        "id": "MX",
        "name": "Mexico"
      },
      "neighborhood": {
        "id": null,
        "name": "The Neighborhood"
      },
      "municipality": {
        "id": null,
        "name": ""
      },
      "types": [
        "default_selling_address",
        "shipping",
        "billing"
      ],
      "agency": null,
      "latitude": 20.67,
      "longitude": -103.42,
      "geolocation_type": "APPROXIMATE",
      "is_valid_for_carrier": null
    }
  },
  "lead_time": {
    "option_id": 111111111,
    "shipping_method": {
      "id": 501245,
      "name": "Estándar",
      "type": "standard"
    },
    "currency_id": "MXN",
    "cost": 20,
    "cost_type": "charged",
    "service_id": 181,
    "estimated_delivery_time": {
      "type": "known",
      "date": "2017-03-26T00:00:00-04:00",
      "shipping": 96,
      "handling": 24,
      "unit": "hour",
      "offset": {
        "date": "2017-03-28T00:00:00-04:00",
        "shipping": 48
      },
      "time_frame": {
        "from": "2017-03-28T09:00:00-04:00",
        "to": "2017-03-28T18:00:00-04:00"
      },
      "pay_before": null
    }
  },
  "tags": []
}

Shipment items
Llamada:

curl -H "x-format-new:true" 'https://api.mercadolibre.com/carrito_mocks/shipments/25943399273/items?access_token=

Respuesta:

[
  {
    "item_id": "MLM573965343",
    "variation_id": null,
    "description": "Item De Testeo, Por Favor No Ofertar",
    "quantity": 1,
    "dimensions": {
      "height": 30,
      "width": 30,
      "length": 30,
      "weight": 1800
    },
    "order_id": "1289297747",
    "sender_id": 246992682
  }
]

Shipment costs
Llamada:

curl -H "x-format-new:true" 'https://api.mercadolibre.com/carrito_mocks/shipments/25943399273/costs?access_token=

Respuesta:

{
  "receiver": {
    "user_id": 1234567890,
    "cost": 20,
    "discount": {
      "rate": 0.5,
      "type": "loyal",
      "promoted_amount": 0
    },
    "compensation": 0,
    "save": 0
  },
  "senders": [
    {
      "user_id": 246992682,
      "cost": 0,
      "discount": {
        "rate": 0,
        "rate_type": null,
        "promoted_amount": 0
      },
      "compensation": 0,
      "save": 0
    }
  ]
}

Shipment lead time
Llamada:

curl -H "x-format-new:true" 'https://api.mercadolibre.com/carrito_mocks/shipments/25943399273/lead_time?access_token=

Respuesta:

{
  "option_id": 111111111,
  "shipping_method": {
    "id": 501245,
    "name": "Estándar",
    "type": "standard"
  },
  "currency_id": "MXN",
  "cost": 20,
  "cost_type": "charged",
  "service_id": 181,
  "estimated_delivery_time": {
    "type": "known",
    "date": "2017-03-26T00:00:00-04:00",
    "shipping": 96,
    "handling": 24,
    "unit": "hour",
    "offset": {
      "date": "2017-03-28T00:00:00-04:00",
      "shipping": 48
    },
    "time_frame": {
      "from": "2017-03-28T09:00:00-04:00",
      "to": "2017-03-28T18:00:00-04:00"
    },
    "pay_before": null
  },
  "estimated_handling_limit": {
    "date": "2017-03-22T00:00:00-04:00"
  },
  "estimated_delivery_extended": {
    "date": "2017-03-31T00:00:00-04:00"
  },
  "estimated_delivery_limit": {
    "date": "2017-04-10T00:00:00-04:00"
  },
  "estimated_delivery_final": {
    "date": "2017-04-20T00:00:00-04:00"
  },
  "delay": []
}

Shipment history
Llamada:

curl -H "x-format-new:true" 'https://api.mercadolibre.com/carrito_mocks/shipments/25943399273/history?access_token=

Respuesta:

[
  {
    "status": "pending",
    "substatus": "shipment_paid",
    "date": "2017-03-20T10:08:34-04:00"
  },
  {
    "status": "handling",
    "substatus": null,
    "date": "2017-03-20T10:13:34-04:00"
  },
  {
    "status": "ready_to_ship",
    "substatus": "ready_to_print",
    "date": "2017-03-20T10:18:34-04:00"
  },
  {
    "status": "ready_to_ship",
    "substatus": "printed",
    "date": "2017-03-20T10:23:34-04:00"
  },
  {
    "status": "shipped",
    "substatus": null,
    "date": "2017-03-21T10:23:34-04:00"
  },
  {
    "status": "delivered",
    "substatus": null,
    "date": "2017-03-23T10:23:34-04:00"
  }
]

Shipment payments
Llamada:

curl -H "x-format-new:true" 'https://api.mercadolibre.com/carrito_mocks/shipments/25943399273/payments?access_token=

Respuesta:

[
  {
    "payment_id": 2574435134,
    "amount": 20,
    "status": "approved"
  }
]

Caso de uso con dos órdenes

Shipment
Llamada:

curl -H "x-format-new:true" 'https://api.mercadolibre.com/carrito_mocks/shipments/25943308795?access_token=

Respuesta:

{
  "id": 25943308795,
  "external_reference": "1000000000036026",
  "status": "ready_to_ship",
  "substatus": "ready_to_print",
  "date_created": "2017-03-20T10:09:46-04:00",
  "last_updated": "2017-03-20T10:09:46-04:00",
  "declared_value": 500,
  "dimensions": {
    "height": 60,
    "width": 60,
    "length": 30,
    "weight": 7200
  },
  "logistic": {
    "direction": "forward",
    "mode": "me2",
    "type": null
  },
  "source": {
    "site_id": "MLM",
    "market_place": "MELI",
    "application_id": null
  },
  "tracking_number": "123456ABC",
  "origin": {
    "type": "selling_address",
    "sender_id": 246992682,
    "shipping_address": {
      "address_id": 265420702,
      "address_line": "Testing Street 1450",
      "street_name": "Testing Street",
      "street_number": "1450",
      "comment": "",
      "zip_code": "1430",
      "city": {
        "id": "TUxBQlNBQTM3Mzda",
        "name": "Saavedra"
      },
      "state": {
        "id": "AR-C",
        "name": "Capital Federal"
      },
      "country": {
        "id": "AR",
        "name": "Argentina"
      },
      "neighborhood": {
        "id": null,
        "name": "The Neighborhood"
      },
      "municipality": {
        "id": null,
        "name": ""
      },
      "types": [
        "billing",
        "default_selling_address",
        "shipping"
      ],
      "agency": {
        "agency_id": null,
        "carrier_id": null,
        "description": null,
        "open_hours": null,
        "phone": null
      },
      "latitude": 0,
      "longitude": 0,
      "geolocation_type": "",
      "is_valid_for_carrier": null
    }
  },
  "destination": {
    "type": "buying_address",
    "receiver_id": 238954822,
    "receiver_name": null,
    "receiver_phone": null,
    "shipping_address": {
      "address_id": 211540565,
      "address_line": "Testing Street 1450",
      "street_name": "Testing Street",
      "street_number": "1450",
      "comment": "",
      "zip_code": "45010",
      "city": {
        "id": "TUxNQ1pBUDM4NzE",
        "name": "Zapopan"
      },
      "state": {
        "id": "MX-JAL",
        "name": "Jalisco"
      },
      "country": {
        "id": "MX",
        "name": "Mexico"
      },
      "neighborhood": {
        "id": null,
        "name": "The Neighborhood"
      },
      "municipality": {
        "id": null,
        "name": ""
      },
      "types": [
        "default_selling_address",
        "shipping",
        "billing"
      ],
      "agency": {
        "agency_id": null,
        "carrier_id": null,
        "description": null,
        "open_hours": null,
        "phone": null
      },
      "latitude": 20.67,
      "longitude": -103.42,
      "geolocation_type": "APPROXIMATE",
      "is_valid_for_carrier": null
    }
  },
  "lead_time": {
    "option_id": 111111111,
    "shipping_method": {
      "id": 501245,
      "name": "Estándar",
      "type": "standard"
    },
    "currency_id": "MXN",
    "cost": 20,
    "cost_type": "charged",
    "service_id": 181,
    "estimated_delivery_time": {
      "type": "known",
      "date": "2017-03-26T00:00:00-04:00",
      "shipping": 96,
      "handling": 24,
      "unit": "hour",
      "offset": {
        "date": "2017-03-28T00:00:00-04:00",
        "shipping": 48
      },
      "time_frame": {
        "from": "2017-03-28T09:00:00-04:00",
        "to": "2017-03-28T18:00:00-04:00"
      },
      "pay_before": null
    }
  },
  "tags": []
}

Shipment items
Llamada:

curl -H "x-format-new:true" 'https://api.mercadolibre.com/carrito_mocks/shipments/25943308795/items?access_token=

Respuesta:

[
  {
    "item_id": "MLM573965343",
    "variation_id": null,
    "description": "Item De Testeo, Por Favor No Ofertar",
    "quantity": 1,
    "dimensions": {
      "height": 30,
      "width": 30,
      "length": 30,
      "weight": 1800
    },
    "order_id": "1289342697",
    "sender_id": 246992682
  },
  {
    "item_id": "MLM573981104",
    "variation_id": "14465627367",
    "description": "Item De Testeo -- No Ofertar --kc:off",
    "quantity": 3,
    "dimensions": {
      "height": 30,
      "width": 30,
      "length": 30,
      "weight": 1800
    },
    "order_id": "1289343339",
    "sender_id": 246992682
  }
]

Shipment costs
Llamada:

curl -H "x-format-new:true" 'https://api.mercadolibre.com/carrito_mocks/shipments/25943308795/costs?access_token=

Respuesta:

{
  "receiver": {
    "user_id": 238954822,
    "cost": 50,
    "discount": {
      "rate": 0.5,
      "type": "loyal",
      "promoted_amount": 0
    },
    "compensation": 0,
    "save": 20
  },
  "senders": [
    {
      "user_id": 246992682,
      "cost": 0,
      "discount": {
        "rate": 0,
        "rate_type": null,
        "promoted_amount": 0
      },
      "compensation": 0,
      "save": 0
    }
  ]
}

Shipment lead time
Llamada:

curl -H "x-format-new:true" 'https://api.mercadolibre.com/carrito_mocks/shipments/25943308795/lead_time?access_token=

Respuesta:

{
  "option_id": 111111111,
  "shipping_method": {
    "id": 501245,
    "name": "Estándar",
    "type": "standard"
  },
  "currency_id": "MXN",
  "cost": 50,
  "cost_type": "charged",
  "service_id": 181,
  "estimated_delivery_time": {
    "type": "known",
    "date": "2017-03-26T00:00:00-04:00",
    "shipping": 96,
    "handling": 24,
    "unit": "hour",
    "offset": {
      "date": "2017-03-28T00:00:00-04:00",
      "shipping": 48
    },
    "time_frame": {
      "from": "2017-03-28T09:00:00-04:00",
      "to": "2017-03-28T18:00:00-04:00"
    },
    "pay_before": null
  },
  "estimated_handling_limit": {
    "date": "2017-03-22T00:00:00-04:00"
  },
  "estimated_delivery_extended": {
    "date": "2017-03-31T00:00:00-04:00"
  },
  "estimated_delivery_limit": {
    "date": "2017-04-10T00:00:00-04:00"
  },
  "estimated_delivery_final": {
    "date": "2017-04-20T00:00:00-04:00"
  },
  "delay": []
}

Shipment history
Llamada:

curl -H "x-format-new:true" 'https://api.mercadolibre.com/carrito_mocks/shipments/25943308795/history?access_token=

Respuesta:

[
  {
    "status": "pending",
    "substatus": "shipment_paid",
    "date": "2017-03-20T10:11:39-04:00"
  },
  {
    "status": "handling",
    "substatus": null,
    "date": "2017-03-20T10:16:39-04:00"
  },
  {
    "status": "ready_to_ship",
    "substatus": "ready_to_print",
    "date": "2017-03-20T10:21:39-04:00"
  },
  {
    "status": "ready_to_ship",
    "substatus": "printed",
    "date": "2017-03-20T10:26:39-04:00"
  },
  {
    "status": "shipped",
    "substatus": null,
    "date": "2017-03-21T10:26:39-04:00"
  },
  {
    "status": "delivered",
    "substatus": null,
    "date": "2017-03-23T10:26:39-04:00"
  }
]

Shipment payments
Llamada:

curl -H "x-format-new:true" 'https://api.mercadolibre.com/carrito_mocks/shipments/25943308795/payments?access_token=

Respuesta:

[
  {
    "payment_id": 2574470881,
    "amount": 50,
    "status": "approved"
  }
]

Manejo de Pagos

Por último, también deberás tener en cuenta el Manejo de Pagos dentro de estos cambios.

Caso de uso con una orden

Payment (Pago del shipment)
Llamada:

curl -H "x-format-new:true" 'https://api.mercadolibre.com/carrito_mocks/payments/2574435134?access_token=

Respuesta:

{
  "id": 2574435134,
  "site_id": "MLM",
  "date_created": "2017-03-21T10:12:34-04:00",
  "date_approved": "2017-03-21T10:12:34-04:00",
  "money_release_date": "2017-03-21T10:12:34-04:00",
  "last_modified": "2017-03-21T10:12:34-04:00",
  "sponsor_id": null,
  "collector_id": 246992682,
  "payer": {
    "id": 222113214,
    "email": "test_user_64693035@testuser.com",
    "phone": {
      "area_code": "01",
      "number": "1111-1111",
      "extension": "",
      "verified": false
    },
    "identification": {
      "type": "IFE",
      "number": "11111111111"
    }
  },
  "order_id": "25943399273",
  "external_reference": "25943399273",
  "merchant_order_id": null,
  "reason": "marketplace_shipment",
  "currency_id": "MXN",
  "transaction_amount": 20,
  "mercadopago_fee": 0,
  "net_received_amount": 20,
  "total_paid_amount": 20,
  "shipping_cost": 0,
  "coupon_amount": 0,
  "coupon_fee": 0,
  "finance_fee": 0,
  "discount_fee": 0,
  "coupon_id": null,
  "status": "approved",
  "status_detail": "accredited",
  "status_code": null,
  "issuer_id": null,
  "installment_amount": 0,
  "deferred_period": null,
  "account_money_amount": 0,
  "payment_type": "account_money",
  "payment_method_id": "account_money",
  "marketplace": "MELI",
  "operation_type": "regular_payment",
  "marketplace_fee": 0,
  "released": "no",
  "deduction_schema": null,
  "tags": [],
  "refunds": [],
  "amount_refunded": 0,
  "client_id": "6492251534497263",
  "created_from": "6492251534497263",
  "notification_url": null,
  "concept_id": null,
  "concept_amount": 0,
  "internal_metadata": {
    "rule_id": "50006",
    "concept": "marketplace_shipment",
    "type": "outbound_payment",
    "splitter_id": "74066",
    "billing_infomation": {
      "buyer": {
        "id": 0,
        "identification": {
          "type": "",
          "number": ""
        }
      },
      "cardholder": {
        "name": "",
        "identification": {
          "number": "",
          "type": ""
        }
      }
    }
  }
}

Payment (Pago de la orden)
Llamada:

curl -H "x-format-new:true" 'https://api.mercadolibre.com/carrito_mocks/payments/2574244194?access_token=

Respuesta:

{
  "id": 2574244194,
  "site_id": "MLM",
  "date_created": "2017-03-21T10:13:22-04:00",
  "date_approved": "2017-03-21T10:13:22-04:00",
  "money_release_date": "2017-03-21T10:13:22-04:00",
  "last_modified": "2017-03-21T10:13:22-04:00",
  "sponsor_id": null,
  "collector_id": 246992682,
  "payer": {
    "id": 238954822,
    "email": "test_user_64693035@testuser.com",
    "phone": {
      "area_code": "01",
      "number": "1111-1111",
      "extension": "",
      "verified": false
    },
    "identification": {
      "type": "IFE",
      "number": "11111111111"
    }
  },
  "order_id": "1289297747",
  "external_reference": "1289297747",
  "merchant_order_id": null,
  "reason": "Item De Testeo, Por Favor No Ofertar",
  "currency_id": "MXN",
  "transaction_amount": 200,
  "mercadopago_fee": 0,
  "net_received_amount": 174,
  "total_paid_amount": 200,
  "shipping_cost": 0,
  "coupon_amount": 0,
  "coupon_fee": 0,
  "finance_fee": 0,
  "discount_fee": 0,
  "coupon_id": null,
  "status": "approved",
  "status_detail": "accredited",
  "status_code": null,
  "issuer_id": null,
  "installment_amount": 0,
  "deferred_period": null,
  "account_money_amount": 0,
  "payment_type": "account_money",
  "payment_method_id": "account_money",
  "marketplace": "MELI",
  "operation_type": "regular_payment",
  "marketplace_fee": 26,
  "released": "no",
  "deduction_schema": null,
  "tags": [],
  "refunds": [],
  "amount_refunded": 0,
  "client_id": "6492251534497263",
  "created_from": "6492251534497263",
  "notification_url": null,
  "concept_id": null,
  "concept_amount": 0,
  "internal_metadata": {
    "rule_id": "50005",
    "concept": "marketplace_order",
    "type": "outbound_payment",
    "splitter_id": "74066",
   "billing_infomation": {
      "buyer": {
        "id": 0,
        "identification": {
          "type": "",
          "number": ""
        }
      },
      "cardholder": {
        "name": "",
        "identification": {
          "number": "",
          "type": ""
        }
      }
    }
  }
}

Payment (Versión 1 Pago de la orden)
Llamada:

curl -H "x-format-new:true" 'https://api.mercadolibre.com/carrito_mocks/collections/2574244194?access_token=

Respuesta:

{
  "id": 2574244194,
  "statement_descriptor": null,
  "captured": true,
  "date_created": "2017-03-21T10:14:20-04:00",
  "date_last_updated": "2017-03-21T10:14:20-04:00",
  "date_approved": "2017-03-21T10:14:20-04:00",
  "payer_id": 222113214,
  "issuer_id": null,
  "description": "Item De Testeo, Por Favor No Ofertar",
  "transaction_amount": 200,
  "card": {},
  "transaction_details": {
    "total_paid_amount": 200,
    "payment_method_reference_id": null,
    "net_received_amount": 174,
    "financial_institution": null,
    "installment_amount": 0,
    "external_resource_url": null,
    "overpaid_amount": 0
  },
  "coupon_amount": 0,
  "metadata": {},
  "collector_id": 246992682,
  "status": "approved",
  "status_detail": "accredited",
  "transaction_id": null,
  "installments": 1,
  "internal_metadata": {
    "rule_id": "50005",
    "concept": "marketplace_order",
    "type": "outbound_payment",
    "splitter_id": "74066",
    "billing_infomation": {
      "buyer": {
        "id": 0,
        "identification": {
          "type": "",
          "number": ""
        }
      },
      "cardholder": {
        "name": "",
        "identification": {
          "number": "",
          "type": ""
        }
      }
    }
  },
  "refunds": [],
  "payment_type_id": "account_money",
  "profile_id": null,
  "payer_tags": [],
  "coupon_id": null,
  "fee_details": [
    {
      "amount": 26,
      "fee_payer": "collector",
      "type": "application_fee"
    }
  ],
  "collector": {
    "id": 246992682,
    "first_name": "Test",
    "last_name": "Test",
    "phone": {
      "extension": "",
      "area_code": "01",
      "number": "1111-1111"
    },
    "email": "test_user_89782056@testuser.com",
    "identification": {
      "number": "1111111",
      "type": "DNI"
    }
  },
  "money_release_days": 0,
  "order": {},
  "external_reference": "1289297747",
  "available_actions": [],
  "application_id": 6492251534497263,
  "marketplace": "MELI",
  "risk_execution_id": 13960639183,
  "call_for_authorize_id": null,
  "api_version": "2",
  "currency_id": "MXN",
  "sponsor_id": null,
  "payment_method_id": "account_money",
  "deduction_schema": null,
  "site_id": "MLM",
  "operation_type": "regular_payment",
  "binary_mode": false,
  "money_release_date": "2017-03-21T10:14:20-04:00",
  "differential_pricing_id": null,
  "payer": {
    "id": "222113214",
    "first_name": "Test",
    "last_name": "Test",
    "phone": {
      "extension": null,
      "area_code": "01",
      "number": "1111-1111"
    },
    "email": "test_user_64693035@testuser.com",
    "identification": {
      "number": "11111111111",
      "type": "IFE"
    },
    "entity_type": null,
    "type": "registred"
  },
  "notification_url": null,
  "transaction_amount_refunded": 0,
  "authorization_code": null,
  "live_mode": true
}

Payment (Versión 1 Pago del shipment)
Llamada:

curl -H "x-format-new:true" 'https://api.mercadolibre.com/carrito_mocks/collections/2574435134?access_token=

Respuesta:

{
  "id": 2574435134,
  "statement_descriptor": null,
  "captured": true,
  "date_created": "2017-03-21T10:16:27-04:00",
  "date_last_updated": "2017-03-21T10:16:27-04:00",
  "date_approved": "2017-03-21T10:16:27-04:00",
  "payer_id": 222113214,
  "issuer_id": null,
  "description": "marketplace_shipment",
  "transaction_amount": 20,
  "card": {},
  "transaction_details": {
    "total_paid_amount": 20,
    "payment_method_reference_id": null,
    "net_received_amount": 20,
    "financial_institution": null,
    "installment_amount": 0,
    "external_resource_url": null,
    "overpaid_amount": 0
  },
  "coupon_amount": 0,
  "metadata": {},
  "collector_id": 246992682,
  "status": "approved",
  "status_detail": "accredited",
  "transaction_id": null,
  "installments": 1,
  "internal_metadata": {
    "rule_id": "50006",
    "concept": "marketplace_shipment",
    "type": "outbound_payment",
    "splitter_id": "74066",
    "billing_infomation": {
      "buyer": {
        "id": 0,
        "identification": {
          "type": "",
          "number": ""
        }
      },
      "cardholder": {
        "name": "",
        "identification": {
          "number": "",
          "type": ""
        }
      }
    }
  },
  "refunds": [],
  "payment_type_id": "account_money",
  "profile_id": null,
  "payer_tags": [],
  "coupon_id": null,
  "fee_details": [],
  "collector": {
    "id": 246992682,
    "first_name": "Test",
    "last_name": "Test",
    "phone": {
      "extension": "",
      "area_code": "01",
      "number": "1111-1111"
    },
    "email": "test_user_89782056@testuser.com",
    "identification": {
      "number": "1111111",
      "type": "DNI"
    }
  },
  "money_release_days": 0,
  "order": {},
  "external_reference": "25943399273",
  "available_actions": [],
  "application_id": 6492251534497263,
  "marketplace": "MELI",
  "risk_execution_id": 13962524282,
  "call_for_authorize_id": null,
  "api_version": "2",
  "currency_id": "MXN",
  "sponsor_id": null,
  "payment_method_id": "account_money",
  "deduction_schema": null,
  "site_id": "MLM",
  "operation_type": "regular_payment",
  "binary_mode": false,
  "money_release_date": "2017-03-21T10:16:27-04:00",
  "differential_pricing_id": null,
  "payer": {
    "id": "222113214",
    "first_name": "Test",
    "last_name": "Test",
    "phone": {
      "extension": null,
      "area_code": "01",
      "number": "1111-1111"
    },
    "email": "test_user_64693035@testuser.com",
    "identification": {
      "number": "11111111111",
      "type": "IFE"
    },
    "entity_type": null,
    "type": "registred"
  },
  "notification_url": null,
  "transaction_amount_refunded": 0,
  "authorization_code": null,
  "live_mode": true
}

Caso de uso con dos órdenes

Payment (Pago de la orden 1)
Llamada:

curl -H "x-format-new:true" 'https://api.mercadolibre.com/carrito_mocks/payments/2574469257?access_token=

Respuesta:

{
  "id": 2574469257,
  "site_id": "MLM",
  "date_created": "2017-03-21T10:17:03-04:00",
  "date_approved": "2017-03-21T10:17:03-04:00",
  "money_release_date": "2017-03-21T10:17:03-04:00",
  "last_modified": "2017-03-21T10:17:03-04:00",
  "sponsor_id": null,
  "collector_id": 246992682,
  "payer": {
    "id": 240490047,
    "email": "test_user_9968521@testuser.com",
    "phone": {
      "area_code": "null",
      "number": "null",
      "extension": "",
      "verified": false
    },
    "identification": {
      "type": "",
      "number": ""
    }
  },
  "order_id": "1289342697",
  "external_reference": "1289342697",
  "merchant_order_id": null,
  "reason": "Item De Testeo, Por Favor No Ofertar",
  "currency_id": "MXN",
  "transaction_amount": 200,
  "mercadopago_fee": 0,
  "net_received_amount": 200,
  "total_paid_amount": 200,
  "shipping_cost": 0,
  "coupon_amount": 0,
  "coupon_fee": 0,
  "finance_fee": 0,
  "discount_fee": 0,
  "coupon_id": null,
  "status": "approved",
  "status_detail": "accredited",
  "status_code": null,
  "issuer_id": null,
  "installment_amount": 0,
  "deferred_period": null,
  "account_money_amount": 0,
  "payment_type": "account_money",
  "payment_method_id": "account_money",
  "marketplace": "MELI",
  "operation_type": "regular_payment",
  "marketplace_fee": 0,
  "released": "no",
  "deduction_schema": null,
  "tags": [
    "new"
  ],
  "refunds": [],
  "amount_refunded": 0,
  "client_id": "6492251534497263",
  "created_from": "6492251534497263",
  "notification_url": null,
  "concept_id": null,
  "concept_amount": 0,
  "internal_metadata": {
    "rule_id": "50005",
    "concept": "marketplace_order",
    "type": "outbound_payment",
    "splitter_id": "74066",
   "billing_infomation": {
      "buyer": {
        "id": 0,
        "identification": {
          "type": "",
          "number": ""
        }
      },
      "cardholder": {
        "name": "",
        "identification": {
          "number": "",
          "type": ""
        }
      }
    }
  }
}

Payment (Pago de la orden 2)
Llamada:

curl -H "x-format-new:true" 'https://api.mercadolibre.com/carrito_mocks/payments/2574470905?access_token=

Respuesta:

{
  "id": 2574470905,
  "site_id": "MLM",
  "date_created": "2017-03-21T10:17:27-04:00",
  "date_approved": "2017-03-21T10:17:27-04:00",
  "money_release_date": "2017-03-21T10:17:27-04:00",
  "last_modified": "2017-03-21T10:17:27-04:00",
  "sponsor_id": null,
  "collector_id": 246992682,
  "payer": {
    "id": 240490047,
    "email": "test_user_9968521@testuser.com",
    "phone": {
      "area_code": "null",
      "number": "null",
      "extension": "",
      "verified": false
    },
    "identification": {
      "type": "",
      "number": ""
    }
  },
  "order_id": "1289343339",
  "external_reference": "1289343339",
  "merchant_order_id": null,
  "reason": "Item De Testeo -- No Ofertar --kc:off",
  "currency_id": "MXN",
  "transaction_amount": 300,
  "mercadopago_fee": 0,
  "net_received_amount": 300,
  "total_paid_amount": 300,
  "shipping_cost": 0,
  "coupon_amount": 0,
  "coupon_fee": 0,
  "finance_fee": 0,
  "discount_fee": 0,
  "coupon_id": null,
  "status": "approved",
  "status_detail": "accredited",
  "status_code": null,
  "issuer_id": null,
  "installment_amount": 0,
  "deferred_period": null,
  "account_money_amount": 0,
  "payment_type": "account_money",
  "payment_method_id": "account_money",
  "marketplace": "MELI",
  "operation_type": "regular_payment",
  "marketplace_fee": 0,
  "released": "no",
  "deduction_schema": null,
  "tags": [
    "new"
  ],
  "refunds": [],
  "amount_refunded": 0,
  "client_id": "6492251534497263",
  "created_from": "6492251534497263",
  "notification_url": null,
  "concept_id": null,
  "concept_amount": 0,
  "internal_metadata": {
    "rule_id": "50005",
    "concept": "marketplace_order",
    "type": "outbound_payment",
    "splitter_id": "74066",
    "billing_infomation": {
      "buyer": {
        "id": 0,
        "identification": {
          "type": "",
          "number": ""
        }
      },
      "cardholder": {
        "name": "",
        "identification": {
          "number": "",
          "type": ""
        }
      }
    }
  }
}

Payment (Pago del shipment)
Llamada:

curl -H "x-format-new:true" 'https://api.mercadolibre.com/carrito_mocks/payments/2574470881?access_token=

Respuesta:

{
  "id": 2574470881,
  "site_id": "MLM",
  "date_created": "2017-03-21T10:17:51-04:00",
  "date_approved": "2017-03-21T10:17:51-04:00",
  "money_release_date": "2017-03-21T10:17:51-04:00",
  "last_modified": "2017-03-21T10:17:51-04:00",
  "sponsor_id": null,
  "collector_id": 246992682,
  "payer": {
    "id": 222113214,
    "email": "test_user_64693035@testuser.com",
    "phone": {
      "area_code": "01",
      "number": "1111-1111",
      "extension": "",
      "verified": false
    },
    "identification": {
      "type": "IFE",
      "number": "11111111111"
    }
  },
  "order_id": "25943308795",
  "external_reference": "25943308795",
  "merchant_order_id": null,
  "reason": "marketplace_shipment",
  "currency_id": "MXN",
  "transaction_amount": 50,
  "mercadopago_fee": 0,
  "net_received_amount": 50,
  "total_paid_amount": 50,
  "shipping_cost": 0,
  "coupon_amount": 0,
  "coupon_fee": 0,
  "finance_fee": 0,
  "discount_fee": 0,
  "coupon_id": null,
  "status": "approved",
  "status_detail": "accredited",
  "status_code": null,
  "issuer_id": null,
  "installment_amount": 0,
  "deferred_period": null,
  "account_money_amount": 0,
  "payment_type": "account_money",
  "payment_method_id": "account_money",
  "marketplace": "MELI",
  "operation_type": "regular_payment",
  "marketplace_fee": 0,
  "released": "no",
  "deduction_schema": null,
  "tags": [],
  "refunds": [],
  "amount_refunded": 0,
  "client_id": "6492251534497263",
  "created_from": "6492251534497263",
  "notification_url": null,
  "concept_id": null,
  "concept_amount": 0,
  "internal_metadata": {
    "rule_id": "52004",
    "concept": "marketplace_shipment",
    "type": "outbound_payment",
    "splitter_id": "76063",
   "billing_infomation": {
      "buyer": {
        "id": 0,
        "identification": {
          "type": "",
          "number": ""
        }
      },
      "cardholder": {
        "name": "",
        "identification": {
          "number": "",
          "type": ""
        }
      }    }

  }
}

Payment (Versión 1 Pago de la orden 1)
Llamada:

curl -H "x-format-new:true" 'https://api.mercadolibre.com/carrito_mocks/collections/2574469257?access_token=

Respuesta:

{
  "id": 2574469257,
  "statement_descriptor": null,
  "captured": true,
  "date_created": "2017-03-21T10:18:25-04:00",
  "date_last_updated": "2017-03-21T10:18:25-04:00",
  "date_approved": "2017-03-21T10:18:25-04:00",
  "payer_id": 222113214,
  "issuer_id": null,
  "description": "Item De Testeo, Por Favor No Ofertar",
  "transaction_amount": 200,
  "card": {},
  "transaction_details": {
    "total_paid_amount": 200,
    "payment_method_reference_id": null,
    "net_received_amount": 174,
    "financial_institution": null,
    "installment_amount": 0,
    "external_resource_url": null,
    "overpaid_amount": 0
  },
  "coupon_amount": 0,
  "metadata": {},
  "collector_id": 246992682,
  "status": "approved",
  "status_detail": "accredited",
  "transaction_id": null,
  "installments": 1,
  "internal_metadata": {
    "rule_id": "52001",
    "concept": "marketplace_order",
    "type": "outbound_payment",
    "splitter_id": "76062",
    "billing_infomation": {
      "buyer": {
        "id": 0,
        "identification": {
          "type": "",
          "number": ""
        }
      },
      "cardholder": {
        "name": "",
        "identification": {
          "number": "",
          "type": ""
        }
      }
    }
  },
  "refunds": [],
  "payment_type_id": "account_money",
  "profile_id": null,
  "payer_tags": [],
  "coupon_id": null,
  "fee_details": [
    {
      "amount": 26,
      "fee_payer": "collector",
      "type": "application_fee"
    }
  ],
  "collector": {
    "id": 246992682,
    "first_name": "Test",
    "last_name": "Test",
    "phone": {
      "extension": "",
      "area_code": "01",
      "number": "1111-1111"
    },
    "email": "test_user_89782056@testuser.com",
    "identification": {
      "number": "1111111",
      "type": "DNI"
    }
  },
  "money_release_days": 0,
  "order": {},
  "external_reference": "1289342697",
  "available_actions": [],
  "application_id": 6492251534497263,
  "marketplace": "MELI",
  "risk_execution_id": 13962540810,
  "call_for_authorize_id": null,
  "api_version": "2",
  "currency_id": "MXN",
  "sponsor_id": null,
  "payment_method_id": "account_money",
  "deduction_schema": null,
  "site_id": "MLM",
  "operation_type": "regular_payment",
  "binary_mode": false,
  "money_release_date": "2017-03-21T10:18:25-04:00",
  "differential_pricing_id": null,
  "payer": {
    "id": "222113214",
    "first_name": "Test",
    "last_name": "Test",
    "phone": {
      "extension": null,
      "area_code": "01",
      "number": "1111-1111"
    },
    "email": "test_user_64693035@testuser.com",
    "identification": {
      "number": "11111111111",
      "type": "IFE"
    },
    "entity_type": null,
    "type": "registred"
  },
  "notification_url": null,
  "transaction_amount_refunded": 0,
  "authorization_code": null,
  "live_mode": true
}

Payment (Versión 1 Pago de la orden 2)
Llamada:

curl -H "x-format-new:true" 'https://api.mercadolibre.com/carrito_mocks/collections/2574470905?access_token=

Respuesta:

{
  "id": 2574470905,
  "statement_descriptor": null,
  "captured": true,
  "date_created": "2017-03-21T10:18:49-04:00",
  "date_last_updated": "2017-03-21T10:18:49-04:00",
  "date_approved": "2017-03-21T10:18:49-04:00",
  "payer_id": 222113214,
  "issuer_id": null,
  "description": "Item De Testeo -- No Ofertar --kc:off",
  "transaction_amount": 300,
  "card": {},
  "transaction_details": {
    "total_paid_amount": 300,
    "payment_method_reference_id": null,
    "net_received_amount": 261,
    "financial_institution": null,
    "installment_amount": 0,
    "external_resource_url": null,
    "overpaid_amount": 0
  },
  "coupon_amount": 0,
  "metadata": {},
  "collector_id": 246992682,
  "status": "approved",
  "status_detail": "accredited",
  "transaction_id": null,
  "installments": 1,
  "internal_metadata": {
    "rule_id": "52003",
    "concept": "marketplace_order",
    "type": "outbound_payment",
    "splitter_id": "76063",
    "billing_infomation": {
      "buyer": {
        "id": 0,
        "identification": {
          "type": "",
          "number": ""
        }
      },
      "cardholder": {
        "name": "",
        "identification": {
          "number": "",
          "type": ""
        }
      }
    }
  },
  "refunds": [],
  "payment_type_id": "account_money",
  "profile_id": null,
  "payer_tags": [],
  "coupon_id": null,
  "fee_details": [
    {
      "amount": 39,
      "fee_payer": "collector",
      "type": "application_fee"
    }
  ],
  "collector": {
    "id": 246992682,
    "first_name": "Test",
    "last_name": "Test",
    "phone": {
      "extension": "",
      "area_code": "01",
      "number": "1111-1111"
    },
    "email": "test_user_89782056@testuser.com",
    "identification": {
      "number": "1111111",
      "type": "DNI"
    }
  },
  "money_release_days": 0,
  "order": {},
  "external_reference": "1289343339",
  "available_actions": [],
  "application_id": 6492251534497263,
  "marketplace": "MELI",
  "risk_execution_id": 13962541637,
  "call_for_authorize_id": null,
  "api_version": "2",
  "currency_id": "MXN",
  "sponsor_id": null,
  "payment_method_id": "account_money",
  "deduction_schema": null,
  "site_id": "MLM",
  "operation_type": "regular_payment",
  "binary_mode": false,
  "money_release_date": "2017-03-21T10:18:49-04:00",
  "differential_pricing_id": null,
  "payer": {
    "id": "222113214",
    "first_name": "Test",
    "last_name": "Test",
    "phone": {
      "extension": null,
      "area_code": "01",
      "number": "1111-1111"
    },
    "email": "test_user_64693035@testuser.com",
    "identification": {
      "number": "11111111111",
      "type": "IFE"
    },
    "entity_type": null,
    "type": "registred"
  },
  "notification_url": null,
  "transaction_amount_refunded": 0,
  "authorization_code": null,
  "live_mode": true
}

Payment (Versión 1 Pago del shipment)
Llamada:

curl -H "x-format-new:true" 'https://api.mercadolibre.com/carrito_mocks/collections/2574470881?access_token=

Respuesta:

{
  "id": 2574470881,
  "statement_descriptor": null,
  "captured": true,
  "date_created": "2017-03-21T10:19:40-04:00",
  "date_last_updated": "2017-03-21T10:19:40-04:00",
  "date_approved": "2017-03-21T10:19:40-04:00",
  "payer_id": 222113214,
  "issuer_id": null,
  "description": "marketplace_shipment",
  "transaction_amount": 50,
  "card": {},
  "transaction_details": {
    "total_paid_amount": 50,
    "payment_method_reference_id": null,
    "net_received_amount": 50,
    "financial_institution": null,
    "installment_amount": 0,
    "external_resource_url": null,
    "overpaid_amount": 0
  },
  "coupon_amount": 0,
  "metadata": {},
  "collector_id": 246992682,
  "status": "approved",
  "status_detail": "accredited",
  "transaction_id": null,
  "installments": 1,
  "internal_metadata": {
    "rule_id": "52004",
    "concept": "marketplace_shipment",
    "type": "outbound_payment",
    "splitter_id": "76063",
    "billing_infomation": {
      "buyer": {
        "id": 0,
        "identification": {
          "type": "",
          "number": ""
        }
      },
      "cardholder": {
        "name": "",
        "identification": {
          "number": "",
          "type": ""
        }
      }
    }
  },
  "refunds": [],
  "payment_type_id": "account_money",
  "profile_id": null,
  "payer_tags": [],
  "coupon_id": null,
  "fee_details": [],
  "collector": {
    "id": 246992682,
    "first_name": "Test",
    "last_name": "Test",
    "phone": {
      "extension": "",
      "area_code": "01",
      "number": "1111-1111"
    },
    "email": "test_user_89782056@testuser.com",
    "identification": {
      "number": "1111111",
      "type": "DNI"
    }
  },
  "money_release_days": 0,
  "order": {},
  "external_reference": "25943308795",
  "available_actions": [],
  "application_id": 6492251534497263,
  "marketplace": "MELI",
  "risk_execution_id": 13962541612,
  "call_for_authorize_id": null,
  "api_version": "2",
  "currency_id": "MXN",
  "sponsor_id": null,
  "payment_method_id": "account_money",
  "deduction_schema": null,
  "site_id": "MLM",
  "operation_type": "regular_payment",
  "binary_mode": false,
  "money_release_date": "2017-03-21T10:19:40-04:00",
  "differential_pricing_id": null,
  "payer": {
    "id": "222113214",
    "first_name": "Test",
    "last_name": "Test",
    "phone": {
      "extension": null,
      "area_code": "01",
      "number": "1111-1111"
    },
    "email": "test_user_64693035@testuser.com",
    "identification": {
      "number": "11111111111",
      "type": "IFE"
    },
    "entity_type": null,
    "type": "registred"
  },
  "notification_url": null,
  "transaction_amount_refunded": 0,
  "authorization_code": null,
  "live_mode": true
}

Please rate this

Manejo de Envíos

La llegada de Carrito de Compras introduce cambios en los principales recursos de nuestra API. Uno de ellos, el recurso de Shipments, contiene toda la información referida al envío que se debe realizar para concluir con la transacción.

Nota: Recuerda que para trabajar con el JSON de shipments, al hacer el GET deberás enviar el parámetro “x-format-new: true”.

Contenido:

Es importante tener en cuenta que el nuevo JSON de Orders no va contener los datos de Shipping, como sí viene haciendo hasta ahora.

El recurso /shipments/shipment_id/ continuará con su estructura, mostrando la información básica para realizar el envío.
Introducimos algunos cambios en la estructura del JSON, que podrás ver a continuación:

GET https://api.mercadolibre.com/shipments/shipment_id?access_token=token
{
  "id": 0,
  "external_reference": "string",
   "status": "string",
  "substatus": "string",
  "date_created": "string",
  "last_updated": "string",
  "declared_value": 0,
  "dimensions": {
    "height": 0,
    "width": 0,
    "length": 0,
    "weight": 0
  },
  "logistic": {
    "direction": "forward",
    "mode": "me2",
    "type": "drop_off"
  },
  "source": {
    "site_id": "MLM",
    "market_place": "MELI",
    "application_id": null
  },
  "tracking_number": "string",
  "origin": {
    "type": "selling_address",
    "sender_id": 0,
    "shipping_address": {
      "id": 0,
      "address_id": 0,
      "address_line": "string",
      "street_name": "string",
      "street_number": 0,
      "comment": "string",
      "zip_code": "string",
      "city": {
        "id": "string",
        "name": "string"
      },
      "state": {
        "id": "string",
        "name": "string"
      },
      "country": {
        "id": "string",
        "name": "string"
      },
      "neighborhood": {
        "id": "string",
        "name": "string"
      },
      "municipality": {
        "id": "string",
        "name": "string"
      },
      "types": {
        "default_buying_address": 0
      },
      "agency": {
        "carrier_id": 0,
        "agency_id": "string",
        "description": "string",
        "phone": "string",
        "open_hours": "string"
      },
      "latitude": 0,
      "longitude": 0,
      "geolocation_type": "string",
      "is_valid_for_carrier": true
    }
  },
  "destination": {
    "type": "buying_address",
    "receiver_id": 0,
    "receiver_name": "string",
    "receiver_phone": "string",
    "comments": "string",
    "shipping_address": {
      "id": 0,
      "address_id": 0,
      "address_line": "string",
      "street_name": "string",
      "street_number": 0,
      "comment": "string",
      "zip_code": "string",
      "city": {
        "id": "string",
        "name": "string"
      },
      "state": {
        "id": "string",
        "name": "string"
      },
      "country": {
        "id": "string",
        "name": "string"
      },
      "neighborhood": {
        "id": "string",
        "name": "string"
      },
      "municipality": {
        "id": "string",
        "name": "string"
      },
      "types": {
        "default_buying_address": 0
      },
      "agency": {
        "carrier_id": 0,
        "agency_id": "string",
        "description": "string",
        "phone": "string",
        "open_hours": "string"
      },
      "latitude": 0,
      "longitude": 0,
      "geolocation_type": "string",
      "is_valid_for_carrier": true
    }
  },
  "lead_time": {
    "option_id": 0,
    "shipping_method": {
      "id": 0,
      "type": "standard",
      "name": "string",
      "deliver_to": "address"
    },
    "currency_id": "string",
    "cost": 0,
    "cost_type": "charged",
    "service_id": 0,
    "estimated_delivery_time": {
      "type": "known",
      "date": "string",
      "shipping": 0,
      "handling": 0,
      "unit": "string",
      "offset": {
        "date": "string",
        "shipping": 0
      },
      "time_frame": {
        "from": 0,
        "to": 0
      },
      "pay_before": "string"
    }
  },
  "tags": [
    "string"
  ]
}

Para entender a qué hace referencia cada uno de los parámetros realiza la siguiente llamada:

GET https://api.mercadolibre.com/shipments/shipment_id?options&access_token=token

Nuevos recursos

Con la nueva versión del recurso Shipments, aparecen nuevos recursos complementarios que aportarán información detallada para poder trabajar de manera más eficiente. A continuación ampliaremos cada uno de ellos.
Ver api docs de recursos existentes.

Items

El recurso /shipments/shipment_id/items devuelve los ítems asociados a un shipment. En caso de que el ítem contenga variaciones (Por ejemplo: talle o color en indumentaria), también podrás ver cual corresponde a la orden dentro del envío. A medida que habilitemos envíos con más de un ítem, la lista pasará a contener cada uno de ellos.
Nota: Cada vendedor sólo visualizará sus propios productos.

GET https://api.mercadolibre.com/shipments/shipment_id/items

[
  {
    "item_id": "string",
    "description": "string",
    "quantity": 0,
    "variation_id": 0,
    "dimensions": {
      "height": 0,
      "width": 0,
      "length": 0,
      "weight": 0
    },
    "order_id": 0,
    "sender_id": 0
  }
]

Costs

El recurso /shipments/shipment_id/costs devuelve los costos del envío que deberá afrontar el usuario.
También podrá visualizar el ahorro conseguido por el envío de más de un producto en la misma caja (cuando esté habilitada está funcionalidad), a través del parámetro “save”, en caso de que exista.

GET https://api.mercadolibre.com/shipments/shipment_id/costs
{
    "receiver": {
    "user_id": 123,
    "cost": 100,
    "discount": {
      "rate": 0,
      "type": "string",
      "promoted_amount": 0
    },
    "compensation": 0,
    "save": 0
  },
  "senders": [
    {
      "user_id": 321,
      "cost": 0,
      "discount": {
        "rate": 0,
        "type": "string",
        "promoted_amount": 0
      },
      "compensation": 0,
      "save": 0
    }
  ]
}

Lead Time

El recurso /shipments/shipment_id/lead_time devuelve todo lo referente a los plazos de entrega de un envío y tipo de servicio, sumando las fechas límites de despacho y entrega.
Si bien el recurso base de shipment ya trae información útil para hacer estas estimaciones, acá podrás visualizarlo de manera más detallada, lo cual ayudará a dar una mejor experiencia para el usuario.

GET https://api.mercadolibre.com/shipments/shipment_id/lead_time
{
  "option_id": 0,
  "shipping_method": {
    "id": 0,
    "type": "standard",
    "name": "string",
    "deliver_to": "address"
  },
  "currency_id": "string",
  "cost": 0,
  "cost_type": "charged",
  "service_id": 0,
  "estimated_delivery_time": {
    "type": "known",
    "date": "string",
    "shipping": 0,
    "handling": 0,
    "unit": "string",
    "offset": {
      "date": "string",
      "shipping": 0
    },
    "time_frame": {
      "from": 0,
      "to": 0
    },
    "pay_before": "string"
  },
  "estimated_handling_limit": {
    "date":  "2016-12-30T12:32:35.000Z"
  },
  "estimated_delivery_extended": {
    "date":  "2016-12-30T12:32:35.000Z"
  },
  "estimated_delivery_limit": {
    "date":  "2016-12-30T12:32:35.000Z"
  },
  "estimated_delivery_final": {
    "date":  "2016-12-30T12:32:35.000Z"
  },
  "delay": [
    "shipping_delayed",
  ]
}

Nota: ten en en cuenta que el campo cost_type puede ser “free”, “charged” o “partially_free”.

Descripción de los tiempos de estimación

Son las fechas límite para que el envío sea despachado y enviado.

estimated_handling_limit: Fecha límite que tiene el vendedor para despachar. Se considera que sólo se tiene en cuenta la fecha ya que la hora sólo se ingresa para mantener una estructura. Es decir, tienes el día completo que figura en el campo, para realizar el despacho antes de que el mismo se marque demorado al día siguiente.

estimated_delivery_extended: Segunda promesa de entrega, en caso de que la original no se cumpla.

estimated_delivery_limit: Fecha límite para que el comprador puede cancelar la compra y pedir la devolución de dinero, siempre y cuando todavía no haya llegado el envío.

estimated_delivery_final: Fecha final como plazo para que llegue el envío y se determine el status final que puede ser delivered o, en caso de haber entrado un reclamo, not_delivered.

Ver más información sobre los tipos de promesa de entrega.

History

El recurso /shipments/shipment_id/history devuelve el historial de status y substatus asociados al ciclo de vida del shipment.

GET https://api.mercadolibre.com/shipments/shipment_id/history

[
  {
    "status": "string",
    "substatus": "string",
    "date": "2016-12-30T12:32:35.000Z"
  }
]

Ejemplo:

https://api.mercadolibre.com/shipments/1234567899/history

[
  {
    "status": "ready_to_ship",
    "substatus": "printed",
    "date":  "2016-12-30T12:32:35.000Z"
  },
  {
    "status": "handling",
    "substatus": "waiting_for_label_generation",
    "date":  "2016-12-30T12:32:35.000Z"
  },

]

Ver información sobre los estado y subestado por los que puede pasar un envío.

Payments

El recurso /shipments/shipment_id/payments devuelve los payments asociados al envío.
Ten en cuenta que ahora el pago del envío estará discriminado y vas a poder, desde este recurso, consumir información básica del mismo. El payment_id funciona de la misma manera que el correspondiente a una orden.

GET https://api.mercadolibre.com/shipments/shipment_id/payments
[
  {
    "payment_id": 0,
    "amount": 0,
    "status": "string"
  }
]

Parámetros disponibles

A continuación te mostraremos los valores disponibles para cada parámetro:
logistic.direction: forward, return
logistic.mode: me2, me1, custom
logistic.type: default, drop_off, xd_drop_off, cross_docking, fulfillment


source.site_id: sites
source.market_place: Mercado Libre, OFF


lead_time.shipping_method.type: next_day, express, standard, same_day
lead_time.shipping_method.deliver_to: address, agency


lead_time.currency_id: currencies
lead_time.cost_type: free, partially_free, charged


lead_time.delay: handling_delayed, shipping_delayed, shipping_delayed_extended


destination/origin.type: agency, buying_address, selling_address


discount.type: loyal, special



Siguiente: Manejo de Pagos.

Please rate this

Manejo de Órdenes

Con el desembarco de esta nueva funcionalidad se verá un cambio en la estructura del JSON en el recurso Orders. La principal diferencia será que la información del envío ya no estará disponible aquí dentro, sino que solo estará el ID asociado, para luego ir a buscar la data complementaria al recurso /shipments.

Nota: Recuerda que para trabajar con el JSON actualizado, al hacer el GET deberás enviar el parámetro “x-format-new: true”.

El resto de la estructura del recurso seguirá funcionando de la misma manera, con algunas modificaciones que deberás tener en cuenta.

curl -X GET -H x-format-new: true https://api.mercadolibre.com/orders/order_id?access_token=ACCESS_TOKEN

JSON previo

{
    "id": 1014059850,
    "date_created": "2015-10-23T16:51:28.000-04:00",
    "date_closed": "2015-10-23T16:53:23.000-04:00",
    "last_updated": "2017-01-11T10:10:01.000-04:00",
    "feedback": {
        "purchase": {
            "id": 9040293414049,
            "date_created": null,
            "fulfilled": null,
            "rating": null,
            "status": "inactive"
        },
        "sale": {
            "id": 9040293397904,
            "date_created": "2015-10-27T19:02:38.000-04:00",
            "fulfilled": true,
            "rating": "positive",
            "status": "active"
        }
    },
    "mediations": [
        
    ],
    "comments": null,
    "order_request": {
        "return": null,
        "change": null
    },
    "fulfilled": true,
    "shipping": {
        "id": 21491526998,
        "site_id": "MLM",
        "shipment_type": "shipping",
        "mode": "me2",
        "shipping_mode": "me2",
        "status": "delivered",
        "shipping_items": [
            {
                "id": "MLM688179011",
                "description": "Item de Test",
                "quantity": 1,
                "dimensions": "5.0x11.0x25.0,100.0"
            }
        ],
        "shipping_option": {
            "id": 100184113,
            "shipping_method_id": 111,
            "name": "Testing Method",
            "currency_id": "MXN",
            "list_cost": 7.89,
            "cost": 0,
            "estimated_handling_limit": {
                "date": "2015-10-26T00:00:00.000-02:00"
            },
            "estimated_delivery_final": {
                "date": "2015-11-26T00:00:00.000-02:00"
            },
            "estimated_delivery_limit": {
                "date": "2015-11-19T00:00:00.000-02:00"
            },
            "estimated_delivery_extended": {
                "date": "2015-11-03T00:00:00.000-02:00"
            },
            "estimated_delivery_time": {
                "type": "known_frame",
                "date": "2015-10-27T00:00:00.000-02:00",
                "shipping": 24,
                "handling": 24,
                "unit": "hour",
                "offset": {
                    "date": "2015-10-28T00:00:00.000-02:00",
                    "shipping": 24
                },
                "time_frame": {
                    "from": null,
                    "to": null
                },
                "pay_before": null
            }
        },
        "currency_id": "MXN",
        "receiver_address": {
            "id": 167418200,
            "address_line": "Test Street 123",
            "street_name": "Test Street",
            "street_number": "123",
            "comment": "apartamento 2",
            "zip_code": "343435",
            "city": {
                "id": "TUxNQ1RPTDc0Mzc",
                "name": "Toluca"
            },
            "state": {
                "id": "MX-MEX",
                "name": "Estado de Mexico"
            },
            "country": {
                "id": "MX",
                "name": "Mexico"
            },
            "neighborhood": {
                "id": null,
                "name": "Test"
            },
            "municipality": {
                "id": null,
                "name": null
            },
            "types": [
                "default_buying_address",
                "billing"
            ],
            "latitude": -19.88,
            "longitude": -43.96,
            "geolocation_type": "ROOFTOP",
            "agency": null,
            "is_valid_for_carrier": true,
            "receiver_name": "Juan Garcia",
            "receiver_phone": "3131313131"
        },
        "sender_address": {
            "id": 73125800,
            "address_line": "Calle Sin Nombre 1234",
            "street_name": "Calle Sin Nombre",
            "street_number": "1234",
            "comment": "  ",
            "zip_code": "454545",
            "city": {
                "id": "TUxNQ1RPTDc0Mzc",
                "name": "Toluca"
            },
            "state": {
                "id": "MX-MEX",
                "name": "Estado de Mexico"
            },
            "country": {
                "id": "MX",
                "name": "Mexico"
            },
            "neighborhood": {
                "id": null,
                "name": "Test"
            },
            "municipality": {
                "id": null,
                "name": null
            },
            "types": [
                "billing",
                "default_buying_address",
                "shipping",
                "default_selling_address"
            ],
            "latitude": -19.87,
            "longitude": -43.95,
            "geolocation_type": "RANGE_INTERPOLATED",
            "agency": null,
            "is_valid_for_carrier": true
        },
        "picking_type": null,
        "cost": 0,
        "substatus": null,
        "date_created": "2015-10-23T16:53:13.000-04:00",
        "date_first_printed": "2015-10-26T09:26:31.000-04:00",
        "service_id": 23,
        "receiver_id": 121212121,
        "sender_id": 3434343434,
        "cost_components": {
            "special_discount": 0,
            "loyal_discount": 0,
            "compensation": 0
        }
    },
    "expiration_date": "2015-11-13T16:53:23.000-04:00",
    "status": "paid",
    "status_detail": null,
    "order_items": [
        {
            "item": {
                "id": "MLB688179011",
                "title": "Paleta Naked 2 - Urban Decay !!! Frete Grátis !!!",
                "category_id": "MLB182078",
                "variation_id": null,
                "seller_custom_field": null,
                "variation_attributes": [
                    
                ],
                "warranty": null,
                "condition": null
            },
            "quantity": 1,
            "unit_price": 79.99,
            "currency_id": "BRL"
        }
    ],
    "currency_id": "BRL",
    "buyer": {
        "id": 121212121,
        "nickname": "TESTMEX",
        "email": "testing+email@mercadolibre.com",
        "phone": {
            "area_code": null,
            "number": "011111111",
            "extension": "",
            "verified": false
        },
        "alternative_phone": {
            "area_code": "",
            "number": "",
            "extension": ""
        },
        "first_name": "Juan",
        "last_name": "Garcia",
        "billing_info": {
            "doc_type": "RFC",
            "doc_number": "ROHA944443AT5"
        }
    },
    "seller": {
        "id": 3434343434,
        "nickname": "TESTSELLER",
        "email": "seller+testing12@mercadolibre.com",
        "phone": {
            "area_code": null,
            "number": "( 54) 3456799",
            "extension": "",
            "verified": false
        },
        "alternative_phone": {
            "area_code": "",
            "number": "",
            "extension": ""
        },
        "first_name": "Raúl",
        "last_name": "Perez"
    },
    "payments": [
        {
            "id": 1347347348,
            "order_id": 1014059850,
            "payer_id": 3434343434,
            "collector": {
                "id": 67170474
            },
            "card_id": 157057223,
            "site_id": "MLM",
            "reason": "Item de Test",
            "payment_method_id": "test",
            "currency_id": "MXN",
            "installments": 6,
            "issuer_id": "24",
            "atm_transfer_reference": {
                "company_id": null,
                "transaction_id": null
            },
            "coupon_id": null,
            "activation_uri": null,
            "operation_type": "regular_payment",
            "payment_type": "credit_card",
            "available_actions": [
                
            ],
            "status": "approved",
            "status_code": "00",
            "status_detail": "accredited",
            "transaction_amount": 79.99,
            "shipping_cost": 0,
            "coupon_amount": 0,
            "overpaid_amount": 0,
            "total_paid_amount": 79.99,
            "installment_amount": 13.33,
            "deferred_period": null,
            "date_approved": "2015-10-23T16:53:21.000-04:00",
            "authorization_code": "631964",
            "transaction_order_id": "10617272430002CB367A",
            "date_created": "2015-10-23T16:53:22.000-04:00",
            "date_last_modified": "2017-01-11T10:10:14.000-04:00"
        }
    ],
    "coupon": {
        "id": null,
        "amount": 0
    },
    "tags": [
        "not_delivered",
        "paid"
    ],
    "total_amount": 79.99,
    "total_amount_with_shipping": 79.99,
    "paid_amount": 79.99
}

JSON nuevo

{
  "id": 1252867227,
  "date_created": "2016-12-29T11:14:00.000-04:00",
  "date_closed": "2016-12-29T11:17:07.000-04:00",
  "last_updated": "2016-12-29T11:37:59.000-04:00",
  "feedback": {
    "sale": null,
    "purchase": null
  },
  "mediations": [],
  "comments": null,
  "order_request": {
    "return": null,
    "change": null
  },
  "fulfilled": null,
  "shipping": {
    "id": 25851291671
  },
  "expiration_date": "2017-01-19T11:17:07.000-04:00",
  "status": "confirmed",
  "status_detail": null,
  "order_items": [
    {
      "item": {
        "id": "MLM571544424",
        "title": "Item De Testeo Por Favor No Ofertar",
        "category_id": "MLM1915",
        "variation_id": null,
        "seller_custom_field": null,
        "variation_attributes": [],
        "warranty": null,
        "condition": "used"
      },
      "quantity": 1,
      "unit_price": 100,
      "currency_id": "MXN"
    }
  ],
  "currency_id": "MXN",
  "buyer": {
    "id": 226104627,
    "nickname": "TETE582019",
    "email": "ttest.f1d92q3+2-ogezdkmrygy3tenjx@mail.mercadolibre.com.mx",
    "phone": {
      "area_code": "01",
      "number": "1111-1111",
      "extension": "",
      "verified": false
    },
    "alternative_phone": {
      "area_code": "",
      "number": "",
      "extension": ""
    },
    "first_name": "Test",
    "last_name": "Test",
    "billing_info": {
      "doc_type": null,
      "doc_number": null
    }
  },
  "seller": {
    "id": 226080093,
    "nickname": "TETE8781491",
    "email": "ttest.zxwryc+2-ogezdkmrygy3tenjx@mail.mercadolibre.com.mx",
    "phone": {
      "area_code": "01",
      "number": "1111-1111",
      "extension": "",
      "verified": false
    },
    "alternative_phone": {
      "area_code": "",
      "number": "",
      "extension": ""
    },
    "first_name": "Test",
    "last_name": "Test"
  },
  "payments": [
    {
      "id": 2515202115,
      "order_id": 1252867227,
      "payer_id": 226104627,
      "collector": {
        "id": 226080093
      },
      "card_id": null,
      "site_id": "MLM",
      "reason": "Item De Testeo Por Favor No Ofertar",
      "payment_method_id": "account_money",
      "currency_id": "MXN",
      "installments": null,
      "issuer_id": null,
      "atm_transfer_reference": {
        "company_id": null,
        "transaction_id": null
      },
      "coupon_id": null,
      "activation_uri": null,
      "operation_type": "regular_payment",
      "payment_type": "account_money",
      "available_actions": [],
      "status": "refunded",
      "status_code": null,
      "status_detail": "bpp_covered",
      "transaction_amount": 100,
      "shipping_cost": 0,
      "coupon_amount": 0,
      "overpaid_amount": 0,
      "total_paid_amount": 100,
      "installment_amount": null,
      "deferred_period": null,
      "date_approved": "2016-12-29T11:17:05.000-04:00",
      "authorization_code": null,
      "transaction_order_id": null,
      "date_created": "2016-12-29T11:17:05.000-04:00",
      "date_last_modified": "2016-12-29T11:37:59.000-04:00"
    }
  ],
  "coupon": {
    "id": null,
    "amount": 0
  },
  "tags": [
    "pack_order",
    "not_paid"
  ],
  "total_amount": 100,
  "total_amount_with_shipping": 100,
  "paid_amount": 0
}


Para entender a qué hace referencia cada uno de los parámetros realiza la siguiente llamada:

GET https://api.mercadolibre.com/orders/order_id?options&access_token=token

Revisa la documentación de Recurso de Órdenes para ver más información.

Consideraciones:

  • El tag “pack_order” se genera de manera automática para poder discriminar si la orden está asociada a un carrito y no podrá ser borrado por el comprador o el vendedor.
  • En caso que la orden no esté asociada a un Carrito de Compras y la transacción sea bajo la modalidad “acordar con el vendedor”, ya no recibirás un status to be agreed si no que directamente el shipping ID vendrá como nule. Eso te dará la pauta de que deberás entrar en contacto con el comprador para coordinar la forma de envío.
  • Solo contarás con el ID del envío, para luego ir a buscar la información a los nuevos recursos de Shipping.
  • Existe la posibilidad de que, aún existiendo una orden, el envío demore en crearse. En esos casos el ID será nulo hasta su creación. Cuando eso pase, serás notificado.
  • El costo del envío, que se encuentra en el campo “shipping_cost”, de una orden asociada a un carrito siempre será 0 ya que no se asociará a la orden sino al paquete que contiene todos los ítems.
    Por ende, el “total_amount_with_shipping” será idéntico al “total_amount”
  • Los tags “delivered/not delivered” ya no se agregarán automáticamente. Solamente existirá la marca si el integrador realiza un PUT con el tag definido.
  • Las órdenes en status paid se cancelarán si se rechaza o devuelve el pago. Si sucede, recibirás una notificación para que puedas conocer el cambio en el estado de la orden.


Siguiente: Manejo de envíos.

Please rate this

Instancia de retrocompatibilidad y nuevas notificaciones

Una vez que se empiece a trabajar en la primera etapa de implementación de la nueva funcionalidad de Carrito de Compras, se contará con una instancia de retrocompatibilidad que permitirá utilizar tanto los nuevos recursos como los ya existentes.
Esto permitirá implementar los cambios progresivamente sin generar interrupciones o afectar la disponibilidad de la integración.
Ten en cuenta que los nuevos recursos no sólo aplican para Carrito de Compras sino que serán la nueva modalidad para orders y shipments a nivel general. Esto quiere decir que si trabajas con otros sitios que no estén bajo esta modalidad también verás el impacto.

Contenido:

Funcionamiento de retrocompatibilidad

Debido a que en la etapa de Beta Testing se tendrá la posibilidad de trabajar en simultáneo con todos los recursos disponibles, deberás implementar el siguiente header cada vez que hagas un request a la API para poder consumir los nuevos recursos adaptados al Carrito de Compras:

curl -H "x-format-new:true" https://api.mercadolibre.com/orders/{Order_id}?access_token=ACCESS_TOKEN

Nota: Si deseas obtener el formato anterior no deberás enviar la línea “x-format-new: true”.

Nuevas notificaciones

Con la nueva funcionalidad de Carrito de Compras será posible trabajar con dos notificaciones nuevas que deberás activar dentro del Application Manager:
orders_v2: Recibirás la novedad cuando se crea una nueva orden o cuando se modifica el json en una ya existente.
shipments: Recibirás la novedad cuando se crea un nuevo envío o hay una actualización en uno ya existente.

Nota: Ten en cuenta que si decides trabajar con “orders_v2” sin anular los anteriores “created_orders” y/u “orders”, comenzarás a recibir la misma novedad de una orden replicada en cada uno de ellos. Sugerimos que al comenzar a escuchar los nuevos topics, descartes los viejos referidos a órdenes para simplificar el proceso.
Si quieres saber más sobre el funcionamiento de todos los topics disponibles puedes consultar el siguiente tutorial.

Accede a los detalles

Después de recibir una notificación sobre un topic, deberás realizar el request al recurso correspondiente para acceder a los detalles y comprobar si se trata de una operación nueva o si deberás actualizar una ya existente en tu sistema.

orders_v2

Notification response:

{
    "resource": "/orders/139876",
    "user_id": 1234,
    "topic": "orders_v2",
    "received": "2011-10-19T16:38:34.425Z",
    "sent" : "2011-10-19T16:40:34.425Z",
}

Con esta información podrás realizar un GET al recurso de orders:

curl -H "x-format-new:true" ’https://api.mercadolibre.com/orders/{Order_id}?access_token=ACCESS_TOKEN

shipments

Notification response:

{
    "resource": "/shipments/139876",
    "user_id": 1234,
    "topic": "shipments",
    "received": "2011-10-19T16:38:34.425Z",
    "sent" : "2011-10-19T16:40:34.425Z",
}

Con esta información podrás realizar un GET al recurso de shipments:

curl -H "x-format-new:true" https://api.mercadolibre.com/shipments/{shipment_id}?access_token=ACCESS_TOKEN

Nota: Para trabajar con las nuevas notificaciones deberás desactivar las que usabas anteriormente para orders. Ten en cuenta que si deseas escuchar todas las notificaciones en algunos casos las recibirás más de una vez.

Siguiente: Manejo de Órdenes.

Please rate this

Guía para Carrito de Compras

Durante el año 2017 estaremos trabajando de manera paulatina en la implementación de “Carrito de Compras” dentro de Mercado Libre.
Con esta nueva funcionalidad buscamos mejorar la experiencia de compra de los usuarios, unificar el proceso de Check Out de varios productos y poder hacer un envío único para acortar tiempos de entrega y ahorrar costos.
Si bien nuestro objetivo es que todos los países cuenten con esta opción, el primer sitio donde se implementará será en Mercado Libre México, donde estaremos trabajando con etapas de testing y release.

¿Cómo será el funcionamiento?

El usuario accederá a la publicación del ítem y seleccionará los productos deseados mediante el botón “Agregar al Carrito”.
Dentro del carrito se podrá revisar la múltiple compra teniendo la opción de eliminar ítems, modificar cantidades, comprar individualmente o guardar.
Una vez que tome la decisión de concretar su compra podrá pagar todos sus artículos por medio de un único proceso de Check Out y seleccionar las opciones de envío que sean más convenientes.
Por último, desde su cuenta podrá controlar el estado de sus compras ya que estarán dentro del ecosistema de Mercado Libre.

Nota: La “compra inmediata” se mantendrá tal cual existe hoy y el usuario tendrá ambas opciones.

Este lanzamiento tendrá un impacto positivo tanto en nuestros compradores como vendedores, y el desarrollo de los integradores cumplirá un rol muy importante en esta nueva modalidad de operar dentro del Ecosistema Mercado Libre.
Es por esto que estaremos trabajando con la siguiente metodología:

Primera etapa (Beta testing) – Marzo

Si bien habrá nuevos recursos que se tendrán que comenzar a implementar, en esta etapa todas las APIs serán retrocompatibles y permitirán trabajar en estos cambios asegurando no generar un impacto negativo en los usuarios.
Además, el uso dentro de la plataforma será de la siguiente manera:

  • Todos los ítems que ofrezcan Mercado Pago y Mercado Envíos podrán participar de esta nueva funcionalidad.
  • Se seleccionará a un grupo de compradores como testers que tendrán la opción de añadir productos de diferentes vendedores al Carrito de Compras siempre que que estos ítems cumplan las condiciones anteriores. Luego, podrán modificar, guardar o eliminar productos del Carrito y una vez confirmada la compra, realizar un único pago por todos los productos.

Nota: En esta etapa, cada producto comprado se enviará por separado, tal como ocurre hoy, aunque se compren varios productos al mismo vendedor.

Segunda etapa (Release en MLM) – Junio

En esta etapa se deberá implementar en producción de manera definitiva todo lo trabajado en la primera instancia una vez que se hayan realizado los tests correspondientes.

Importante: Ten en cuenta que en esta etapa ya no existirá retrocompatibilidad y los recursos serán los definitivos.

Siguiente: Retrocompatibilidad y Notificaciones.

Please rate this

Manejo de Pagos

Continuando con los cambios que deberás tener en cuenta con la llegada de Carrito de Compras, te contaremos cómo será el manejo de pagos dentro de esta nueva funcionalidad.

Del mismo modo que hoy, el comprador podrá cubrir el costo de la compra con cualquier medio de pago ofrecido por Mercado Pago dentro de Mercado Libre.

Estos pagos son denominados Inbound Payments, pagos del comprador hacia una cuenta interna de Mercado Pago.

Por otro lado, cuando la compra sea pagada en su totalidad, el dinero de Inbound Payments es distribuido en cada una de las órdenes y envíos, generando así un Outbound Payments.

Notas:

  • Los Outbound Payments siempre son pagos de dinero que se realizan en cuentas de Mercado Pago.
  • El collector de los Outbound Payments es el vendedor del ítem, pero el payer es la cuenta interna de Mercado Pago antes mencionada.
  • Los pagos de las órdenes son notificados a los vendedores y serán las únicas personas que tendrán acceso a los mismos/a ellos.

Para poder obtener los datos pertinentes del comprador dentro de Carrito de Compras, se agregará un nuevo nodo denominado “internal_metadata” que contiene la información de facturación necesaria en el nodo “billing_information”.

Llamada:

GET https://api.mercadolibre.com/collections/{collection_id}?access_token=
{
  "id": 2910384756,
  "site_id": "MLM",
  "date_created": "2017-01-23T16:38:43.000-04:00",
  "date_approved": "2017-01-23T16:38:44.000-04:00",
  "last_modified": "2017-01-23T16:38:44.000-04:00",
  . . .
  "payer": {
    "id": 241760979,
    /*
   
    */
  }
  "internal_metadata": {
    "rule_id": "34004",
    "concept": "marketplace_order",
    "type": "outbound_payment",
    "splitter_id": "56020",
    "billing_information": {
      "buyer": {
        "id": 1029384756,
        "identification": {
          "type": "CURP",
          "number": "12345678"
        }
      },
      "cardholder": {
        "name": "Juan Carlos Test",
        "identification": {
          "number": "12345678",
          "type": "CURP"
        }
      }
    }
  }
}

Notas:

  • Los datos que se reciben dentro de “payer” corresponden a la cuenta interna de Mercado Pago, no al comprador.
  • Para diferenciar un pago realizado dentro de Carrito de Compras de uno hecho de forma usual sólo bastará con leer la información recibida dentro de “internal_metadata”.
    En caso de que el nodo se encuentre vacío el pago corresponde a compras comunes.

Para más información sobre cómo debes utilizar los recursos “payments” y “collections” revisa la documentación disponible de Gestiona Ventas.

Ten en cuenta que en la primera versión sólo estará disponible un medio de pago pero en versiones posteriores habrá 2 o más posibilidades de combinación.

Siguiente:
Pruebas con Carrito de Compras.

Please rate this