Documents

Use these methods to manage client documents submitted for passing a verification procedure.

GET[host]/api/v2/documents

Get a list of documents

GET[host]/api/v2/documents/{documentId}

Get document details

POST[host]/api/v2/documents

Add a new document

Get a list of documents

Use this method to obtain a list of documents (such as an ID card, passport or driver’s license) submitted by clients for passing a verification procedure.

Note

If such a request is made by an admin user that is only permitted to view clients with certain tags, a response includes only the documents provided by clients marked with these tags.

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

Request

Header parameters:

  • Authorization: Bearer <access_token>

Query parameters:

The following filter parameter is available for this method:

clientId

The client identifier.

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

GET[host]/api/v2/documents

curl --location -g --request GET 'https://host.name/api/v2/documents?limit=10&offset=0&filter[clientId]=1' \
--header 'Authorization: Bearer <token>'

Response

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

Get document details

Use this method to obtain detailed information about a specified document submitted by a client for passing a verification procedure.

To obtain a list of all documents provided by a client, use a separate method to get a list of documents.

Request

Path parameters:

documentId required

The identifier of a document.

GET[host]/api/v2/document/{documentId}

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

Response

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

Add a new document

Use this method to add a new document required from a client for passing a verification procedure.

Request

Header parameters:

  • Authorization: Bearer <access_token>

Body:

Specify the following parameters for a document:

clientId integer required

The client identifier.

file string required

The path to a document file.

status string required

The status of a client request for document approval. Possible values:

  • new

  • approved

  • rejected

typeID integer required

The identifier of a document type with which a document is associated.

POST[host]/api/v2/documents

curl --location --request POST 'https://host.name/api/v2/documents' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
  "clientId": 1,
  "file": "ut velit quis",
  "status": "new",
  "typeId": 2
}'

Response

A response includes a Document object providing information about the added document.