1
创建发货方
Zonos 将无法知道此货件的来源,因为标签未在 Zonos 仪表板中显示。为了确保我们能够拉回正确的订单详细信息,您需要创建一个包含来源详细信息的 party
,包括 account
和 accountOrderNumber
作为 referenceId
。此方的 referenceId
必须是 account
和 accountOrderNumber
用连字符连接,如下例所示。
变更
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
mutation originParty {
partyCreate(
input: {
referenceId: "100051-O-1434321"
person: {
firstName: "John"
lastName: "Doe"
email: "test@test.com"
phone: "5555555555"
}
location: {
administrativeArea: "Utah"
administrativeAreaCode: "UT"
countryCode: US
line1: "348 N 2450 E"
line2: "#245"
locality: "St George"
postalCode: "84790"
}
type: ORIGIN
}
) {
id
}
}
变量
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"
}
}
}
响应
1
2
3
4
5
6
7
8
9
10
{
"data": {
"shipFrom": {
"id": "party_ac64040b-228e-424c-a090-6da03197011d",
"location": {
"countryCode": "US"
}
}
}
}
2
获取Zonos 订单ID
向Zonos 提供商家的 account
号码以及他们的 accountOrderNumber
,以便将您系统中的详细信息与我们系统中的 order
进行匹配。API 参考可以这里找到。
变更
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
mutation {
orderLink(input: { account: "10051", accountOrderNumber: "1434321" }) {
id
root {
id
parties {
id
type
location {
countryCode
postalCode
}
}
items {
id
description
}
shipmentRatings {
id
}
landedCosts {
amountSubtotals {
duties
taxes
fees
shipping
}
}
}
}
}
响应
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
{
"data": {
"orderLink": [
{
"id": "order_cd6bca4e-6da4-430c-aaf3-7a8b161627a4",
"root": {
"id": "100051-O-1434321",
"parties": [
{
"id": "party_2fdf56a0-2bb2-4443-b8ca-a984d335ffcf",
"type": "ORIGIN",
"location": {
"countryCode": "US",
"postalCode": "84790"
}
},
{
"id": "party_9b3ac542-da12-4869-bcf4-00f42af17f6f",
"type": "DESTINATION",
"location": {
"countryCode": "FR",
"postalCode": "47310"
}
}
],
"items": [
{
"id": "item_c0a329ef-d157-4fa2-8982-be4420717f64",
"description": "Monoprice 4-Port SATA Serial ATA PCI RAID Controller Card, Silicon Image"
},
{
"id": "item_67e9fd3f-8f84-4027-9b06-f6b26915d1d2",
"description": "CORSAIR iCUE H115i RGB PRO XT, 280mm Radiator, Dual 140mm PWM Fans, Software Control, Liquid CPU Cooler, CW-9060044-WW LGA 1700 Compatible"
}
],
"shipmentRatings": [
{
"id": "shipment_rating_fc73d892-1336-47c5-a620-40903388332d"
}
],
"landedCosts": [
{
"amountSubtotals": {
"duties": 53.67,
"taxes": 147.89,
"fees": 42.37,
"shipping": 15.0
}
}
]
}
}
]
}
}
3
创建货件
获取货件的海关信息的最后一步是创建货件本身。此流程的一部分是创建包含货件项目详细信息的 shipmentCarton
,这些信息对于 customsSpec
是必要的。如果在 generateCustoms
字段中传递 true
,则 shipment
将自动生成一个海关对象。
变更
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
}
}
}
}
变量
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"]
}
]
}
}
响应
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"
}
}
}
}
检索订单的海关文档
获取现有订单的海关信息。GraphQL
如果您是 Zonos 的合作伙伴,并且我们有共同的客户,您可以使用 Clear 来更新和检索现有 Zonos 订单的完整海关文档。您可以检索发货人可能提供的缺失或不准确信息的货件的海关数据。例如,发货人通常会提供不良描述或不提供 HS 代码。Zonos 可以添加、补充或改善信息,例如描述、HS 代码、原产国、价格等。