Create a shipment via the API
Once a Landed Cost has been calculated and an order has been created, you can send us tracking numbers and other shipment details via the API.
Use this request when you are telling Zonos about a shipment
but do not need a label. You will pass details about parties
, and shipmentCartons
that are tied to the order
. By giving us these details we will be able to know if the order has been fulfilled partially or in its entirety.
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
mutation {
partyCreateWorkflow(
input: [
{
location: {
administrativeArea: "Utah"
administrativeAreaCode: "UT"
countryCode: US
line1: "123 Test Street"
locality: "St George"
postalCode: "84770"
}
person: { companyName: "test Corp", phone: "8018565714" }
type: ORIGIN
}
{
location: {
administrativeArea: "Quebec"
administrativeAreaCode: "QC"
countryCode: CA
line1: "2147 Pitfield Blvd"
locality: "Pierrefonds"
postalCode: "H9H 3C7"
}
person: {
email: "test@gmail.com"
firstName: "firstName"
lastName: "lastName"
phone: "5022303021"
companyName: "goProTest"
metadata: { key: "key", value: "value" }
}
type: DESTINATION
}
]
) {
type
id
organization
}
shipmentCreateWorkflow(
input: {
trackingNumber: "test_tracking_num_5"
orderId: "order_c535c9c8-88a1-4dde-b938-7dd7f776beee"
serviceLevel: "service_level_720198b0-43ce-409e-a5bb-0c6e91a43fad"
shipmentCartons: [
{
dimensionalUnit: "INCH"
length: 10
width: 10
height: 10
weightUnit: "POUND"
weight: 10
trackingNumber: "1234567890"
items: [{ itemReference: "someothersku4345" }]
}
]
}
) {
id
status
tracking {
id
number
}
shipmentCartons {
id
tracking {
number
}
carton {
id
length
width
height
dimensionalUnit
weight
weightUnit
}
}
}
}
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
shipmentCreateWorkflow
mutation. You can also use these mutations to tell Zonos about domestic shipments to cross-docking facilities.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.