¡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. 1. Encuentra tus credenciales
  2. Ve a Conexiones > API y copia tus credenciales (Client ID y Client Secret).
  3. 2. Genera tu bearer token
  4. Utiliza las credenciales y genera el bearer token para autenticar tus solicitudes
  5. 3. Empieza a llamar a la API
  6. 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.com

Oauth

POST

Resumen: Obtener un token de acceso

Descripción:
   POST /api/v1/oauth/token

El 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, como refresh_token o client_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ón refresh_token).
  • redirect_uri: La URI de redirección, debe ser la misma que la redirect_uri almacenada 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_SECRET

Ejemplo de Cuerpo de Solicitud:

Content-Type: application/json
Object:
client_idRequired
Type: string
client_secretRequired
Type: string
grant_typeRequired
Type: string
redirect_uri
Type: string
refresh_token
Type: string
scope
Type: string
curl -X POST 'https://sb-pro.skydropx.com/api/v1/oauth/token' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{BEARER_TOKEN}}' 
        
Respuestas:
Código: 200
Descripció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: 400
Descripción:

Credenciales faltantes

Esquema:
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "error_description": {
      "type": "string"
    }
  }
}
Ejemplo:
{
  "error": "Credenciales faltantes",
  "error_description": "Credenciales faltantes"
}
Código: 401
Descripció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/revoke

El 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_token o refresh_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_token

Ejemplo de Cuerpo de Solicitud:

Content-Type: application/json
Object:
client_idRequired
Type: string
client_secretRequired
Type: string
tokenRequired
Type: string
token_type_hint
Type: string
curl -X POST 'https://sb-pro.skydropx.com/api/v1/oauth/revoke' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{BEARER_TOKEN}}' 
        
Respuestas:
Código: 200
Descripción:

Revocar un token

Esquema:
{
  "type": "object",
  "properties": {}
}
Ejemplo:
{}
Código: 403
Descripció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/introspect

El 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_token o refresh_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_token

Ejemplo de Cuerpo de Solicitud:

Content-Type: application/json
Object:
client_idRequired
Type: string
client_secretRequired
Type: string
tokenRequired
Type: string
token_type_hint
Type: string
curl -X POST 'https://sb-pro.skydropx.com/api/v1/oauth/introspect' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{BEARER_TOKEN}}' 
        
Respuestas:
Código: 200
Descripció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: 400
Descripción:

Credenciales faltantes

Esquema:
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "error_description": {
      "type": "string"
    }
  }
}
Ejemplo:
{
  "error": "Credenciales faltantes",
  "error_description": "Credenciales faltantes"
}
Código: 401
Descripció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/orders

El 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.

curl -X GET 'https://sb-pro.skydropx.com/api/v1/orders' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{BEARER_TOKEN}}' 
        
Respuestas:
Código: 200
Descripció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/:id

El endpoint para recuperar una orden sirve para obtener toda la información de una orden.

Parámetros:

id path

Required

Type: string
curl -X GET 'https://sb-pro.skydropx.com/api/v1/orders/example_id' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{BEARER_TOKEN}}' 
        
Respuestas:
Código: 200
Descripció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/orders

