# 增加运费模版

# 接口调用请求说明

POST https://api.weixin.qq.com/channels/ec/merchant/addfreighttemplate?access_token=ACCESS_TOKEN

# 请求参数示例

{
    "freight_template": {
        "name": "测试api",
        "valuation_type": "PIECE",
        "send_time": "SendTime_FOUR_HOUR",
        "address_info": {
            "user_name": "",
            "postal_code": "12345",
            "province_name": "广东省",
            "city_name": "广州市",
            "county_name": "海珠区",
            "detail_info": "新港中路",
            "national_code": "23456",
            "tel_number": "12345"
        },
        "delivery_type": "EXPRESS",
        "shipping_method": "FREE",
        "is_default": false
    }
}

# 请求参数说明

# freight_template

字段名 类型 是否必填 说明
freight_template object FreightTemplate 运费模板

# 回包示例

{
    "errcode": 0,
    "errmsg": "ok",
    "template_id": "123123"
}

# 回包参数说明

字段名 类型 是否必填 说明
errcode Number 错误码
errmsg String 错误信息
template_id String 运费模板id

# 错误码

错误码 错误信息
10021053 非法的默认运费模板规则,默认运费模板不可以指定地址
10021054 非法的省市区信息
10021200 请检查模板名是否已存在|
10021055 运费模板必须包含默认规则