Gọi Zonos để lấy chi tiết hải quan
Thực hiện theo các bước dưới đây để cho phép khách hàng của bạn truy xuất chi tiết hải quan có thể được sử dụng khi tạo lô hàng từ nền tảng của bạn.
Cho phép khách hàng nhập thông tin xác thực API Zonos
API Zonos có thể truy cập bằng một credentialToken
. Nền tảng của bạn sẽ cần cung cấp cho khách hàng khả năng nhập credentialToken
của họ từ Bảng điều khiển Zonos vào nền tảng của bạn. Từ đây, bạn sẽ có thể thực hiện các yêu cầu đến Zonos thay mặt cho họ.
Truy vấn chi tiết hải quan
Sử dụng truy vấn sau để lấy lại các chi tiết hải quan cần thiết để tạo lô hàng. Đối với orderId
, bạn có thể sử dụng ID đơn hàng Zonos hoặc accountOrderNumber
mà có thể đã có trong hệ thống của bạn.
Truy vấn
query {
customsSpecByReference(
referenceId: "order_d8d0893b-cac5-4759-8842-bef4a5abbacf"
) {
id
currencyCode
amountSubtotals {
items
shipping
}
reasonForExport
incoterm
declarationStatement
attributes {
type
value
}
serviceLevel {
name
code
carrier {
name
code
}
}
parties {
id
type
person {
companyName
firstName
lastName
email
phone
}
location {
countryCode
line1
locality
postalCode
administrativeAreaCode
administrativeArea
}
}
customsItems {
id
amount
quantity
hsCode
hsCodeSource
description
countryOfOrigin
items {
id
amount
currencyCode
quantity
}
}
}
}
Phản hồi
{
"data": {
"customsSpecByReference": {
"id": "customs_spec_0jnbyj1fc2dhv",
"currencyCode": "GBP",
"amountSubtotals": {
"items": 128.42,
"shipping": 16.05
},
"reasonForExport": "NOT_FOR_RESALE",
"incoterm": "DAP",
"declarationStatement": null,
"attributes": [
{
"type": "GST",
"value": "1234567890"
}
],
"serviceLevel": null,
"parties": [
{
"id": "party_02ca9b01-341a-450e-bff4-8bcd9c799c67",
"type": "PAYOR",
"person": {
"companyName": "Test",
"firstName": "firstName",
"lastName": "lastName",
"email": "test@gmail.com",
"phone": "5022303021"
},
"location": {
"countryCode": "GB",
"line1": "40 Stone Street",
"locality": "Craigton",
"postalCode": "DD5 7JE",
"administrativeAreaCode": null,
"administrativeArea": null
}
},
{
"id": "party_7f22f3b2-2f4d-4f82-a13f-2688397b8ee6",
"type": "ORIGIN",
"person": null,
"location": {
"countryCode": "US",
"line1": "215 test st",
"locality": "St George",
"postalCode": "84770",
"administrativeAreaCode": "UT",
"administrativeArea": "Utah"
}
},
{
"id": "party_604ee39f-369e-458a-b3e3-2958dec42f35",
"type": "DESTINATION",
"person": {
"companyName": "test",
"firstName": "firstName",
"lastName": "lastName",
"email": "test@gmail.com",
"phone": "5022303021"
},
"location": {
"countryCode": "GB",
"line1": "40 Stone Street",
"locality": "Craigton",
"postalCode": "DD5 7JE",
"administrativeAreaCode": null,
"administrativeArea": null
}
}
],
"customsItems": [
{
"id": "customs_item_0jnbyjc5m2dhq",
"amount": 7.22,
"quantity": 1,
"hsCode": "6203.42",
"hsCodeSource": "API_REQUEST",
"description": "Cotton denim trousers",
"countryOfOrigin": "TR",
"items": [
{
"id": "item_0jnbyey9r4xcf",
"amount": 9.0,
"currencyCode": "USD",
"quantity": 1
}
]
},
{
"id": "customs_item_0jnbyjc5m2dhr",
"amount": 28.09,
"quantity": 2,
"hsCode": "6109.10",
"hsCodeSource": "API_REQUEST",
"description": "Cotton knitted apparel",
"countryOfOrigin": "US",
"items": [
{
"id": "item_0jnbyey9r4xc7",
"amount": 5.0,
"currencyCode": "USD",
"quantity": 1
},
{
"id": "item_0jnbyey9r4xcb",
"amount": 30.0,
"currencyCode": "USD",
"quantity": 1
}
]
},
{
"id": "customs_item_0jnbyjc5m2dhs",
"amount": 20.07,
"quantity": 1,
"hsCode": "6214.90",
"hsCodeSource": "API_REQUEST",
"description": "Cotton scarf, textile",
"countryOfOrigin": "IN",
"items": [
{
"id": "item_0jnbyey9r4xcd",
"amount": 25.0,
"currencyCode": "USD",
"quantity": 1
}
]
},
{
"id": "customs_item_0jnbyjc5m2dht",
"amount": 13.64,
"quantity": 2,
"hsCode": "6204.49",
"hsCodeSource": "API_REQUEST",
"description": "Silk apparel items",
"countryOfOrigin": "IN",
"items": [
{
"id": "item_0jnbyey9r4xcg",
"amount": 5.0,
"currencyCode": "USD",
"quantity": 1
},
{
"id": "item_0jnbyey9r4xcc",
"amount": 12.0,
"currencyCode": "USD",
"quantity": 1
}
]
},
{
"id": "customs_item_0jnbyjc5m2dhv",
"amount": 36.12,
"quantity": 1,
"hsCode": "6109.90",
"hsCodeSource": "API_REQUEST",
"description": "Synthetic t-shirt, man-made",
"countryOfOrigin": "VN",
"items": [
{
"id": "item_0jnbyey9r4xc9",
"amount": 45.0,
"currencyCode": "USD",
"quantity": 1
}
]
},
{
"id": "customs_item_0jnbyjc5m2dhw",
"amount": 6.42,
"quantity": 1,
"hsCode": "6110.11",
"hsCodeSource": "API_REQUEST",
"description": "Wool knitted sweater",
"countryOfOrigin": "IT",
"items": [
{
"id": "item_0jnbyey9r4xce",
"amount": 8.0,
"currencyCode": "USD",
"quantity": 1
}
]
},
{
"id": "customs_item_0jnbyjc5m2dhx",
"amount": 16.86,
"quantity": 2,
"hsCode": "4203.10",
"hsCodeSource": "API_REQUEST",
"description": "Leather apparel articles",
"countryOfOrigin": "IT",
"items": [
{
"id": "item_0jnbyey9r4xca",
"amount": 6.0,
"currencyCode": "USD",
"quantity": 1
},
{
"id": "item_0jnbyey9r4xc8",
"amount": 15.0,
"currencyCode": "USD",
"quantity": 1
}
]
}
]
}
}
}
Tạo lô hàng với nhà vận chuyển
Khi bạn đã lấy được thông tin hải quan cho một đơn hàng, bạn có thể sử dụng những thông tin đó trong yêu cầu của mình gửi đến nhà vận chuyển. Khi bạn nhận được nhãn và số theo dõi từ nhà vận chuyển, bạn có thể sử dụng shipmentCreate
mutation, để thông báo cho Zonos về số theo dõi để chúng tôi có thể cập nhật trạng thái của đơn hàng.
Truy xuất chi tiết hải quan
Truy xuất chi tiết đơn hàng để chuẩn bị cho một lô hàng.GraphQL
Nếu bạn là đối tác của Zonos và đang làm việc với một khách hàng sử dụng nền tảng của bạn để vận chuyển, bạn có thể gọi Zonos để lấy chi tiết về đơn hàng. Những chi tiết này có thể được sử dụng trong yêu cầu nhãn của bạn gửi đến nhà vận chuyển để đảm bảo rằng các chi tiết được cung cấp là những chi tiết được sử dụng để đảm bảo rằng Zonos đảm bảo các khoản thuế và phí được áp dụng cho lô hàng đó. Chúng tôi sẽ trả về các chi tiết về mã số thuế, các mặt hàng, bao gồm mã HS và mô tả hải quan, cũng như số tài khoản sẽ được tính phí cho các khoản thuế và phí.