# 获取面单标准模板

接口应在服务器端调用,不可在前端(小程序、网页、APP等)直接调用,具体可参考接口调用指南

接口英文名:ewaybill_get_template_config

可通过该接口获取面单标准模板

# 1. 调用方式

# HTTPS 调用

POST https://api.weixin.qq.com/channels/ec/logistics/ewaybill/biz/template/config?access_token=ACCESS_TOKEN

# 云调用

  • 本接口不支持云调用

# 第三方调用

  • 本接口支持第三方平台代商家调用。

  • 该接口所属的权限集 id 为:130、159

  • 服务商获得其中之一权限集授权后,可通过使用 authorizer_access_token 代商家进行调用,具体可查看 第三方调用 说明文档。

# 2. 请求参数

# 查询参数 Query String parameters

参数名类型必填示例说明
access_tokenstringACCESS_TOKEN接口调用凭证,可使用 access_tokenauthorizer_access_token

# 请求体 Request Payload

# 3. 返回参数

# 返回体 Response Payload

参数名类型说明
errcodenumber错误码
errmsgstring错误信息
configobjarray所有快递公司模板信息汇总,delivery_id为快递公司id,template_type为模版类型

# Res.config(Array) Object Payload

所有快递公司模板信息汇总,delivery_id为快递公司id,template_type为模版类型

参数名类型说明
typestring模板类型 默认填 "single"
descstring模板描述 默认填 "一联单标准模板"
widthnumber面单宽度,(单位毫米)
heightnumber面单高度,(单位毫米)
urlstring标准模板
custom_configobject自定义模板配置

# Res.config(Array).custom_config Object Payload

自定义模板配置

参数名类型说明
widthnumber自定义区域宽度,(单位px, 10px = 1毫米)
heightnumber自定义区域高度,(单位px, 10px = 1毫米)
topnumber自定义区域到顶部距离,(单位px, 10px = 1毫米)
leftnumber自定义区域到左边距离,(单位px, 10px = 1毫米)

# 4. 注意事项

  • 调用接口时传空的json串即可;
  • 面单标准模板是由平台提供的统一的标准面单模板,全局通用。

# 5. 代码示例

请求示例

{
}

返回示例

{
	"errcode": 0,
	"errmsg": "ok",
    "config": {
        "YTO": {
            "single": {
                "type": "single",
                "desc": "一联单标准模板",
                "width": 76,
                "height": 130,
                "url": "https://res.wx.qq.com/shop/public/2023-10-23/f81ed53c-8c35-4ea7-b4ec-9ac8d283c9a5.html",
                "custom_config": {
                    "width": 656,
                    "height": 300,
                    "top": 900,
                    "left": 60
                }
            }
        },
        "ZTO": {
            "single": {
                "type": "single",
                "desc": "一联单标准模板",
                "width": 76,
                "height": 130,
                "url": "https://res.wx.qq.com/shop/public/2023-10-23/e500a351-d668-4851-97ff-79137f76cae0.html",
                "custom_config": {
                    "width": 656,
                    "height": 300,
                    "left": 60,
                    "top": 930
                }
            }
        },
        "YUNDA": {
            "single": {
                "type": "single",
                "desc": "一联单标准模板",
                "width": 76,
                "height": 130,
                "url": "https://res.wx.qq.com/shop/public/2023-10-23/29c184fa-5708-45e3-8332-426d9cd59d89.html",
                "custom_config": {
                    "width": 656,
                    "height": 340,
                    "left": 60,
                    "top": 884
                }
            }
        },
        "JTSD": {
            "single": {
                "type": "single",
                "desc": "一联单标准模板",
                "width": 76,
                "height": 130,
                "url": "https://res.wx.qq.com/shop/public/2023-10-23/53dbf069-f44d-44f3-9113-6cae2bd9d536.html",
                "custom_config": {
                    "width": 656,
                    "height": 300,
                    "top": 865,
                    "left": 60
                }
            }
        },
        "STO": {
            "single": {
                "type": "single",
                "desc": "一联单标准模板",
                "width": 76,
                "height": 130,
                "url": "https://res.wx.qq.com/shop/public/2023-10-23/baefa5e0-eeef-41e4-b513-12eee76f9975.html",
                "custom_config": {
                    "width": 712,
                    "height": 300,
                    "left": 24,
                    "top": 754
                }
            }
        }
    }
}

# 6. 错误码

此接口没有特殊错误码,可参考 通用错误码

# 7. 适用范围

本接口支持「微信小店」账号类型调用。其他账号类型如无特殊说明,均不可调用。