# 查询二维码激活状态接口
接口应在服务器端调用,不可在前端(小程序、网页、APP等)直接调用,具体可参考接口调用指南
接口英文名:intp_marketcode_codeactivequery
查询二维码激活状态及关联信息
# 1. 调用方式
# HTTPS 调用
POST https://api.weixin.qq.com/intp/marketcode/codeactivequery?access_token=ACCESS_TOKEN
# 云调用
- 本接口不支持云调用
# 第三方调用
本接口支持第三方平台代商家调用。
该接口所属的权限集 id 为:46
服务商获得其中之一权限集授权后,可通过使用 authorizer_access_token 代商家进行调用,具体可查看 第三方调用 说明文档。
# 2. 请求参数
# 查询参数 Query String parameters
参数名 | 类型 | 必填 | 说明 |
---|---|---|---|
access_token | string | 是 | 接口调用凭证,可使用 access_token、authorizer_access_token |
# 请求体 Request Payload
参数名 | 类型 | 必填 | 说明 |
---|---|---|---|
application_id | number | 否 | 申请单号 |
code_index | number | 否 | 该码在批次中的偏移量,传入application_id时必填 |
code_url | string | 否 | 28位普通码字符,code与code_url二选一 |
code | string | 否 | 九位的字符串原始码,code与code_url二选一 |
# 3. 返回参数
# 返回体 Response Payload
参数名 | 类型 | 说明 |
---|---|---|
errcode | number | 返回状态码,0 |
errmsg | string | 错误提示,返回信息,如errcode不为0,则errmsg为错误信,,errcode为0时返回下列字段 |
code | string | 原始码,返回原始码数据,并返回对应的激活信息 |
application_id | number | 申请单号 |
isv_application_id | string | 外部单号 |
activity_name | string | 活动名称 |
product_brand | string | 商品品牌 |
product_title | string | 商品标题 |
wxa_appid | string | 小程序的appid |
wxa_path | string | 小程序的path |
wxa_type | number | 小程序版本 |
code_start | number | 激活码段的起始位,如0(包含该值) |
code_end | number | 激活码段的结束位,如9999(包含该值) |
# 4. 注意事项
支持通过application_id+code_index或code/URL两种查询方式
# 5. 代码示例
请求示例
{
"code_url":"P.URL.CN/0U.JYJXP3HJI2C98A9O"
}
返回示例
{
"errcode": 0,
"errmsg": "ok",
"code": "8",
"code_start": 0,
"code_end": 200,
"activity_name": "test_name",
"product_brand": "test_brand",
"product_title": "test_title",
"product_code": "test_code",
"wxa_appid": "test_appid",
"wxa_path": "test_path"
"application_id":581865877,
"isv_application_id":"test_id"
}
# 6. 错误码
以下是本接口的错误码列表,其他错误码可参考 通用错误码
错误码 | 错误描述 | 解决方案 |
---|---|---|
40001 | invalid credential access_token isinvalid or not latest | access_token 无效或不为最新获取的 access_token,请开发者确认access_token的有效性 |
# 7. 适用范围
本接口支持「服务号(需申请)」账号类型调用。其他账号类型如无特殊说明,均不可调用。