El 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/json
Object:
orderRequired
Object:
reference
Type: string
A través de este campo se podrá identificar la órden en la plataforma.
Example
188
reference_number
Type: string
Identificador externo de la orden en la plataforma. Puede ser nulo. Si esta presente, debe ser único.
Example
188-5455445-33334433
payment_status
Type: string
Estado de pago.
Example
paid
total_price
Type: string
Precio total de la orden.
Example
57.00
merchant_store_id
Type: string
Id de la tienda
Example
139539AS
headquarter_id
Type: string
Id del headquarter
Example
468b8926-8e9d-4a62-baed-0cab7a3125f5
platform
Type: string
Plataforma desde donde se realizará la orden
Example
Shopify
package_type
Type: string
Tipo de paquete
Example
4G
parcels
Array of:
Object:
weight
Type: float
Peso del paquete.
Example
10
length
Type: integer
Longitud del paquete.
Example
10
width
Type: integer
Ancho del paquete.
Example
10
height
Type: integer
Altura del paquete.
Example
10
quantity
Type: integer
Cantidad de paquetes con las mismas medidas.
Example
1
dimension_unit
Type: string
Unidad de medida de las dimensiones.
Example
CM
mass_unit
Type: string
Unidad de medida del peso.
Example
KG
package_type
Type: string
Tipo de paquete, requerido para automatizaciones que crean guía automática.
Example
7H1
consignment_note
Type: string
Este 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
24121500
products
Array of:
Object:
name
Type: string
Nombre del producto.
Example
Bicicleta
hs_code
Type: string
Código HS del producto.
Example
9560.63
sku
Type: string
Código del producto.
Example
BIC-001
price
Type: string
Precio del producto.
Example
57.00
quantity
Type: integer
Cantidad de productos.
Example
1
weight
Type: float
Peso del producto en kilogramos.
Example
10
height
Type: integer
Altura del producto en centímetros.
Example
10
length
Type: integer
Longitud del producto en centímetros.
Example
10
width
Type: integer
Ancho del producto en centímetros.
Example
10
shipper_address
Object:
address
Type: string
Nombre de la calle o avenida.
Example
Vía Industrial
internal_number
Type: string
Número de la casa o departamento.
Example
100
reference
Type: string
Referencia de la dirección.
Example
Planta nuclear
sector
Type: string
Nombre de la Colonia.
Example
Asarco
city
Type: string
Nombre de la ciudad.
Example
Monterrey
state
Type: string
Nombre del estado.
Example
Nuevo León
postal_code
Type: string
Código postal.
Example
64550
country
Type: string
Código de país según el formato alpha-2 de la ISO 3166-1.
Example
MX
person_name
Type: string
Nombre de la persona que recibirá los paquetes.
Example
Homero Simpson
company
Type: string
Nombre de la empresa que recibirá los paquetes.
Example
Inversiones Montgomery Burns S.A.S de C.V.
phone
Type: string
Número de teléfono de la persona que recibirá los paquetes.
Example
4434434444
email
Type: string
Correo electrónico de la persona que recibirá los paquetes.
Example
homero@burns.com
recipient_address
Object:
address
Type: string
Nombre de la calle o avenida.
Example
Avenida Siempre Viva
internal_number
Type: string
Número de la casa o departamento.
Example
742
reference
Type: string
Referencia de la dirección.
Example
Casa color durazno.
sector
Type: string
Nombre de la Colonia.
Example
La Finca
city
Type: string
Nombre de la ciudad.
Example
Monterrey
state
Type: string
Nombre del estado.
Example
Nuevo León
postal_code
Type: string
Código postal.
Example
64000
country
Type: string
País.
Example
MX
person_name
Type: string
Nombre de la persona que enviará los paquetes.
Example
Bart Simpson
company
Type: string
Nombre de la empresa que enviará los paquetes.
Example
Casa de Bart S.A.S de C.V.
phone
Type: string
Número de teléfono de la persona que enviará los paquetes.
Example
4434434444
email
Type: string
Correo electrónico de la persona que enviará los paquetes.
Example
bart@simpson.com
curl -X POST 'https://sb-pro.skydropx.com/api/v1/orders/' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{BEARER_TOKEN}}' 
        
Respuestas:
Código: 201
Descripció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: 403
Descripción:

Prohibido

Código: 422
Descripció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/:id

El endpoint permite actualizar la información de una orden.

Parámetros:

order_id path

Required

Type: string

Ejemplo de Cuerpo de Solicitud:

