Zonos logo
DOCS

Create a shipment

/

Create a shipment 

COMING SOON

If you are integrated with the Zonos API and are approved to ship outside of Dashboard, you will need to create a shipment and provide tracking numbers using the createShipment mutation.

If you are using a Duty and Tax app and shipping with a platform that syncs tracking numbers to Zonos or shipping in Dashboard, you will not need to use this mutation.

1

Calculate a landed cost

The first step to creating a shipment is calculating a Landed Cost that will be tied to an order.

2

Create an order

Once you have calculated a Landed Cost, you will create an order that the shipments will be tied to. Ideally this would happen as soon as the order is created in your system.

3

Create a shipment

Once a Landed Cost has been calculated and an order has been assigned, you can create a shipment that Zonos will guarantee.

POST https://api.zonos.com/graphql

Mutation

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
mutation ShipmentCreate($shipmentCreate: ShipmentCreateInput!) {
  shipmentCreate(input: $shipmentCreate) {
    id
    customsSpec {
      id
    }
    order {
      id
    }
    parties {
      id
      type
      location {
        countryCode
      }
      person {
        firstName
        lastName
      }
    }
    serviceLevel {
      id
    }
    shipmentCartons {
      id
      carton {
        id
        dimensionalUnit
        height
        length
        width
        weightUnit
        weight
        items {
          edges {
            node {
              id
            }
          }
        }
      }
    }
  }
}

Variables

1
2
3
4
5
6
7
8
9
10
{
  "shipmentCreate": {
    "generateLabel": "False",
    "generateCustoms": "False",
    "orderId": "order_e1097b7a-0878-4e63-ac6c-edf77d9382fb",
    "trackingNumbers":[
      "9205500000000000000000"
    ]
  }
}

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{
  "data": {
    "shipmentCreate": {
      "id": "shipment_e633562f-9773-4e69-bfc9-df63c052a847",
      "customsSpec": {
        "id": "customs_spec_261942d4-6d8b-4990-b118-16f4291d4246"
      },
      "order": {
        "id": "order_e1097b7a-0878-4e63-ac6c-edf77d9382fb"
      },
      "parties": [
        {
          "id": "party_fc99156b-4d5d-4eb5-8ac3-be2b0b36a0b2",
          "type": "ORIGIN",
          "location": {
            "countryCode": "US"
          },
          "person": {
            "firstName": "Jane",
            "lastName": "Doe"
          }
        },
        {
          "id": "party_235f82a-4d5d-4eb5-8ac3-be2b0b36b2d4",
          "type": "DESTINATION",
          "location": {
            "countryCode": "CA"
          },
          "person": {
            "firstName": "John",
            "lastName": "Doe"
          }
        }
      ],
      "serviceLevel": {
        "id": "service_level_8193df42-05d3-4874-be18-2ee72a82210f"
      },
      "shipmentCartons": {
        "id": "shipment_carton_a2f67792-68a4-4f3d-a921-5a9b3be6be69",
        "carton": {
          "id": "carton_a2f67792-68a4-4f3d-a921-5a9b3be6be69",
          "dimensionalUnit": "INCH",
          "height": 5,
          "length": 10,
          "width": 8,
          "weightUnit": "POUND",
          "weight": 2,
          "items": {
            "edges": [
              {
                "node": {
                  "id": "item_eb05ad0c-ad1e-49ea-8aaa-fdb1b5e329ad"
                }
              },
              {
                "node": {
                  "id": "item_eb05ad0c-ad1e-49ea-8aaa-fdb1b5e329ad"
                }
              }
            ]
          }
        }
      }
    }
  }
}