Create a Reseller's Manager

The Create a Reseller's Manager method is used for creating a Manager for 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.

Only Managers with the System administrator role can create new a Manager (see Managers' roles).

POST {base_url}/api/v3/resellers/{reseller_id}/managers

Arguments

Name

Parameter Type

Data type

Required/ Optional

Description

X-Api-TokenheaderstringRequiredAPI token of the Manager that performs the operation (see Viewing and updating manager's information)
Content-TypeheaderstringRequiredIndicates the media type (text/html or text/JSON) of the request that is sent to the server by the client (browser)
AcceptheaderstringRequiredInformation about data types that the client (browser) supports
reseller_idpathintegerRequiredID of the current Reseller or any of its downstream Resellers (see Viewing and updating reseller general information)
dataformobjectRequiredInformation about the attributes of the operation

attributesformobjectRequiredAttributes of the operation


nameformstringRequiredManager's name


emailformstringRequiredManager's email which will be used as a login to the Operator Control Panel


roleformstringRequiredManager's role (for the list of roles, see Managers' roles)


passwordformstringRequiredManager's password which will be used for signing in to the Operator Control Panel


phoneformstringOptional

Manager's phone number:

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


manager_keyformstringOptionalUnique Manager's key


custom_attributesformobjectOptional

Manager's Attributes (see Managing attributes)




dataformarrayOptionalInformation about a Manager's Attribute




keyformstringDepends on the attributeManager's Attribute key




valueformstringDepends on the attribute

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 information about the created Manager (see Get the Reseller's Manager by ID).

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

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",
            "role": "admin",
            "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",
            "role": "admin",
            "phone": "+375290000000",
            "photo": null,
            "custom_attributes": {
                "test": "1"
            }
        }
    }
}