Content-Type: application/json
Object:
orderRequired
Object:
total_price
Type: string
Precio total de la orden.
Example
57.00
payment_status
Type: string
Estado de pago.
Example
paid
parcels
Array of:
Object:
weight
Type: float
Peso del paquete.
Example
10.0
mass_unit
Type: string
Unidad de medida del peso.
Example
KG
length
Type: integer
Longitud del paquete.
Example
10
width
Type: integer
Ancho del paquete.
Example
10
height
Type: integer
Altura del paquete.
Example
10
quantity
Type: integer
Cantidad de paquetes con las mismas medidas.
Example
1
dimension_unit
Type: string
Unidad de medida de las dimensiones.
Example
CM
package_type
Type: string
Tipo de paquete, requerido para automatizaciones que crean guía automática.
Example
7H1
consignment_note
Type: string
Este 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
24121500
products
Array of:
Object:
name
Type: string
Nombre del producto.
Example
Bicicleta
hs_code
Type: string
Código HS del producto.
Example
9560.63
sku
Type: string
Código del producto.
Example
BIC-001
price
Type: string
Precio del producto.
Example
57.00
quantity
Type: integer
Cantidad de productos.
Example
1
weight
Type: integer
Peso del producto en kilogramos.
Example
10
height
Type: integer
Altura del producto en centímetros.
Example
10
length
Type: integer
Longitud del producto en centímetros.
Example
10
width
Type: integer
Ancho del producto en centímetros.
Example
10
shipper_address
Object:
address
Type: string
Nombre de la calle o avenida.
Example
Vía Industrial
internal_number
Type: string
Número de la casa o departamento.
Example
100
reference
Type: string
Referencia de la dirección.
Example
Planta nuclear
sector
Type: string
Nombre de la Colonia.
Example
Asarco
city
Type: string
Nombre de la ciudad.
Example
Monterrey
state
Type: string
Nombre del estado.
Example
Nuevo León
postal_code
Type: string
Código postal.
Example
64550
country
Type: string
Código de país según el formato alpha-2 de la ISO 3166-1.
Example
MX
person_name
Type: string
Nombre de la persona que recibirá los paquetes.
Example
Homero Simpson
company
Type: string
Nombre de la empresa que recibirá los paquetes.
Example
Inversiones Montgomery Burns S.A.S de C.V.
phone
Type: string
Número de teléfono de la persona que recibirá los paquetes.
Example
4434434444
email
Type: string
Correo electrónico de la persona que recibirá los paquetes.
Example
homero@burns.com
recipient_address
Object:
address
Type: string
Nombre de la calle o avenida.
Example
Avenida Siempre Viva
internal_number
Type: string
Número de la casa o departamento.
Example
742
reference
Type: string
Referencia de la dirección.
Example
Casa color durazno.
sector
Type: string
Nombre de la Colonia.
Example
La Finca
city
Type: string
Nombre de la ciudad.
Example
Monterrey
state
Type: string
Nombre del estado.
Example
Nuevo León
postal_code
Type: string
Código postal.
Example
64000
country
Type: string
País.
Example
MX
person_name
Type: string
Nombre de la persona que enviará los paquetes.
Example
Bart Simpson
company
Type: string
Nombre de la empresa que enviará los paquetes.
Example
Casa de Bart S.A.S de C.V.
phone
Type: string
Número de teléfono de la persona que enviará los paquetes.
Example
4434434444
email
Type: string
Correo electrónico de la persona que enviará los paquetes.
Example
bart@simpson.com
curl -X PATCH 'https://sb-pro.skydropx.com/api/v1/orders/example_order_id' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{BEARER_TOKEN}}' 
        
Respuestas:
Código: 200
Descripció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: 422
Descripción:

La orden no puede ser actualizada

Esquema:
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "string"
    }
  }
}
Ejemplo:
{
  "errors": "example_errors"
}
Código: 404
Descripció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

Required

ID Envío

Type: string
curl -X GET 'https://sb-pro.skydropx.com/api/v1/pickups/coverage' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{BEARER_TOKEN}}' 
        
Respuestas:
Código: 200
Descripció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: 422
Descripció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: 404
Descripció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/reschedule

Este endpoint permite reprogramar una recolección

Parámetros de la solicitud:

  • reference_shipment_id: Id del envio a recolectar
  • packages: Número de paquetes a recolectar
  • total_weight: Peso total de los paquetes a recolectar
  • 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

Ejemplo de Cuerpo de Solicitud:

