Integración de órdenes
Integración de órdenes
PASO 1
Contacto
Leer la documentación.
PASO 2
Acceso
Comparte a tu Ejecutivo de Cuenta un correo al que tengas acceso pero NO exista en Pedidosya.
Recibirás la dirección y nombre de tu tienda de pruebas. Además te darán acceso a ella desde el Vendor Portal, donde podrás generar el token y configurar el webhook y desde Pelican, donde podrás gestionar tus órdenes.
Te llegará un email del equipo de Soporte de Integraciones para que tengas el primer contacto con ellos.
PASO 3
Desarrollo
Podrás consultarle al equipo de Soporte de Integraciones las dudas que tengas.
PASO 4
Test + Homologación
Deberás probar todas las funcionalidades y comunicarle al equipo de Soporte para que te den feedback.
Deberás coordinar una reunión de homologación con el equipo de Soporte de Integraciones a través del siguiente link.
PASO 5
Live
Puesta en marcha de la integración en todas tus tiendas online.
PASO 6
Issues
Puedes contactar a tu Ejecutivo de Cuenta o comunicarte con Ayuda en línea a través del Vendor Portal.
Comparte a tu Ejecutivo de Cuenta un correo al que tengas acceso pero NO exista en Pedidosya.
El equipo de Soporte de Integraciones creará un usuario de pruebas con el correo compartido, que sólo podrá ser utilizado para pruebas (no se podrán realizar pedidos reales). Podrás ver tu tienda de pruebas desde el Vendor Portal y en la aplicación de PedidosYa, buscándola con la dirección y el nombre que te compartirá tu Representante de cuenta (ingresando a la app con el usuario de pruebas). Allí podrás verificar que todo lo que gestiones se vea impactado correctamente y desde la app podrás crear órdenes de prueba con el usuario de pruebas.
Realiza tu gestión de acceso desde el Vendor Portal.
Autenticación
Ingresa al Vendor portal y dirígete a la sección Shops Integrations.
Ingresa a la pestaña Gestión de Tokens. Desde allí, podrás solicitar un token que luego deberás utilizar en cada request a Partner API.
Haz clic en Generar nuevo token. Como puedes ver en la imagen, al obtener el token es necesario guardarlo inmediatamente ya que luego no se puede volver a visualizar.
Ten en cuenta que este token aplicará a todos los vendors de la razón social. Deberás tener tantos tokens como razones sociales integres en PedidosYa.
Configuración de la URL de webhook:
Ingresa al Vendor Portal y, dentro de la sección Shop Integrations, dirígete a la pestaña Order Status Updates.
En el lateral derecho podrás configurar el webhook donde quieres recibir las notificaciones. A ese webhook le puedes configurar una clave, si lo deseas.
Si especificas una clave en la configuración del webhook, llegará como un header authorization del tipo bearer:
Consideraciones:
No puedes agregar productos nuevos a la orden. Solo puedes incorporar reemplazos de productos faltantes.
No puedes añadir sugerencias de reemplazo que no formen parte de tu catálogo.
Recepción de órdenes
a. En el webhook configurado previamente, enviaremos las órdenes que se gestionan en Pelican en tiempo real. Las órdenes llegarán a esa URL luego de ser cerradas en Pelican y llegarán a este Webhook con las modificaciones que se realicen en Pelican a nivel de producto o estado de la orden.
b. Si la orden luego de ser cerrada en Pelican tiene un cambio de estado, este cambio viajará a la integración.
Healthcheck o estado del servicio.
a. Permite validar el estado del servicio de PedidosYa.
Deberás enviar el siguiente request:
curl --location 'https://partners-pedidosya.deliveryhero.io/ping' \
--header 'Authorization: {validToken}'
Obtendrás este response:
200 OK
pong
3. Listado de ordenes
a. Permite obtener un listado con todas las órdenes de un período de tiempo determinado.
Deberás enviar el siguiente request:
curl --location 'https://partners-pedidosya.deliveryhero.io/v1/orders/vendors/{partner_id}?page_size=10&page=1&start_created_at_datetime=2024-02-07T15%3A00%3A00&end_created_at_datetime%09%0A=2024-02-08T00%3A00%3A00' \
--header 'Authorization: {validToken}\
Debes agregar como Pathparam el ID de la tienda a consultar: partner_id.
También puedes pasar los siguientes queryParams:
start_created_at_datetime → Es un campo obligatorio. Define la fecha y hora de inicio (en UTC) para filtrar los pedidos creados, la fecha y hora en el formato especificado (por ejemplo, "2023-01-01T15:00:00"). Puede indicarse cómo máximo 60 días antes del día actual.
end_created_at_datetime → Es un campo opcional (si no lo indicas, queda la fecha del día en que estés operando). Define la fecha y hora (en UTC) de finalización para filtrar los pedidos creados. Sigue el mismo formato que "2023-01-01T15:00:00". Predeterminado a la hora del momento.
page_size → Define el tamaño de la página, es decir, cuántos elementos quieres en cada página de resultados. El valor predeterminado es de 20.
page → Define la página específica que deseas recuperar. El valor predeterminado es de 1, pero puedes cambiarlo si deseas obtener páginas específicas según los resultados.
Obtendrás este response:
{
"orders": [
{
"accepted_for": "string",
"cancellation": {},
"client": {},
"comment": "string",
"customer": {},
"encrypted_customer": "string",
"external_order_id": "string",
"isPreorder": true,
"items": [],
"order_code": "string",
"order_id": "string",
"order_type": "string",
"payment": {},
"promised_for": "string",
"status": "string",
"sys": {},
"transport_type": "string"
}
],
"page_number": 0,
"page_size": 0,
"total_pages": 0
}
Error por token errado:
401 Unauthorized
2. Error por consulta de más de 60 días hacia atrás:
400 Bad Request
"start created_at can be at most 60 days in the past "
4. Obtener toda la información de una orden por su order_id.
Deberás enviar este request:
curl --location 'https://partners-pedidosya.deliveryhero.io/v1/orders/{order_id}' \
--header 'Authorization: {validToken}'
Debes agregar como Pathparam el ID de la orden a consultar: order_id.
Obtendrás este response:
{
"accepted_for": "string",
"cancellation": {
"cancelled_by": "string",
"reason": "string"
},
"client": {
"chain_id": "string",
"country_code": "string",
"external_partner_config_id": "string",
"id": "string",
"name": "string",
"store_id": "string"
},
"comment": "string",
"customer": {
"_id": "string",
"delivery_address": {
"apartment": "string",
"block": "string",
"building": "string",
"city": "string",
"company": "string",
"country": "string",
"entrance": "string",
"floor": "string",
"formattedAddress": "string",
"instructions": "string",
"intercom": "string",
"latitude": 0,
"longitude": 0,
"number": "string",
"street": "string",
"suburb": "string",
"zipcode": "string"
},
"first_name": "string",
"last_name": "string",
"national_id": "string",
"phone_number": "string",
"phone_number_unmasked": "string",
"tax_id": "string"
},
"encrypted_customer": "string",
"external_order_id": "string",
"isPreorder": true,
"items": [
{
"_id": "string",
"barcode": [
"string"
],
"container_deposit": 0,
"discount": 0,
"instructions": "string",
"name": "string",
"original_pricing": {
"max_quantity": 0,
"min_quantity": 0,
"pricing_type": "string",
"quantity": 0,
"total_price": 0,
"unit_price": 0,
"vat_percent": 0,
"weight": 0
},
"pricing": {
"max_quantity": 0,
"min_quantity": 0,
"pricing_type": "string",
"quantity": 0,
"total_price": 0,
"unit_price": 0,
"vat_percent": 0,
"weight": 0
},
"replaced_id": "string",
"sku": "string",
"status": "string"
}
],
"order_code": "string",
"order_id": "string",
"order_type": "string",
"payment": {
"additional_fees": {
"property1": 0,
"property2": 0
},
"container_charge": 0,
"delivery_fee": 0,
"difference_to_minimum": 0,
"discount": 0,
"discounts": [
{
"name": "string",
"value": 0
}
],
"order_total": 0,
"service_fee": 0,
"sub_total": 0,
"total_taxes": 0,
"type": "string"
},
"promised_for": "string",
"status": "string",
"sys": {
"created_at": "string",
"created_by": "string",
"update_status": "string",
"updated_at": "string",
"updated_by": "string",
"webhook_status": "string"
},
"transport_type": "string"
}
Error por order_id incorrecto
404Not Found
2. Error por token errado
401 Unauthorized
Para dejar tu integración lista y activa en todas tus tiendas operativas, debes realizar una homologación.
Para ello, coordina aquí una reunión con el equipo de Soporte de Integraciones para certificar el correcto funcionamiento de la integración una vez que la hayas implementado.
Luego de esta reunión, la integración podrá quedar live en las tiendas reales.
No, las pruebas se realizarán en una tienda de pruebas que creará tu Ejecutivo de Cuentas. De esta forma, nos aseguramos de no afectar las tiendas operativas.
Luego de que la integración sea homologada, podrás impactar información en las tiendas reales.
Una API (Interfaz de Programación de Aplicaciones) es un conjunto de reglas y definiciones que permiten que diferentes aplicaciones se comuniquen entre sí. Actúa como un intermediario que permite que dos programas se comuniquen de manera efectiva. Las API definen los métodos y protocolos que las aplicaciones pueden utilizar para solicitar y enviar datos.
Los principales usos de una API incluyen:
Integración de sistemas
Permite que diferentes sistemas informáticos se comuniquen entre sí y compartan datos de manera eficiente.
Desarrollo de aplicaciones
Proporciona funciones predefinidas que los desarrolladores pueden utilizar para crear nuevas aplicaciones de forma más rápida y sencilla.
Acceso a servicios web
Muchos servicios en línea, como redes sociales, servicios de pago y plataformas de almacenamiento en la nube, ofrecen API que permiten a los desarrolladores integrar estos servicios en sus propias aplicaciones.
Automatización
Puedes utilizarla para automatizar tareas repetitivas o complejas, lo que ayuda a mejorar la eficiencia y reducir los errores humanos.
Personalización
Puedes personalizar la funcionalidad de una aplicación según las necesidades específicas de un usuario o empresa.
Un webhook es un mecanismo de comunicación automatizado que permite a una aplicación enviar información en tiempo real a otra aplicación o servicio cuando ocurre un evento específico. En lugar de que una aplicación solicite datos de forma periódica, el webhook permite que la aplicación receptora sea notificada de inmediato cuando hay nuevos datos disponibles o cuando se produce un evento relevante.
Los webhooks son útiles como notificaciones de cambios en bases de datos, actualizaciones de estado en sistemas de seguimiento, integraciones entre aplicaciones, entre otros casos de uso. Por ejemplo, un servicio de pagos en línea puede utilizar un webhook para notificar a una tienda en línea cuando se ha completado un pago, lo que desencadenaría acciones como actualizar el inventario o enviar un correo electrónico de confirmación al cliente.
cURL es una herramienta de línea de comandos que se utiliza para transferir datos a través de varios protocolos, como HTTP, HTTPS, FTP, FTPS, SCP, SFTP, LDAP y otros. Su nombre completo es "Client for URLs" (Cliente para URLs), lo que refleja su capacidad para trabajar con diversas URL y protocolos de red.
Es una herramienta versátil que permite interactuar con servidores web y transferir datos de manera eficiente a través de una variedad de protocolos de red. Es útil para una amplia gama de tareas relacionadas con la transferencia de datos y la comunicación en línea.
Algunos de los posibles usos de cURL incluyen:
Transferencia de archivos
Puedes utilizarla para descargar o subir archivos a través de FTP, FTPS, SCP o SFTP.
Interacción con APIs
Puedes realizar solicitudes a APIs web y recibir respuestas, lo que permite probar y depurar servicios web.
Pruebas de conectividad
Puedes verificar la conectividad con servidores web y probar la disponibilidad de servicios en línea.
Descarga de contenido web
Puedes descargar páginas web completas o recursos específicos, como imágenes o archivos CSS.
Pruebas de velocidad de conexión
Puedes medir la velocidad de descarga y carga de archivos desde y hacia un servidor.
Autenticación y gestión de cookies
Puedes gestionar la autenticación con servidores web y las cookies para mantener la sesión activa.
No. Podrás acceder al plugin Shops Integrations solo si tu usuario tiene permisos de Admin.
Si tienes alguna duda o consulta durante el proceso de integración, contacta a nuestro equipo de Soporte de Integraciones vía e-mail: soporteintegraciones@pedidosya.com.
Y si surge cualquier inconveniente después de que la integración esté activa, contacta a tu Representante de cuenta o reporta tu issue aquí.
Esta información estará disponible si deseas mapearla con algún parámetro específico.
Estados de la orden:
READY_FOR_PICKUP- Se envía una vez la orden es cerrada(checkout) en Pelican y ya esta lista para ser retirada por repartidor.
CANCELED - Se envía este estado si la orden ha sido cancelada por PedidosYa(validar razón y quien cancelo en order.cancellation[...]).
Motivos de cancelación:
CLOSED
ITEM_UNAVAILABLE
TOO_BUSY
Estados de los productos:
NOT_PROCESSED: estado inicial de un producto recibido por el webhook
NOT_FOUND: producto no encontrado en tienda
IN_CART: producto agregado al carrito por el picker
REPLACED: productos que fueron reemplazados y no se entregan al cliente. Si A es reemplazado por B. A tendrá el estado REPLACED y B el estado IN_CART
Información de los productos:
En el arreglo "pricing" de los productos se indica la cantidad final (quantity) y precio con el descuento aplicado a nivel de unidad (unit_price) y del total de unidades pickeadas (total_price).
En el campo instructions se envía la información correspondiente al precio original de los productos y descuento aplicado: "Precio Original: $6090.0 / Descuento Aplicado: $1522.5. " Tener en cuenta que este campo es estático y corresponde a la información de la orden original (antes de ser modificada en Pelican).
Si tienes productos PESABLES, el peso del producto se indicará en el campo weight que aparecerá dentro del arreglo del producto, como se ve en el ejemplo a continuación. Además el campo "pricing_type" seá KG. Puedes consultar con tu Ejecutivo de Cuenta si tienes productos con estas características.
Tipos de pago:
En el campo "type", dentro del arreglo "payment", podrás recibir uno de los siguientes métodos de pago:
CASH_ON_DELIVERY = Pago en efectivo
CARD_ON_DELIVERY = Pago con tarjeta pero en el domicilio del cliente
PAID = Pago online, esto son todos los pagos con tarjeta desde la app
"items": [
{
"_id": "9f61694b-94f9-4d3b-8f4d-2d0e1638c4c2",
"sku": "02851400008008",
"barcode": [
"02851400008008"
],
"name": "Berenjena",
"pricing": {
"pricing_type": "KG",
"unit_price": 666,
"vat_percent": 0,
"total_price": 499.5,
"quantity": 1,
"min_quantity": 0.08,
"max_quantity": 0.78,
"weight": 0.75
},
"original_pricing": {
"pricing_type": "KG",
"unit_price": 666,
"vat_percent": 0,
"total_price": 519.48,
"quantity": 1,
"min_quantity": 0.08,
"max_quantity": 0.78,
"weight": 0.78
},
"container_deposit": 0,
"discount": 0,
"instructions": "Seleccionar 3 unidades de este producto, por un peso de 0,78 KG.\nSi no está disponible: Elegir reemplazos",
"status": "IN_CART"
},
Información que llega del cliente: Por motivos de seguridad, la información del cliente viaja encriptada. Como se ve a continuación:
"customer": {
"_id": "67860659",
"national_id": "",
"tax_id": "",
"first_name": "T**t",
"last_name": "O**nPlatform",
"phone_number": "+59898****63",
"delivery_address": {
"country": "",
"city": "",
"street": "",
"number": "",
"latitude": 0,
"longitude": 0,
"company": "",
"block": "",
"building": "",
"apartment": "",
"entrance": "",
"intercom": "",
"floor": "",
"suburb": "",
"zipcode": "",
"instructions": "",
"formattedAddress": ""
}
},
Documentación de referencia
Aquí puedes ver cómo te van a llegar las órdenes con datos reales.
Json de orden confirmada por Pelican (lista para retirar)
{
"order_id": "e647c4de-3b21-4808-a414-1faacb873460",
"external_order_id": "1097773216",
"order_code": "165",
"client": {
"id": "49289",
"chain_id": "917a01fe-74d1-4380-88e0-02befaf548e9",
"name": "Techsupport",
"country_code": "uy",
"store_id": "364124",
"external_partner_config_id": ""
},
"customer": {
"_id": "67860659",
"national_id": "",
"tax_id": "",
"first_name": "T**t",
"last_name": "O**nPlatform",
"phone_number": "+59898****63",
"delivery_address": {
"country": "",
"city": "",
"street": "",
"number": "",
"latitude": 0,
"longitude": 0,
"company": "",
"block": "",
"building": "",
"apartment": "",
"entrance": "",
"intercom": "",
"floor": "",
"suburb": "",
"zipcode": "",
"instructions": "",
"formattedAddress": ""
}
},
"comment": "Email del Cliente: testuser.openplatform@gmail.com",
"items": [
{
"_id": "7ee6612a-2cb6-45fb-955d-fe68a81ecb1e",
"sku": "SKUACEITETEST",
"barcode": [
"07730132001431"
],
"name": "Aceite De Girasol Altoleico Optimo 900 Ml",
"pricing": {
"pricing_type": "UNIT",
"unit_price": 200,
"vat_percent": 0,
"total_price": 800,
"quantity": 4,
"min_quantity": 0,
"max_quantity": 4
},
"original_pricing": {
"pricing_type": "UNIT",
"unit_price": 200,
"vat_percent": 0,
"total_price": 800,
"quantity": 4,
"min_quantity": 0,
"max_quantity": 4
},
"container_deposit": 0,
"discount": 0,
"instructions": "",
"status": "IN_CART"
}
],
"order_type": "DELIVERY",
"transport_type": "LOGISTICS_DELIVERY",
"payment": {
"sub_total": 800,
"order_total": 800,
"delivery_fee": 0,
"service_fee": 0,
"difference_to_minimum": 0,
"discounts": [],
"discount": 0,
"container_charge": 0,
"total_taxes": 0,
"type": "CASH_ON_DELIVERY"
},
"cancellation": {
"reason": "",
"cancelled_by": ""
},
"status": "READY_FOR_PICKUP",
"sys": {
"created_at": "2024-02-16T18:53:35.201584643Z",
"created_by": "Order Fulfilment",
"updated_at": "2024-02-16T18:53:35.201658626Z",
"updated_by": "Order Fulfilment",
"webhook_status": ""
},
"isPreorder": false
}
Json de orden cancelada por la plataforma (luego de haber sido confirmada)
{
"order_id": "e647c4de-3b21-4808-a414-1faacb873460",
"external_order_id": "1097773216",
"order_code": "165",
"client": {
"id": "49289",
"chain_id": "917a01fe-74d1-4380-88e0-02befaf548e9",
"name": "Techsupport",
"country_code": "uy",
"store_id": "364124",
"external_partner_config_id": ""
},
"customer": {
"_id": "67860659",
"national_id": "",
"tax_id": "",
"first_name": "T**t",
"last_name": "O**nPlatform",
"phone_number": "+59898****63",
"delivery_address": {
"country": "",
"city": "",
"street": "",
"number": "",
"latitude": 0,
"longitude": 0,
"company": "",
"block": "",
"building": "",
"apartment": "",
"entrance": "",
"intercom": "",
"floor": "",
"suburb": "",
"zipcode": "",
"instructions": "",
"formattedAddress": ""
}
},
"comment": "Email del Cliente: testuser.openplatform@gmail.com",
"items": [
{
"_id": "7ee6612a-2cb6-45fb-955d-fe68a81ecb1e",
"sku": "SKUACEITETEST",
"barcode": [
"07730132001431"
],
"name": "Aceite De Girasol Altoleico Optimo 900 Ml",
"pricing": {
"pricing_type": "UNIT",
"unit_price": 200,
"vat_percent": 0,
"total_price": 800,
"quantity": 4,
"min_quantity": 0,
"max_quantity": 4
},
"original_pricing": {
"pricing_type": "UNIT",
"unit_price": 200,
"vat_percent": 0,
"total_price": 800,
"quantity": 4,
"min_quantity": 0,
"max_quantity": 4
},
"container_deposit": 0,
"discount": 0,
"instructions": "",
"status": "IN_CART"
}
],
"order_type": "DELIVERY",
"transport_type": "LOGISTICS_DELIVERY",
"payment": {
"sub_total": 800,
"order_total": 800,
"delivery_fee": 0,
"service_fee": 0,
"difference_to_minimum": 0,
"discounts": [],
"discount": 0,
"container_charge": 0,
"total_taxes": 0,
"type": "CASH_ON_DELIVERY"
},
"cancellation": {
"reason": "NO_COURIER",
"cancelled_by": "TRANSPORT"
},
"status": "CANCELLED",
"sys": {
"created_at": "2024-02-16T19:03:17.584435364Z",
"created_by": "Order Fulfilment",
"updated_at": "2024-02-16T19:03:17.584546403Z",
"updated_by": "Order Fulfilment",
"webhook_status": "",
"update_status": "SENT_TO_PARTNER"
},
"isPreorder": false
}
Json de orden con datos de facturación a empresa (dentro de “comment”)
{
"order_id": "d28f0392-d63e-4f88-84a4-2d996747927b",
"external_order_id": "1097777968",
"order_code": "166",
"client": {
"id": "49289",
"chain_id": "917a01fe-74d1-4380-88e0-02befaf548e9",
"name": "Techsupport",
"country_code": "uy",
"store_id": "364124",
"external_partner_config_id": ""
},
"customer": {
"_id": "67860659",
"national_id": "",
"tax_id": "",
"first_name": "T**t",
"last_name": "O**nPlatform",
"phone_number": "+59898****63",
"delivery_address": {
"country": "",
"city": "",
"street": "",
"number": "",
"latitude": 0,
"longitude": 0,
"company": "",
"block": "",
"building": "",
"apartment": "",
"entrance": "",
"intercom": "",
"floor": "",
"suburb": "",
"zipcode": "",
"instructions": "",
"formattedAddress": ""
}
},
"comment": "Facturar a empresa: Moises SRL - Nro.: 1234567-8 | Email del Cliente: testuser.openplatform@gmail.com",
"items": [
{
"_id": "533e4c6f-0d04-42c8-9011-df1b3bc6088c",
"sku": "SKUACEITETEST",
"barcode": [
"07730132001431"
],
"name": "Aceite De Girasol Altoleico Optimo 900 Ml",
"pricing": {
"pricing_type": "UNIT",
"unit_price": 200,
"vat_percent": 0,
"total_price": 800,
"quantity": 4,
"min_quantity": 0,
"max_quantity": 4
},
"original_pricing": {
"pricing_type": "UNIT",
"unit_price": 200,
"vat_percent": 0,
"total_price": 800,
"quantity": 4,
"min_quantity": 0,
"max_quantity": 4
},
"container_deposit": 0,
"discount": 0,
"instructions": "",
"status": "IN_CART"
}
],
"order_type": "DELIVERY",
"transport_type": "LOGISTICS_DELIVERY",
"payment": {
"sub_total": 800,
"order_total": 800,
"delivery_fee": 0,
"service_fee": 0,
"difference_to_minimum": 0,
"discounts": [],
"discount": 0,
"container_charge": 0,
"total_taxes": 0,
"type": "CASH_ON_DELIVERY"
},
"cancellation": {
"reason": "",
"cancelled_by": ""
},
"status": "READY_FOR_PICKUP",
"sys": {
"created_at": "2024-02-16T19:26:15.507204877Z",
"created_by": "Order Fulfilment",
"updated_at": "2024-02-16T19:26:15.507269408Z",
"updated_by": "Order Fulfilment",
"webhook_status": ""
},
"isPreorder": false
}
Json de orden cancelada desde PedidosYa por productos faltantes en la orden
{
"order_id": "512d4910-934e-489b-9564-642c40211a05",
"external_order_id": "1097803043",
"order_code": "167",
"client": {
"id": "49289",
"chain_id": "917a01fe-74d1-4380-88e0-02befaf548e9",
"name": "Techsupport",
"country_code": "uy",
"store_id": "364124",
"external_partner_config_id": ""
},
"customer": {
"_id": "67860659",
"national_id": "",
"tax_id": "",
"first_name": "T**t",
"last_name": "O**nPlatform",
"phone_number": "+59898****63",
"delivery_address": {
"country": "",
"city": "",
"street": "",
"number": "",
"latitude": 0,
"longitude": 0,
"company": "",
"block": "",
"building": "",
"apartment": "",
"entrance": "",
"intercom": "",
"floor": "",
"suburb": "",
"zipcode": "",
"instructions": "",
"formattedAddress": ""
}
},
"comment": "Facturar a empresa: Moises SRL - Nro.: 1234567-8 | Email del Cliente: testuser.openplatform@gmail.com",
"items": [
{
"_id": "8f7c6a2c-3278-4ffb-b416-51126bd17fa0",
"sku": "SKUACEITETEST",
"barcode": [
"07730132001431"
],
"name": "Aceite De Girasol Altoleico Optimo 900 Ml",
"pricing": {
"pricing_type": "UNIT",
"unit_price": 0,
"vat_percent": 0,
"total_price": 0,
"quantity": 0,
"min_quantity": 0,
"max_quantity": 4
},
"original_pricing": {
"pricing_type": "UNIT",
"unit_price": 200,
"vat_percent": 0,
"total_price": 800,
"quantity": 4,
"min_quantity": 0,
"max_quantity": 4
},
"container_deposit": 0,
"discount": 0,
"instructions": "",
"status": "NOT_FOUND"
}
],
"order_type": "DELIVERY",
"transport_type": "LOGISTICS_DELIVERY",
"payment": {
"sub_total": 0,
"order_total": 0,
"delivery_fee": 0,
"service_fee": 0,
"difference_to_minimum": 0,
"discounts": [],
"discount": 0,
"container_charge": 0,
"total_taxes": 0,
"type": "CASH_ON_DELIVERY"
},
"cancellation": {
"reason": "ITEM_UNAVAILABLE",
"cancelled_by": "VENDOR"
},
"status": "CANCELLED",
"sys": {
"created_at": "2024-02-16T19:38:19.823178916Z",
"created_by": "Order Fulfilment",
"updated_at": "2024-02-16T19:38:19.823237582Z",
"updated_by": "Order Fulfilment",
"webhook_status": ""
},
"isPreorder": false
}
Json de una orden READY TO PICKUP la cual tuvo modificaciones
Producto _id: 0da036da-7557-494a-9101-442aeeb629d8 tiene una modificación en la cantidad con respecto a la creada por el usuario.
Producto _id: 6529c639-aa05-41ca-b488-b5e11d3e1fdb fue remplazado.
Producto _id: 3f967cc8-cc63-425d-9486-8807ca694c1c tuvo un cambio en el precio con respecto al original.
Producto _id: eea6a6e1-6960-485e-adb5-ed13168c17b9 fue el remplazo del producto _id: 6529c639-aa05-41ca-b488-b5e11d3e1fdb validar campo replaced_id
{
"order_id": "60cdac38-79b7-46a4-badb-e767287f1bca",
"external_order_id": "1165902137",
"order_code": "502",
"client": {
"id": "49289",
"chain_id": "917a01fe-74d1-4380-88e0-02befaf548e9",
"name": "Techsupport",
"country_code": "uy",
"store_id": "364124",
"external_partner_config_id": ""
},
"customer": {
"_id": "67860659",
"national_id": "",
"tax_id": "1234567-8",
"first_name": "T**t",
"last_name": "O**nPlatform",
"phone_number": "+59898****63",
"delivery_address": {
"country": "",
"city": "",
"street": "",
"number": "",
"latitude": 0,
"longitude": 0,
"company": "",
"block": "",
"building": "",
"apartment": "",
"entrance": "",
"intercom": "",
"floor": "",
"suburb": "",
"zipcode": "",
"instructions": "",
"formattedAddress": ""
}
},
"comment": "Facturar a empresa: platform srl - Nro.: 1234567-8 | Email del Cliente: testuser.openplatform@gmail.com",
"items": [
{
"_id": "0da036da-7557-494a-9101-442aeeb629d8",
"sku": "75WITE",
"barcode": [
"07802926000194"
],
"name": "Helado San Francisco Tiramisú 1 Lt",
"pricing": {
"pricing_type": "UNIT",
"unit_price": 800,
"vat_percent": 0,
"total_price": 1600,
"quantity": 2,
"min_quantity": 0,
"max_quantity": 4
},
"original_pricing": {
"pricing_type": "UNIT",
"unit_price": 800,
"vat_percent": 0,
"total_price": 3200,
"quantity": 4,
"min_quantity": 0,
"max_quantity": 4
},
"container_deposit": 0,
"discount": 0,
"instructions": "",
"status": "IN_CART"
},
{
"_id": "6529c639-aa05-41ca-b488-b5e11d3e1fdb",
"sku": "SKUCOCATEST",
"barcode": [
"07441003500532"
],
"name": "Coca Cola Original 1 L",
"pricing": {
"pricing_type": "UNIT",
"unit_price": 120,
"vat_percent": 0,
"total_price": 120,
"quantity": 1,
"min_quantity": 0,
"max_quantity": 1
},
"original_pricing": {
"pricing_type": "UNIT",
"unit_price": 120,
"vat_percent": 0,
"total_price": 120,
"quantity": 1,
"min_quantity": 0,
"max_quantity": 1
},
"container_deposit": 0,
"discount": 0,
"instructions": "",
"status": "REPLACED"
},
{
"_id": "3f967cc8-cc63-425d-9486-8807ca694c1c",
"sku": "0145555",
"barcode": [
"00000003456217"
],
"name": "Cerveza Miller Genuine Draft Botella 12 Oz",
"pricing": {
"pricing_type": "UNIT",
"unit_price": 100,
"vat_percent": 0,
"total_price": 100,
"quantity": 1,
"min_quantity": 0,
"max_quantity": 1
},
"original_pricing": {
"pricing_type": "UNIT",
"unit_price": 85,
"vat_percent": 0,
"total_price": 85,
"quantity": 1,
"min_quantity": 0,
"max_quantity": 1
},
"container_deposit": 0,
"discount": 0,
"instructions": "",
"status": "IN_CART"
},
{
"_id": "eea6a6e1-6960-485e-adb5-ed13168c17b9",
"replaced_id": "6529c639-aa05-41ca-b488-b5e11d3e1fdb",
"sku": "SKUPRUEBACOPPO",
"barcode": null,
"name": "Sonajero Explorador Tiny Love Manzana 1Un",
"pricing": {
"pricing_type": "UNIT",
"unit_price": 110,
"vat_percent": 0,
"total_price": 110,
"quantity": 1,
"min_quantity": 0,
"max_quantity": 0
},
"original_pricing": {
"pricing_type": "UNIT",
"unit_price": 110,
"vat_percent": 0,
"total_price": 110,
"quantity": 1,
"min_quantity": 0,
"max_quantity": 0
},
"container_deposit": 0,
"discount": 0,
"instructions": "",
"status": "IN_CART"
}
],
"order_type": "DELIVERY",
"transport_type": "LOGISTICS_DELIVERY",
"payment": {
"sub_total": 1810,
"order_total": 1810,
"delivery_fee": 0,
"service_fee": 0,
"difference_to_minimum": 0,
"discounts": [],
"discount": 0,
"container_charge": 0,
"total_taxes": 0,
"type": "CASH_ON_DELIVERY"
},
"cancellation": {
"reason": "",
"cancelled_by": ""
},
"status": "READY_FOR_PICKUP",
"sys": {
"created_at": "2024-05-07T18:43:28.97118857Z",
"created_by": "Order Fulfilment",
"updated_at": "2024-05-07T18:43:28.971237083Z",
"updated_by": "Order Fulfilment",
"webhook_status": "",
"update_status": "SENT_TO_PARTNER"
},
"isPreorder": false
}
Json de paginado de órdenes
{
"orders": [
{
"cancellation": {
"cancelled_by": "TRANSPORT",
"reason": "NO_COURIER"
},
"client": {
"chain_id": "917a01fe-74d1-4380-88e0-02befaf548e9",
"country_code": "uy",
"external_partner_config_id": "",
"id": "49289",
"name": "Techsupport",
"store_id": "364124"
},
"comment": "Email del Cliente: andrestestpeya@gmail.com",
"customer": {
"_id": "69769881",
"delivery_address": {
"apartment": "",
"block": "",
"building": "",
"city": "",
"company": "",
"country": "",
"entrance": "",
"floor": "",
"formattedAddress": "",
"instructions": "",
"intercom": "",
"latitude": 0,
"longitude": 0,
"number": "",
"street": "",
"suburb": "",
"zipcode": ""
},
"first_name": "A**res",
"last_name": "P**a",
"national_id": "",
"phone_number": "+59891****9",
"tax_id": ""
},
"external_order_id": "1097505980",
"isPreorder": false,
"items": [
{
"_id": "e3ae4572-5017-42bb-a8d0-029415730caf",
"barcode": [
"07613035375116"
],
"container_deposit": 0,
"discount": 0,
"instructions": "",
"name": "Bracafe Fuerte X 10 Sticks",
"original_pricing": {
"max_quantity": 2,
"min_quantity": 0,
"pricing_type": "UNIT",
"quantity": 2,
"total_price": 300,
"unit_price": 150,
"vat_percent": 0
},
"pricing": {
"max_quantity": 2,
"min_quantity": 0,
"pricing_type": "UNIT",
"quantity": 1,
"total_price": 150,
"unit_price": 150,
"vat_percent": 0
},
"sku": "SKUTESTMOI",
"status": "IN_CART"
},
{
"_id": "dc303f94-3afc-43c7-ad49-62b949133130",
"barcode": null,
"container_deposit": 0,
"discount": 0,
"instructions": "",
"name": "Lima",
"original_pricing": {
"max_quantity": 0.5,
"min_quantity": 0.43,
"pricing_type": "KG",
"quantity": 1,
"total_price": 7.5,
"unit_price": 15,
"vat_percent": 0,
"weight": 0.5
},
"pricing": {
"max_quantity": 0.5,
"min_quantity": 0.43,
"pricing_type": "KG",
"quantity": 1,
"total_price": 6.9,
"unit_price": 15,
"vat_percent": 0,
"weight": 0.46
},
"sku": "ME81YT",
"status": "IN_CART"
},
{
"_id": "d6e95aed-741e-4412-93af-f43cc8e9dc5e",
"barcode": [
"07441003500532"
],
"container_deposit": 0,
"discount": 0,
"instructions": "",
"name": "Coca Cola Original 1 L",
"original_pricing": {
"max_quantity": 3,
"min_quantity": 0,
"pricing_type": "UNIT",
"quantity": 3,
"total_price": 360,
"unit_price": 120,
"vat_percent": 0
},
"pricing": {
"max_quantity": 3,
"min_quantity": 0,
"pricing_type": "UNIT",
"quantity": 3,
"total_price": 300,
"unit_price": 100,
"vat_percent": 0
},
"sku": "SKUCOCATEST",
"status": "IN_CART"
},
{
"_id": "e4f959e0-e216-4bba-b226-c97047c21c7c",
"barcode": null,
"container_deposit": 0,
"discount": 0,
"instructions": "",
"name": "Berenjena",
"original_pricing": {
"max_quantity": 1.5,
"min_quantity": 1.28,
"pricing_type": "KG",
"quantity": 1,
"total_price": 300,
"unit_price": 200,
"vat_percent": 0,
"weight": 1.5
},
"pricing": {
"max_quantity": 1.5,
"min_quantity": 1.28,
"pricing_type": "KG",
"quantity": 1,
"total_price": 258,
"unit_price": 200,
"vat_percent": 0,
"weight": 1.29
},
"sku": "02851400008008",
"status": "IN_CART"
}
],
"order_code": "164",
"order_id": "5424514d-e146-4130-84e3-e34a36c2b94c",
"order_type": "DELIVERY",
"payment": {
"container_charge": 0,
"delivery_fee": 0,
"difference_to_minimum": 0,
"discount": 0,
"discounts": [],
"order_total": 715,
"service_fee": 0,
"sub_total": 714.9,
"total_taxes": 0,
"type": "CASH_ON_DELIVERY"
},
"promised_for": "2024-02-16T14:57:37Z",
"status": "CANCELLED",
"sys": {
"created_at": "2024-02-16T14:48:09.558Z",
"created_by": "Order Fulfilment",
"update_status": "SENT_TO_PARTNER",
"updated_at": "2024-02-16T14:48:09.558Z",
"updated_by": "Order Fulfilment",
"webhook_status": ""
},
"transport_type": "LOGISTICS_DELIVERY"
},
{
"cancellation": {
"cancelled_by": "VENDOR",
"reason": "NO_RESPONSE"
},
"client": {
"chain_id": "917a01fe-74d1-4380-88e0-02befaf548e9",
"country_code": "uy",
"external_partner_config_id": "",
"id": "49289",
"name": "Techsupport",
"store_id": "364124"
},
"comment": "Email del Cliente: testuser.openplatform@gmail.com",
"customer": {
"_id": "67860659",
"delivery_address": {
"apartment": "",
"block": "",
"building": "",
"city": "",
"company": "",
"country": "",
"entrance": "",
"floor": "",
"formattedAddress": "",
"instructions": "",
"intercom": "",
"latitude": 0,
"longitude": 0,
"number": "",
"street": "",
"suburb": "",
"zipcode": ""
},
"first_name": "T**t",
"last_name": "O**nPlatform",
"national_id": "",
"phone_number": "+59898****63",
"tax_id": ""
},
"external_order_id": "1096722612",
"isPreorder": false,
"items": [
{
"_id": "e4bf3cbd-d1e4-46f4-aa58-ceac7bdf6f89",
"barcode": [
"07802926000194"
],
"container_deposit": 0,
"discount": 0,
"instructions": "",
"name": "Helado San Francisco Tiramisú 1 Lt",
"original_pricing": {
"max_quantity": 1,
"min_quantity": 0,
"pricing_type": "UNIT",
"quantity": 1,
"total_price": 800,
"unit_price": 800,
"vat_percent": 0
},
"pricing": {
"max_quantity": 1,
"min_quantity": 0,
"pricing_type": "UNIT",
"quantity": 1,
"total_price": 800,
"unit_price": 800,
"vat_percent": 0
},
"sku": "75WITE",
"status": "NOT_PROCESSED"
}
],
"order_code": "163",
"order_id": "520d9da7-df0b-47cf-ae10-0c62a2e77f9c",
"order_type": "DELIVERY",
"payment": {
"container_charge": 0,
"delivery_fee": 0,
"difference_to_minimum": 0,
"discount": 0,
"discounts": [],
"order_total": 800,
"service_fee": 0,
"sub_total": 800,
"total_taxes": 0,
"type": "CASH_ON_DELIVERY"
},
"promised_for": "2024-02-15T13:41:45Z",
"status": "CANCELLED",
"sys": {
"created_at": "2024-02-15T13:32:00.213Z",
"created_by": "Order Fulfilment",
"update_status": "SENT_TO_PARTNER",
"updated_at": "2024-02-15T13:32:00.213Z",
"updated_by": "Order Fulfilment",
"webhook_status": ""
},
"transport_type": "LOGISTICS_DELIVERY"
}
],
"page_number": 1,
"page_size": 20,
"total_pages": 1
}
GET de una orden específica
{
"cancellation": {
"cancelled_by": "TRANSPORT",
"reason": "NO_COURIER"
},
"client": {
"chain_id": "917a01fe-74d1-4380-88e0-02befaf548e9",
"country_code": "uy",
"external_partner_config_id": "",
"id": "49289",
"name": "Techsupport",
"store_id": "364124"
},
"comment": "Email del Cliente: andrestestpeya@gmail.com",
"customer": {
"_id": "69769881",
"delivery_address": {
"apartment": "",
"block": "",
"building": "",
"city": "",
"company": "",
"country": "",
"entrance": "",
"floor": "",
"formattedAddress": "",
"instructions": "",
"intercom": "",
"latitude": 0,
"longitude": 0,
"number": "",
"street": "",
"suburb": "",
"zipcode": ""
},
"first_name": "A**res",
"last_name": "P**a",
"national_id": "",
"phone_number": "+59891****9",
"tax_id": ""
},
"external_order_id": "1097505980",
"isPreorder": false,
"items": [
{
"_id": "e3ae4572-5017-42bb-a8d0-029415730caf",
"barcode": [
"07613035375116"
],
"container_deposit": 0,
"discount": 0,
"instructions": "",
"name": "Bracafe Fuerte X 10 Sticks",
"original_pricing": {
"max_quantity": 2,
"min_quantity": 0,
"pricing_type": "UNIT",
"quantity": 2,
"total_price": 300,
"unit_price": 150,
"vat_percent": 0
},
"pricing": {
"max_quantity": 2,
"min_quantity": 0,
"pricing_type": "UNIT",
"quantity": 1,
"total_price": 150,
"unit_price": 150,
"vat_percent": 0
},
"sku": "SKUTESTMOI",
"status": "IN_CART"
},
{
"_id": "dc303f94-3afc-43c7-ad49-62b949133130",
"barcode": null,
"container_deposit": 0,
"discount": 0,
"instructions": "",
"name": "Lima",
"original_pricing": {
"max_quantity": 0.5,
"min_quantity": 0.43,
"pricing_type": "KG",
"quantity": 1,
"total_price": 7.5,
"unit_price": 15,
"vat_percent": 0,
"weight": 0.5
},
"pricing": {
"max_quantity": 0.5,
"min_quantity": 0.43,
"pricing_type": "KG",
"quantity": 1,
"total_price": 6.9,
"unit_price": 15,
"vat_percent": 0,
"weight": 0.46
},
"sku": "ME81YT",
"status": "IN_CART"
},
{
"_id": "d6e95aed-741e-4412-93af-f43cc8e9dc5e",
"barcode": [
"07441003500532"
],
"container_deposit": 0,
"discount": 0,
"instructions": "",
"name": "Coca Cola Original 1 L",
"original_pricing": {
"max_quantity": 3,
"min_quantity": 0,
"pricing_type": "UNIT",
"quantity": 3,
"total_price": 360,
"unit_price": 120,
"vat_percent": 0
},
"pricing": {
"max_quantity": 3,
"min_quantity": 0,
"pricing_type": "UNIT",
"quantity": 3,
"total_price": 300,
"unit_price": 100,
"vat_percent": 0
},
"sku": "SKUCOCATEST",
"status": "IN_CART"
},
{
"_id": "e4f959e0-e216-4bba-b226-c97047c21c7c",
"barcode": null,
"container_deposit": 0,
"discount": 0,
"instructions": "",
"name": "Berenjena",
"original_pricing": {
"max_quantity": 1.5,
"min_quantity": 1.28,
"pricing_type": "KG",
"quantity": 1,
"total_price": 300,
"unit_price": 200,
"vat_percent": 0,
"weight": 1.5
},
"pricing": {
"max_quantity": 1.5,
"min_quantity": 1.28,
"pricing_type": "KG",
"quantity": 1,
"total_price": 258,
"unit_price": 200,
"vat_percent": 0,
"weight": 1.29
},
"sku": "02851400008008",
"status": "IN_CART"
}
],
"order_code": "164",
"order_id": "5424514d-e146-4130-84e3-e34a36c2b94c",
"order_type": "DELIVERY",
"payment": {
"container_charge": 0,
"delivery_fee": 0,
"difference_to_minimum": 0,
"discount": 0,
"discounts": [],
"order_total": 715,
"service_fee": 0,
"sub_total": 714.9,
"total_taxes": 0,
"type": "CASH_ON_DELIVERY"
},
"promised_for": "2024-02-16T14:57:37Z",
"status": "CANCELLED",
"sys": {
"created_at": "2024-02-16T14:48:09.558Z",
"created_by": "Order Fulfilment",
"update_status": "SENT_TO_PARTNER",
"updated_at": "2024-02-16T14:48:09.558Z",
"updated_by": "Order Fulfilment",
"webhook_status": ""
},
"transport_type": "LOGISTICS_DELIVERY"
}