Zonos logo
DOCS

Match orders to get customs info

/

Match your order to retrieve customs documentation

Learn how to get customs info for an existing order.

If you are a partner of Zonos and we share mutual customers, you can use Clear to update and retrieve complete customs documentation on an existing Zonos order. You can retrieve customs data on a shipment where the shipper may have provided missing or inaccurate information. For example, it is common for a shipper to provide a poor description or not provide a HS code Zonos can add, supplement or improve information such as a description, HS code, country of origin, prices, and more.

1

Supply Zonos with the account number of the merchant as well as their accountOrderNumber to match the details from your system with the order in our system. The API reference can be found here.

Mutation

1
2
3
4
5
mutation OrderLink($orderLink: OrderLinkInput!) {
  orderLink(input: $orderLink) {
    id
  }
}

Variables

1
2
3
4
5
6
{
  "orderLink": {
    "account": "4442523",
    "accountOrderNumber": "P32940203"
  }
}

Response

1
2
3
4
5
6
7
8
9
{
  "data": {
    "orderLink": [
      {
        "id": "order_0bfa01a6-202a-41cf-aeda-793aba1502de"
      }
    ]
  }
}
2

Add ship from details for the shipment

Zonos will be unable to know the origin of this shipment as the label was not manifested in the Zonos dashboard. To provide the right documentation and calculation amounts, you will need to pass the shipFrom party details. For this mutation, we only require location details. API reference can be found here.

Mutation

1
2
3
4
5
6
7
8
mutation CreateParties( $shipFrom: CreatePartyInput!) {
 shipFrom: createParty(input: $shipTo) {
  id
  location {
   countryCode
  }
 }
}

Variables

1
2
3
4
5
6
7
8
9
10
11
12
13
14
{
  "shipFrom": {
    "type": "ORIGIN",
    "referenceId": "root_cd8d3d85-283f-4865-af77-9cda0c123c0a",
    "location": {
      "administrativeArea": "Utah",
      "administrativeAreaCode": "UT",
      "countryCode": "US",
      "line1": "370 Buena Vista Boulevard",
      "locality": "St. George",
      "postalCode": "84790"
    }
  }
}

Response

1
2
3
4
5
6
7
8
9
10
{
  "data": {
    "shipFrom": {
      "id": "party_ac64040b-228e-424c-a090-6da03197011d",
      "location": {
        "countryCode": "US"
      }
    }
  }
}
3

Create a shipment

The final step to retrieving customs information for a shipment is creating the shipment itself. Part of this flow is creating the shipmentCarton that contains the item details for the shipment that are necessary for the customsSpec. The shipment will automatically generate a customs object if you pass true in the generateCustoms field.

Mutation

1
2
3
4
5
6
7
8
9
10
11
12
13
mutation CreateShipment($createShipment: ShipmentCreateInput!) {
  shipmentCreate(input: $createShipment) {
    id
    customSpec {
      id
    }
    shipmentCartons {
      carton {
        id
      }
    }
  }
}

Variables

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
  "createShipment": {
    "orderId": "order_3a369733-3046-4390-b0a4-99a2f8a1c2a2",
    "trackingNumber": "12345",
    "generateCustoms": true,
    "parties": [
      "party_2fdf56a0-2bb2-4443-b8ca-a984d335ff3g",
      "party_5c928cde-67fa-4ee4-b77a-2628fbcd5ac9"
    ],
    "serviceLevel": "custom.custom",
    "shipmentCartons": [
      {
        "height": 10,
        "length": 10,
        "width": 10,
        "weight": 1,
        "items": ["item_8a0ecee9-42ff-4544-9610-8e8d679ef0a3"]
      }
    ]
  }
}

Response

1
2
3
4
5
6
7
8
9
10
{
  "data": {
    "shipmentCreate": {
      "id": "shipment_a125e480-369c-4606-abf8-ff34295b15cb",
      "customSpec": {
        "id": "customsSpec_a19875ec-b85c-11ed-afa1-0242ac120002"
      }
    }
  }
}