User Roles
Manage User Roles
Last updated
Manage User Roles
Last updated
GET
‎https://<domain>/<api prefix>/<version>/user/get/roles/
This API endpoint will give you the user roles details.
Name | Type | Description |
---|---|---|
Node
PHP
POST
‎https://<domain>/<api prefix>/<version>/upgrade/user-role/
This API endpooint will upgrade a user role from customer to preferred customer or to member.
Node
PHP
POST
‎https://<domain>/<api prefix>/<version>/downgrade/user-role/
This API endpoint will downgrade a user role from member to preferred customer or to customer.
Node
PHP
Error Responses
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
apikey*
string
apikey
Authorization*
string
Bearer access-token
apikey*
string
apikey
Authorization*
string
Bearer access token
unique_id*
string
User unique id.
upgrade_to*
string
Upgrade options, possible values are: Member - Upgrade user role from customer to member. Preferred Customer - Upgrade user role from customer to preferred customer.
api_place_genealogy
string
api_place_genealogy is required when upgrading the role from customer to preferred customer. Possible values are: True - Place the user in genealogy when upgrading to preferred customer False - Do not place the user in genealogy.
Status Code
Error Type
Field
Description
400
Validation Error
unique_id
This field is required and its may not be blank.
User not exist or invalid unique id.
Ensure this field has no more than 255 characters.
400
Validation Error
upgrade_to
This field is required and its may not be blank.
Invalid upgrade option, Choose a valid one.
400
Validation Erorr
api_place_genealogy
This field is required and its may not be blank.
Choose a valid option.
403
Request Failed
User role is already upgraded.
User already have a member role.
User already have a preferred customer role.
Free user place genealogy disabled, can't upgrade user role.
Free package for user role upgrade is not created.
User role upgrade option not found.
Created free package is not a customer privilaged package.
Created free package is not a member privilaged package.
apikey*
string
apikey
Authorization*
string
Bearer access token
unique_id*
string
user unique id
downgrade_to*
string
Downgrade options, possible values are: Customer - Downgrade user role from member to customer. Preferred Customer - Downgrade user role from member to preferred customer
api_block_user*
string
Block the user with role downgrade, Possible values are: True - Block user account. False - Do not block.
Status Code
Error Type
Field
Description
400
Validation Error
unique_id
This field is required and its may not be blank.
User not exist or invalid unique id.
Ensure this field has no more than 255 characters.
400
Validation Error
downgrade_to
This field is required and its may not be blank.
Invalid downgrade option, Choose a valid one.
400
Validation Erorr
api_block_user
Choose a valid option.
403
Request Failed
User already have a downgraded role.
User already have a customer role.
User already have a preferred customer role.
Somthing went wrong.