DOCS

Create a landed cost

/

计算landed cost

了解如何通过REST API请求landed cost。

REST

该Zonos Landed Cost API 让您快速获取跨境进出口货物的高度准确的landed cost报价。提协调(HS)代码可以让Zonos Landed Cost返回最准确的关税计算,即使未提供协调代码,我们也会返回大致的关税和税费金额。

1

设置Zonos

首先,注册一个Zonos账户,并在Zonos仪表板上配置您的账户。然后,您将能够获取您的API密钥,这将允许您与Zonos API进行身份验证。

2

设置基础货币

为了提供有关landed cost请求中包含的金额的上下文,您需要指定请求的基础货币代码(作为ISO货币代码)。这将指代请求中的所有货币值以及生成的landed cost报价将以何种货币呈现。您可以在我们landed cost文档上找到支持的货币及其ISO代码的列表。

请求

1
2
3
{
  "currency": "USD"
}
3

提供商品详情

要使用 landed cost 获取准确的 Zonos 报价,您需要尽可能提供每个商品的详细信息,包括协调(HS)代码。通常,您提供的信息越多,报价就会越准确。

虽然提供 HS 代码可以让 Zonos Landed Cost 返回最准确和完整的计算,但在没有 HS 代码的情况下也可以近似计算实际的 landed cost。但是,请注意,如果您商品的总成本超过了最低限度阈值,则可能需要 HS 代码。在这种情况下,发送没有 HS 代码的请求将导致错误。

对于您想要包含在 landed cost 报价中的每个商品,请在请求体的 items 数组中添加一个条目。

请求

1
2
3
4
5
6
7
8
9
10
11
12
{
  "items": [
    {
      "id": "294395",
      "amount": 75,
      "country_of_origin": "FR",
      "description_customs": null,
      "hs_code": "6116.10.00",
      "quantity": 1
    }
  ]
}
4

添加运输地址

计算landed cost所需的发货和收货地点。运输目的地需要完整地址,但对于大多数landed cost报价,仅提供发货国家即可。

请求

1
2
3
4
5
6
7
8
9
{
  "ship_from_country": "US",
  "ship_to": {
    "city": "Campinas",
    "country": "BR",
    "postal_code": "75828-000",
    "state": "SP"
  }
}
5

提供运费

Zonos Landed Cost API 不计算运费 - 它专注于关税、税费和费用。由于运费是总landed cost 报价的重要组成部分,并且在计算中占有重要地位,因此提前指定运费是至关重要的。这个值可以通过使用货运评级 API,例如Zonos 评级 API,或通过其他多种方式获得,例如您的承运人的运输软件、rate 表等。

与运费相关的信息,包括整体运费金额,通过您的 API 请求中的 shipping 字段发送。

请求

1
2
3
4
5
{
  "shipping": {
    "amount": 14.23
  }
}

虽然只需要金额,但您也可以提供服务级别名称,以便 API 根据提供的金额计算承运人费用。您可以在我们的 Landed Cost 文档 中查看支持的承运人和服务级别列表。

请求

1
2
3
4
5
6
{
  "shipping": {
    "amount": 14.23,
    "service_level": "ups_express_saver"
  }
}
6

发送 API 请求

现在您已经构建并配置了请求,您可以向 Zonos Landed Cost API 发送 POST 请求。确保使用您的 API 密钥进行身份验证,并在请求中提供正确的版本头。

POST https://api.zonos.com/v1/landed_cost

请求

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
{
  "currency": "USD",
  "items": [
    {
      "id": "294395",
      "amount": 75,
      "country_of_origin": "FR",
      "description_customs": null,
      "hs_code": "6116.10.00",
      "quantity": 1
    }
  ],
  "ship_from_country": "US",
  "ship_to": {
    "city": "Campinas",
    "country": "BR",
    "postal_code": "75828-000",
    "state": "SP"
  },
  "shipping": {
    "amount": 14.23,
    "amount_discount": 0,
    "service_level": "ups_express_saver"
  }
}

