Create a shipment via the API
Once a Landed Cost has been calculated and an order has been created, you can create a shipment that Zonos will guarantee.
Single shipment
Split shipments
Domestic shipments
Use this request when you are fulfilling an order that has one parcel or you are sending multiple parcels at once. You do not need to pass shipmentCartons
as we will use the details that were used for the initial Landed Cost quote.
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
33
34
35
36
37
38
39
40
41
42
43
44
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
{
"shipmentCreate": {
"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
{
"data": {
"shipmentCreate": {
"id": "shipment_e633562f-9773-4e69-bfc9-df63c052a847",
"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"
}
}
]
}
}
}
}
}
}
Voiding a shipment
In the event that you wish to cancel a label that has been created, you can use the following mutation to void the shipment. If labels have been created for the shipment, they will be voided as well. Once a shipment has been voided, it cannot be updated.
Request
1
2
3
4
5
6
7
8
9
10
11
12
mutation {
shipmentStatusUpdate(
input: {
shipment: "shipment_f1fe4dbd-e471-49fa-94e7-84e369083223"
status: VOIDED
note: "Voiding shipment"
}
) {
id
status
}
}
Create a shipment
Create a shipment with the Zonos API.GraphQL
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
shipmentCreate
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.