Activate QR Code API

Last edited on 2025-07-09

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

ParameterTypeRequiredDescription
access_tokenstringYesAPI call credential, you can use access_token, authorizer_access_token

Request Body Request Payload

ParameterTypeRequiredDescription
application_idnumberYesApplication Order Number
activity_namestringYesActivity Name. Used for distinguishing activities in data analysis. Please name it properly.
product_brandstringYesProduct Brand. Used for distinguishing brands in data analysis. Please name it properly.
product_titlestringYesProduct Title. Used for distinguishing products in data analysis. Please name it properly.
product_codestringYesProduct Barcode. EAN product barcode. Please fill it in correctly.
wxa_appidstringYesAppID of Mini Program. The AppID of Mini Program that users are redirected to after scanning.
wxa_pathstringYesPath of Mini Program. The path of Mini Program that users are redirected to after scanning.
wxa_typenumberNoVersion of Mini Program. Defaults to 0 (Release Version), 1 (Development Version), and 2 (Trial Version).
code_startnumberYesStart position of the activated code range. For example, 0 (inclusive).
code_endnumberYesEnd position of the activated code range. For example, 9999 (inclusive).

3. Response Parameters

Response Body Response Payload

ParameterTypeDescription
errcodenumberStatus Code returned. 0
errmsgstringError 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 CodeError DescriptionSolution
40001invalid credential  access_token isinvalid or not latestaccess_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.