Product permission groups

Use these methods to manage product permission groups.

A permission group includes a set of permissions that can be assigned to products.

GET[host]/api/v2/products/permissions

Get a list of permission groups

GET[host]/api/v2/products/permissions/{permissionId}

Get permission group details

POST[host]/api/v2/products/permissions

Create a permission group

PATCH[host]/api/v2/products/permissions/{permissionId}

Update a permission group

DELETE[host]/api/v2/products/permissions/{permissionId}

Delete a permission group

Get a list of permission groups

Use this method to obtain a list of product permission groups configured in the Back Office.

Request

Header parameters:

  • Authorization: Bearer <token>

Query parameters:

The following filter parameter is available for this method:

name

The name of a permission group.

The following sorting parameter is available for this method:

createTime

The date and time when a permission group was created.

Refer to the Query parameters section in the API Overview for details on applying filter and sorting parameters.

GET[host]/api/v2/products/permissions

curl --location -g 'https://host.name/api/v2/products/permissions?limit=10&offset=0&sort_by=createTime&filter[name]=Name' \
--header 'Authorization: Bearer <token>' \
--header 'accept-language: ja'

Response

A response contains an array of Product Permission Group objects providing information about the permission groups matching the request parameters.


Get permission group details

Use this method to obtain detailed information about a specific product permission group.

Request

Header parameters:

  • Authorization: Bearer <token>

Path parameters:

permissionId required

The identifier of a permission group.

GET[host]/api/v2/products/permissions/{permissionId}

curl --location 'https://host.name/api/v2/products/permissions/1' \
--header 'Authorization: Bearer <token>'

Response

A response contains a Product Permission Group object providing information about the specified permission group.


Create a permission group

Use this method to configure a new product permission group.

Request

Header parameters:

  • Authorization: Bearer <token>

Body:

Specify the following parameters for a permission group:

name string required

The name of a permission group.

isEnabled boolean

If true, a permission group is enabled; otherwise, false.

rights array

An array of string values specifying the permissions included in a group. Possible values:

  • enabled

  • tradeEnabled

  • deposit

  • withdraw

  • visible

  • transferDeposit

  • transferWithdraw

  • exchange

  • createFromTRDenied

resource object

An array of resource objects specifying localized strings for user interface pages displayed to a client.

POST[host]/api/v2/products/permissions

curl --location --request POST 'https://host.name/api/v2/products/permissions' \
--header 'Authorization: Bearer <token>' \
--data '{
  "name": "Name",
  "isEnabled": true,
  "rights": [
    "transferDeposit",
    "transferWithdrawal"
  ],
  "resources": [
    {
      "key": "caption",
      "locale": "en_US",
      "value": "value
    },
    {
      "key": "caption",
      "locale": "ja_JP",
      "value": "value"
    }
  ]
}'

Response

A response contains a Product Permission Group objects providing information about the created permission group.


Update a permission group

Use this method to update a specified product permission group.

Request

Header parameters:

  • Authorization: Bearer <token>

Path parameters:

permissionId required

The identifier of a permission group.

Body:

The following field values can be updated for a permission group:

name string

The name of a permission group.

isEnabled boolean

If true, a permission group is enabled; otherwise, false.

rights array

An array of string values specifying the permissions included in a permission group. Possible values:

  • enabled

  • tradeEnabled

  • deposit

  • withdraw

  • visible

  • transferDeposit

  • transferWithdraw

  • exchange

  • createFromTRDenied

resource object

An array of resource objects specifying localized strings for user interface pages displayed to a client.

PATCH[host]/api/v2/products/permissions/{permissionId}

curl --location --request PATCH 'https://host.name/api/v2/products/permissions/1' \
--header 'Authorization: Bearer <token>' \
--data '{
  "name": "Name",
  "isEnabled": true,
  "rights": [
    "transferDeposit",
    "transferWithdrawal"
  ],
  "resources": [
    {
      "key": "caption",
      "locale": "en_US",
      "value": "value
    },
    {
      "key": "caption",
      "locale": "ja_JP",
      "value": "value"
    }
  ]
}'

Response

A response contains a Product Permission Group object providing information about the permissions group that was updated.


Delete a permission group

Use this method to remove a specified product permission group.

Request

Header parameters:

  • Authorization: Bearer <token>

Path parameters:

permissionId required

The identifier of a permission group.

DELETE[host]/api/v2/products/permissions/{permissionId}

curl --location --request DELETE 'https://host.name/api/v2/products/permissions/1' \
--header 'Authorization: Bearer <token>'

Response

In case of success, no response body is returned.