Content-Type: application/json
Object:
pickupRequired
Object:
reference_shipment_id
Type: string
Id del envio a recolectar
Example
0ac5adcc-a13d-427d-81dd-9ddd70b2f660
packages
Type: integer
Número de paquetes a recolectar
Example
5
total_weight
Type: ["number", "string"]
Peso total de los paquetes a recolectar
Example
30.0
scheduled_from
Type: string
Fecha y hora de inicio de franja horaria de recolección
Example
2024-09-24 09:00:00
scheduled_to
Type: string
Fecha y hora final de franja horaria de recolección
Example
2024-09-24 14:00:00
curl -X POST 'https://sb-pro.skydropx.com/api/v1/pickups/reschedule' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{BEARER_TOKEN}}' 
        
Respuestas:
Código: 201
Descripció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: 404
Descripción:

Recolección no encontrada

Esquema:
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    }
  }
}
Ejemplo:
{
  "message": "El recurso buscado no se pudo encontrar."
}
Código: 422
Descripció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
curl -X GET 'https://sb-pro.skydropx.com/api/v1/pickups' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{BEARER_TOKEN}}' 
        
Respuestas:
Código: 200
Descripció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

Required

ID de la recolección

Type: string
curl -X GET 'https://sb-pro.skydropx.com/api/v1/pickups/example_id' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{BEARER_TOKEN}}' 
        
Respuestas:
Código: 200
Descripció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: 404
Descripció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 recolectar
  • packages: Número de paquetes a recolectar
  • total_weight: Peso total de los paquetes a recolectar
  • 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

Ejemplo de Cuerpo de Solicitud:

Content-Type: application/json
Object:
pickupRequired
Object:
reference_shipment_id
Type: string
Id del envio a recolectar
Example
0ac5adcc-a13d-427d-81dd-9ddd70b2f660
packages
Type: integer
Número de paquetes a recolectar
Example
5
total_weight
Type: ["number", "string"]
Peso total de los paquetes a recolectar
Example
30.0
scheduled_from
Type: string
Fecha y hora de inicio de franja horaria de recolección
Example
2024-09-24 09:00:00
scheduled_to
Type: string
Fecha y hora final de franja horaria de recolección
Example
2024-09-24 14:00:00
curl -X POST 'https://sb-pro.skydropx.com/api/v1/pickups/' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{BEARER_TOKEN}}' 
        
Respuestas:
Código: 201
Descripció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: 400
Descripción:

Retorna una respuesta de error (solicitud incorrecta)

Código: 422
Descripció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/products

El 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: integer
Example
1

filters[destination_country_code] query

Filtrar productos por código de país de destino

Type: string
Example
"MX"
curl -X GET 'https://sb-pro.skydropx.com/api/v1/products' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{BEARER_TOKEN}}' 
        
Respuestas:
Código: 200
Descripció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/quotations

El endpoint de cotizaciones se utiliza para consultar los precios con las diferentes transportadoras.

Ejemplo de Cuerpo de Solicitud: Cotización Nacional

Content-Type: application/json
Object:
quotation
Object:
order_id
Type: string
ID de la orden a la que pertenece la cotización
Example
c2092234-1b85-41a2-a200-858d052c0ad1
address_fromRequired
Object:
country_codeRequired
Type: string
Código de país de la dirección (ISO 3166-1 alpha-2).
Example
MX
postal_codeRequired
Type: string
Código postal de la dirección.
Example
64000
area_level1Required
Type: string
Estado, provincia o departamento de la dirección.
Example
Nuevo León
area_level2Required
Type: string
Ciudad o municipio de la dirección.
Example
Monterrey
area_level3Required
Type: string
Barrio o colonia de la dirección.
Example
Monterrey Centro
address_toRequired
Object:
country_codeRequired
Type: string
Código de país de la dirección (ISO 3166-1 alpha-2).
Example
MX
postal_codeRequired
Type: string
Código postal de la dirección.
Example
64000
area_level1Required
Type: string
Estado, provincia o departamento de la dirección.
Example
Nuevo León
area_level2Required
Type: string
Ciudad o municipio de la dirección.
Example
Monterrey
area_level3Required
Type: string
Barrio o colonia de la dirección.
Example
Monterrey Centro
parcelsRequired
Array of:
Object:
lengthRequired
Type: integer
Longitud del paquete.
Example
10
widthRequired
Type: integer
Ancho del paquete.
Example
10
heightRequired
Type: integer
Altura del paquete.
Example
10
weightRequired
Type: float
Peso del paquete.
Example
2
package_protected
Type: boolean
Package protection indicator.
Example
true
declared_value
Type: float
Declared value of the package.
Example
100
requested_carriers
Array of:
Type: string
Paqueterias a cotizar.
Example
[
  "fedex",
  "dhl"
]

