# 偏远地区查询 ## 接口信息 - Method: `POST` - URL: `https://tms-go.czl.net/api/v1/remote` - Auth: `Authorization: Bearer ` - Content-Type: `application/json` ## 适用场景 - 偏远地区自动判断 - 邮编首查 + 城市补查 - 价格系统中的偏远附加费判定 ## 请求体 | 字段 | 类型 | 必填 | 说明 | | --- | --- | --- | --- | | `country_code` | `string` | 是 | 国家二字码,例如 `US`、`NZ` | | `city_or_post` | `string` | 是 | 城市名或邮编。首查通常传邮编 | | `selected_city` | `string` | 否 | 用户明确选择的城市名,用于补查 | ## 请求示例 ```bash curl --request POST \ --url https://tms-go.czl.net/api/v1/remote \ --header 'Authorization: Bearer your_api_key' \ --header 'Content-Type: application/json' \ --data '{ "country_code": "NZ", "city_or_post": "0112", "selected_city": "MAIRTOWN" }' ``` ## 成功响应 ```json { "code": 200, "msg": "success", "data": { "query_cities": ["KAMO", "MAIRTOWN", "OTANGAREI"], "dhl": { "is_remote": false, "total_cities": 3 }, "fedex": { "is_remote": true, "remote_type": "TIERB", "matched_city": "MAIRTOWN", "remote_cities": ["MAIRTOWN"], "total_cities": 3 }, "ups": { "is_remote": false, "total_cities": 3 } } } ``` ## 关键字段 - `query_cities`: 邮编对应的候选城市列表 - `is_remote`: 是否偏远 - `remote_type`: 偏远类型 - `matched_city`: 实际命中的城市 - `remote_cities`: 命中的偏远城市列表 ## 接入建议 - 推荐先只传 `country_code + city_or_post` 首查 - 如果响应里有 `query_cities`,让用户选择城市后再带 `selected_city` 补查 - 自定义渠道可能会以动态字段名直接出现在 `data` 下