# Management Role Interface
Promotion roles are internal classifications of promoters (e.g. different levels of leads) and are used to help merchants fine-tune their management (e. g. viewing data by role, group messaging, etc.). The platform provides a default role, "Promoter," and merchants can add other roles as needed.
# I. Adding new roles
# Interface Dxplaination
A single merchant has up to 100 promotional roles.
# Request address
POST https://api.weixin.qq.com/promoter/addrole?access_token=ACCESS_TOKEN
# Request parameters
Note: All character strings in this document are string.length (), the string to utf8 encoding, a Chinese character length of 3
parameter | type | Is it compulsory? | Introductions |
---|---|---|---|
name | string | yes | Role name, no more than 50 characters in length |
desc | string | no | Character description, no more than 200 characters long |
# Example Requests
{
"name": "xxxxx",
"desc": "xxxxx"
}
# Return value
attribute | type | Introductions |
---|---|---|
role_id | uint32 | Roleid |
name | string | Character Name |
desc | string | Character Description |
errcode | int32 | Error code |
errmsg | string | Error message |
# Return data example
{
"role_id": 2,
"name": "xxxxx",
"desc": "xxxxx",
"errcode": 0,
"errmsg": ok"
}
# II. Inquiry Roles
# Request address
POST https://api.weixin.qq.com/promoter/getrole?access_token=ACCESS_TOKEN
# Request parameters
Note: All character strings in this document are string.length (), the string to utf8 encoding, a Chinese character length of 3
parameter | type | Is it compulsory? | Introductions |
---|---|---|---|
role_id | uint32 | no | Roleid |
# Example Requests
{
"role_id": 1
}
# Return value
attribute | type | Introductions |
---|---|---|
role_id | uint32 | Roleid |
name | string | Character Name |
desc | string | Character Description |
total_cnt | uint32 | Total number of characters |
errcode | int32 | Error code |
errmsg | string | Error message |
# Return data example
{
"role_list":
[
{
"role_id": 1,
"name": "xxxxx",
"desc": "xxxxx"
},
{
"role_id": 2,
"name": "xxxxx",
"desc": "xxxxx"
}
],
"total_cnt": 2,
"errcode": 0,
"errmsg": "OK"
}
# III. Modifying Roles
# Request address
POST https://api.weixin.qq.com/promoter/updaterole?access_token=ACCESS_TOKEN
# Request parameters
Note: All character strings in this document are string.length (), the string to utf8 encoding, a Chinese character length of 3
parameter | type | Is it compulsory? | Introductions |
---|---|---|---|
role_id | uint32 | yes | Roleid |
name | string | Both name and desc are required | Role name, no more than 50 characters in length |
desc | string | Both name and desc are required | Character description, no more than 200 characters long |
Note: "Promoter" is the default role and cannot be changed. A change returns 10301 (parameter error). If the same character name already exists in the library, a return of 10 303 (repeated record) is made when you modify.
# Example Requests
{
"role_id": 1,
"name": "xxxxx",
"desc": "xxxxx"
}
# Return value
attribute | type | Introductions |
---|---|---|
errcode | int32 | Error code |
errmsg | string | Error message |
# Return data example
{
"errcode": 0,
"errmsg": "OK"
}