付费GETDHL邮编
DHL 国家邮编支持查询
判断某个国家是否支持按邮编查询,为城市建议接口做前置判断。
DHL 国家邮编支持查询
接口信息
- Method:
GET - URL:
https://tms-go.czl.net/api/v1/dhl/country/postcode-support - Auth:
Authorization: Bearer <API_KEY>
Query 参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
country_code |
string |
是 | 国家二字码,例如 US、DE、AU |
请求示例
bash
curl --request GET \
--url 'https://tms-go.czl.net/api/v1/dhl/country/postcode-support?country_code=US' \
--header 'Authorization: Bearer your_api_key'成功响应
json
{
"code": 200,
"msg": "success",
"data": {
"country_code": "US",
"postcode_supported": true
}
}说明
- 建议在调用城市建议接口前先查这个接口
postcode_supported为true时,优先按邮编查