Update a Reseller's Manager
The Update a Reseller's Manager method is used for updating information about a Manager of the current Reseller or any of its downstream Resellers.
Access to the current Reseller and downstream Resellers is determined by the Manager's token in the API request.
Updating information is available as follows:
- For Managers with the System administrator role (see Managers' roles) — about any Manager.
- For Managers with other roles — only about the Manager whose token is specified in the API request.
PATCH {base_url}/api/v3/resellers/{reseller_id}/managers/{manager_id}
Arguments
Name | Parameter Type | Data type | Required/ Optional | Description | |||||
---|---|---|---|---|---|---|---|---|---|
X-Api-Token | header | string | Required | API token of the Manager that performs the operation (see Viewing and updating manager's information) | |||||
Content-Type | header | string | Required | Indicates the media type (text/html or text/JSON) of the request that is sent to the server by the client (browser) | |||||
Accept | header | string | Required | Information about data types that the client (browser) supports | |||||
reseller_id | path | integer | Required | ID of the current Reseller or any of its downstream Resellers (see Viewing and updating reseller general information) | |||||
manager_id | path | integer | Required | ID of the Manager | |||||
data | form | object | Required | Information about the attributes of the operation | |||||
attributes | form | object | Required | Attributes of the operation | |||||
name | form | string | Optional | Manager's name | |||||
status | form | string | Optional | Status of the Manager:
| |||||
role | form | string | Optional | Manager's role (for the list of roles, see Managers' roles) Updating the role parameter is available only using the token of a Manager with the System administrator role. | |||||
password | form | string | Optional | Manager's password which will be used for signing in to the Operator Control Panel | |||||
phone | form | string | Optional | Manager's phone number:
| |||||
manager_key | form | string | Optional | Unique Manager's key | |||||
custom_attributes | form | object | Optional | Manager's Attributes (see Managing attributes) | |||||
data | form | array | Optional | Information about a Manager's Attribute | |||||
key | form | string | Optional | Manager's Attribute key | |||||
value | form | string | Optional | 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 updated information about the Manager (see Get the Reseller's Manager by ID).
All validation errors for the specified Manager attributes are displayed similar to the Operator Control Panel (see Adding a manager in ActivePlatform. Operator Control Panel).
Request example
PATCH /api/v3/resellers/1/managers/483
Host: test.activeplatform.com
Content-Type: application/vnd.api+json
X-Api-Token: vY5fwetestK3gJXZH5uHCw
Accept: application/vnd.api+json
{
"data": {
"attributes": {
"status": "inactive"
}
}
}
Response example
{
"data": {
"id": "483",
"type": "managers",
"attributes": {
"created_at": "2020-11-16T12:27:49.922+03:00",
"updated_at": "2020-11-16T17:38:03.779+03:00",
"reseller_id": 1,
"name": "Rudy McLaughlin",
"status": "inactive",
"email": "terry@example.net",
"role": "admin",
"phone": "+375290000000",
"photo": null,
"custom_attributes": {
"test": "1"
}
}
}
}