Client folders

Use these methods to manage a folder tree that is predefined for all clients in the Back Office.

GET[host]/api/v2/folders

Get a list of folders

GET[host]/api/v2/folders/{folderId}

Get folder details

POST[host]/api/v2/folders

Add a new folder

POST[host]/api/v2/folders/{folderId}/addSubdirectory

Add a new subdirectory

PUT[host]/api/v2/folders/{folderId}

PATCH[host]/api/v2/folders/{folderId}

Update a folder

Use these methods to manage access permissions to folders for Back Office user groups.

GET[host]/api/v2/folders/{folderId}/groups/{folderId}

Get granted access permissions

PUT[host]/api/v2/folders/{folderId}/groups/{folderId}

PATCH[host]/api/v2/folders/{folderId}/groups/{folderId}

Update access permissions

Get a list of folders

Use this method to obtain a folder tree configured in the Back Office.

Request

Header parameters:

  • Authorization: Bearer <token>

GET[host]/api/v2/folders

curl --location --request GET 'https://host.name/api/v2/folders?limit=10&offset=0' \
--header 'Authorization: Bearer <token>' \
--header 'accept-language: ja'

Response

A response contains an array of Client Folder objects including information about the folder tree.


Get folder details

Use this method to obtain detailed information about a specific folder.

Request

Header parameters:

  • Authorization: Bearer <token>

Path parameters:

folderId required

The identifier of a folder.

GET[host]/api/v2/folders/{folderId}

curl --location --request GET 'https://host.name/api/v2/folders/1' \
--header 'Authorization: Bearer <token>' \
--header 'accept-language: ja'

Response

A response contains a Client Folder object including information about the specified folder.


Add a new folder

Use this method to add a new folder.

Request

Header parameters:

  • Authorization: Bearer <token>

Body:

Specify the following parameter for a folder:

name string required

The name of a folder.

POST[host]/api/v2/folders

curl --location --request POST 'https://host.name/api/v2/folders' \
--header 'Authorization: Bearer <token>' \
--header 'accept-language: ja' \
--data-raw '{
  "name": "Folder"
}'

Response

A response contains a Client Folder object including information about the folder that was created.


Add a new subdirectory

Use this method to add a new nested folder to a parent folder.

Request

Header parameters:

  • Authorization: Bearer <token>

Path parameters:

folderId required

The identifier of a parent folder.

Body:

Specify the following parameter for a nested folder:

name string required

The name of a nested folder.

POST[host]/api/v2/folders/{folderId}/addSubdirectory

curl --location --request POST 'https://host.name/api/v2/folders/1/addSubdirectory' \
--header 'Authorization: Bearer <token>' \
--header 'accept-language: ja' \
--data-raw '{
  "name": "Folder"
}'

Response

In case of success, no response body is returned.


Update a folder

Use this method to update a specified folder.

Note

Instead of the method described below, you can use a similar method that uses the HTTP verb PATCH.

Request

Header parameters:

  • Authorization: Bearer <token>

Path parameters:

folderId required

The identifier of a folder.

Body:

The following field value can be updated for a folder:

name string required

The name of a folder.

PUT[host]/api/v2/folders/{folderId}

curl --location --request PUT 'https://host.name/api/v2/folders/1' \
--header 'Authorization: Bearer <token>' \
--header 'accept-language: ja' \
--data-raw '{
  "name": "Folder"
}'

Response

In case of cuccess, no response body is returned.


Get granted access permissions

Use this method to obtain information about the Back Office User groups that have access permissions to a specific folder.

Request

Header parameters:

  • Authorization: Bearer <token>

Path parameters:

folderId required

The identifier of a folder.

GET[host]/api/v2/folders/{folderId}/groups

curl --location --request GET 'https://host.name/api/v2/folders/1/groups' \
--header 'Authorization: Bearer <token>' \
--header 'accept-language: ja'

Response

A response provides the following data:

id integer

The identifier of a Back Office user group.

caption string

The name of a Back Office user group.

enabled boolean

If true, a Back Office user group is granted access permissions to a folder; otherwise, false.

RESPONSE EXAMPLE
{
  "total": 3,
  "data": [
    {
      "id": 1,
      "caption": "Administrators",
      "enabled": true
    },
    {
      "id": 2,
      "caption": "B2B Account Manager",
      "enabled": true
    },
    {
      "id": 3,
      "caption": "B2B L1 Support",
      "enabled": false
    }
  ]
}

Update access permissions

Use this method to change access permissions to a specific folder for a Back Office user group.

Note

Instead of the method described below, you can use a similar method that uses the HTTP verb PATCH.

Request

Header parameters:

  • Authorization: Bearer <token>

Path parameters:

folderId required

The identifier of a folder.

groupId required

The identifier of a Back Office user group for which you want to change access permissions.

  • If the group is granted access permissions to a folder, they will be revoked.

  • If the group isn’t granted access permissions to a folder, they will be assigned to it.

PUT[host]/api/v2/folders/{folderId}/groups/{folderId}

curl --location --request PUT 'https://host.name/api/v2/folders/1/groups/1' \
--header 'Authorization: Bearer <token>' \
--header 'accept-language: ja'

Response

A response provides the following data:

status boolean

If true, a Back Office user group is granted access permissions to a folder; otherwise, false.

RESPONSE EXAMPLE
{
    "status": true
}