This API should be called on the server side and cannot be called directly on the client side (Mini Program, web page, APP, etc.). For details, please refer to API Call Guide.
API English Name: intp_marketcode_codeactive
Activate QR codes within a specified range for actual marketing campaigns.
1. Call Method
HTTPS Call
POST https://api.weixin.qq.com/intp/marketcode/codeactive?access_token=ACCESS_TOKEN
Cloud Call
- This API does not support cloud call.
Third-party Call
-
This API supports third-party platforms on behalf of Merchant call.
-
The permission set ID of this API is: 46
-
After the service provider obtains one of the permission set authorizations, it can use authorizer_access_token to call on behalf of Merchant, for details please refer to Third-party Call documentation.
2. Request Parameters
Query Parameters Query String Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| access_token | string | Yes | API call credential, you can use access_token, authorizer_access_token |
Request Body Request Payload
| Parameter | Type | Required | Description |
|---|---|---|---|
| application_id | number | Yes | Application Order Number |
| activity_name | string | Yes | Activity Name. Used for distinguishing activities in data analysis. Please name it properly. |
| product_brand | string | Yes | Product Brand. Used for distinguishing brands in data analysis. Please name it properly. |
| product_title | string | Yes | Product Title. Used for distinguishing products in data analysis. Please name it properly. |
| product_code | string | Yes | Product Barcode. EAN product barcode. Please fill it in correctly. |
| wxa_appid | string | Yes | AppID of Mini Program. The AppID of Mini Program that users are redirected to after scanning. |
| wxa_path | string | Yes | Path of Mini Program. The path of Mini Program that users are redirected to after scanning. |
| wxa_type | number | No | Version of Mini Program. Defaults to 0 (Release Version), 1 (Development Version), and 2 (Trial Version). |
| code_start | number | Yes | Start position of the activated code range. For example, 0 (inclusive). |
| code_end | number | Yes | End position of the activated code range. For example, 9999 (inclusive). |
3. Response Parameters
Response Body Response Payload
| Parameter | Type | Description |
|---|---|---|
| errcode | number | Status Code returned. 0 |
| errmsg | string | Error message. Returned information. If errcode is not 0, errmsg contains the error details. |
4. Notes
No special notes for this API
5. Code Example
Request Example
{
"application_id":581865877,
"code_start":0,
"code_end":200,
"activity_name":"test_name",
"product_brand":"test_brand",
"product_title":"test_title",
"product_code":"test_code",
"wxa_appid":"wx3sxjifjwojfsffef",
"wxa_path":"pages/index/index"
}
Response Example
{
"errcode":0,
"errmsg":"ok"
}
6. Error Codes
The following is the error code list of this API, other error codes can refer to Common Error Codes; When encountering errors in calling the API, you can use the official API Diagnostic Tool to assist in locating and analyzing problems.
| Error Code | Error Description | Solution |
|---|---|---|
| 40001 | invalid credential access_token isinvalid or not latest | access_token is invalid or not the latest one obtained. Developers should verify the validity of the access_token. |
7. Applicable Scope
This API supports 「Service Account (Need Apply)」 account type calls. Other account types cannot call unless otherwise specified.