Ejemplo de Cuerpo de Solicitud: Cotización Internacional

Content-Type: application/json
Object:
quotation
Object:
order_id
Type: string
ID de la orden a la que pertenece la cotización
Example
c2092234-1b85-41b2-a293-778d052c0ad1
address_fromRequired
Object:
country_codeRequired
Type: string
Código de país de la dirección (ISO 3166-1 alpha-2).
Example
MX
postal_codeRequired
Type: string
Código postal de la dirección.
Example
64000
area_level1Required
Type: string
Estado, provincia o departamento de la dirección.
Example
Nuevo León
area_level2Required
Type: string
Ciudad o municipio de la dirección.
Example
Monterrey
area_level3Required
Type: string
Barrio o colonia de la dirección.
Example
Monterrey Centro
address_toRequired
Object:
country_codeRequired
Type: string
Código de país de la dirección (ISO 3166-1 alpha-2).
Example
US
postal_codeRequired
Type: string
Código postal de la dirección.
Example
11201
area_level1Required
Type: string
Estado, provincia o departamento de la dirección.
Example
New York
area_level2Required
Type: string
Ciudad o municipio de la dirección.
Example
Brooklyn
area_level3
Type: string
Barrio o colonia de la dirección.
Example
Kings County
parcelsRequired
Array of:
Object:
lengthRequired
Type: integer
Longitud del paquete.
Example
10
widthRequired
Type: integer
Ancho del paquete.
Example
10
heightRequired
Type: integer
Altura del paquete.
Example
10
weightRequired
Type: float
Peso del paquete.
Example
2
package_protected
Type: boolean
Package protection indicator.
Example
true
declared_value
Type: float
Declared value of the package.
Example
100
productsRequired
Array of:
Object:
hs_codeRequired
Type: string
Código HS del producto.
Example
3407.002000
description_enRequired
Type: string
Descripción del producto en inglés.
Example
Medicine for children
country_codeRequired
Type: string
Código de país del producto (ISO 3166-1 alpha-2).
Example
US
quantityRequired
Type: integer
Cantidad del producto.
Example
1
priceRequired
Type: float
Precio del producto.
Example
100.0
requested_carriers
Array of:
Type: string
Paqueterias a cotizar.
Example
[
  "fedex",
  "dhl"
]
curl -X POST 'https://sb-pro.skydropx.com/api/v1/quotations' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{BEARER_TOKEN}}' 
        
Respuestas:
Código: 201
Descripció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: 422
Descripció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: 400
Descripció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

Required

ID de la Cotización

Type: string
curl -X GET 'https://sb-pro.skydropx.com/api/v1/quotations/example_id' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{BEARER_TOKEN}}' 
        
Respuestas:
Código: 200
Descripció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: 404
Descripció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/json
Object:
printing_format
Type: string
Formato de impresión de la guía, puede ser `standard` o `thermal`.
Example
standard
curl -X PATCH 'https://sb-pro.skydropx.com/api/v1/settings/printing_formats' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{BEARER_TOKEN}}' 
        
Respuestas:
Código: 202
Descripción:

Solicitud aceptada.

Código: 422
Descripció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

Required

Type: string

Ejemplo de Cuerpo de Solicitud:

Content-Type: application/json
Object:
reason
Type: string
Razón de la cancelación.
Example
Ya no es necesario
shipment_id
Type: string
Id o número de rastreo del envío.
Example
12345
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}}' 
        
