The Create manager method is used for creating a manager for the current reseller or any of its downstream resellers.
POST {base_url}/api/v3/resellers/{reseller_id}/managers
Arguments
|
Name |
Parameter Type |
Data type |
Required/ Optional |
Description |
|||||
|---|---|---|---|---|---|---|---|---|---|
|
X-Api-Token |
header |
string |
Required |
API token of a manager that performs the operation (see
) |
|||||
|
Content-Type |
header |
string |
Required |
Media type of the request. Specify the following: application/vnd.api+json |
|||||
|
Accept |
header |
string |
Required |
Supported media types of the answer. Specify the following: application/vnd.api+json |
|||||
|
base_url |
path |
string |
Required |
ActivePlatform URL |
|||||
|
reseller_id |
path |
integer |
Required |
ID of the current reseller or any of its downstream resellers (see
) |
|||||
|
data |
form |
object |
Required |
Information about the attributes of the operation |
|||||
|
|
attributes |
form |
object |
Required |
Attributes of the operation |
||||
|
|
|
name |
form |
string |
Required |
Manager's name |
|||
|
|
|
|
form |
string |
Required |
Manager's email which will be used as a login to the Operator Control Panel |
|||
|
|
|
admin |
form |
bool |
Optional |
The administrator indicator:
|
|||
|
|
|
manager_role_id |
form |
integer |
Optional |
The manager role ID (see and Get list of roles). Ignored if |
|||
|
|
|
password |
form |
string |
Required |
Manager's password which will be used for signing in to the Operator Control Panel. The password requirements see in
|
|||
|
|
|
phone |
form |
string |
Optional |
Manager's phone number:
|
|||
|
|
|
manager_key |
form |
string |
Optional |
Unique manager's key |
|||
|
|
|
custom_attributes |
form |
object |
Optional |
||||
|
|
|
|
data |
form |
array |
Optional |
Information about a manager's attribute |
||
|
|
|
|
|
key |
form |
string |
Depends on the attribute |
Manager's attribute key |
|
|
|
|
|
|
value |
form |
string |
Depends on the attribute |
Manager's attribute value. Depending on the value type, the value is specified in the following formats:
|
|
Response model
If no errors are encountered, the method returns data as the information about the created manager (see Get manager).
All validation errors for the manager attributes are displayed similar to the Operator Control Panel (see in ).
Request example
POST /api/v3/resellers/1/managers
Host: test.activeplatform.com
Content-Type: application/vnd.api+json
X-Api-Token: vY5fwetestK3gJXZH5uHCw
Accept: application/vnd.api+json
{
"data": {
"attributes": {
"name": "Angelica Johnson",
"email": "nigel65@example.org",
"admin": true,
"password": "qwerty",
"phone": "+375290000000",
"custom_attributes": {
"data": [
{
"key": "test",
"value": "1"
}
]
}
}
}
}
Response example
{
"data": {
"id": "317",
"type": "managers",
"attributes": {
"created_at": "2020-12-09T08:17:47.773+03:00",
"updated_at": "2020-12-09T08:17:47.776+03:00",
"reseller_id": 1,
"name": "Angelica Johnson",
"status": "active",
"email": "nigel65@example.org",
"manager_role": {
"id": null,
"name": null
},
"phone": "+375290000000",
"photo": null,
"manager_key": "",
"mfa_required": true,
"custom_attributes": {
"test": "1"
}
}
}
}