Update manager

The Update manager method is used for updating information about a manager of the current reseller or any of its downstream resellers.

XML
PATCH {{base_url}}/api/v3/resellers/{{reseller_id}}/managers/{{manager_id}}

Authentication

This endpoint requires a JWT access token. Specify the token in the Authorization header using the Bearer authentication scheme:

Authorization: Bearer <JWT_ACCESS_TOKEN>

In Postman, select Bearer Token on the Authorization tab and enter the JWT access token.

Arguments

Name

Parameter Type

Data type

Required/ Optional

Description

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 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:

  • active — access to the Operator Control Panel is allowed.

  • inactive — access to the Operator Control Panel is blocked.



admin

form

bool

Optional

The administrator indicator:

  • If you need to create an administrator at the root level, specify true.

  • Otherwise, not used. See manager_role_id



manager_role_id

form

string

Optional

The manager role ID (see Managers' roles and Get list of roles).

Ignored if admin = true



password

form

string

Optional

Manager's password which will be used for signing in to the Operator Control Panel. The password requirements see in Password settings



phone

form

string

Optional

Manager's phone number:

  • + < country code > < city code or network code > < phone number >.

  • 00 < country code > < city code or network code > < 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:

  • Checkbox:

    • 1 for true.

    • 0 for false.

  • Date: DD.MM.YYYY.

  • List: Key of the element.

Response model

If no errors are encountered, the method returns data as the updated information about the manager (see Get manager).

All validation errors for the specified manager attributes are displayed similar to the Operator Control Panel (see Adding a manager).

Request example

XML
PATCH /api/v3/resellers/1/managers/483
Host: test.activeplatform.com
Content-Type: application/vnd.api+json
Authorization: Bearer <JWT_ACCESS_TOKEN>
Accept: application/vnd.api+json
JSON
JSON
{
    "data": {
        "attributes": {
            "status": "inactive"            
        }
    }
}

Response example

JSON
{
    "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",
            "manager_role": {
                "id": null,
                "name": null
            },
            "phone": "+375290000000",
            "photo": null,
            "manager_key": "",
            "mfa_required": true,
            "custom_attributes": {
                "test": "1"
            }
        }
    }
}