DOCS

Preparar manifiesto aduanero

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.

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 vuelo
  • ManifestLineInput: Detalles de envíos individuales vinculados a un manifiesto
  • ManifestLineItemInput: Información de productos para clasificación aduanera
  • CreatePartyInput: 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

1mutation ManifestCreate($input: ManifestInput!) {
2 manifestCreate(input: $input) {
3 id
4 amount
5 arrivalDate
6 awbNumber
7 awbPrefix
8 carrierCode
9 createdAt
10 createdBy
11 destinationCode
12 operatorDestination
13 operatorOrigin
14 originCode
15 postalOperatorCode
16 serviceNumber
17 source
18 transportationMode
19 updatedAt
20 updatedBy
21 weight
22 weightUnit
23 statusTransitions {
24 createdAt
25 createdBy
26 note
27 source
28 }
29 lines(first: 5) {
30 totalCount
31 edges {
32 cursor
33 node {
34 id
35 trackingNumber
36 endUse
37 currencyCode
38 createdAt
39 createdBy
40 updatedAt
41 updatedBy
42 landedCost {
43 id
44 }
45 }
46 }
47 }
48 }
49}

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.

1mutation ManifestLineCreate($manifestId: ID!, $input: ManifestLineInput!) {
2 manifestLineCreate(manifestId: $manifestId, input: $input) {
3 id
4 manifestId
5 trackingNumber
6 endUse
7 currencyCode
8 referenceNumber
9 arrivalDate
10 createdAt
11 createdBy
12 updatedAt
13 updatedBy
14 landedCost {
15 id
16 }
17 }
18}

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.

1mutation ManifestLinesCreate($manifestId: ID!, $input: [ManifestLineInput!]!) {
2 manifestLinesCreate(manifestId: $manifestId, input: $input) {
3 id
4 manifestId
5 trackingNumber
6 endUse
7 currencyCode
8 createdAt
9 }
10}

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.

1mutation ManifestUpdate($id: ID!, $input: ManifestUpdateInput!) {
2 manifestUpdate(id: $id, input: $input) {
3 id
4 amount
5 arrivalDate
6 awbNumber
7 awbPrefix
8 carrierCode
9 createdAt
10 createdBy
11 destinationCode
12 operatorDestination
13 operatorOrigin
14 originCode
15 postalOperatorCode
16 serviceNumber
17 source
18 transportationMode
19 updatedAt
20 updatedBy
21 weight
22 weightUnit
23 statusTransitions {
24 createdAt
25 createdBy
26 note
27 source
28 }
29 }
30}

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:

ValorDescripción
CARDITIntercambio de datos del transportista
PRECONAviso de pre-consignación
PREDESAviso de pre-despacho
RESDITRespuesta al despacho

¿Fue útil esta página?