Preparar la solicitud
Crear un manifiesto requiere organizar los datos del envío en la estructura adecuada. La API utiliza un enfoque jerárquico en el que primero crea el manifiesto y luego agrega líneas de manifiesto con los detalles de cada envío individual.
Cada componente tiene campos obligatorios específicos para garantizar el cumplimiento aduanero y la documentación precisa. A continuación describimos la estructura de datos esencial y las entradas requeridas.
Tipos de entrada clave
La API de manifiestos utiliza varios tipos de entrada para organizar los datos del envío:
ManifestInput: Información de envío de alto nivel que incluye aeropuertos, tipo de guía aérea y detalles del vueloManifestLineInput: Detalles de envíos individuales vinculados a un manifiestoManifestLineItemInput: Información de productos para clasificación aduaneraCreatePartyInput: Detalles de partes y ubicaciones de origen y destino
Consulte las definiciones completas de campos y opciones en nuestra referencia de la API GraphQL.
Crear un manifiesto mediante la API
Una vez que haya organizado los datos del envío, envíe la mutación GraphQL para crear el manifiesto.
Paso 1: Crear el encabezado del manifiesto
mutation ManifestCreate($input: ManifestInput!) { manifestCreate(input: $input) { id amount arrivalDate awbNumber awbPrefix carrierCode createdAt createdBy destinationCode operatorDestination operatorOrigin originCode postalOperatorCode serviceNumber source transportationMode updatedAt updatedBy weight weightUnit statusTransitions { createdAt createdBy note source } lines(first: 5) { totalCount edges { cursor node { id trackingNumber endUse currencyCode createdAt createdBy updatedAt updatedBy landedCost { id } } } } }}RESPUESTA
json
{
"data": {
"manifestCreate": {
"id": "manifest_abc123def456",
"amount": "0",
"arrivalDate": "2026-03-15T14:30:00.000Z",
"awbNumber": "1234",
"awbPrefix": "001",
"carrierCode": "AA",
"createdAt": "2026-01-06T12:00:00.000Z",
"createdBy": "organization_xyz789",
"destinationCode": "JFK",
"operatorDestination": "US",
"originCode": "LHR",
"postalOperatorCode": "J1CGBA",
"serviceNumber": "1234",
"source": "API",
"transportationMode": "AIR",
"updatedAt": "2026-01-06T12:00:00.000Z",
"updatedBy": "organization_xyz789",
"weight": "0",
"weightUnit": "KILOGRAM",
"statusTransitions": [],
"lines": {
"totalCount": 0,
"edges": []
}
}
}
}
Paso 2: Agregar líneas de manifiesto
Utilizando el ID devuelto por la mutación manifestCreate, ahora puede vincular envíos individuales al manifiesto.
mutation ManifestLineCreate($manifestId: ID!, $input: ManifestLineInput!) { manifestLineCreate(manifestId: $manifestId, input: $input) { id manifestId trackingNumber endUse currencyCode referenceNumber arrivalDate createdAt createdBy updatedAt updatedBy landedCost { id } }}RESPUESTA
json
{
"data": {
"manifestLineCreate": {
"id": "manifest_line_def456ghi789",
"manifestId": "manifest_abc123def456",
"trackingNumber": "LX123456789GB",
"endUse": "NOT_FOR_RESALE",
"currencyCode": "USD",
"referenceNumber": "ORDER-2026-001",
"arrivalDate": "2026-03-15T14:30:00.000Z",
"createdAt": "2026-01-06T12:05:00.000Z",
"createdBy": "organization_xyz789",
"updatedAt": "2026-01-06T12:05:00.000Z",
"updatedBy": "organization_xyz789",
"landedCost": null
}
}
}
Paso 3: Agregar múltiples líneas de manifiesto (lote)
Para mayor eficiencia, puede agregar múltiples líneas de manifiesto en una sola solicitud utilizando la mutación manifestLinesCreate. Cada línea requiere su propio array parties para definir el origen y destino del envío.
mutation ManifestLinesCreate($manifestId: ID!, $input: [ManifestLineInput!]!) { manifestLinesCreate(manifestId: $manifestId, input: $input) { id manifestId trackingNumber endUse currencyCode createdAt }}RESPUESTA
json
{
"data": {
"manifestLinesCreate": [
{
"id": "manifest_line_aaa111bbb222",
"manifestId": "manifest_abc123def456",
"trackingNumber": "LX123456789GB",
"endUse": "NOT_FOR_RESALE",
"currencyCode": "USD",
"createdAt": "2026-01-06T12:10:00.000Z"
},
{
"id": "manifest_line_ccc333ddd444",
"manifestId": "manifest_abc123def456",
"trackingNumber": "LX987654321GB",
"endUse": "GIFT",
"currencyCode": "USD",
"createdAt": "2026-01-06T12:10:00.000Z"
}
]
}
}
Paso 4: Actualizar manifiesto
En caso de que los detalles del vuelo hayan cambiado, puede actualizar los detalles del manifiesto utilizando la siguiente mutación. El campo source es obligatorio e indica la fuente de datos de la actualización.
mutation ManifestUpdate($id: ID!, $input: ManifestUpdateInput!) { manifestUpdate(id: $id, input: $input) { id amount arrivalDate awbNumber awbPrefix carrierCode createdAt createdBy destinationCode operatorDestination operatorOrigin originCode postalOperatorCode serviceNumber source transportationMode updatedAt updatedBy weight weightUnit statusTransitions { createdAt createdBy note source } }}RESPUESTA
json
{
"data": {
"manifestUpdate": {
"id": "manifest_abc123def456",
"amount": "150.50",
"arrivalDate": "2026-03-16T10:00:00.000Z",
"awbNumber": "5678",
"awbPrefix": "001",
"carrierCode": "BA",
"createdAt": "2026-01-06T12:00:00.000Z",
"createdBy": "organization_xyz789",
"destinationCode": "JFK",
"operatorDestination": "US",
"originCode": "LHR",
"postalOperatorCode": "J1CGBA",
"serviceNumber": "5678",
"source": "RESDIT",
"transportationMode": "AIR",
"updatedAt": "2026-01-06T14:30:00.000Z",
"updatedBy": "organization_xyz789",
"weight": "25.5",
"weightUnit": "KILOGRAM",
"statusTransitions": [
{
"createdAt": "2026-01-06T14:30:00.000Z",
"createdBy": "organization_xyz789",
"note": "Flight rescheduled due to weather",
"source": "RESDIT"
}
]
}
}
}
Valores de fuente de datos
El campo source en ManifestUpdateInput acepta los siguientes valores:
| Valor↕ | Descripción↕ |
|---|---|
CARDIT | Intercambio de datos del transportista |
PRECON | Aviso de pre-consignación |
PREDES | Aviso de pre-despacho |
RESDIT | Respuesta al despacho |
Preparar un manifiesto aduanero para envíos a EE. UU.
Proporcione a Zonos datos de envíos postales entrantes.Zonos preparará manifiestos aduaneros completos que incluyen toda la información necesaria para envíos postales a EE. UU.