Respuestas:
Código: 201
Descripció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: 422
Descripció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: 404
Descripció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

Required

Type: string

Ejemplo de Cuerpo de Solicitud:

Content-Type: application/json
Object:
protectRequired
Object:
declared_value
Type: string
Valor declarado del envío
Example
1000
shipment_id
Type: string
UUID del envío
Example
7f433cf4-e54a-4294-b421-1522cd377c12
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}}' 
        
Respuestas:
Código: 201
Descripció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: 422
Descripció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

Required

Type: string

carrier_name path

Required

Type: string
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}}' 
        
Respuestas:
Código: 200
Descripció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: 404
Descripció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
curl -X GET 'https://sb-pro.skydropx.com/api/v1/shipments' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{BEARER_TOKEN}}' 
        
Respuestas:
Código: 200
Descripció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

Required

Type: string
curl -X GET 'https://sb-pro.skydropx.com/api/v1/shipments/example_id' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{BEARER_TOKEN}}' 
        
Respuestas:
Código: 200
Descripció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: 404
Descripció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/json
Object:
shipment
Object:
rate_idRequired
Type: string
Id único del precio obtenido al consultar la cotización (GET /api/v1/quotations/{id}).
Example
5f4b3b4b-4b3b-4b3b-4b3b-4b3b4b3b4b3b
original_shipment_id
Type: string
ID del envío original.
Example
0199977a-e032-78bf-a335-00a9ae3cfdff
printing_format
Type: string
Formato de impresión de la guía, puede ser `standard` o `thermal`.
Example
thermal
address_fromRequired
Object:
street1Required
Type: string
Calle y número de la dirección.
Example
Calle Example
nameRequired
Type: string
Nombre completo del remitente.
Example
Homero Simpson
companyRequired
Type: string
Nombre de la empresa.
Example
Acme INC
phoneRequired
Type: string
Número de teléfono.
Example
4434434445
emailRequired
Type: string
Correo electrónico.
Example
homero@simpson.com
referenceRequired
Type: string
Referencia de la dirección.
Example
Casa de Homero
address_toRequired
Object:
street1Required
Type: string
Calle y número de la dirección.
Example
Avenida Example
nameRequired
Type: string
Nombre completo del destinatario.
Example
Bart Simpson
companyRequired
Type: string
Nombre de la empresa.
Example
Example Company LTDA.
phoneRequired
Type: string
Número de teléfono.
Example
4434434444
emailRequired
Type: string
Correo electrónico.
Example
bart@simpson.com
reference
Type: string
Referencia de la dirección.
Example
Casa de Bart
packagesRequired
Array of:
Object:
package_number
Type: string
Número de índice del paquete cotizado.
Example
1
package_protected
Type: boolean
Si tiene seguro se pone true, si no tiene agrega false.
Example
true
declared_value
Type: number
Si tiene seguro se pone el valor a asegurar, ejemplo 500. El valor está en pesos mexicanos.
Example
2500.0
consignment_note
Type: string
Carta porte ID
Example
53102400
package_type
Type: string
Tipo de paquete
Example
4G
products
Array of:
Object:
product_id
Type: string
ID del producto
Example
5f4b3b4b-4b3b-4b3b-4b3b-4b3b4b3b4b3b
name
Type: string
Nombre del producto
Example
Producto 1
description_en
Type: string
Descripción en inglés
Example
Product description
quantity
Type: integer
Cantidad
Example
1
price
Type: number
Precio en pesos mexicanos
Example
100.0
sku
Type: string
SKU
Example
SKU-123
hs_code
Type: string
Código Harmonizado
Example
9706.900060
hs_code_description
Type: string
Descripción del código Harmonizado
Example
Descripción del HS Code
product_type_code
Type: string
Código de tipo de producto
Example
P
product_type_name
Type: string
Nombre del tipo de producto
Example
Producto
country_code
Type: string
Código de país en ISO 3166-1 alpha-2
Example
MX

Ejemplo de Cuerpo de Solicitud: Envío internacional

