Documentación de integración para APIs: Events Tracking (GET) y Generación de paquetes (POST). Incluye autenticación y ejemplos de request/response.
/api/v1/events
Devuelve información de origen/destino y la lista de eventos asociados a un tracking. Cuando el envío cuenta con
prueba de entrega, el último evento puede incluir un objeto delivery_proof con un link.
Requiere Bearer Token en el header Authorization.
Authorization: Bearer <ACCESS_TOKEN>
| Param | Type | Required | Description |
|---|---|---|---|
id |
string | yes | Tracking number. |
curl --location 'https://<API_HOST>/api/v1/events?id=<TRACKING_NUMBER>' \
--header 'Authorization: Bearer <ACCESS_TOKEN>'
{
"data": [
{
"tracking": "<TRACKING_NUMBER>",
"origin": "<ORIGIN_COUNTRY>",
"destination": "<DESTINATION_COUNTRY>",
"state": "<STATE_OR_REGION>",
"events": [
{
"date": "<CHECKPOINT_AT_DATE>",
"category_es": "Orden creada",
"category": "Order created",
"code": "OC-1",
"description": "Label generated",
"description_es": "Etiqueta impresa",
"description_pt": "Etiqueta impressa",
"description_alt": "Label generated",
"received_by": null,
"office": null,
"city": null
},
{
"date": "<CHECKPOINT_AT_DATE>",
"category_es": "Proceso finalizado",
"category": "Finished",
"code": "PF-1",
"description": "Delivered",
"description_es": "Entregado",
"description_pt": "Entregue",
"description_alt": null,
"received_by": "<RECEIVER_NAME_OR_REFERENCE>",
"office": null,
"city": null,
"delivery_proof": {
"link": "https://<DELIVERY_PROOF_URL>",
"details": null
}
}
]
}
],
"meta": {
"error": false,
"code": 200,
"pagination": {
"total": 1,
"count": 1,
"per_page": 100,
"current_page": 1,
"links": { "next": null }
}
}
}
delivery_proof.link puede ser una URL presigned (expira). Si expira, volver a consultar el endpoint./api/v1/create-package
Crea un paquete a partir de los datos de la orden, remitente, comprador e ítems. Devuelve un tracking y la etiqueta en pdf base64. En este endpoint, el token se envía como query param.
Requiere access_token como query param.
POST /api/v1/create-package?access_token=<ACCESS_TOKEN>
curl --location 'https://<API_HOST>/api/v1/create-package?access_token=<ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{ ... }'
{
"order_id": CUSTOMER_CLIENT_TRACKING_NUMBER,
"sale_date": "SALEDATE",
"service": "PROVIDED_SERVICE_CODE",
"delivery_duties_paid": "N/Y",
"returns_allowed": "N/Y",
"label_format": "pdf",
"package": {
"net_weight": null,
"weight": 0.3,
"weight_unit": "kg",
"height": 1,
"width": 11,
"length": 16,
"measurement_unit": "cm",
"declared_value": 1,
"freight": null,
"cif": null,
"insurance": null,
"taxes": null,
"duties": null,
"payment_method": null,
"issuing_entity": null,
"last_four_digits_payment_method": null,
"transaction_number": null
},
"shipper": {
"name": "<SHIPPER_NAME>",
"contact_name": null,
"address1": "<SHIPPER_ADDRESS_LINE1>",
"address2": null,
"address3": null,
"district": null,
"city": "<SHIPPER_CITY>",
"state": "<SHIPPER_STATE>",
"postal_code": "<SHIPPER_POSTAL_CODE>",
"country": "<SHIPPER_COUNTRY_CODE>",
"email": "<SHIPPER_EMAIL>",
"phone": "<SHIPPER_PHONE>"
},
"buyer": {
"name": "<BUYER_NAME>",
"buyer_id": "<BUYER_ID>",
"company": null,
"address1": "<BUYER_ADDRESS_LINE1>",
"address1_number": null,
"address2": "<BUYER_ADDRESS_LINE2>",
"address3": null,
"district": null,
"city": "<BUYER_CITY>",
"state": "<BUYER_STATE>",
"location": "<BUYER_LOCATION>",
"postal_code": "<BUYER_POSTAL_CODE>",
"country": "<BUYER_COUNTRY_CODE>",
"email": "<BUYER_EMAIL>",
"phone": "<BUYER_PHONE>"
},
"items": [
{
"quantity": 1,
"sku": null,
"description": "aa",
"description_alt": "bb",
"net_weight": 0.3,
"declared_value": 1,
"hs_code": "820740",
"external_item_id": "<EXTERNAL_ITEM_ID>",
"category": null,
"product_url": null
}
]
}
label_format y dimensiones/peso cumplan con el servicio seleccionado.{
"error": false,
"data": {
"tracking": "<GENERATED_TRACKING>",
"label": "<PDF_BASE64>"
}
}
access_token en repositorios.