响应

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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
{
  "id": "ldct_1AoaDV8MZ8SAmsVFFTWISI",
  "amount_subtotal": {
    "duties": 53.54,
    "fees": 27.64,
    "taxes": 33.96
  },
  "currency": {
    "id": "1aad3b7e-c",
    "base": "USD",
    "date": "2022-09-06T20:57:10.333+0000",
    "rates": [
      {
        "currency": "BRL",
        "rate": 5.2499
      }
    ]
  },
  "customs": {
    "delivery_duty_paid": "available",
    "items": [
      {
        "id": "294395",
        "amount": 75,
        "country_of_origin": "FR",
        "country_of_origin_source": "api_request",
        "description_customs": null,
        "description_retail": null,
        "hs_code": "6116.10.00",
        "hs_code_source": "api_request",
        "note": "",
        "quantity": 1
      }
    ],
    "shipping_amount": 14.23,
    "ship_to_country": "BR"
  },
  "de_minimis": [
    {
      "formula": "(cost {'<='} 0 brl)",
      "method": "FOB",
      "note": "Duty applies to all shipments",
      "threshold": "above",
      "type": "duty"
    },
    {
      "formula": "(cost {'<='} 0 brl)",
      "method": "FOB",
      "note": "Tax applies to all shipments",
      "threshold": "above",
      "type": "tax"
    }
  ],
  "duties": [
    {
      "amount": 45.0,
      "description": "Basic customs duty",
      "item_id": "294395",
      "formula": "60 %",
      "note": "Duty is 60% of the items total.",
      "type": "item"
    },
    {
      "amount": 8.538,
      "description": "Basic customs duty",
      "item_id": "294395",
      "formula": "60 %",
      "note": "Duty is 60% of the items total.",
      "type": "shipping"
    }
  ],
  "fees": [
    {
      "amount": 15.0,
      "description": "UPS United States Duty and Tax Forwarding Charge",
      "item_id": null,
      "formula": "15 USD",
      "note": null,
      "type": "ddp_service_fee"
    },
    {
      "amount": 12.0,
      "description": "UPS Disbursement Fee",
      "item_id": null,
      "formula": "2.00% of duties & taxes amount with a minimum of 12 usd, whichever is greater",
      "note": null,
      "type": "advancement"
    },
    {
      "amount": 0.64,
      "description": "UPS Currency Conversion Fee",
      "item_id": null,
      "formula": ".75% of the amount converted",
      "note": null,
      "type": "currency_conversion_fee"
    }
  ],
  "taxes": [
    {
      "amount": 16.46,
      "description": "ICMS",
      "item_id": "294395",
      "formula": "0.82% applied to gross amount including tax. Calculate with fomula: value/(1-0.18)*0.18",
      "note": null,
      "type": "item"
    },
    {
      "amount": 3.12,
      "description": "ICMS",
      "item_id": "294395",
      "formula": "0.82% applied to gross amount including tax. Calculate with fomula: value/(1-0.18)*0.18",
      "note": null,
      "type": "shipping"
    },
    {
      "amount": 9.88,
      "description": "ICMS",
      "item_id": "294395",
      "formula": "0.82% applied to gross amount including tax. Calculate with fomula: value/(1-0.18)*0.18",
      "note": "ICMS on the duty of the item",
      "type": "duty"
    },
    {
      "amount": 1.87,
      "description": "ICMS",
      "item_id": "294395",
      "formula": "0.82% applied to gross amount including tax. Calculate with fomula: value/(1-0.18)*0.18",
      "note": "ICMS on the duty of the shipping",
      "type": "duty"
    },
    {
      "amount": 2.63,
      "description": "ICMS",
      "item_id": null,
      "formula": "0.82% applied to gross amount including tax. Calculate with fomula: value/(1-0.18)*0.18",
      "note": null,
      "type": "advancement"
    }
  ],
  "removed_items": [],
  "remittance": [],
  "landedCostGuaranteeCode": "ZONOS"
}

这个页面有帮助吗?


有问题吗?

联系我们。