Pedidos
A continuación, los siguientes servicios que permiten a tu organización la integración directamente con Boosmap.
Crear pedido
POST /order
Ejemplo de llamada tradicional
curl --request POST "https://api.boosmap.io/order" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer [TOKEN]" \ -d '{ "order_number": "LOREM123123", "delivery_date": "2018-12-06 13:00:00", "delivery_service": "Sameday", "delivery_start_time": "13:00", "delivery_end_time": "16:00", "notes": "Lorem Ipsum Lorem Ipsum", "pickup": { "location": { "name": "Nombre del Punto retiro", "address": "Brown Sur 333", "district": "Nunoa" } }, "dropoff": { "contact": { "fullname": "Testing Testing", "email": "email@gmail.com", "phone": "+56991234567" }, "location": { "address": "Direccion prueba", "district": "La Florida", "latitude": -33.4583, "longitude": -70.5945 } }, "packages": [ { "code": "123123123", "name": "Lorem Ipsum 1", "price": "23000", "qty": 1 }, { "code": "123123125", "name": "Lorem Ipsum 2", "price": "10000", "qty": 2 } ], "tags": { "brand": "Lorem Ipsum" }, "files": [ { "name": "Lorem Ipsum", "kind": "recipe", "url": "https://picsum.photos/200/300.jpg" }, { "name": "Lorem Ipsum", "kind": "recipe", "url": "https://picsum.photos/200/300.jpg" } ], "url_tracking": "true" }'
Ejemplo de llamada usando ID de sucursal, previa homologación de sucursales.
Al crear pedidos usandopickup.location.id
, nos permite distribuir estratégicamente sus pedidos, creando rutas de despacho óptimas, permitiendo llegar en el menor tiempo posible a su destino, ya que conocemos las sucursales.
curl --request POST "https://api.boosmap.io/order" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer [TOKEN]" \ -d '{ "order_number": "LOREM123123", "delivery_date": "2018-12-06 13:00:00", "delivery_service": "Sameday", "delivery_start_time": "13:00", "delivery_end_time": "16:00", "notes": "Lorem Ipsum Lorem Ipsum", "pickup": { "location": { "id": 123 } }, "dropoff": { "contact": { "fullname": "Testing Testing", "email": "email@gmail.com", "phone": "+56991234567" }, "location": { "address": "Direccion prueba", "district": "La Florida", "latitude": -33.4583, "longitude": -70.5945 } }, "packages": [ { "code": "123123123", "name": "Lorem Ipsum 1", "price": "23000", "qty": 1 }, { "code": "123123125", "name": "Lorem Ipsum 2", "price": "10000", "qty": 2 } ], "tags": { "brand": "Lorem Ipsum" }, "files": [ { "name": "Lorem Ipsum", "kind": "recipe", "url": "https://picsum.photos/200/300.jpg" }, { "name": "Lorem Ipsum", "kind": "recipe", "url": "https://picsum.photos/200/300.jpg" } ], "url_tracking": "true" }'
Parámetros
order_number Requerido string |
Numero de Orden de pedido |
delivery_date Requerido datetime |
Fecha del despacho del pedido (Y-m-d H:i:s) |
delivery_service Requerido string |
Tipo de ventana (Nextday, Express, Sameday, NextdayWithWindow, SamedayWithWindow) |
delivery_start_time Opcional string |
Hora desde |
delivery_end_time Opcional string |
Hora hasta |
notes Opcional string |
Notas adicionales al pedido |
pickup Requerido object |
Información del punto de retiro |
dropoff Requerido object |
Información del punto de entrega |
packages Requerido array |
Bultos del pedido |
tags Requerido object |
Datos adicionales que se necesite registrar |
files Opcional object |
Archivos adicionales del pedido |
url_tracking Opcional boolean |
Si es true el response tendrá la url del tracking |
Obtener información de un pedido
GET /order/{order_number}
Ejemplo de llamada
curl --request GET "https://api.boosmap.io/order/{order_number}" \ -H "Content-Type: application/json" -H "Authorization: Bearer [TOKEN]"
Ejemplo de respuesta
{ "errors": null, "success": true, "data": { "deliveries": [ { "notes": "Lorem Ipsum Lorem Ipsum", "updated": "2019-02-05T10:49:46Z", "created": "2019-02-05T10:49:45Z", "contactName": "Testing Testing", "orderNumber": "PRUEBA_12234235", "deliveryDate": "2018-12-06T16:00:00Z", "contactPhone": "+56991234567", "contactEmail": "email@gmail.com", "last_state": "asignación aceptada", "state": [ { "date": "05-05-2020 18:46:44", "status": "entregado" }, { "date": "05-05-2020 18:46:21", "status": "en camino entrega" }, { "date": "05-05-2020 18:46:18", "status": "en despacho" }, { "date": "05-05-2020 17:41:28", "status": "en punto de retiro" }, { "date": "05-05-2020 17:35:37", "status": "asignación aceptada" }, { "date": "05-05-2020 16:26:45", "status": "ingresado" } ], "packages": [ { "name": "Lorem Ipsum 1", "price": 23000, "qty": "1" }, { "name": "Lorem Ipsum 2", "price": 10000, "qty": "2" } ], "trackingURL": "https://" } ] } }
Parámetros
order_number Requerido string |
Número de orden |
Respuesta
Retorna un objeto con la información de un pedido en especifico