Dealers

List dealers

get

List a collection of dealers.

Authorizations
Responses
200
OK
application/json
get
GET /api/dealers HTTP/1.1
Host: hostname:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "count": 100,
  "items": [
    {
      "id": "NzAwNTUxOTA5NzczMTQ4MTYw",
      "enabled": true,
      "level": "DISTRIBUTOR",
      "name": "text",
      "email": "[email protected]",
      "display_name": "text",
      "website": "text",
      "phone": "text",
      "address": "text",
      "description": "text",
      "max_tenants": 100,
      "max_extensions": 50000,
      "tenant_full_access": true
    }
  ]
}

Create a dealer

post

Create a dealer.

Authorizations
Body
enabledbooleanOptional

Enable this dealer or not.

Default: true
levelstring · enumRequired

Dealer level includes:

  • DISTRIBUTOR: the first level of dealers.
  • SUB_DISTRIBUTOR: the second level of dealers.
  • RESELLER: the third level of dealers.
Possible values:
namestring · min: 1 · max: 64Required

The user's account name.
Only letters, numbers, and the following special characters can be added: underscore, dash, single quote, and period (_, -, ', and .).
Username cannot start or end with period (.).
admin, system, administrator, and root are reserved names for system admin only with case ignored.

passwordstringRequired

The password of dealer.

emailall ofOptional

The email address of user.

string · max: 128Optional

The email address.

Example: [email protected]
display_namestring · max: 1024Optional

The display name of user.

websitestringOptional

The website of user.

phonestring · max: 32Optional

The mobile phone number of user.

addressstring · max: 128Optional

The address.

descriptionstringOptional

The description of dealer.

max_tenantsinteger · int32Required

The maximum number of tenants that the dealer is allowed to create.

Default: 100
max_extensionsinteger · int32Required

The maximum number of extensions that the dealer is allowed to create.

Default: 50000
tenant_full_accessbooleanOptional

Whether or not the reseller is allowed to have full control over the tenant.
This attribute is not valid if not modified by first level dealer.

Default: true
Responses
201
Success
application/json
post
POST /api/dealers HTTP/1.1
Host: hostname:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 259

{
  "enabled": true,
  "level": "DISTRIBUTOR",
  "name": "text",
  "password": "text",
  "email": "[email protected]",
  "display_name": "text",
  "website": "text",
  "phone": "text",
  "address": "text",
  "description": "text",
  "max_tenants": 100,
  "max_extensions": 50000,
  "tenant_full_access": true
}
{
  "id": "NzAwNTUxOTA5NzczMTQ4MTYw"
}

Retrieve a dealer

get

Get details of the dealer by it's unique ID.

Authorizations
Path parameters
idall ofRequired

The unique ID of dealer.

stringOptional

The unique ID of the resource.

Example: NzAwNTUxOTA5NzczMTQ4MTYw
Responses
200
OK
application/json
get
GET /api/dealers/{id} HTTP/1.1
Host: hostname:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "NzAwNTUxOTA5NzczMTQ4MTYw",
  "enabled": true,
  "level": "DISTRIBUTOR",
  "name": "text",
  "email": "[email protected]",
  "display_name": "text",
  "website": "text",
  "phone": "text",
  "address": "text",
  "description": "text",
  "max_tenants": 100,
  "max_extensions": 50000,
  "tenant_full_access": true
}

Update a dealer

post

Modify the settings of the dealer.

Authorizations
Path parameters
idall ofRequired

The unique ID of dealer.

stringOptional

The unique ID of the resource.

Example: NzAwNTUxOTA5NzczMTQ4MTYw
Body
enabledbooleanOptional

Enable this dealer or not.

Default: true
emailall ofOptional

The email address of user.

string · max: 128Optional

The email address.

Example: [email protected]
display_namestring · max: 1024Optional

The display name of user.

websitestringOptional

The website of user.

phonestring · max: 32Optional

The mobile phone number of user.

addressstring · max: 128Optional

The address.

descriptionstringOptional

The description of dealer.

max_tenantsinteger · int32Optional

The maximum number of tenants that the dealer is allowed to create.

Default: 100
max_extensionsinteger · int32Optional

The maximum number of extensions that the dealer is allowed to create.

Default: 50000
tenant_full_accessbooleanOptional

Whether or not the reseller is allowed to have full control over the tenant.
This attribute is not valid if not modified by first level dealer.

Default: true
Responses
200
OK
post
POST /api/dealers/{id} HTTP/1.1
Host: hostname:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 205

{
  "enabled": true,
  "email": "[email protected]",
  "display_name": "text",
  "website": "text",
  "phone": "text",
  "address": "text",
  "description": "text",
  "max_tenants": 100,
  "max_extensions": 50000,
  "tenant_full_access": true
}

No content