通过API创建货件
在计算Landed Cost并创建订单后,您可以通过API将跟踪号码和其他货件详细信息发送到Zonos。
当您为现有订单创建货件且不需要修改项目或方的详细信息时,请使用此工作流程。它支持可选的跟踪号码、履行中心和服务级别选择。
变更
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
mutation CreateShipment($input: ShipmentCreateWorkflowInput!) {
shipmentCreateWorkflow(input: $input) {
id
status
trackingDetails {
number
}
serviceLevel {
id
name
carrier {
id
name
}
}
shipmentCartons {
id
carton {
id
width
length
height
weight
items {
item {
id
amount
description
}
}
}
label {
url
trackingNumber
id
documentFiling
}
}
}
}
基本变量
1
2
3
4
5
6
{
"input": {
"generateLabel": true,
"orderId": "order_12345678-1234-1234-1234-123456789abc"
}
}
与履行中心
1
2
3
4
5
6
7
{
"input": {
"generateLabel": true,
"orderId": "order_12345678-1234-1234-1234-123456789def",
"fulfillmentCenter": "fulfillment_center_12345"
}
}
使用自定义跟踪
1
2
3
4
5
6
7
{
"input": {
"generateLabel": false,
"orderId": "order_12345678-1234-1234-1234-123456789ghi",
"trackingNumbers": ["tracking_example_1", "tracking_example_2"]
}
}
带服务水平
1
2
3
4
5
6
7
{
"input": {
"generateLabel": true,
"orderId": "order_12345678-1234-1234-1234-123456789jkl",
"serviceLevel": "dhl.express_example"
}
}
取消货件
要取消已创建的标签,请使用以下变更来作废货件。任何相关的标签也将自动作废。请注意,一旦货件被作废,就无法更新或恢复。
变更
1
2
3
4
5
6
7
8
9
10
11
12
mutation {
shipmentStatusUpdate(
input: {
shipment: "shipment_12345678-1234-1234-1234-123456789stu"
status: VOIDED
note: "Voiding shipment"
}
) {
id
status
}
}
创建货件
使用GraphQL变更通过Zonos API创建货件。
GraphQL
如果您已与Zonos API集成并获得批准在仪表板外发货,请使用
shipmentCreateWorkflow
变更来创建货件并提供跟踪信息。这些变更还允许您通知Zonos有关交叉对接设施的国内货件。注意:如果您正在使用与自动同步跟踪号码到Zonos的Duty and Tax应用程序的平台,或者如果您直接通过仪表板发货,则不需要这些变更。