Content-Type: application/json
Object:
shipment
Object:
rate_idRequired
Type: string
Id único del precio obtenido al consultar la cotización (GET /api/v1/quotations/{id}).
Example
5f4b3b4b-4b3b-4b3b-4b3b-4b3b4b3b4b3b
customs_payment_payerRequired
Type: string
Entidad que pagará los aranceles del envío. Puede ser `sender` o `recipient`.
Example
sender
shipment_purposeRequired
Type: string
Propósito del envío (`goods`, `documents`, `sample`, `return_of_goods`, `gift` o `humanitarian_donation`).
Example
goods
printing_format
Type: string
Formato de impresión de la guía, puede ser `standard` o `thermal`.
Example
standard
address_fromRequired
Object:
street1Required
Type: string
Calle y número de la dirección.
Example
Calle Example
nameRequired
Type: string
Nombre completo del remitente.
Example
Homero Simpson
companyRequired
Type: string
Nombre de la empresa.
Example
Acme INC
phoneRequired
Type: string
Número de teléfono.
Example
4434434445
emailRequired
Type: string
Correo electrónico.
Example
homero@simpson.com
referenceRequired
Type: string
Referencia de la dirección.
Example
Casa de Homero
address_toRequired
Object:
street1Required
Type: string
Calle y número de la dirección.
Example
Avenida Example
nameRequired
Type: string
Nombre completo del destinatario.
Example
Bart Simpson
companyRequired
Type: string
Nombre de la empresa.
Example
Example Company LTDA.
phoneRequired
Type: string
Número de teléfono.
Example
4434434444
emailRequired
Type: string
Correo electrónico.
Example
bart@simpson.com
reference
Type: string
Referencia de la dirección.
Example
Casa de Bart
packagesRequired
Array of:
Object:
package_number
Type: string
Número de índice del paquete cotizado.
Example
1
package_protected
Type: boolean
Si tiene seguro se pone true, si no tiene agrega false.
Example
true
declared_value
Type: number
Si tiene seguro se pone el valor a asegurar, ejemplo 500. El valor está en pesos mexicanos.
Example
2500.0
consignment_note
Type: string
Carta porte ID
Example
53102400
package_type
Type: string
Tipo de paquete
Example
4G
products
Array of:
Object:
name
Type: string
Nombre del producto
Example
Moldes dentales - USA
sku
Type: string
SKU
Example
SKU-1
product_type_code
Type: string
Código de tipo de producto
Example
42152400
product_type_name
Type: string
Nombre del tipo de producto
Example
Materiales dentales
curl -X POST 'https://sb-pro.skydropx.com/api/v1/shipments/' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{BEARER_TOKEN}}' 
        
Respuestas:
Código: 202
Descripció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: 422
Descripción:

Retorna una respuesta de error

Webhooks

Descripción general: Los webhooks permiten que servicios externos reciban actualizaciones en tiempo real desde nuestra aplicación. Este cliente es responsable de enviar notificaciones cuando ocurren eventos específicos en nuestro sistema.
Solicita la sección para configurar webhooks en plataforma escribiendo a hola@skydropx.com
Encabezados de la solicitud El nombre del encabezado de autenticación puede configurarse dinámicamente. Por defecto, se utiliza Authorization, pero puede asignarse cualquier nombre que cumpla con las siguientes condiciones:
  • 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.

Cuerpo de la solicitud El cuerpo de la solicitud contiene información relevante sobre el evento notificado.

• 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"
        }
      }
    }
  }
}
Métodos de autenticación

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.
Información adicional Por razones de privacidad, no podemos compartir toda la información directamente en el webhook. Sin embargo, los clientes pueden hacer una solicitud adicional a la API usando los enlaces proporcionados en el cuerpo de la respuesta para obtener los detalles completos del evento. Para la documentación completa de la API: Seguridad Asegúrate de que tu URL de webhook use HTTPS.

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.
Contacto y soporte
Para preguntas o problemas, por favor contacta a nuestro equipo de soporte en: hola@skydropx.com