put https://api.coohom.com/global/i18n-user/role
Upgrade or downgrade Coohom API-C User Roles
ATTENTION:The value of the parameter ”active” is not equal to the “upgrade” or “downgrade” action. The “upgrade” or “downgrade” action is determined by the relationship between the current role and the target role.
About the “downgrade” action:
- The “downgrade” action will be executed immediately after the current role expires.
- Status “To downgrade”: there’s a “downgrade” action to be executed when the current role expires.
active: true
No. | Current Role | Status | Target Role | Action |
---|---|---|---|---|
1 | Basic | Normal | Pro | Upgrade immediately |
2 | Pro | Normal | Pro | Invalid call {"c" : "Invalid Role Update"; "m" : "you have already activated target role!"} |
3 | Pro | To downgrade | Pro | Cancel the downgrading action. The current role will continue. |
4 | Premium | Normal | Pro | When the current role expires, it will downgrade to “Basic” first, then upgrade to “Pro” 8 hours later. ATTENTION: DO NOT call this API during the 8 hours! |
5 | Premium | To downgrade | Pro | Invalid call, please call this API after the downgrading action is done. {"c" : "Illegal Operation"; "m" : "you cannot change to another role when you are downgrading"} |
6 | Basic | Normal | Premium | Upgrade immediately |
7 | Pro | Normal | Premium | Upgrade immediately, the purchase time and next-update time will be replaced according to current time |
8 | Pro | To downgrade | Premium | Invalid call, please call this API after the downgrading action is done. {"c" : "Illegal Operation"; "m" : "you cannot change to another role when you are downgrading"} |
9 | Premium | Normal | Premium | Invalid call {"c" : "Invalid Role Update"; "m" : "you have already activated target role!"} |
10 | Premium | To downgrade | Premium | Cancel the degrading action. The current role will continue. |
active:false
Only valid in the following cases:
No. | Current Role | Status | Target Role | Action |
---|---|---|---|---|
1 | Pro | Normal | Pro | Downgrade to “Basic” after the current role expires. |
2 | Premium | Normal | Premium | Downgrade to “Basic” after the current role expires. |
3 | Basic | Not Applicable | not applicable | {"c" : "Invalid Deactive"; "m" : "Attempting to deactive invalid role"} |
4 | Pro | Normal | Premium | {"c" : "Invalid Deactive"; "m" : "Attempting to deactive invalid role"} |
5 | Premium | Normal | Pro | {"c" : "Invalid Deactive"; "m" : "Attempting to deactive invalid role"} |
6 | Pro/Premium | Downgrading | Any | {"c" : "Invalid Deactive"; "m": "Attempting to deactive in downgrading status"} |