Dealers

Retrieve dealer information the tenant belongs

Get the dealer to which the tenant belongs.

GEThttp://127.0.0.1:8888/api/tenants/{id}/dealers
Path parameters
id*all of

The unique ID of tenant.

Response

OK

Body
idall of

The unique ID of dealer.

enabledboolean

Enable this dealer or not.

levelenum

Dealer level includes:

  • DISTRIBUTOR: the first level of dealers.
  • SUB_DISTRIBUTOR: the second level of dealers.
  • RESELLER: the third level of dealers.
DISTRIBUTORSUB_DISTRIBUTORRESELLER
namestring

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.

display_namestring

The display name of user.

Request
const response = await fetch('http://127.0.0.1:8888/api/tenants/{id}/dealers', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "id": {},
  "enabled": true,
  "level": "DISTRIBUTOR",
  "name": "text",
  "display_name": "text"
}

Designate tenant to dealer

Designate tenant to dealer.

POSThttp://127.0.0.1:8888/api/tenants/{id}/dealers/{dealer_id}
Path parameters
id*all of

The unique ID of tenant.

dealer_id*all of

The unique ID of dealer.

Body
dealer_id*all of

The unique ID of dealer.

Response

Created

Body
idall of

The unique ID of tenant.

Request
const response = await fetch('http://127.0.0.1:8888/api/tenants/{id}/dealers/{dealer_id}', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "dealer_id": {}
    }),
});
const data = await response.json();
Response
{
  "id": {}
}