¡Bienvenido a nuestra documentación de integraciones!
Podrás automatizar envíos y procesos, sincronizar las órdenes de tiendas online; programar recolecciones, configurar impresión, rastrear los movimientos de tus envíos y protegerlos.
Busca las credenciales y conecta con nuestra API
Simplifica tu integración, elige el ambiente y empieza a usar nuestra API en minutos…
- 1. Encuentra tus credenciales
- Ve a Conexiones > API y copia tus credenciales (Client ID y Client Secret).
- 2. Genera tu bearer token
- Utiliza las credenciales y genera el bearer token para autenticar tus solicitudes
- 3. Empieza a llamar a la API
Con tu token listo podrás hacer solicitudes a la API.
¿Comenzamos cotizando un envío?El token expira en 2 horas y permite hasta 2 solicitudes por segundo. Planifica las peticiones dentro de este tiempo.
Inicia sesión para consultar la duración del token.
Iniciar sesión¿Necesitas ayuda con tu integración? Escríbenos a
api@skydropx.comOauth
- POST
-
Resumen: Obtener un token de acceso
Descripción:POST /api/v1/oauth/tokenEl endpoint de token se utiliza para que el cliente obtenga un token de acceso presentando su concesión de autorización o token de actualización.
Parámetros de la solicitud:
grant_type: El tipo de concesión utilizada, comorefresh_tokenoclient_credentials.client_id: El identificador del cliente.client_secret: La clave secreta del cliente.refresh_token: El token de actualización (para el tipo de concesiónrefresh_token).redirect_uri: La URI de redirección, debe ser la misma que laredirect_urialmacenada en la aplicación Cliente.scope:Los scopes limitan el acceso de los tokens de acceso a partes específicas de la API. Al solicitar un token de acceso, puedes especificar uno o más scopes.
Ejemplo de solicitud:
POST /api/v1/oauth/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials&client_id=CLIENT_ID&client_secret=CLIENT_SECRETEjemplo de Cuerpo de Solicitud:
Content-Type: application/jsonObject:client_idRequiredType: stringclient_secretRequiredType: stringgrant_typeRequiredType: stringredirect_uriType: stringrefresh_tokenType: stringscopeType: string -
Respuestas:
curl -X POST 'https://sb-pro.skydropx.com/api/v1/oauth/token' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {{BEARER_TOKEN}}'Código: 200Descripción:Obtener un token de acceso
Esquema:{ "type": "object", "properties": { "access_token": { "type": "string" }, "token_type": { "type": "string" }, "expires_in": { "type": "integer" }, "scope": { "type": "string" }, "created_at": { "type": "integer" } } }Ejemplo:{ "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9", "token_type": "Bearer", "expires_in": 7200, "scope": "read write", "created_at": 1764910368 }Código: 400Descripción:Credenciales faltantes
Esquema:{ "type": "object", "properties": { "error": { "type": "string" }, "error_description": { "type": "string" } } }Ejemplo:{ "error": "Credenciales faltantes", "error_description": "Credenciales faltantes" }Código: 401Descripción:Credenciales inválidas
Esquema:{ "type": "object", "properties": { "error": { "type": "string" }, "error_description": { "type": "string" } } }Ejemplo:{ "error": "Credenciales inválidas", "error_description": "Credenciales inválidas" }
- POST
-
Resumen: Revocar un token
Descripción:POST /api/v1/oauth/revokeEl endpoint de revocación permite a los clientes notificar al servidor de autorización que un token de actualización o acceso previamente obtenido ya no es necesario.
Parámetros de la solicitud:
client_id: El identificador del cliente.client_secret: La clave secreta del cliente.token: El token que el cliente desea revocar.token_type_hint: Una pista sobre el tipo de token enviado para revocación, por ejemplo,access_tokenorefresh_token.
Ejemplo de solicitud:
POST /api/v1/oauth/revoke Content-Type: application/x-www-form-urlencoded client_id=CLIENT_ID&client_secret=CLIENT_SECRET&token=TOKEN&token_type_hint=access_tokenEjemplo de Cuerpo de Solicitud:
Content-Type: application/jsonObject:client_idRequiredType: stringclient_secretRequiredType: stringtokenRequiredType: stringtoken_type_hintType: string -
Respuestas:
curl -X POST 'https://sb-pro.skydropx.com/api/v1/oauth/revoke' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {{BEARER_TOKEN}}'Código: 200Descripción:Revocar un token
Esquema:{ "type": "object", "properties": {} }Ejemplo:{}Código: 403Descripción:Cliente no autorizado
Esquema:{ "type": "object", "properties": { "error": { "type": "string" }, "error_description": { "type": "string" } } }Ejemplo:{ "error": "Cliente no autorizado", "error_description": "Cliente no autorizado" }
- POST
-
Resumen: Obtener detalles del token
Descripción:POST /api/v1/oauth/introspectEl endpoint de introspección se utiliza para verificar el estado activo de un token de acceso o de actualización.
Parámetros de la solicitud:
client_id: El identificador del cliente.client_secret: La clave secreta del cliente.token: El token del cual el cliente desea obtener detalles.token_type_hint: Una pista sobre el tipo de token enviado para introspección, por ejemplo,access_tokenorefresh_token.
Ejemplo de solicitud:
POST /api/v1/oauth/introspect Content-Type: application/x-www-form-urlencoded client_id=CLIENT_ID&client_secret=CLIENT_SECRET&token=TOKEN&token_type_hint=access_tokenEjemplo de Cuerpo de Solicitud:
Content-Type: application/jsonObject:client_idRequiredType: stringclient_secretRequiredType: stringtokenRequiredType: stringtoken_type_hintType: string -
Respuestas:
curl -X POST 'https://sb-pro.skydropx.com/api/v1/oauth/introspect' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {{BEARER_TOKEN}}'Código: 200Descripción:Obtener detalles del token
Esquema:{ "type": "object", "properties": { "active": { "type": "boolean" }, "scope": { "type": "string" }, "client_id": { "type": "string" }, "token_type": { "type": "string" }, "exp": { "type": "integer" }, "iat": { "type": "integer" } } }Ejemplo:{ "active": true, "scope": "read write", "client_id": "example_client_id", "token_type": "Bearer", "exp": 1, "iat": 1 }Código: 400Descripción:Credenciales faltantes
Esquema:{ "type": "object", "properties": { "error": { "type": "string" }, "error_description": { "type": "string" } } }Ejemplo:{ "error": "Credenciales faltantes", "error_description": "Credenciales faltantes" }Código: 401Descripción:Credenciales inválidas
Esquema:{ "type": "object", "properties": { "error": { "type": "string" }, "error_description": { "type": "string" } } }Ejemplo:{ "error": "Credenciales inválidas", "error_description": "Credenciales inválidas" }
Ordenes
- GET
-
Resumen: Recupera todas las órdenes
Descripción:GET /api/v1/ordersEl endpoint de órdenes sirve para recuperar todas las órdenes realizadas. Funciona como un historial.
Parámetros de la solicitud:
Está sección no tiene parámetros.
-
Respuestas:
curl -X GET 'https://sb-pro.skydropx.com/api/v1/orders' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {{BEARER_TOKEN}}'Código: 200Descripción:Retorna una colección de pedidos
Esquema:{ "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" }, "attributes": { "type": "object", "properties": { "id": { "type": "string" }, "platform": { "type": "string", "nullable": true }, "ecommerce_id": { "type": "string", "nullable": true }, "price": { "type": "string", "nullable": true }, "created_at": { "type": "string" }, "updated_at": { "type": "string" } } } } } } } }Ejemplo:{ "data": [ { "id": "The order uuid, example: 0ac5adcc-a13d-427d-81dd-9ddd70b2f660", "type": "order", "attributes": { "id": "The order uuid, example: 0ac5adcc-a13d-427d-81dd-9ddd70b2f660", "platform": "Wix", "ecommerce_id": "12342", "price": "44532", "created_at": "example_created_at", "updated_at": "example_updated_at" } } ] }
- GET
-
Resumen: Recupera una orden
Descripción:GET /api/v1/orders/:idEl endpoint para recuperar una orden sirve para obtener toda la información de una orden.
Parámetros:
id path
RequiredType: string -
Respuestas:
curl -X GET 'https://sb-pro.skydropx.com/api/v1/orders/example_id' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {{BEARER_TOKEN}}'Código: 200Descripción:Retorna una orden
Esquema:{ "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" }, "attributes": { "type": "object", "properties": { "id": { "type": "string" }, "reference": { "type": "string" }, "platform": { "type": [ "string", null ] }, "ecommerce_id": { "type": [ "string", null ] }, "price": { "type": [ "string", null ] }, "created_at": { "type": "string", "format": "date-time" }, "address_from": { "type": "object", "nullable": true, "properties": { "area_level1": { "type": [ "string", null ] }, "area_level2": { "type": [ "string", null ] }, "area_level3": { "type": [ "string", null ] }, "name": { "type": [ "string", null ] }, "postal_code": { "type": [ "string", null ] }, "country_code": { "type": [ "string", null ] }, "street1": { "type": [ "string", null ] }, "company": { "type": [ "string", null ] }, "phone": { "type": [ "string", null ] }, "email": { "type": [ "string", null ] }, "reference": { "type": [ "string", null ] }, "address_type": { "type": "string" }, "apartment_number": { "type": [ "string", null ] } } }, "address_to": { "type": "object", "nullable": true, "properties": { "area_level1": { "type": [ "string", null ] }, "area_level2": { "type": [ "string", null ] }, "area_level3": { "type": [ "string", null ] }, "name": { "type": [ "string", null ] }, "postal_code": { "type": [ "string", null ] }, "country_code": { "type": [ "string", null ] }, "street1": { "type": [ "string", null ] }, "company": { "type": [ "string", null ] }, "phone": { "type": [ "string", null ] }, "email": { "type": [ "string", null ] }, "reference": { "type": [ "string", null ] }, "address_type": { "type": "string" }, "apartment_number": { "type": [ "string", null ] } } }, "parcel": { "type": "object", "properties": { "weight": { "type": "float" }, "length": { "type": "integer" }, "width": { "type": "integer" }, "height": { "type": "integer" } } } } }, "relationships": { "type": "object", "properties": { "items": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } } }, "shipments": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } } } } } } }, "included": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" }, "attributes": { "type": "object", "properties": { "name": { "type": "string" }, "sku": { "type": "string", "nullable": true }, "quantity": { "type": "integer" }, "price": { "type": "number" }, "weight": { "type": "number" }, "height": { "type": "number" }, "width": { "type": "number" }, "length": { "type": "number" } } } } }, "nullable": true } } }Ejemplo:{ "data": { "id": "9e270243-762f-40c8-833e-ef1c4ee8282d", "type": "order", "attributes": { "id": "9e270243-762f-40c8-833e-ef1c4ee8282d", "reference": "example_reference", "platform": "Shopify", "ecommerce_id": "SDFG", "price": "10.0", "created_at": "2025-01-07T14:46:38.203-06:00", "address_from": { "area_level1": "Nuevo León", "area_level2": "Monterrey", "area_level3": "La Finca", "name": "Name", "postal_code": "64000", "country_code": "MX", "street1": "Olivo 4618", "company": "", "phone": "1242452456", "email": "email@example.com", "reference": "Green house", "address_type": "from", "apartment_number": "" }, "address_to": { "area_level1": "Monterrey Centro", "area_level2": "Monterrey", "area_level3": "La finca", "name": "Mayra Doe", "postal_code": "64000", "country_code": "MX", "street1": "22 Main St", "company": "ACS Inc.", "phone": "1234567890", "email": "jhon@doe.com", "reference": "Near the park", "address_type": "to", "apartment_number": "123" }, "parcel": { "weight": 2.0, "length": 10, "width": 10, "height": 10 } }, "relationships": { "items": { "data": [ { "id": "c2092234-1b85-41a2-a200-858d052c0ad1", "type": "item" } ] }, "shipments": { "data": [ { "id": "9eae25ba-11b4-4b9f-9b01-3d09da8bc12d", "type": "shipment" } ] } } }, "included": [ { "id": "c2092234-1b85-41a2-a200-858d052c0ad1", "type": "item", "attributes": { "name": "prueba", "sku": "prueba", "quantity": 2, "price": 15.0, "weight": 20.0, "height": 30.0, "width": 30.0, "length": 30.0 } } ] }
- POST
-
Resumen: Crea una órden
Descripción:POST /api/v1/ordersEl endpoint permite crear una órden en específico. Se necesita enviar al menos uno de todos los atributos, para crear una orden.
Ejemplo de Cuerpo de Solicitud:
Content-Type: application/jsonObject:orderRequiredObject:referenceType: stringA través de este campo se podrá identificar la órden en la plataforma.Example
188reference_numberType: stringIdentificador externo de la orden en la plataforma. Puede ser nulo. Si esta presente, debe ser único.Example
188-5455445-33334433payment_statusType: stringEstado de pago.Example
paidtotal_priceType: stringPrecio total de la orden.Example
57.00merchant_store_idType: stringId de la tiendaExample
139539ASheadquarter_idType: stringId del headquarterExample
468b8926-8e9d-4a62-baed-0cab7a3125f5platformType: stringPlataforma desde donde se realizará la ordenExample
Shopifypackage_typeType: stringTipo de paqueteExample
4GparcelsArray of:Object:weightType: floatPeso del paquete.Example
10lengthType: integerLongitud del paquete.Example
10widthType: integerAncho del paquete.Example
10heightType: integerAltura del paquete.Example
10quantityType: integerCantidad de paquetes con las mismas medidas.Example
1dimension_unitType: stringUnidad de medida de las dimensiones.Example
CMmass_unitType: stringUnidad de medida del peso.Example
KGpackage_typeType: stringTipo de paquete, requerido para automatizaciones que crean guía automática.Example
7H1consignment_noteType: stringEste dato se utilizará para registrar la Carta Porte, requisito legal solicitado por el Sistema de Administración Tributaria (SAT) para realizar tu envío, requerido para automatizaciones que crean guía automática.Example
24121500productsArray of:Object:nameType: stringNombre del producto.Example
Bicicletahs_codeType: stringCódigo HS del producto.Example
9560.63skuType: stringCódigo del producto.Example
BIC-001priceType: stringPrecio del producto.Example
57.00quantityType: integerCantidad de productos.Example
1weightType: floatPeso del producto en kilogramos.Example
10heightType: integerAltura del producto en centímetros.Example
10lengthType: integerLongitud del producto en centímetros.Example
10widthType: integerAncho del producto en centímetros.Example
10shipper_addressObject:addressType: stringNombre de la calle o avenida.Example
Vía Industrialinternal_numberType: stringNúmero de la casa o departamento.Example
100referenceType: stringReferencia de la dirección.Example
Planta nuclearsectorType: stringNombre de la Colonia.Example
AsarcocityType: stringNombre de la ciudad.Example
MonterreystateType: stringNombre del estado.Example
Nuevo Leónpostal_codeType: stringCódigo postal.Example
64550countryType: stringCódigo de país según el formato alpha-2 de la ISO 3166-1.Example
MXperson_nameType: stringNombre de la persona que recibirá los paquetes.Example
Homero SimpsoncompanyType: stringNombre de la empresa que recibirá los paquetes.Example
Inversiones Montgomery Burns S.A.S de C.V.phoneType: stringNúmero de teléfono de la persona que recibirá los paquetes.Example
4434434444emailType: stringCorreo electrónico de la persona que recibirá los paquetes.Example
homero@burns.comrecipient_addressObject:addressType: stringNombre de la calle o avenida.Example
Avenida Siempre Vivainternal_numberType: stringNúmero de la casa o departamento.Example
742referenceType: stringReferencia de la dirección.Example
Casa color durazno.sectorType: stringNombre de la Colonia.Example
La FincacityType: stringNombre de la ciudad.Example
MonterreystateType: stringNombre del estado.Example
Nuevo Leónpostal_codeType: stringCódigo postal.Example
64000countryType: stringPaís.Example
MXperson_nameType: stringNombre de la persona que enviará los paquetes.Example
Bart SimpsoncompanyType: stringNombre de la empresa que enviará los paquetes.Example
Casa de Bart S.A.S de C.V.phoneType: stringNúmero de teléfono de la persona que enviará los paquetes.Example
4434434444emailType: stringCorreo electrónico de la persona que enviará los paquetes.Example
bart@simpson.com -
Respuestas:
curl -X POST 'https://sb-pro.skydropx.com/api/v1/orders/' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {{BEARER_TOKEN}}'Código: 201Descripción:Pedido creado
Esquema:{ "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" }, "attributes": { "type": "object", "properties": { "id": { "type": "string" }, "platform": { "type": "string" }, "ecommerce_id": { "type": [ "string", null ] }, "price": { "type": "number", "format": "float" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } } } } } }, "required": [ "data" ] }Ejemplo:{ "data": { "id": "e7c50876-2715-4f76-a83d-da5307d58b07", "type": "order", "attributes": { "id": "e7c50876-2715-4f76-a83d-da5307d58b07", "platform": "Shopify", "price": 100.0, "created_at": "2024-09-05T23:13:40.417-06:00", "updated_at": "2024-09-05T23:13:40.417-06:00" } } }Código: 403Descripción:Prohibido
Código: 422Descripción:Solicitud inválida
Esquema:{ "type": "object", "properties": { "errors": { "type": "string" } } }Ejemplo:{ "errors": "example_errors" }
- PATCH
-
Resumen: Actualiza una orden
Descripción:PATCH /api/v1/orders/:idEl endpoint permite actualizar la información de una orden.
Parámetros:
order_id path
RequiredType: stringEjemplo de Cuerpo de Solicitud:
Content-Type: application/jsonObject:orderRequiredObject:total_priceType: stringPrecio total de la orden.Example
57.00payment_statusType: stringEstado de pago.Example
paidparcelsArray of:Object:weightType: floatPeso del paquete.Example
10.0mass_unitType: stringUnidad de medida del peso.Example
KGlengthType: integerLongitud del paquete.Example
10widthType: integerAncho del paquete.Example
10heightType: integerAltura del paquete.Example
10quantityType: integerCantidad de paquetes con las mismas medidas.Example
1dimension_unitType: stringUnidad de medida de las dimensiones.Example
CMpackage_typeType: stringTipo de paquete, requerido para automatizaciones que crean guía automática.Example
7H1consignment_noteType: stringEste dato se utilizará para registrar la Carta Porte, requisito legal solicitado por el Sistema de Administración Tributaria (SAT) para realizar tu envío, requerido para automatizaciones que crean guía automática.Example
24121500productsArray of:Object:nameType: stringNombre del producto.Example
Bicicletahs_codeType: stringCódigo HS del producto.Example
9560.63skuType: stringCódigo del producto.Example
BIC-001priceType: stringPrecio del producto.Example
57.00quantityType: integerCantidad de productos.Example
1weightType: integerPeso del producto en kilogramos.Example
10heightType: integerAltura del producto en centímetros.Example
10lengthType: integerLongitud del producto en centímetros.Example
10widthType: integerAncho del producto en centímetros.Example
10shipper_addressObject:addressType: stringNombre de la calle o avenida.Example
Vía Industrialinternal_numberType: stringNúmero de la casa o departamento.Example
100referenceType: stringReferencia de la dirección.Example
Planta nuclearsectorType: stringNombre de la Colonia.Example
AsarcocityType: stringNombre de la ciudad.Example
MonterreystateType: stringNombre del estado.Example
Nuevo Leónpostal_codeType: stringCódigo postal.Example
64550countryType: stringCódigo de país según el formato alpha-2 de la ISO 3166-1.Example
MXperson_nameType: stringNombre de la persona que recibirá los paquetes.Example
Homero SimpsoncompanyType: stringNombre de la empresa que recibirá los paquetes.Example
Inversiones Montgomery Burns S.A.S de C.V.phoneType: stringNúmero de teléfono de la persona que recibirá los paquetes.Example
4434434444emailType: stringCorreo electrónico de la persona que recibirá los paquetes.Example
homero@burns.comrecipient_addressObject:addressType: stringNombre de la calle o avenida.Example
Avenida Siempre Vivainternal_numberType: stringNúmero de la casa o departamento.Example
742referenceType: stringReferencia de la dirección.Example
Casa color durazno.sectorType: stringNombre de la Colonia.Example
La FincacityType: stringNombre de la ciudad.Example
MonterreystateType: stringNombre del estado.Example
Nuevo Leónpostal_codeType: stringCódigo postal.Example
64000countryType: stringPaís.Example
MXperson_nameType: stringNombre de la persona que enviará los paquetes.Example
Bart SimpsoncompanyType: stringNombre de la empresa que enviará los paquetes.Example
Casa de Bart S.A.S de C.V.phoneType: stringNúmero de teléfono de la persona que enviará los paquetes.Example
4434434444emailType: stringCorreo electrónico de la persona que enviará los paquetes.Example
bart@simpson.com -
Respuestas:
curl -X PATCH 'https://sb-pro.skydropx.com/api/v1/orders/example_order_id' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {{BEARER_TOKEN}}'Código: 200Descripción:Orden actualizada
Esquema:{ "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" }, "attributes": { "type": "object", "properties": { "id": { "type": "string" }, "reference": { "type": "string" }, "platform": { "type": [ "string", null ] }, "ecommerce_id": { "type": [ "string", null ] }, "price": { "type": [ "string", null ] }, "created_at": { "type": "string", "format": "date-time" }, "address_from": { "type": "object", "nullable": true, "properties": { "area_level1": { "type": [ "string", null ] }, "area_level2": { "type": [ "string", null ] }, "area_level3": { "type": [ "string", null ] }, "name": { "type": [ "string", null ] }, "postal_code": { "type": [ "string", null ] }, "country_code": { "type": [ "string", null ] }, "street1": { "type": [ "string", null ] }, "company": { "type": [ "string", null ] }, "phone": { "type": [ "string", null ] }, "email": { "type": [ "string", null ] }, "reference": { "type": [ "string", null ] }, "address_type": { "type": "string" }, "apartment_number": { "type": [ "string", null ] } } }, "address_to": { "type": "object", "nullable": true, "properties": { "area_level1": { "type": [ "string", null ] }, "area_level2": { "type": [ "string", null ] }, "area_level3": { "type": [ "string", null ] }, "name": { "type": [ "string", null ] }, "postal_code": { "type": [ "string", null ] }, "country_code": { "type": [ "string", null ] }, "street1": { "type": [ "string", null ] }, "company": { "type": [ "string", null ] }, "phone": { "type": [ "string", null ] }, "email": { "type": [ "string", null ] }, "reference": { "type": [ "string", null ] }, "address_type": { "type": "string" }, "apartment_number": { "type": [ "string", null ] } } }, "parcel": { "type": "object", "properties": { "weight": { "type": "float" }, "length": { "type": "integer" }, "width": { "type": "integer" }, "height": { "type": "integer" } } } } }, "relationships": { "type": "object", "properties": { "items": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } } }, "shipments": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } } } } } } }, "included": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" }, "attributes": { "type": "object", "properties": { "name": { "type": "string" }, "sku": { "type": "string", "nullable": true }, "quantity": { "type": "integer" }, "price": { "type": "number" }, "weight": { "type": "number" }, "height": { "type": "number" }, "width": { "type": "number" }, "length": { "type": "number" } } } } }, "nullable": true } } }Ejemplo:{ "data": { "id": "9e270243-762f-40c8-833e-ef1c4ee8282d", "type": "order", "attributes": { "id": "9e270243-762f-40c8-833e-ef1c4ee8282d", "reference": "example_reference", "platform": "Shopify", "ecommerce_id": "SDFG", "price": "10.0", "created_at": "2025-01-07T14:46:38.203-06:00", "address_from": { "area_level1": "Nuevo León", "area_level2": "Monterrey", "area_level3": "La Finca", "name": "Name", "postal_code": "64000", "country_code": "MX", "street1": "Olivo 4618", "company": "", "phone": "1242452456", "email": "email@example.com", "reference": "Green house", "address_type": "from", "apartment_number": "" }, "address_to": { "area_level1": "Monterrey Centro", "area_level2": "Monterrey", "area_level3": "La finca", "name": "Mayra Doe", "postal_code": "64000", "country_code": "MX", "street1": "22 Main St", "company": "ACS Inc.", "phone": "1234567890", "email": "jhon@doe.com", "reference": "Near the park", "address_type": "to", "apartment_number": "123" }, "parcel": { "weight": 2.0, "length": 10, "width": 10, "height": 10 } }, "relationships": { "items": { "data": [ { "id": "c2092234-1b85-41a2-a200-858d052c0ad1", "type": "item" } ] }, "shipments": { "data": [ { "id": "9eae25ba-11b4-4b9f-9b01-3d09da8bc12d", "type": "shipment" } ] } } }, "included": [ { "id": "c2092234-1b85-41a2-a200-858d052c0ad1", "type": "item", "attributes": { "name": "prueba", "sku": "prueba", "quantity": 2, "price": 15.0, "weight": 20.0, "height": 30.0, "width": 30.0, "length": 30.0 } } ] }Código: 422Descripción:La orden no puede ser actualizada
Esquema:{ "type": "object", "properties": { "errors": { "type": "string" } } }Ejemplo:{ "errors": "example_errors" }Código: 404Descripción:Orden no encontrada
Esquema:{ "type": "object", "properties": { "message": { "type": "string" } } }Ejemplo:{ "message": "Orden no encontrada" }
Recolecciones
- GET
-
Resumen: Obtiene cobertura de Fechas
Descripción:GET /api/v1/pickups/coverage?shipment_id={shipment_id}Este endpoint obtiene la cobertura de fechas para realizar una recolección.
Parámetros de la solicitud:
shipment_id: ID Envío de referencia que obtuviste del endpoint de envíos (GET /api/v1/shipments)
Parámetros:
shipment_id query
RequiredID Envío
Type: string -
Respuestas:
curl -X GET 'https://sb-pro.skydropx.com/api/v1/pickups/coverage' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {{BEARER_TOKEN}}'Código: 200Descripción:Retorna fechas disponibles para recolección
Esquema:{ "type": "object", "properties": { "success": { "type": "boolean", "description": "Indica si la solicitud se procesó exitosamente." }, "carrier": { "type": "string", "description": "Paquetería responsable de la recolección." }, "service": { "type": "string", "description": "Tipo de servicio ofrecido por la paquetería" }, "version": { "type": "string" }, "pickupDates": { "type": "array", "items": { "type": "object", "properties": { "date": { "type": "string", "format": "date", "description": "Fecha disponible para la recolección." }, "startHour": { "type": "string", "format": "time", "description": "Hora de inicio de la ventana de recolección." }, "endHour": { "type": "string", "format": "time", "description": "Hora de finalización de la ventana de recolección." } } } } } }Ejemplo:{ "success": true, "carrier": "FEDEX", "service": "FEDEX_EXPRESS_SAVER", "version": "2.0.0", "pickupDates": [ { "date": "2024-09-20", "startHour": "08:30:00", "endHour": "14:00:00" } ] }Código: 422Descripción:Solicitud inválida
Esquema:{ "type": "object", "properties": { "success": { "type": "boolean", "description": "Indica si la solicitud se procesó exitosamente." }, "message": { "type": "string", "description": "Proporciona detalles sobre el error ocurrido." } } }Ejemplo:{ "success": false, "message": "Carrier services error" }Código: 404Descripción:Recurso no encontrado
Esquema:{ "type": "object", "properties": { "message": { "type": "string" } } }Ejemplo:{ "message": "El recurso buscado no se pudo encontrar." }
- POST
-
Resumen: Reprograma una recolección
Descripción:POST /api/v1/pickups/rescheduleEste endpoint permite reprogramar una recolección
Parámetros de la solicitud:
reference_shipment_id: Id del envio a recolectarpackages: Número de paquetes a recolectartotal_weight: Peso total de los paquetes a recolectarscheduled_from: Fecha y hora de inicio de franja horaria de recolecciónscheduled_to: Fecha y hora final de franja horaria de recolección
Ejemplo de Cuerpo de Solicitud:
Content-Type: application/jsonObject:pickupRequiredObject:reference_shipment_idType: stringId del envio a recolectarExample
0ac5adcc-a13d-427d-81dd-9ddd70b2f660packagesType: integerNúmero de paquetes a recolectarExample
5total_weightType: ["number", "string"]Peso total de los paquetes a recolectarExample
30.0scheduled_fromType: stringFecha y hora de inicio de franja horaria de recolecciónExample
2024-09-24 09:00:00scheduled_toType: stringFecha y hora final de franja horaria de recolecciónExample
2024-09-24 14:00:00 -
Respuestas:
curl -X POST 'https://sb-pro.skydropx.com/api/v1/pickups/reschedule' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {{BEARER_TOKEN}}'Código: 201Descripción:Retorna la recolección reprogramada
Esquema:{ "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string" }, "attributes": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "description": "UUID de la recolección" }, "status": { "type": "string", "description": "Estado de la recolección" }, "request_number": { "type": "string", "description": "Número de solicitud de la recolección" }, "packages": { "type": "integer", "description": "Número de paquetes a recolectar" }, "total_weight": { "type": [ "number", "string" ], "format": "decimal", "description": "Peso total de los paquetes a recolectar" }, "scheduled_from": { "type": "string", "format": "date-time", "description": "Fecha y hora de inicio de franja horaria de recolección" }, "scheduled_to": { "type": "string", "format": "date-time", "description": "Fecha y hora final de franja horaria de recolección" }, "created_at": { "type": "string", "format": "date-time", "description": "Fecha de creación" }, "updated_at": { "type": "string", "format": "date-time", "description": "Fecha de actualización" }, "error_reason": { "type": "string", "nullable": true, "description": "Motivo del error si la recolección no se pudo programar" }, "reschedule_remaining_days": { "type": "integer", "nullable": true, "description": "Días restantes hasta que el envío alcance el máximo de días permitidos para reagendar la recolección (14 días). Solo se muestra cuando la recolección puede ser reagendada (available_for_reschedule? retorna true)." } } }, "relationships": { "type": "object", "properties": { "reference_shipment": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string" } } } } }, "address": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string" } } } } } } } } }, "included": { "type": "array", "items": { "oneOf": [ { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" }, "attributes": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "description": "UUID de la dirección" }, "area_level1": { "type": "string", "description": "Estado, provincia o departamento de la dirección" }, "area_level2": { "type": "string", "description": "Ciudad o municipio de la dirección" }, "area_level3": { "type": "string", "description": "Barrio o colonia de la dirección" }, "name": { "type": "string", "description": "Nombre del destinatario o remitente" }, "postal_code": { "type": "string", "description": "Código postal de la dirección" }, "country_code": { "type": "string", "description": "Código de país de la dirección" }, "address_type": { "type": "string", "nullable": true, "description": "Tipo de dirección" }, "street1": { "type": "string", "description": "Calle y número de la dirección" }, "company": { "type": "string", "description": "Nombre de la empresa" }, "phone": { "type": "string", "description": "Número de teléfono" }, "email": { "type": "string", "description": "Correo electrónico" }, "reference": { "type": "string", "description": "Referencia de la dirección" }, "apartment_number": { "type": "string", "nullable": true, "description": "Número de departamento" } } } } } ] } } } }Ejemplo:{ "data": { "id": "ed06f78a-8757-488c-bb82-31964449aea0", "type": "pickup", "attributes": { "id": "ed06f78a-8757-488c-bb82-31964449aea0", "status": "scheduled", "request_number": "123456789", "packages": 1, "total_weight": "30.0", "scheduled_from": "2024-09-20T09:00:00.000-06:00", "scheduled_to": "2024-09-20T14:00:00.000-06:00", "created_at": "2024-09-19T07:43:46.614-06:00", "updated_at": "2024-09-19T07:43:46.614-06:00", "error_reason": "Error al programar la recolección", "reschedule_remaining_days": 9 }, "relationships": { "reference_shipment": { "data": { "id": "d4ad5784-4f71-4474-9f34-e2a6f8366d5e", "type": "shipment" } }, "address": { "data": { "id": "901e4d68-a147-4fdf-9078-c252a672611c", "type": "address" } } } }, "included": [ { "oneOf": [ { "id": "example_id", "type": "address", "attributes": { "id": "0ac5adcc-a13d-427d-81dd-9ddd70b2f660", "area_level1": "Ciudad de México", "area_level2": "Venustiano Carranza", "area_level3": "Romero rubio", "name": "Juan", "postal_code": "15400", "country_code": "MX", "address_type": "from", "street1": "Persia 143", "company": "Company name", "phone": "3453453453453", "email": "juan@mail.com", "reference": "porton", "apartment_number": "Apartamento 404" } } ] } ] }Código: 404Descripción:Recolección no encontrada
Esquema:{ "type": "object", "properties": { "message": { "type": "string" } } }Ejemplo:{ "message": "El recurso buscado no se pudo encontrar." }Código: 422Descripción:Retorna una respuesta de error
Esquema:{ "type": "object", "properties": { "errors": { "type": "object" } } }Ejemplo:{ "errors": { "message": "An error occurred" } }
- GET
-
Resumen: Recupera todas las recolecciones
Descripción:GET /api/v1/pickups?page={page}Este endpoint recupera todas las recolecciones, paginadas de diez en diez.
Parámetros:
page query
Nro de página
Type: integer -
Respuestas:
curl -X GET 'https://sb-pro.skydropx.com/api/v1/pickups' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {{BEARER_TOKEN}}'Código: 200Descripción:Retorna una colección paginada de recolecciones
Esquema:{ "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string" }, "attributes": { "type": "object,", "properties": { "id": { "type": "string", "format": "uuid", "description": "UUID de la recolección" }, "status": { "type": "string", "description": "Estado de la recolección" }, "request_number": { "type": "string", "description": "Número de solicitud de la recolección" }, "packages": { "type": "integer", "description": "Número de paquetes a recolectar" }, "total_weight": { "type": [ "number", "string" ], "format": "decimal", "description": "Peso total de los paquetes a recolectar" }, "scheduled_from": { "type": "string", "format": "date-time", "description": "Fecha y hora de inicio de franja horaria de recolección" }, "scheduled_to": { "type": "string", "format": "date-time", "description": "Fecha y hora final de franja horaria de recolección" }, "created_at": { "type": "string", "format": "date-time", "description": "Fecha de creación" }, "updated_at": { "type": "string", "format": "date-time", "description": "Fecha de actualización" }, "error_reason": { "type": "string", "nullable": true, "description": "Motivo del error si la recolección no se pudo programar" }, "reschedule_remaining_days": { "type": "integer", "nullable": true, "description": "Días restantes hasta que el envío alcance el máximo de días permitidos para reagendar la recolección (14 días). Solo se muestra cuando la recolección puede ser reagendada (available_for_reschedule? retorna true)." } } }, "relationships": { "type": "object", "properties": { "reference_shipment": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string" } } } } }, "address": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string" } } } } } } } } } }, "included": { "type": "array", "items": { "oneOf": [ { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" }, "attributes": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "description": "UUID de la dirección" }, "area_level1": { "type": "string", "description": "Estado, provincia o departamento de la dirección" }, "area_level2": { "type": "string", "description": "Ciudad o municipio de la dirección" }, "area_level3": { "type": "string", "description": "Barrio o colonia de la dirección" }, "name": { "type": "string", "description": "Nombre del destinatario o remitente" }, "postal_code": { "type": "string", "description": "Código postal de la dirección" }, "country_code": { "type": "string", "description": "Código de país de la dirección" }, "address_type": { "type": "string", "nullable": true, "description": "Tipo de dirección" }, "street1": { "type": "string", "description": "Calle y número de la dirección" }, "company": { "type": "string", "description": "Nombre de la empresa" }, "phone": { "type": "string", "description": "Número de teléfono" }, "email": { "type": "string", "description": "Correo electrónico" }, "reference": { "type": "string", "description": "Referencia de la dirección" }, "apartment_number": { "type": "string", "nullable": true, "description": "Número de departamento" } } } } } ] } }, "meta": { "type": "object", "properties": { "current_page": { "type": "integer" }, "next_page": { "type": "integer", "nullable": true }, "prev_page": { "type": "integer", "nullable": true }, "total_pages": { "type": "integer" }, "total_count": { "type": "integer" } } } } }Ejemplo:{ "data": [ { "id": "0ac5adcc-a13d-427d-81dd-9ddd70b2f660", "type": "pickup", "attributes": { "id": "0ac5adcc-a13d-427d-81dd-9ddd70b2f660", "status": "scheduled", "request_number": "123456789", "packages": 5, "total_weight": "30.0", "scheduled_from": "Fecha y hora de inicio de franja horaria de recolección", "scheduled_to": "Fecha y hora final de franja horaria de recolección", "created_at": "Fecha de creación", "updated_at": "Fecha de actualización", "error_reason": "Error al programar la recolección", "reschedule_remaining_days": 9 }, "relationships": { "reference_shipment": { "data": { "id": "2a5bca90-457f-4b2d-9993-12a1fa1e910c", "type": "shipment" } }, "address": { "data": { "id": "e1033bdc-007e-4da9-b29d-3b0cb2730dee", "type": "address" } } } } ], "included": [ { "oneOf": [ { "id": "example_id", "type": "address", "attributes": { "id": "0ac5adcc-a13d-427d-81dd-9ddd70b2f660", "area_level1": "Ciudad de México", "area_level2": "Venustiano Carranza", "area_level3": "Romero rubio", "name": "Juan", "postal_code": "15400", "country_code": "MX", "address_type": "from", "street1": "Persia 143", "company": "Company name", "phone": "3453453453453", "email": "juan@mail.com", "reference": "porton", "apartment_number": "Apartamento 404" } } ] } ], "meta": { "current_page": 2, "next_page": 3, "prev_page": 1, "total_pages": 3, "total_count": 30 } }
- GET
-
Resumen: Detalle de Recolección
Descripción:GET /api/v1/pickups/{id}Este endpoint recupera una recolección
Parámetros:
id path
RequiredID de la recolección
Type: string -
Respuestas:
curl -X GET 'https://sb-pro.skydropx.com/api/v1/pickups/example_id' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {{BEARER_TOKEN}}'Código: 200Descripción:Recolección encontrada
Esquema:{ "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string" }, "attributes": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "description": "UUID de la recolección" }, "status": { "type": "string", "description": "Estado de la recolección" }, "request_number": { "type": "string", "description": "Número de solicitud de la recolección" }, "packages": { "type": "integer", "description": "Número de paquetes a recolectar" }, "total_weight": { "type": [ "number", "string" ], "format": "decimal", "description": "Peso total de los paquetes a recolectar" }, "scheduled_from": { "type": "string", "format": "date-time", "description": "Fecha y hora de inicio de franja horaria de recolección" }, "scheduled_to": { "type": "string", "format": "date-time", "description": "Fecha y hora final de franja horaria de recolección" }, "created_at": { "type": "string", "format": "date-time", "description": "Fecha de creación" }, "updated_at": { "type": "string", "format": "date-time", "description": "Fecha de actualización" }, "error_reason": { "type": "string", "nullable": true, "description": "Motivo del error si la recolección no se pudo programar" }, "reschedule_remaining_days": { "type": "integer", "nullable": true, "description": "Días restantes hasta que el envío alcance el máximo de días permitidos para reagendar la recolección (14 días). Solo se muestra cuando la recolección puede ser reagendada (available_for_reschedule? retorna true)." } } }, "relationships": { "type": "object", "properties": { "reference_shipment": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string" } } } } }, "address": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string" } } } } } } } } }, "included": { "type": "array", "items": { "oneOf": [ { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" }, "attributes": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "description": "UUID de la dirección" }, "area_level1": { "type": "string", "description": "Estado, provincia o departamento de la dirección" }, "area_level2": { "type": "string", "description": "Ciudad o municipio de la dirección" }, "area_level3": { "type": "string", "description": "Barrio o colonia de la dirección" }, "name": { "type": "string", "description": "Nombre del destinatario o remitente" }, "postal_code": { "type": "string", "description": "Código postal de la dirección" }, "country_code": { "type": "string", "description": "Código de país de la dirección" }, "address_type": { "type": "string", "nullable": true, "description": "Tipo de dirección" }, "street1": { "type": "string", "description": "Calle y número de la dirección" }, "company": { "type": "string", "description": "Nombre de la empresa" }, "phone": { "type": "string", "description": "Número de teléfono" }, "email": { "type": "string", "description": "Correo electrónico" }, "reference": { "type": "string", "description": "Referencia de la dirección" }, "apartment_number": { "type": "string", "nullable": true, "description": "Número de departamento" } } } } } ] } } } }Ejemplo:{ "data": { "id": "ed06f78a-8757-488c-bb82-31964449aea0", "type": "pickup", "attributes": { "id": "ed06f78a-8757-488c-bb82-31964449aea0", "status": "scheduled", "request_number": "123456789", "packages": 1, "total_weight": "30.0", "scheduled_from": "2024-09-20T09:00:00.000-06:00", "scheduled_to": "2024-09-20T14:00:00.000-06:00", "created_at": "2024-09-19T07:43:46.614-06:00", "updated_at": "2024-09-19T07:43:46.614-06:00", "error_reason": "Error al programar la recolección", "reschedule_remaining_days": 9 }, "relationships": { "reference_shipment": { "data": { "id": "d4ad5784-4f71-4474-9f34-e2a6f8366d5e", "type": "shipment" } }, "address": { "data": { "id": "901e4d68-a147-4fdf-9078-c252a672611c", "type": "address" } } } }, "included": [ { "oneOf": [ { "id": "example_id", "type": "address", "attributes": { "id": "0ac5adcc-a13d-427d-81dd-9ddd70b2f660", "area_level1": "Ciudad de México", "area_level2": "Venustiano Carranza", "area_level3": "Romero rubio", "name": "Juan", "postal_code": "15400", "country_code": "MX", "address_type": "from", "street1": "Persia 143", "company": "Company name", "phone": "3453453453453", "email": "juan@mail.com", "reference": "porton", "apartment_number": "Apartamento 404" } } ] } ] }Código: 404Descripción:Recolección no encontrada
Esquema:{ "type": "object", "properties": { "message": { "type": "string" } } }Ejemplo:{ "message": "El recurso buscado no se pudo encontrar." }
- POST
-
Resumen: Programa una recolección
Descripción:POST /api/v1/pickups/Este endpoint permite programar una recolección
Parámetros de la solicitud:
reference_shipment_id: Id del envio a recolectarpackages: Número de paquetes a recolectartotal_weight: Peso total de los paquetes a recolectarscheduled_from: Fecha y hora de inicio de franja horaria de recolecciónscheduled_to: Fecha y hora final de franja horaria de recolección
Ejemplo de Cuerpo de Solicitud:
Content-Type: application/jsonObject:pickupRequiredObject:reference_shipment_idType: stringId del envio a recolectarExample
0ac5adcc-a13d-427d-81dd-9ddd70b2f660packagesType: integerNúmero de paquetes a recolectarExample
5total_weightType: ["number", "string"]Peso total de los paquetes a recolectarExample
30.0scheduled_fromType: stringFecha y hora de inicio de franja horaria de recolecciónExample
2024-09-24 09:00:00scheduled_toType: stringFecha y hora final de franja horaria de recolecciónExample
2024-09-24 14:00:00 -
Respuestas:
curl -X POST 'https://sb-pro.skydropx.com/api/v1/pickups/' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {{BEARER_TOKEN}}'Código: 201Descripción:Retorna la recolección programada
Esquema:{ "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string" }, "attributes": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "description": "UUID de la recolección" }, "status": { "type": "string", "description": "Estado de la recolección" }, "request_number": { "type": "string", "description": "Número de solicitud de la recolección" }, "packages": { "type": "integer", "description": "Número de paquetes a recolectar" }, "total_weight": { "type": [ "number", "string" ], "format": "decimal", "description": "Peso total de los paquetes a recolectar" }, "scheduled_from": { "type": "string", "format": "date-time", "description": "Fecha y hora de inicio de franja horaria de recolección" }, "scheduled_to": { "type": "string", "format": "date-time", "description": "Fecha y hora final de franja horaria de recolección" }, "created_at": { "type": "string", "format": "date-time", "description": "Fecha de creación" }, "updated_at": { "type": "string", "format": "date-time", "description": "Fecha de actualización" }, "error_reason": { "type": "string", "nullable": true, "description": "Motivo del error si la recolección no se pudo programar" }, "reschedule_remaining_days": { "type": "integer", "nullable": true, "description": "Días restantes hasta que el envío alcance el máximo de días permitidos para reagendar la recolección (14 días). Solo se muestra cuando la recolección puede ser reagendada (available_for_reschedule? retorna true)." } } }, "relationships": { "type": "object", "properties": { "reference_shipment": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string" } } } } }, "address": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string" } } } } } } } } }, "included": { "type": "array", "items": { "oneOf": [ { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" }, "attributes": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "description": "UUID de la dirección" }, "area_level1": { "type": "string", "description": "Estado, provincia o departamento de la dirección" }, "area_level2": { "type": "string", "description": "Ciudad o municipio de la dirección" }, "area_level3": { "type": "string", "description": "Barrio o colonia de la dirección" }, "name": { "type": "string", "description": "Nombre del destinatario o remitente" }, "postal_code": { "type": "string", "description": "Código postal de la dirección" }, "country_code": { "type": "string", "description": "Código de país de la dirección" }, "address_type": { "type": "string", "nullable": true, "description": "Tipo de dirección" }, "street1": { "type": "string", "description": "Calle y número de la dirección" }, "company": { "type": "string", "description": "Nombre de la empresa" }, "phone": { "type": "string", "description": "Número de teléfono" }, "email": { "type": "string", "description": "Correo electrónico" }, "reference": { "type": "string", "description": "Referencia de la dirección" }, "apartment_number": { "type": "string", "nullable": true, "description": "Número de departamento" } } } } } ] } } } }Ejemplo:{ "data": { "id": "ed06f78a-8757-488c-bb82-31964449aea0", "type": "pickup", "attributes": { "id": "ed06f78a-8757-488c-bb82-31964449aea0", "status": "scheduled", "request_number": "123456789", "packages": 1, "total_weight": "30.0", "scheduled_from": "2024-09-20T09:00:00.000-06:00", "scheduled_to": "2024-09-20T14:00:00.000-06:00", "created_at": "2024-09-19T07:43:46.614-06:00", "updated_at": "2024-09-19T07:43:46.614-06:00", "error_reason": "Error al programar la recolección", "reschedule_remaining_days": 9 }, "relationships": { "reference_shipment": { "data": { "id": "d4ad5784-4f71-4474-9f34-e2a6f8366d5e", "type": "shipment" } }, "address": { "data": { "id": "901e4d68-a147-4fdf-9078-c252a672611c", "type": "address" } } } }, "included": [ { "oneOf": [ { "id": "example_id", "type": "address", "attributes": { "id": "0ac5adcc-a13d-427d-81dd-9ddd70b2f660", "area_level1": "Ciudad de México", "area_level2": "Venustiano Carranza", "area_level3": "Romero rubio", "name": "Juan", "postal_code": "15400", "country_code": "MX", "address_type": "from", "street1": "Persia 143", "company": "Company name", "phone": "3453453453453", "email": "juan@mail.com", "reference": "porton", "apartment_number": "Apartamento 404" } } ] } ] }Código: 400Descripción:Retorna una respuesta de error (solicitud incorrecta)
Código: 422Descripción:Retorna una respuesta de error
Esquema:{ "type": "object", "properties": { "errors": { "type": "object" } } }Ejemplo:{ "errors": { "message": "An error occurred" } }
Productos
- GET
-
Resumen: Obtener lista de productos
Descripción:GET /api/v1/productsEl endpoint de productos sirve para obtener una lista de productos.
Parámetros de la solicitud:
Parámetros:
page query
Número de página a recuperar
Type: integerExample1filters[destination_country_code] query
Filtrar productos por código de país de destino
Type: stringExample"MX" -
Respuestas:
curl -X GET 'https://sb-pro.skydropx.com/api/v1/products' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {{BEARER_TOKEN}}'Código: 200Descripción:Devuelve una lista de productos
Esquema:{ "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "El id del producto" }, "type": { "type": "string" }, "attributes": { "type": "object", "properties": { "id": { "type": "string", "description": "El id del producto" }, "name": { "type": "string", "description": "El nombre del producto" }, "sku": { "type": "string", "description": "El código del producto" }, "hscode": { "type": "string", "description": "El código HS del producto" }, "description": { "type": "string", "description": "La descripción del producto" }, "weight": { "type": "number", "description": "El peso del producto" }, "width": { "type": "number", "description": "El ancho del producto" }, "height": { "type": "number", "description": "La altura del producto" }, "length": { "type": "number", "description": "La longitud del producto" }, "price": { "type": "number", "description": "El precio del producto" }, "created_at": { "type": "string", "description": "La fecha de creación del producto" }, "updated_at": { "type": "string", "description": "La fecha de actualización del producto" }, "country_id": { "type": "string", "description": "El id del país del producto" }, "product_type_code": { "type": "string", "description": "El código del tipo de producto" }, "product_type_name": { "type": "string", "description": "El nombre del tipo de producto" }, "description_en": { "type": "string", "description": "La descripción del producto en inglés" }, "created_from": { "type": "string", "description": "La fuente de creación del producto" }, "international_shipment_enabled": { "type": "boolean", "description": "Indica si el producto está habilitado para envío internacional" }, "price_mxn": { "type": "number", "description": "El precio del producto en pesos mexicanos" }, "destination_country_id": { "type": "string", "description": "El id del país de destino del producto" } } } } } }, "meta": { "type": "object", "properties": { "current_page": { "type": "integer" }, "next_page": { "type": "integer", "nullable": true }, "prev_page": { "type": "integer", "nullable": true }, "total_pages": { "type": "integer" }, "total_count": { "type": "integer" } } } } }Ejemplo:{ "data": [ { "id": 73, "type": "product", "attributes": { "id": 73, "name": "Pantalón", "sku": 1234567890, "hscode": 6402.2, "description": "Descripción del producto", "weight": 4, "width": 4, "height": 4, "length": 4, "price": 4.5, "created_at": "2025-02-06 21:26:41 -0500", "updated_at": "2025-02-06 21:26:41 -0500", "country_id": "f12f8764-1ee7-48c7-94b3-3f5a4e610e5b", "product_type_code": 31261500, "product_type_name": "Producto 1", "description_en": "Product 1", "created_from": "interface", "international_shipment_enabled": true, "price_mxn": 4.5, "destination_country_id": "f12f8764-1ee7-48c7-94b3-3f5a4e610e5b" } } ], "meta": { "current_page": 2, "next_page": 3, "prev_page": 1, "total_pages": 3, "total_count": 8 } }
Cotizaciones
- POST
-
Resumen: Crea una cotización
Descripción:POST /api/v1/quotationsEl endpoint de cotizaciones se utiliza para consultar los precios con las diferentes transportadoras.
Ejemplo de Cuerpo de Solicitud: Cotización Nacional
Content-Type: application/jsonObject:quotationObject:order_idType: stringID de la orden a la que pertenece la cotizaciónExample
c2092234-1b85-41a2-a200-858d052c0ad1address_fromRequiredObject:country_codeRequiredType: stringCódigo de país de la dirección (ISO 3166-1 alpha-2).Example
MXpostal_codeRequiredType: stringCódigo postal de la dirección.Example
64000area_level1RequiredType: stringEstado, provincia o departamento de la dirección.Example
Nuevo Leónarea_level2RequiredType: stringCiudad o municipio de la dirección.Example
Monterreyarea_level3RequiredType: stringBarrio o colonia de la dirección.Example
Monterrey Centroaddress_toRequiredObject:country_codeRequiredType: stringCódigo de país de la dirección (ISO 3166-1 alpha-2).Example
MXpostal_codeRequiredType: stringCódigo postal de la dirección.Example
64000area_level1RequiredType: stringEstado, provincia o departamento de la dirección.Example
Nuevo Leónarea_level2RequiredType: stringCiudad o municipio de la dirección.Example
Monterreyarea_level3RequiredType: stringBarrio o colonia de la dirección.Example
Monterrey CentroparcelsRequiredArray of:Object:lengthRequiredType: integerLongitud del paquete.Example
10widthRequiredType: integerAncho del paquete.Example
10heightRequiredType: integerAltura del paquete.Example
10weightRequiredType: floatPeso del paquete.Example
2package_protectedType: booleanPackage protection indicator.Example
truedeclared_valueType: floatDeclared value of the package.Example
100requested_carriersArray of:Type: stringPaqueterias a cotizar.Example
[ "fedex", "dhl" ]Ejemplo de Cuerpo de Solicitud: Cotización Internacional
Content-Type: application/jsonObject:quotationObject:order_idType: stringID de la orden a la que pertenece la cotizaciónExample
c2092234-1b85-41b2-a293-778d052c0ad1address_fromRequiredObject:country_codeRequiredType: stringCódigo de país de la dirección (ISO 3166-1 alpha-2).Example
MXpostal_codeRequiredType: stringCódigo postal de la dirección.Example
64000area_level1RequiredType: stringEstado, provincia o departamento de la dirección.Example
Nuevo Leónarea_level2RequiredType: stringCiudad o municipio de la dirección.Example
Monterreyarea_level3RequiredType: stringBarrio o colonia de la dirección.Example
Monterrey Centroaddress_toRequiredObject:country_codeRequiredType: stringCódigo de país de la dirección (ISO 3166-1 alpha-2).Example
USpostal_codeRequiredType: stringCódigo postal de la dirección.Example
11201area_level1RequiredType: stringEstado, provincia o departamento de la dirección.Example
New Yorkarea_level2RequiredType: stringCiudad o municipio de la dirección.Example
Brooklynarea_level3Type: stringBarrio o colonia de la dirección.Example
Kings CountyparcelsRequiredArray of:Object:lengthRequiredType: integerLongitud del paquete.Example
10widthRequiredType: integerAncho del paquete.Example
10heightRequiredType: integerAltura del paquete.Example
10weightRequiredType: floatPeso del paquete.Example
2package_protectedType: booleanPackage protection indicator.Example
truedeclared_valueType: floatDeclared value of the package.Example
100productsRequiredArray of:Object:hs_codeRequiredType: stringCódigo HS del producto.Example
3407.002000description_enRequiredType: stringDescripción del producto en inglés.Example
Medicine for childrencountry_codeRequiredType: stringCódigo de país del producto (ISO 3166-1 alpha-2).Example
USquantityRequiredType: integerCantidad del producto.Example
1priceRequiredType: floatPrecio del producto.Example
100.0requested_carriersArray of:Type: stringPaqueterias a cotizar.Example
[ "fedex", "dhl" ] -
Respuestas:
curl -X POST 'https://sb-pro.skydropx.com/api/v1/quotations' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {{BEARER_TOKEN}}'Código: 201Descripción:Retorna una respuesta completa de cotización
Esquema:{ "type": "object", "properties": { "id": { "type": "string", "description": "ID de la cotización." }, "is_completed": { "type": "boolean", "description": "Estado de la cotización." }, "quotation_scope": { "type": "object", "oneOf": [ { "properties": { "carriers_scoped_to": { "type": "string", "enum": [ "ALL_AVAILABLE", "PARTIALLY_SELECTED_CARRIERS" ], "description": "Paqueterias cotizadas (todas las paqueterias `ALL_AVAILABLE`)(paqueterias seleccionadas `PARTIALLY_SELECTED_CARRIERS`)" } } }, { "properties": { "carriers_scoped_to": { "type": "string", "enum": [ "ALL_AVAILABLE", "PARTIALLY_SELECTED_CARRIERS" ], "description": "Paqueterias cotizadas (todas las paqueterias `ALL_AVAILABLE`)(paqueterias seleccionadas `PARTIALLY_SELECTED_CARRIERS`)" }, "found_carriers": { "type": "array", "items": { "type": "string", "description": "Paqueterias encontradas." } }, "not_found_carriers": { "type": "array", "items": { "type": "string", "description": "Paqueterias no encontradas." } } } } ], "required": [ "carriers_scoped_to" ] }, "rates": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "ID de la tarifa." }, "success": { "type": "boolean", "description": "Indicador de éxito." }, "rate_type": { "type": "string", "nullable": true, "description": "Tipo de tarifa." }, "country_code": { "type": "string", "nullable": true, "description": "Código de país de la dirección." }, "provider_name": { "type": "string", "description": "Nombre de la paquetería." }, "provider_display_name": { "type": "string", "description": "Nombre para mostrar de la paquetería." }, "provider_service_name": { "type": "string", "description": "Nombre del servicio de la paquetería." }, "provider_service_code": { "type": "string", "description": "Código del servicio de la paquetería." }, "status": { "type": "string", "description": "Estado de la tarifa (Tarifa pendiente `pending`)(Tafira no aplica `not_applicable`)(Tarifa encontrada `approved`)(Tarifa sin cobertura `no_coverage`)(Tarifa con cobertura comprobada `coverage_checked`)(Tarifa encontrada `price_found_internal`)(Tarifa encontrada `price_found_external`)(Tarifa sin precio `tariff_price_not_found`)" }, "currency_code": { "type": "string", "description": "Código de moneda." }, "amount": { "type": "string", "description": "Monto de la tarifa." }, "total": { "type": "string", "description": "Total de la tarifa." }, "service_fee": { "type": "float", "nullable": true, "description": "Tarifa de gestión." }, "weight": { "type": "float", "description": "Peso del paquete." }, "days": { "type": "integer", "description": "Días de entrega." }, "insurable": { "type": "boolean", "description": "Indicador de seguro." }, "has_own_agreement": { "type": "boolean", "description": "Indicador de acuerdo propio." }, "own_agreement_amount": { "type": "number", "nullable": true, "description": "Monto del acuerdo propio." }, "extra_fees": { "type": "array", "items": { "type": "object", "properties": { "code": { "type": "string" }, "value": { "type": "string" } } }, "nullable": true }, "error_messages": { "type": "array", "nullable": true }, "zone": { "type": "string", "nullable": true, "description": "Zona de la tarifa." }, "plan_type": { "type": "string", "nullable": true, "description": "Tipo de plan." }, "packaging_type": { "type": "string", "description": "Indica el tipo de embalaje requerido para el envío, ya sea caja (Package) o tarima (Pallet)." }, "protection_value_total": { "type": "float", "description": "Valor de la protección total." }, "total_value_with_protection": { "type": "float", "description": "Valor total con protección." }, "pickup": { "type": "boolean", "description": "Indica si la recolección está disponible para esta tarifa." }, "pickup_automatic": { "type": "boolean", "description": "Indica si la recolección es automática para esta tarifa." }, "pickup_package_min": { "type": "integer", "description": "Número mínimo de paquetes requeridos para la recolección." }, "pickup_ocurre": { "type": "boolean", "description": "Indica si la recolección ocurre en origen (true) o en sucursal (false)." }, "service_zone": { "type": "string", "nullable": true, "description": "Zona real de la tarifa." }, "vat_fee": { "type": "string", "nullable": true, "description": "Tasa de IVA." } } } }, "packages": { "type": "array", "items": { "type": "object", "properties": { "package_number": { "type": "integer", "description": "Número de índice del paquete cotizado." }, "weight": { "type": "string", "description": "Peso del paquete." }, "length": { "type": "string", "description": "Longitud del paquete." }, "width": { "type": "string", "description": "Ancho del paquete." }, "height": { "type": "string", "description": "Altura del paquete." }, "package_protected": { "type": "boolean", "nullable": true, "description": "Package protection indicator." }, "declared_value": { "type": "float", "description": "Declared value of the package." }, "protection_value": { "type": "float", "description": "Valor de la protección del paquete" } } } }, "overweight": { "type": "boolean", "description": "Indicador de sobrepeso del paquete." } }, "required": [ "id", "is_completed", "quotation_scope" ] }Ejemplo:{ "id": "0ac5adcc-a13d-427d-81dd-9ddd70b2f660", "is_completed": true, "quotation_scope": {}, "rates": [ { "id": "0ac5adcc-a13d-427d-81dd-9ddd70b2f660", "success": true, "rate_type": "Tipo de tarifa.", "country_code": "mx", "provider_name": "fedex", "provider_display_name": "FedEx", "provider_service_name": "Standard Overnight", "provider_service_code": "standard_overnight", "status": "pending", "currency_code": "MXN", "amount": 150.0, "total": 150.0, "service_fee": 15.0, "weight": 5, "days": 2, "insurable": true, "has_own_agreement": false, "own_agreement_amount": 1.0, "extra_fees": [ { "code": "SUCCESS", "value": "example_value" } ], "error_messages": [ {} ], "zone": "Zona de la tarifa.", "plan_type": "Tipo de plan.", "packaging_type": "Indica el tipo de embalaje requerido para el envío, ya sea caja (Package) o tarima (Pallet).", "protection_value_total": 100, "total_value_with_protection": 100, "pickup": true, "pickup_automatic": false, "pickup_package_min": 1, "pickup_ocurre": true, "service_zone": "Zona real de la tarifa.", "vat_fee": "Tasa de IVA." } ], "packages": [ { "package_number": 1, "weight": "2.0", "length": "10.0", "width": "10.0", "height": "10.0", "package_protected": true, "declared_value": 100, "protection_value": 100 } ], "overweight": true }Código: 422Descripción:Retorna una respuesta de error
Esquema:{ "type": "object", "properties": { "errors": { "type": "object", "properties": { "address_from": { "type": "object", "properties": { "country_code": { "type": "array", "items": { "type": "string" } }, "postal_code": { "type": "array", "items": { "type": "string" } }, "area_level1": { "type": "array", "items": { "type": "string" } }, "area_level2": { "type": "array", "items": { "type": "string" } }, "area_level3": { "type": "array", "items": { "type": "string" } } } }, "address_to": { "type": "object", "properties": { "country_code": { "type": "array", "items": { "type": "string" } }, "postal_code": { "type": "array", "items": { "type": "string" } }, "area_level1": { "type": "array", "items": { "type": "string" } }, "area_level2": { "type": "array", "items": { "type": "string" } }, "area_level3": { "type": "array", "items": { "type": "string" } } } }, "parcel": { "type": "object", "properties": { "weight": { "type": "array", "items": { "type": "string" } }, "length": { "type": "array", "items": { "type": "string" } }, "width": { "type": "array", "items": { "type": "string" } }, "height": { "type": "array", "items": { "type": "string" } } } } } }, "error": { "type": "string" } }, "required": [ "error" ] }Ejemplo:{ "errors": { "address_from": { "country_code": [ "SUCCESS" ], "postal_code": [ "SUCCESS" ], "area_level1": [ "example_area_level1" ], "area_level2": [ "example_area_level2" ], "area_level3": [ "example_area_level3" ] }, "address_to": { "country_code": [ "SUCCESS" ], "postal_code": [ "SUCCESS" ], "area_level1": [ "example_area_level1" ], "area_level2": [ "example_area_level2" ], "area_level3": [ "example_area_level3" ] }, "parcel": { "weight": [ "example_weight" ], "length": [ "example_length" ], "width": [ "example_width" ], "height": [ "example_height" ] } }, "error": "Retorna una respuesta de error" }Código: 400Descripción:Retorna una respuesta de error (solicitud incorrecta)
Esquema:{ "type": "object", "properties": { "message": { "type": "string" } } }Ejemplo:{ "message": "Retorna una respuesta de error (solicitud incorrecta)" }
- GET
-
Resumen: Obtiene una cotización
Descripción:GET /api/v1/quotations/{id}El endpoint de cotizaciones obtiene las diferentes tarifas de las transportadoras creadas con los datos del paso anterior.
Parámetros de la solicitud:
id: El parámetro que obtuviste del endpoint de cotizaciones (POST /api/v1/quotations) se agrega en esta sección
Parámetros:
id path
RequiredID de la Cotización
Type: string -
Respuestas:
curl -X GET 'https://sb-pro.skydropx.com/api/v1/quotations/example_id' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {{BEARER_TOKEN}}'Código: 200Descripción:Cotización encontrada
Esquema:{ "type": "object", "properties": { "id": { "type": "string", "description": "ID de la cotización." }, "is_completed": { "type": "boolean", "description": "Estado de la cotización." }, "quotation_scope": { "type": "object", "oneOf": [ { "properties": { "carriers_scoped_to": { "type": "string", "enum": [ "ALL_AVAILABLE", "PARTIALLY_SELECTED_CARRIERS" ], "description": "Paqueterias cotizadas (todas las paqueterias `ALL_AVAILABLE`)(paqueterias seleccionadas `PARTIALLY_SELECTED_CARRIERS`)" } } }, { "properties": { "carriers_scoped_to": { "type": "string", "enum": [ "ALL_AVAILABLE", "PARTIALLY_SELECTED_CARRIERS" ], "description": "Paqueterias cotizadas (todas las paqueterias `ALL_AVAILABLE`)(paqueterias seleccionadas `PARTIALLY_SELECTED_CARRIERS`)" }, "found_carriers": { "type": "array", "items": { "type": "string", "description": "Paqueterias encontradas." } }, "not_found_carriers": { "type": "array", "items": { "type": "string", "description": "Paqueterias no encontradas." } } } } ], "required": [ "carriers_scoped_to" ] }, "rates": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "ID de la tarifa." }, "success": { "type": "boolean", "description": "Indicador de éxito." }, "rate_type": { "type": "string", "nullable": true, "description": "Tipo de tarifa." }, "country_code": { "type": "string", "nullable": true, "description": "Código de país de la dirección." }, "provider_name": { "type": "string", "description": "Nombre de la paquetería." }, "provider_display_name": { "type": "string", "description": "Nombre para mostrar de la paquetería." }, "provider_service_name": { "type": "string", "description": "Nombre del servicio de la paquetería." }, "provider_service_code": { "type": "string", "description": "Código del servicio de la paquetería." }, "status": { "type": "string", "description": "Estado de la tarifa (Tarifa pendiente `pending`)(Tafira no aplica `not_applicable`)(Tarifa encontrada `approved`)(Tarifa sin cobertura `no_coverage`)(Tarifa con cobertura comprobada `coverage_checked`)(Tarifa encontrada `price_found_internal`)(Tarifa encontrada `price_found_external`)(Tarifa sin precio `tariff_price_not_found`)" }, "currency_code": { "type": "string", "description": "Código de moneda." }, "amount": { "type": "string", "description": "Monto de la tarifa." }, "total": { "type": "string", "description": "Total de la tarifa." }, "service_fee": { "type": "float", "nullable": true, "description": "Tarifa de gestión." }, "weight": { "type": "float", "description": "Peso del paquete." }, "days": { "type": "integer", "description": "Días de entrega." }, "insurable": { "type": "boolean", "description": "Indicador de seguro." }, "has_own_agreement": { "type": "boolean", "description": "Indicador de acuerdo propio." }, "own_agreement_amount": { "type": "number", "nullable": true, "description": "Monto del acuerdo propio." }, "extra_fees": { "type": "array", "items": { "type": "object", "properties": { "code": { "type": "string" }, "value": { "type": "string" } } }, "nullable": true }, "error_messages": { "type": "array", "nullable": true }, "zone": { "type": "string", "nullable": true, "description": "Zona de la tarifa." }, "service_zone": { "type": "string", "nullable": true, "description": "Zona real de la tarifa." }, "vat_fee": { "type": "string", "nullable": true, "description": "Tasa de IVA." }, "plan_type": { "type": "string", "nullable": true, "description": "Tipo de plan." }, "packaging_type": { "type": "string", "description": "Indica el tipo de embalaje requerido para el envío, ya sea caja (Package) o tarima (Pallet)." }, "protection_value_total": { "type": "float", "description": "Valor de la protección total." }, "total_value_with_protection": { "type": "float", "description": "Valor total con protección." }, "pickup": { "type": "boolean", "description": "Indica si la recolección está disponible para esta tarifa." }, "pickup_automatic": { "type": "boolean", "description": "Indica si la recolección es automática para esta tarifa." }, "pickup_package_min": { "type": "integer", "description": "Número mínimo de paquetes requeridos para la recolección." }, "pickup_ocurre": { "type": "boolean", "description": "Indica si la recolección ocurre en origen (true) o en sucursal (false)." } } } }, "packages": { "type": "array", "items": { "type": "object", "properties": { "package_number": { "type": "integer", "description": "Número de índice del paquete cotizado." }, "weight": { "type": "string", "description": "Peso del paquete." }, "length": { "type": "string", "description": "Longitud del paquete." }, "width": { "type": "string", "description": "Ancho del paquete." }, "height": { "type": "string", "description": "Altura del paquete." }, "package_protected": { "type": "boolean", "nullable": true, "description": "Package protection indicator." }, "declared_value": { "type": "float", "description": "Declared value of the package." }, "protection_value": { "type": "float", "description": "Valor de la protección del paquete" } } } } }, "required": [ "id", "is_completed", "quotation_scope" ] }Ejemplo:{ "id": "0ac5adcc-a13d-427d-81dd-9ddd70b2f660", "is_completed": true, "quotation_scope": {}, "rates": [ { "id": "0ac5adcc-a13d-427d-81dd-9ddd70b2f660", "success": true, "rate_type": "Tipo de tarifa.", "country_code": "mx", "provider_name": "fedex", "provider_display_name": "FedEx", "provider_service_name": "Standard Overnight", "provider_service_code": "standard_overnight", "status": "pending", "currency_code": "MXN", "amount": 150.0, "total": 150.0, "service_fee": 15.0, "weight": 5, "days": 2, "insurable": true, "has_own_agreement": false, "own_agreement_amount": 1.0, "extra_fees": [ { "code": "SUCCESS", "value": "example_value" } ], "error_messages": [ {} ], "zone": "Zona de la tarifa.", "service_zone": "Zona real de la tarifa.", "vat_fee": "Tasa de IVA.", "plan_type": "Tipo de plan.", "packaging_type": "Indica el tipo de embalaje requerido para el envío, ya sea caja (Package) o tarima (Pallet).", "protection_value_total": 100, "total_value_with_protection": 100, "pickup": true, "pickup_automatic": false, "pickup_package_min": 1, "pickup_ocurre": true } ], "packages": [ { "package_number": 1, "weight": "2.0", "length": "10.0", "width": "10.0", "height": "10.0", "package_protected": true, "declared_value": 100, "protection_value": 100 } ] }Código: 404Descripción:Cotización no encontrada
Esquema:{ "type": "object", "properties": { "message": { "type": "string" } } }Ejemplo:{ "message": "Cotización no encontrada" }
Opciones de impresión
- PATCH
-
Resumen: Actualiza el formato de impresión
Descripción:Establece el formato de impresión según el tipo de impresora que se utilice.
Ejemplo de Cuerpo de Solicitud:
Content-Type: application/jsonObject:printing_formatType: stringFormato de impresión de la guía, puede ser `standard` o `thermal`.Example
standard -
Respuestas:
curl -X PATCH 'https://sb-pro.skydropx.com/api/v1/settings/printing_formats' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {{BEARER_TOKEN}}'Código: 202Descripción:Solicitud aceptada.
Código: 422Descripción:Solicitud inválida.
Esquema:{ "type": "object", "properties": { "errors": { "type": "array" } } }Ejemplo:{ "errors": "Formato de impresión inválido" }
Envíos
- POST
-
Resumen: Cancelar un envío
Descripción:Este endpoint permite cancelar un envío.
Parámetros:
shipment_id path
RequiredType: stringEjemplo de Cuerpo de Solicitud:
Content-Type: application/jsonObject:reasonType: stringRazón de la cancelación.Example
Ya no es necesarioshipment_idType: stringId o número de rastreo del envío.Example
12345 -
Respuestas:
curl -X POST 'https://sb-pro.skydropx.com/api/v1/shipments/example_shipment_id/cancellations' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {{BEARER_TOKEN}}'Código: 201Descripción:Retorna la cancelcación del envío
Esquema:{ "type": "object", "properties": { "id": { "type": "string", "description": "UUID de la cancelación" }, "reason": { "type": "string", "description": "Razón de la cancelación" }, "status": { "type": "string", "description": "Estado de la cancelación" }, "success": { "type": "boolean", "description": "Indicador de éxito" } } }Ejemplo:{ "id": "0ac5adcc-a13d-427d-81dd-9ddd70b2f660", "reason": "Ya no es necesario", "status": "approved", "success": true }Código: 422Descripción:El envío no se puede cancelar
Esquema:{ "type": "object", "properties": { "error": { "type": "string" } } }Ejemplo:{ "error": "El envío no se puede cancelar" }Código: 404Descripción:Envío no encontrado
Esquema:{ "type": "object", "properties": { "message": { "type": "string" } } }Ejemplo:{ "message": "Envío no encontrado" }
- POST
-
Resumen: Protege un envío
Descripción:Este endpoint permite proteger un envío.
Parámetros:
shipment_id path
RequiredType: stringEjemplo de Cuerpo de Solicitud:
Content-Type: application/jsonObject:protectRequiredObject:declared_valueType: stringValor declarado del envíoExample
1000shipment_idType: stringUUID del envíoExample
7f433cf4-e54a-4294-b421-1522cd377c12 -
Respuestas:
curl -X POST 'https://sb-pro.skydropx.com/api/v1/shipments/example_shipment_id/protect' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {{BEARER_TOKEN}}'Código: 201Descripción:Retorna la información de la protección del envío
Esquema:{ "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" }, "attributes": { "type": "object", "properties": { "id": { "type": "string" }, "declared_value": { "type": "string", "description": "Valor declarado del envío" }, "total": { "type": "string", "description": "Costo total de la protección del envío" }, "fixed_cost": { "type": "string", "description": "Costo fijo del envío" }, "percentage": { "type": "number", "description": "Costo porcentaje del envío" }, "created_at": { "type": "string", "description": "Fecha de creación de la protección" }, "updated_at": { "type": "string", "description": "Fecha de actualización de la protección" }, "shipment_id": { "type": "string", "description": "UUID del envío" } } } } } }, "required": [ "data" ] }Ejemplo:{ "data": { "id": "681ddd3e-4fc5-4c15-bfed-f9f4224e8095", "type": "protect", "attributes": { "id": "681ddd3e-4fc5-4c15-bfed-f9f4224e8095", "declared_value": 1000, "total": 110, "fixed_cost": 10, "percentage": 10, "created_at": "2024-10-09 13:38:33", "updated_at": "2024-10-09 13:38:33", "shipment_id": "7f433cf4-e54a-4294-b421-1522cd377c12" } } }Código: 422Descripción:El envío no se puede proteger
Esquema:{ "type": "object", "properties": { "errors": { "type": "string" } } }Ejemplo:{ "errors": "Valor declarado debe estar entre 100.0 y 500.0" }
- GET
-
Resumen: Rastrea un envío
Descripción:Este endpoint permite rastrear un envío.
Parámetros:
tracking_number path
RequiredType: stringcarrier_name path
RequiredType: string -
Respuestas:
curl -X GET 'https://sb-pro.skydropx.com/api/v1/shipments/tracking?tracking_number=example_tracking_number&carrier_name=example_carrier_name' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {{BEARER_TOKEN}}'Código: 200Descripción:Retorna la lista de los eventos ocurridos
Esquema:{ "type": "object", "properties": { "data": { "type": "array", "properties": { "id": { "type": "string", "description": "UUID del evento de rastreo" }, "type": { "type": "string", "description": "Tipo de registro" }, "attributes": { "type": "object", "properties": { "description": { "type": "string", "description": "Descripción del estado" }, "location": { "type": "string", "description": "Ubicación donde ocurrio el evento" }, "date": { "type": "string", "format": "date-time", "description": "Fecha del evento" }, "status": { "type": "string", "description": "Código del estado" } } } } } } }Ejemplo:{ "data": [ {} ] }Código: 404Descripción:Este número de guía no cuenta con eventos de rastreo
Esquema:{ "type": "object", "properties": { "error": { "type": "string" } } }Ejemplo:{ "error": "Este número de guía no cuenta con eventos de rastreo" }
- GET
-
Resumen: Recupera todos los envíos
Descripción:Este endpoint recupera todos los envíos, paginados de diez en diez.
Parámetros:
page query
Type: integer -
Respuestas:
curl -X GET 'https://sb-pro.skydropx.com/api/v1/shipments' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {{BEARER_TOKEN}}'Código: 200Descripción:Retorna una colección de envíos
Esquema:{ "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" }, "attributes": { "type": "object", "properties": { "id": { "type": "string", "description": "UUID del envío" }, "carrier_name": { "type": "string", "description": "Nombre de la paquetería" }, "workflow_status": { "type": "string", "description": "Estado del envío" }, "payment_status": { "type": "string", "description": "Estado del pago" }, "total": { "type": "string", "description": "Costo total del envío" }, "source": { "type": "string", "description": "Origen del envío (Api `api`)" }, "carrier_id": { "type": "string", "description": "UUID de la paquetería" }, "service_id": { "type": "string", "nullable": true, "description": "UUID del servicio" }, "master_tracking_number": { "type": "string", "nullable": true, "description": "Número de rastreo" }, "original_shipment_id": { "type": "string", "nullable": true, "description": "ID del envío original." }, "created_at": { "type": "string", "description": "Fecha de creación" }, "updated_at": { "type": "string", "description": "Fecha de actualización" }, "error_detail": { "type": "object", "nullable": true, "description": "Detalles del error cuando el envío falla", "properties": { "error_code": { "type": "string", "nullable": true }, "error_message": { "type": "string", "nullable": true } } } } }, "relationships": { "type": "object", "properties": { "packages": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } } }, "address_from": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "address_to": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } } } } } } }, "included": { "type": "array", "items": { "oneOf": [ { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" }, "attributes": { "type": "object", "properties": { "id": { "type": "string", "description": "UUID del paquete" }, "package_type": { "type": "string", "description": "Tipo de paquete" }, "weight": { "type": "string", "description": "Peso del paquete" }, "length": { "type": "string", "description": "Longitud del paquete" }, "width": { "type": "string", "description": "Ancho del paquete" }, "height": { "type": "string", "description": "Altura del paquete" }, "consignment_note": { "type": "string", "description": "Carta porte ID" }, "tracking_url_provider": { "type": "string", "description": "URL de seguimiento" }, "tracking_status": { "type": "string", "nullable": true, "tracking_status": "created", "description": "Estado de seguimiento" }, "tracking_number": { "type": "string", "description": "Número de seguimiento" }, "label_url": { "type": "string", "nullable": true, "description": "URL de la guía" }, "created_at": { "type": "string", "description": "Fecha de creación" }, "updated_at": { "type": "string", "description": "Fecha de actualización" } } }, "relationships": { "type": "object", "properties": { "shipment": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } } } } } }, { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" }, "attributes": { "type": "object", "properties": { "id": { "type": "string", "description": "UUID de la dirección" }, "area_level1": { "type": "string", "description": "Estado, provincia o departamento de la dirección" }, "area_level2": { "type": "string", "description": "Ciudad o municipio de la dirección" }, "name": { "type": "string", "description": "Nombre del destinatario o remitente" }, "postal_code": { "type": "string", "description": "Código postal de la dirección" }, "country_code": { "type": "string", "description": "Código de país de la dirección" }, "address_type": { "type": "string", "description": "Tipo de dirección" }, "street1": { "type": "string", "description": "Calle y número de la dirección" }, "company": { "type": "string", "description": "Nombre de la empresa" }, "phone": { "type": "string", "description": "Número de teléfono" }, "email": { "type": "string", "description": "Correo electrónico" }, "reference": { "type": "string", "description": "Referencia de la dirección" }, "area_level3": { "type": "string", "description": "Barrio o colonia de la dirección" }, "apartment_number": { "type": "string", "nullable": true, "description": "Número de departamento" } } }, "relationships": { "type": "object", "properties": { "shipment": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } } } } } } ] } }, "meta": { "type": "object", "properties": { "current_page": { "type": "integer" }, "next_page": { "type": "integer", "nullable": true }, "prev_page": { "type": "integer", "nullable": true }, "total_pages": { "type": "integer" }, "total_count": { "type": "integer" } } } } }Ejemplo:{ "data": [ { "id": "0ac5adcc-a13d-427d-81dd-9ddd70b2f660", "type": "example_type", "attributes": { "id": "0ac5adcc-a13d-427d-81dd-9ddd70b2f660", "carrier_name": "fedex", "workflow_status": "pending", "payment_status": "paid", "total": "38.20", "source": "api", "carrier_id": "0ac5adcc-a13d-427d-81dd-9ddd70b2f660", "service_id": "standart_overnight", "master_tracking_number": "234234234233", "original_shipment_id": "0199977a-e032-78bf-a335-00a9ae3cfdff", "created_at": "Fecha de creación", "updated_at": "Fecha de actualización", "error_detail": { "error_code": "ERR_INVALID_ADDRESS", "error_message": "La dirección de destino no es válida" } }, "relationships": { "packages": { "data": [ { "id": "example_id", "type": "example_type" } ] }, "address_from": { "data": { "id": "example_id", "type": "example_type" } }, "address_to": { "data": { "id": "example_id", "type": "example_type" } } } } ], "included": [ { "oneOf": [ { "id": "example_id", "type": "example_type", "attributes": { "id": "0ac5adcc-a13d-427d-81dd-9ddd70b2f660", "package_type": "4G", "weight": 1, "length": 1, "width": 1, "height": 1, "consignment_note": 53102400, "tracking_url_provider": "https://www.fedex.com/fedextrack/?trknbr=234234234233", "tracking_status": "Estado de seguimiento", "tracking_number": 123123123123, "label_url": "https://label.com", "created_at": "Fecha de creación", "updated_at": "Fecha de actualización" }, "relationships": { "shipment": { "data": { "id": "example_id", "type": "example_type" } } } }, { "id": "example_id", "type": "example_type", "attributes": { "id": "0ac5adcc-a13d-427d-81dd-9ddd70b2f660", "area_level1": "Ciudad de México", "area_level2": "Venustiano Carranza", "name": "Juan", "postal_code": "15400", "country_code": "MX", "address_type": "to", "street1": "Persia 143", "company": "Company name", "phone": "3453453453453", "email": "juan@mail.com", "reference": "porton", "area_level3": "Romero rubio", "apartment_number": "Número de departamento" }, "relationships": { "shipment": { "data": { "id": "example_id", "type": "example_type" } } } } ] } ], "meta": { "current_page": 2, "next_page": 3, "prev_page": 1, "total_pages": 3, "total_count": 8 } }
- GET
-
Resumen: Recupera un envío
Descripción:Recupera un envío
Parámetros:
id path
RequiredType: string -
Respuestas:
curl -X GET 'https://sb-pro.skydropx.com/api/v1/shipments/example_id' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {{BEARER_TOKEN}}'Código: 200Descripción:Retorna un envío
Esquema:{ "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" }, "attributes": { "type": "object", "properties": { "id": { "type": "string", "description": "UUID del envío" }, "carrier_name": { "type": "string", "description": "Nombre de la paquetería" }, "workflow_status": { "type": "string", "description": "Estado del envío" }, "payment_status": { "type": "string", "description": "Estado del pago" }, "total": { "type": "string", "description": "Costo total del envío" }, "source": { "type": "string", "description": "Origen del envío (Api `api`)" }, "carrier_id": { "type": "string", "nullable": true, "description": "UUID de la paquetería" }, "service_id": { "type": "string", "nullable": true, "description": "UUID del servicio" }, "master_tracking_number": { "type": "string", "nullable": true, "description": "Número de rastreo" }, "original_shipment_id": { "type": "string", "nullable": true, "description": "ID del envío original." }, "created_at": { "type": "string", "description": "Fecha de creación" }, "updated_at": { "type": "string", "description": "Fecha de actualización" }, "error_detail": { "type": "object", "nullable": true, "description": "Detalles del error cuando el envío falla", "properties": { "error_code": { "type": "string", "nullable": true }, "error_message": { "type": "string", "nullable": true } } } } }, "relationships": { "type": "object", "properties": { "packages": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } } }, "address_from": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "address_to": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } } } } } }, "included": { "type": "array", "items": { "oneOf": [ { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" }, "attributes": { "type": "object", "properties": { "id": { "type": "string", "description": "UUID del paquete" }, "package_type": { "type": "string", "description": "Tipo de paquete" }, "weight": { "type": "string", "description": "Peso del paquete" }, "length": { "type": "string", "description": "Longitud del paquete" }, "width": { "type": "string", "description": "Ancho del paquete" }, "height": { "type": "string", "description": "Altura del paquete" }, "consignment_note": { "type": "string", "description": "Carta porte ID" }, "tracking_url_provider": { "type": "string", "description": "URL de seguimiento" }, "tracking_status": { "type": "string", "nullable": true, "description": "Estado de seguimiento" }, "tracking_number": { "type": "string", "description": "Número de seguimiento" }, "label_url": { "type": "string", "nullable": true, "description": "URL de la guía" }, "created_at": { "type": "string", "description": "Fecha de creación" }, "updated_at": { "type": "string", "description": "Fecha de actualización" } } }, "relationships": { "type": "object", "properties": { "shipment": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } } } } } }, { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" }, "attributes": { "type": "object", "properties": { "id": { "type": "string", "description": "UUID de la dirección" }, "area_level1": { "type": "string", "description": "Estado, provincia o departamento de la dirección" }, "area_level2": { "type": "string", "description": "Ciudad o municipio de la dirección" }, "name": { "type": "string", "description": "Nombre del destinatario o remitente" }, "postal_code": { "type": "string", "description": "Código postal de la dirección" }, "country_code": { "type": "string", "description": "Código de país de la dirección" }, "address_type": { "type": "string", "description": "Tipo de dirección" }, "street1": { "type": "string", "description": "Calle y número de la dirección" }, "company": { "type": "string", "description": "Nombre de la empresa" }, "phone": { "type": "string", "description": "Número de teléfono" }, "email": { "type": "string", "description": "Correo electrónico" }, "reference": { "type": "string", "description": "Referencia de la dirección" }, "area_level3": { "type": "string", "description": "Barrio o colonia de la dirección" }, "apartment_number": { "type": "string", "nullable": true, "description": "Número de departamento" } } }, "relationships": { "type": "object", "properties": { "shipment": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } } } } } } ] } } } }Ejemplo:{ "data": { "id": "example_id", "type": "example_type", "attributes": { "id": "0ac5adcc-a13d-427d-81dd-9ddd70b2f660", "carrier_name": "FEDEX", "workflow_status": "success", "payment_status": "paid", "total": "500.0", "source": "api", "carrier_id": "91dd6bde-fd08-4bf2-b12d-d79c98b0f7ab", "service_id": "91dd6bde-fd08-4bf2-b12d-d79c98b0f7ab", "master_tracking_number": "234234234233", "original_shipment_id": "0199977a-e032-78bf-a335-00a9ae3cfdff", "created_at": "Fecha de creación", "updated_at": "Fecha de actualización", "error_detail": { "error_code": "ERR_INVALID_ADDRESS", "error_message": "La dirección de destino no es válida" } }, "relationships": { "packages": { "data": [ { "id": "example_id", "type": "example_type" } ] }, "address_from": { "data": { "id": "example_id", "type": "example_type" } }, "address_to": { "data": { "id": "example_id", "type": "example_type" } } } }, "included": [ { "oneOf": [ { "id": "example_id", "type": "example_type", "attributes": { "id": "91dd6bde-fd08-4bf2-b12d-d79c98b0f7ab", "package_type": "4G", "weight": "1", "length": "1", "width": "1", "height": "1", "consignment_note": "53102400", "tracking_url_provider": "https://www.fedex.com/fedextrack/?trknbr=234234234233", "tracking_status": "created", "tracking_number": 234234234233, "label_url": "https://label.com", "created_at": "Fecha de creación", "updated_at": "Fecha de actualización" }, "relationships": { "shipment": { "data": { "id": "example_id", "type": "example_type" } } } }, { "id": "example_id", "type": "example_type", "attributes": { "id": "91dd6bde-fd08-4bf2-b12d-d79c98b0f7ab", "area_level1": "Ciudad de México", "area_level2": "Venustiano Carranza", "name": "Juan", "postal_code": "15400", "country_code": "MX", "address_type": "to", "street1": "Persia 143", "company": "Company name", "phone": "3453453453453", "email": "juan@mail.com", "reference": "porton", "area_level3": "Romero rubio", "apartment_number": "Número de departamento" }, "relationships": { "shipment": { "data": { "id": "example_id", "type": "example_type" } } } } ] } ] }Código: 404Descripción:Retorna un mensaje de no encontrado
Esquema:{ "type": "object", "properties": { "message": { "type": "string" } } }Ejemplo:{ "message": "El recurso buscado no se pudo encontrar." }
- POST
-
Resumen: Crea un envío
Descripción:Este endpoint permite crear un envío, usando la cotización creada (POST /api/v1/quotations) y obtenida previamente (GET /api/v1/quotations/{id}).
Ejemplo de Cuerpo de Solicitud: Envío nacional
Content-Type: application/jsonObject:shipmentObject:rate_idRequiredType: stringId único del precio obtenido al consultar la cotización (GET /api/v1/quotations/{id}).Example
5f4b3b4b-4b3b-4b3b-4b3b-4b3b4b3b4b3boriginal_shipment_idType: stringID del envío original.Example
0199977a-e032-78bf-a335-00a9ae3cfdffprinting_formatType: stringFormato de impresión de la guía, puede ser `standard` o `thermal`.Example
thermaladdress_fromRequiredObject:street1RequiredType: stringCalle y número de la dirección.Example
Calle ExamplenameRequiredType: stringNombre completo del remitente.Example
Homero SimpsoncompanyRequiredType: stringNombre de la empresa.Example
Acme INCphoneRequiredType: stringNúmero de teléfono.Example
4434434445emailRequiredType: stringCorreo electrónico.Example
homero@simpson.comreferenceRequiredType: stringReferencia de la dirección.Example
Casa de Homeroaddress_toRequiredObject:street1RequiredType: stringCalle y número de la dirección.Example
Avenida ExamplenameRequiredType: stringNombre completo del destinatario.Example
Bart SimpsoncompanyRequiredType: stringNombre de la empresa.Example
Example Company LTDA.phoneRequiredType: stringNúmero de teléfono.Example
4434434444emailRequiredType: stringCorreo electrónico.Example
bart@simpson.comreferenceType: stringReferencia de la dirección.Example
Casa de BartpackagesRequiredArray of:Object:package_numberType: stringNúmero de índice del paquete cotizado.Example
1package_protectedType: booleanSi tiene seguro se pone true, si no tiene agrega false.Example
truedeclared_valueType: numberSi tiene seguro se pone el valor a asegurar, ejemplo 500. El valor está en pesos mexicanos.Example
2500.0consignment_noteType: stringCarta porte IDExample
53102400package_typeType: stringTipo de paqueteExample
4GproductsArray of:Object:product_idType: stringID del productoExample
5f4b3b4b-4b3b-4b3b-4b3b-4b3b4b3b4b3bnameType: stringNombre del productoExample
Producto 1description_enType: stringDescripción en inglésExample
Product descriptionquantityType: integerCantidadExample
1priceType: numberPrecio en pesos mexicanosExample
100.0skuType: stringSKUExample
SKU-123hs_codeType: stringCódigo HarmonizadoExample
9706.900060hs_code_descriptionType: stringDescripción del código HarmonizadoExample
Descripción del HS Codeproduct_type_codeType: stringCódigo de tipo de productoExample
Pproduct_type_nameType: stringNombre del tipo de productoExample
Productocountry_codeType: stringCódigo de país en ISO 3166-1 alpha-2Example
MXEjemplo de Cuerpo de Solicitud: Envío internacional
Content-Type: application/jsonObject:shipmentObject:rate_idRequiredType: stringId único del precio obtenido al consultar la cotización (GET /api/v1/quotations/{id}).Example
5f4b3b4b-4b3b-4b3b-4b3b-4b3b4b3b4b3bcustoms_payment_payerRequiredType: stringEntidad que pagará los aranceles del envío. Puede ser `sender` o `recipient`.Example
sendershipment_purposeRequiredType: stringPropósito del envío (`goods`, `documents`, `sample`, `return_of_goods`, `gift` o `humanitarian_donation`).Example
goodsprinting_formatType: stringFormato de impresión de la guía, puede ser `standard` o `thermal`.Example
standardaddress_fromRequiredObject:street1RequiredType: stringCalle y número de la dirección.Example
Calle ExamplenameRequiredType: stringNombre completo del remitente.Example
Homero SimpsoncompanyRequiredType: stringNombre de la empresa.Example
Acme INCphoneRequiredType: stringNúmero de teléfono.Example
4434434445emailRequiredType: stringCorreo electrónico.Example
homero@simpson.comreferenceRequiredType: stringReferencia de la dirección.Example
Casa de Homeroaddress_toRequiredObject:street1RequiredType: stringCalle y número de la dirección.Example
Avenida ExamplenameRequiredType: stringNombre completo del destinatario.Example
Bart SimpsoncompanyRequiredType: stringNombre de la empresa.Example
Example Company LTDA.phoneRequiredType: stringNúmero de teléfono.Example
4434434444emailRequiredType: stringCorreo electrónico.Example
bart@simpson.comreferenceType: stringReferencia de la dirección.Example
Casa de BartpackagesRequiredArray of:Object:package_numberType: stringNúmero de índice del paquete cotizado.Example
1package_protectedType: booleanSi tiene seguro se pone true, si no tiene agrega false.Example
truedeclared_valueType: numberSi tiene seguro se pone el valor a asegurar, ejemplo 500. El valor está en pesos mexicanos.Example
2500.0consignment_noteType: stringCarta porte IDExample
53102400package_typeType: stringTipo de paqueteExample
4GproductsArray of:Object:nameType: stringNombre del productoExample
Moldes dentales - USAskuType: stringSKUExample
SKU-1product_type_codeType: stringCódigo de tipo de productoExample
42152400product_type_nameType: stringNombre del tipo de productoExample
Materiales dentales -
Respuestas:
curl -X POST 'https://sb-pro.skydropx.com/api/v1/shipments/' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {{BEARER_TOKEN}}'Código: 202Descripción:Retorna el envío creado
Esquema:{ "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "description": "UUID del envío" }, "type": { "type": "string", "description": "Tipo de envío" }, "attributes": { "type": "object", "properties": { "id": { "type": "string", "description": "UUID del envío" }, "carrier_name": { "type": "string", "description": "Nombre de la paquetería" }, "workflow_status": { "type": "string", "description": "Estado del envío" }, "payment_status": { "type": "string", "description": "Estado del pago" }, "total": { "type": "string", "description": "Costo total del envío" }, "source": { "type": "string", "description": "Origen del envío (Api `api`)" }, "carrier_id": { "type": "string", "nullable": true, "description": "UUID de la paquetería" }, "service_id": { "type": "string", "nullable": true, "description": "UUID del servicio" }, "master_tracking_number": { "type": "string", "nullable": true, "description": "Número de rastreo" }, "original_shipment_id": { "type": "string", "nullable": true, "description": "ID del envío original." }, "created_at": { "type": "string", "description": "Fecha de creación" }, "updated_at": { "type": "string", "description": "Fecha de actualización" }, "error_detail": { "type": "object", "nullable": true, "description": "Detalles del error cuando el envío falla", "properties": { "error_code": { "type": "string", "nullable": true }, "error_message": { "type": "string", "nullable": true } } } } }, "relationships": { "type": "object", "properties": { "packages": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } } }, "address_from": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "address_to": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } } } } } }, "included": { "type": "array", "items": { "oneOf": [ { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" }, "attributes": { "type": "object", "properties": { "id": { "type": "string", "description": "UUID del paquete" }, "package_type": { "type": "string", "description": "Tipo de paquete" }, "weight": { "type": "string", "description": "Peso del paquete" }, "length": { "type": "string", "description": "Longitud del paquete" }, "width": { "type": "string", "description": "Ancho del paquete" }, "height": { "type": "string", "description": "Altura del paquete" }, "consignment_note": { "type": "string", "description": "Carta porte ID" }, "tracking_url_provider": { "type": "string", "nullable": true, "description": "URL de seguimiento" }, "tracking_status": { "type": "string", "nullable": true, "tracking_status": "created", "description": "Estado de seguimiento" }, "tracking_number": { "type": "string", "nullable": true, "description": "Número de seguimiento" }, "label_url": { "type": "string", "nullable": true, "description": "URL de la guía" }, "created_at": { "type": "string", "description": "Fecha de creación" }, "updated_at": { "type": "string", "description": "Fecha de actualización" } } }, "relationships": { "type": "object", "properties": { "shipment": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } } } } } }, { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" }, "attributes": { "type": "object", "properties": { "id": { "type": "string", "description": "UUID de la dirección" }, "area_level1": { "type": "string", "description": "Estado, provincia o departamento de la dirección" }, "area_level2": { "type": "string", "description": "Ciudad o municipio de la dirección" }, "name": { "type": "string", "description": "Nombre del destinatario o remitente" }, "postal_code": { "type": "string", "description": "Código postal de la dirección" }, "country_code": { "type": "string", "description": "Código de país de la dirección" }, "address_type": { "type": "string", "description": "Tipo de dirección" }, "street1": { "type": "string", "description": "Calle y número de la dirección" }, "company": { "type": "string", "description": "Nombre de la empresa" }, "phone": { "type": "string", "description": "Número de teléfono" }, "email": { "type": "string", "description": "Correo electrónico" }, "reference": { "type": "string", "description": "Referencia de la dirección" }, "area_level3": { "type": "string", "description": "Barrio o colonia de la dirección" }, "apartment_number": { "type": "string", "nullable": true, "description": "Número de departamento" } } }, "relationships": { "type": "object", "properties": { "shipment": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } } } } } } ] } } } }Ejemplo:{ "data": { "id": "0ac5adcc-a13d-427d-81dd-9ddd70b2f660", "type": "Tipo de envío", "attributes": { "id": "0ac5adcc-a13d-427d-81dd-9ddd70b2f660", "carrier_name": "fedex", "workflow_status": "pending", "payment_status": "paid", "total": "38.20", "source": "api", "carrier_id": "0ac5adcc-a13d-427d-81dd-9ddd70b2f660", "service_id": "0ac5adcc-a13d-427d-81dd-9ddd70b2f660", "master_tracking_number": "1234567890", "original_shipment_id": "0199977a-e032-78bf-a335-00a9ae3cfdff", "created_at": "Fecha de creación", "updated_at": "Fecha de actualización", "error_detail": { "error_code": "ERR_INVALID_ADDRESS", "error_message": "La dirección de destino no es válida" } }, "relationships": { "packages": { "data": [ { "id": "example_id", "type": "example_type" } ] }, "address_from": { "data": { "id": "example_id", "type": "example_type" } }, "address_to": { "data": { "id": "example_id", "type": "example_type" } } } }, "included": [ { "oneOf": [ { "id": "example_id", "type": "example_type", "attributes": { "id": "0ac5adcc-a13d-427d-81dd-9ddd70b2f660", "package_type": "4G", "weight": 1, "length": 1, "width": 1, "height": 1, "consignment_note": 53102400, "tracking_url_provider": "https://www.fedex.com/fedextrack/?trknbr=234234234233", "tracking_status": "Estado de seguimiento", "tracking_number": 123123123123, "label_url": "https://label.com", "created_at": "Fecha de creación", "updated_at": "Fecha de actualización" }, "relationships": { "shipment": { "data": { "id": "example_id", "type": "example_type" } } } }, { "id": "example_id", "type": "example_type", "attributes": { "id": "0ac5adcc-a13d-427d-81dd-9ddd70b2f660", "area_level1": "Ciudad de México", "area_level2": "Venustiano Carranza", "name": "Juan", "postal_code": "15400", "country_code": "MX", "address_type": "to", "street1": "Persia 143", "company": "Company name", "phone": "3453453453453", "email": "juan@mail.com", "reference": "porton", "area_level3": "Romero rubio", "apartment_number": "Número de departamento" }, "relationships": { "shipment": { "data": { "id": "example_id", "type": "example_type" } } } } ] } ] }Código: 422Descripción:Retorna una respuesta de error
Webhooks
- Contener entre 3 y 25 caracteres.
- No incluir espacios.
1. Autenticación con Bearer Token (menos segura):
Authorization: Bearer <token> (token proporcionado por nosotros)
Content-Type: application/json
2. Autenticación HMAC (recomendada):
Authorization: HMAC <firma>
Content-Type: application/json
La firma se genera utilizando el algoritmo HMAC con la función hash SHA-512, como se define en el RFC 6234, usando tu clave secreta. El HMAC se calcula sobre el cuerpo crudo de la solicitud (bytes exactos, sin formato) y se codifica como una cadena hexadecimal en minúsculas.
• Ejemplo de envíos con orden:
{
"data": {
"id": "6172eb82-7b0b-4852-9954-b1ac1c20e4f8",
"type": "packages",
"attributes": {
"status": "delivered",
"tracking_number": "794874381730",
"tracking_url_provider": "https://www.fedex.com/fedextrack/?trknbr=794874381730",
"label_url": "https://api.example.com/cloud/storage/blobs/proxy/30a9d3/label_794874381730.pdf"
},
"relationships": {
"shipment": {
"data": {
"id": "93774c22-8275-4757-9963-71b79b2e8db7",
"type": "shipments"
},
"links": {
"related": "https://api.example.com/api/v1/shipments/93774c22-8275-4757-9963-71b79b2e8db7"
}
},
"order": {
"data": {
"id": "41ae1bf9-bccf-47dd-ba85-053b42f530c2",
"type": "orders"
},
"links": {
"related": "https://api.example.com/api/v1/orders/41ae1bf9-bccf-47dd-ba85-053b42
}
}
}
}
}
• Ejemplo de envíos sin orden:
{
"data": {
"id": "6172eb82-7b0b-4852-9954-b1ac1c20e4f8",
"type": "packages",
"attributes": {
"status": "delivered",
"tracking_number": "794874381730",
"tracking_url_provider": "https://www.fedex.com/fedextrack/?trknbr=794874381730",
"label_url": "https://api.example.com/cloud/storage/blobs/proxy/30a9d3/label_794874381730.pdf"
},
"relationships": {
"shipment": {
"data": {
"id": "93774c22-8275-4757-9963-71b79b2e8db7",
"type": "shipments"
},
"links": {
"related": "https://api.example.com/api/v1/shipments/93774c22-8275-4757-9963-71b79b2e8db7"
}
}
}
}
}
• Ejemplo de órdenes:
{
"data": {
"id": "1f92595c-1ba5-40f8-a52b-4788db608293",
"type": "orders",
"attributes": {
"status": "sent",
"platform": "shopify",
"platform_id": "69b24c26-00f0-4099-90cc-a5c8b26d9bfa",
"ecommerce_id: "2d3afffd-ce69-4aa5-ae80-549487d8d5c5",
"price": 10_000,
"payment_status": 'paid'
},
"links": {
"self": "https://api.example.com/api/v1/orders/1f92595c-1ba5-40f8-a52b-4788db608293"
}
}
}
• Ejemplo de cotización:
{
"data": {
"id": "dde96439-67a9-41ec-90ed-af7f4ca2cec9",
"type": "quotation",
"attributes": {
"status": "completed",
"country_code_from": "MX",
"postal_code_from": "25904",
"area_level3_from": "Portales",
"area_level2_from": "Ramos Arizpe",
"area_level1_from": "Coahuila de Zaragoza",
"name_from": "Skydropx",
"email_from": "soporte@skydropx.com",
"phone_from": "8341713030",
"street1_from": "Calle",
"reference_from": "Sin referencias",
"company_from": "Skydropx",
"apartment_number_from": null,
"country_code_to": "MX",
"postal_code_to": "64000",
"area_level3_to": "Monterrey Centro",
"area_level2_to": "Monterrey",
"area_level1_to": "Nuevo León",
"name_to": "Skydropx",
"email_to": "soporte@skydropx.com",
"phone_to": "8341713030",
"street1_to": "Calle",
"reference_to": "Sin referencias",
"company_to": "Skydropx",
"apartment_number_to": null
},
"relationships": {
"rates": {
"data": [
{
"id": "4c02c346-0b66-46f3-9c2a-ec98eec56aa4",
"type": "rate"
},
{
"id": "938f6079-e608-4baa-b9b5-8be7f4de0535",
"type": "rate"
},
{
"id": "767612b3-9124-4388-889d-451cbba9dd68",
"type": "rate"
}
]
},
"packages": {
"data": [
{
"id": "5beefc46-352d-47d9-9856-2d3e2ec0f52a",
"type": "package"
}
]
}
},
"links": {
"self": "https://api.example.com/api/v1/quotations/dde96439-67a9-41ec-90ed-af7f4ca2cec9"
}
},
"included": [
{
"id": "4c02c346-0b66-46f3-9c2a-ec98eec56aa4",
"type": "rate",
"attributes": {
"success": false,
"rate_type": null,
"provider_name": "fedex",
"provider_display_name": "FedEx",
"provider_service_name": "Express Saver",
"provider_service_code": "fedex_express_saver",
"status": "not_applicable",
"currency_code": null,
"cost": null,
"amount": null,
"total": null,
"days": null,
"insurable": null,
"has_own_agreement": false,
"own_agreement_amount": null,
"extra_fees": null,
"zone": null,
"country_code": null,
"plan_type": null,
"packaging_type": "package",
"weight": 5
},
"relationships": {
"quotation": {
"data": {
"id": "dde96439-67a9-41ec-90ed-af7f4ca2cec9",
"type": "quotation"
},
"links": {
"related": "https://api.example.com/api/v1/quotations/dde96439-67a9-41ec-90ed-af7f4ca2cec9"
}
}
}
},
{
"id": "938f6079-e608-4baa-b9b5-8be7f4de0535",
"type": "rate",
"attributes": {
"success": true,
"rate_type": "default",
"provider_name": "sendex",
"provider_display_name": "Sendex",
"provider_service_name": "Sin recoleccion",
"provider_service_code": "sin_recoleccion",
"status": "price_found_external",
"currency_code": "MXN",
"cost": "74.3",
"amount": "106.19",
"total": "106.19",
"days": 1,
"insurable": null,
"has_own_agreement": false,
"own_agreement_amount": null,
"extra_fees": [],
"zone": "3",
"country_code": "MX",
"plan_type": null,
"packaging_type": "package",
"error_messages": {},
"weight": 5
},
"relationships": {
"quotation": {
"data": {
"id": "dde96439-67a9-41ec-90ed-af7f4ca2cec9",
"type": "quotation"
},
"links": {
"related": "https://api.example.com/api/v1/quotations/dde96439-67a9-41ec-90ed-af7f4ca2cec9"
}
}
}
},
{
"id": "767612b3-9124-4388-889d-451cbba9dd68",
"type": "rate",
"attributes": {
"success": true,
"rate_type": "default",
"provider_name": "dhl",
"provider_display_name": "DHL",
"provider_service_name": "Standard",
"provider_service_code": "standard",
"status": "price_found_external",
"currency_code": "MXN",
"cost": "153.54",
"amount": "228.11",
"total": "246.74",
"days": 1,
"insurable": null,
"has_own_agreement": false,
"own_agreement_amount": null,
"extra_fees": [
{
"code": "FUEL_SURCHARGE_FEE",
"value": 18.63,
"currency_code": "MXN"
}
],
"zone": "flat",
"country_code": "MX",
"plan_type": null,
"packaging_type": "package",
"error_messages": {},
"weight": 5
},
"relationships": {
"quotation": {
"data": {
"id": "dde96439-67a9-41ec-90ed-af7f4ca2cec9",
"type": "quotation"
},
"links": {
"related": "https://api.example.com/api/v1/quotations/dde96439-67a9-41ec-90ed-af7f4ca2cec9"
}
}
}
},
{
"id": "5beefc46-352d-47d9-9856-2d3e2ec0f52a",
"type": "package",
"attributes": {
"package_number": 1,
"weight": "5.0",
"length": "7.0",
"width": "7.0",
"height": "7.0"
}
}
]
}
• Ejemplo de tarifas:
{
"data": {
"id": "ab85cf5a-0129-42ea-9e6a-cc50cb19d99b",
"type": "rate",
"attributes": {
"success": true,
"rate_type": "default",
"provider_name": "sendex",
"provider_display_name": "Sendex",
"provider_service_name": "Reg",
"provider_service_code": "reg",
"status": "price_found_external",
"currency_code": "MXN",
"cost": "74.3",
"amount": "106.19",
"total": "106.19",
"days": 1,
"insurable": null,
"has_own_agreement": false,
"own_agreement_amount": null,
"extra_fees": [],
"zone": "3",
"country_code": "MX",
"plan_type": null,
"packaging_type": "package",
"error_messages": {},
"weight": 5
},
"relationships": {
"quotation": {
"data": {
"id": "76b094f9-0e15-4505-8a45-948931baf847",
"type": "quotation"
},
"links": {
"related": "http://skydropx.localhost.skydropx:3000/api/v1/quotations/76b094f9-0e15-4505-8a45-948931baf847"
}
}
}
}
}
1. Autenticación con Bearer Token
Utiliza el token estático proporcionado para una autenticación sencilla (menos segura).
2. Autenticación HMAC (Recomendada)
- Crear la cadena de firma: raw_request_body.
- Calcular HMAC-SHA512 utilizando tu clave secreta.
- Enviar la firma en el encabezado Authorization.
- Envíos: Documentación de envíos
- Órdenes: Documentación de órdenes
1. Para autenticación con Bearer Token:
- Trata el token como credenciales sensibles.
- Rota los tokens periódicamente.
- Valida todas las solicitudes entrantes antes de procesarlas.
2. Para autenticación HMAC:
- Almacena tu clave secreta de forma segura.
Consola de pruebas
Vista previa del generador de tokens y formulario de pruebas.
Inicia sesión para empezar las pruebas.
Iniciar sesión