系统-自定义税费-国家税费-保存

税费 - 设置自定义税费方案的国家税率

接口信息

  • 接口地址: {your-site-url}/api/skill/tax/save-custom-tax-country-taxs
  • 基础 URL: {your-site-url} 需替换为你自己的独立站 URL 地址,如 https://your-domain.com/apimanager666
  • 请求方式: POST
  • Content-Type: application/json
  • 说明: 此接口用于为自定义税费方案一次性设置多个国家/地区的税率配置,包括默认税率和省/州级别税率

认证

请求头中需要携带 skill-access-token

Header
skill-access-token {your-skill-access-token} (请替换为你自己的 token)

请求参数 (JSON Body)

字段 类型 必填 说明
tax_custom_id string/int ✅ 必填 自定义税费方案 ID
country_taxs Array[Object] ✅ 必填 国家/省税率配置数组
country_taxs[].type int ✅ 必填 类型。1 = 国家默认税率,2 = 省/州税率
country_taxs[].country_code string ✅ 必填 国家简码,从 得到国家和省列表 获取
country_taxs[].state_code string 省/州简码。type=1 时传空字符串 ""type=2 时填写省/州简码
country_taxs[].tax float/string ✅ 必填 税率值
country_taxs[].id string 已有记录 ID。新建时传空字符串 "",更新已有记录时传对应 ID

请求示例

cURL

curl --location --request POST '{your-site-url}/api/skill/tax/save-custom-country-tax' \
--header 'skill-access-token: {your-skill-access-token}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "tax_custom_id": "20",
    "country_taxs": [
        {"id": "", "type": 1, "country_code": "GB", "state_code": "", "tax": "2.6"},
        {"id": "", "type": 1, "country_code": "US", "state_code": "", "tax": "2.9"},
        {"id": "", "type": 2, "country_code": "US", "state_code": "AS", "tax": 2.34},
        {"id": "", "type": 2, "country_code": "US", "state_code": "AZ", "tax": 2.34}
    ]
}'

返回结果

code200 表示调用成功;code 不为 200 表示调用失败。

成功响应

{
    "code": 200,
    "data": [],
    "message": "success"
}

返回字段说明

字段 类型 说明
code Number 状态码,200 表示成功
message String 执行结果的文字描述
data Array 返回数据,目前为空数组

注意事项

  1. tax_custom_idcountry_taxs 为必填
  2. type=1 表示国家默认税率,state_code 传空字符串。如果未对该国的省/州单独设置税率,将使用此默认税率
  3. type=2 表示省/州级别的独立税率,state_code 必填。省/州税率优先级高于国家默认税率
  4. id 新建时传空字符串 "";如需更新已有税率记录,传对应的记录 ID(可从税率详情 API 获取)
  5. 国家简码和省份简码从 得到国家和省列表 获取
Copyright © fecify.com 2025 all right reserved,powered by Gitbook该文件修订时间: 2026-06-01 16:05:33

results matching ""

    No results matching ""