Document groups

Use these methods to manage document groups that are used to categorize document types.

GET[host]/api/v2/documents/groups

Get a list of document groups

GET[host]/v2/documents/groups/{groupId}

Get document group details

POST[host]/v2/documents/groups

Create a new document group

PUT[host]/v2/documents/groups/{groupId}

PATCH[host]/v2/documents/groups/{groupId}

Update a document group

DELETE[host]/v2/documents/groups/{groupID}

Delete a document group

Get a list of document groups

Use this method to obtain a list of document groups created in the Back Office.

To obtain detailed information about a specific document group, use a separate method to get document group details.

Request

Header parameters:

  • Authorization: Bearer <access_token>

Query parameters:

The following filter parameters are available for this method:

type

The type of a document group. Possible values:

  • one — indicates that a single document type belongs to this document group

  • all — indicates that all available document types belong to this document group

typeId

The identifier of a type to which a document group belongs.

enabled

It true, a document group can be used for verification; otherwise, false.

The following sorting parameter is available for this method:

createTime

The date and time when a document group was created.

priority

The priority index assigned to a document group.

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

GET[host]/api/v2/documents/groups

curl --location -g --request GET 'https://host.name/api/v2/documents/groups?limit=10&offset=0&sort_order=desc&sort_by=createTime&filter[type]=one&filter[typeId]=1&filter[enabled]=true' \
--header 'Authorization: Bearer <token>'

Response

A response contains an array of Document Group objects providing information about the document groups that correspond to the query parameters included in the request.

Get document group details

Use this method to obtain detailed information about a specified document group.

To obtain a list of all document groups created in the Back Office, use a separate method to get a list of document groups.

Request

Header parameters:

  • Authorization: Bearer <access_token>

Path parameters:

groupId required

The identifier of a document group.

GET[host]/v2/documents/groups/{groupId}

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

Response

A response contains a Document Group object providing information about the specified document group.

Create a new document group

Use this method to create a new document group.

Request

Header parameters:

  • Authorization: Bearer <access_token>

Body:

Specify the following parameters for a document group:

description string required

The localized description of a document group.

enabled boolean required

If true, a document group can be used for client verification; otherwise, false.

name string required

The localized name of a user group.

type string required

The type of a user group. Possible values:

  • one

  • all

POST[host]/v2/documents/groups

curl --location --request POST 'https://host.name/api/v2/documents/groups' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
  "description": "The documents required for corporate clients",
  "enabled": true,
  "name": "corporate",
  "type": "one"
}'

Response

A response includes a Document Group object providing information about the created document group.

Update a document group

Use this method to update a specified document 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 <access_token>

Path parameters:

groupId required

The identifier of a document group.

Body:

The following field values can be updated for a specified document group:

description string

The localized description of a document group.

enabled boolean

If true, a document group can be used for client verification; otherwise, false.

name string

The localized name of a document group.

type string

The type of a document group. Possible values:

  • one — indicates that a single document type belongs to this document group

  • all — indicates that all available document types belong to this document group

priority integer

The priority index assigned to a document group.

PUT[host]/v2/documents/groups/{groupId}

curl --location --request PUT 'https://host.name/api/v2/documents/groups/1' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
  "description": "The documents required for corporate clients",
  "enabled": true,
  "name": "corporate",
  "type": "one",
  "priority": 1
}'

Response

A response includes a Document Group object providing information about the document group that was updated.

Delete a document group

Use this method to delete a specified document group.

Note

A document group can’t be deleted if there is at least one document type included in this group.

Request

Header parameters:

  • Authorization: Bearer <access_token>

Path parameters:

groupId required

The identifier of a document group.

DELETE[host]/v2/documents/groups/{groupID}

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

Response

In case of success, no response body is returned.