Clients

Use these methods to register new clients and create client profiles as well as obtain client-related data.

GET[host]/api/v2/clients

Get a client list

GET[host]/api/v2/clients/{clientId}

Get client details

POST[host]/api/v2/clients

Create a client profile

Get a client list

Use this method to obtain a client list.

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 list of clients marked with these tags.

Request

Header parameters:

  • Authorization: Bearer <access_token>

Query parameters:

The following filter parameters are available for this method:

clientId

The client identifier.

email

The client email address.

name

The client name.

nickname

The client nickname.

managerIds

A comma-separated list of integer values identifying the client managers.

countryCodes

The numeric code of a client’s country of residence.

city

The client’s city.

statusIds

A comma-separated list of integer values identifying the client profile statuses.

internalTypeIds

A comma-separated list of integer values identifying the internal categories assigned to clients.

companyShortName

The client company short name.

companyFullName

The client company full name.

riskLevelIds

A comma-separated list of integer values identifying the client risk levels.

typeIds

A comma-separated list of integer values identifying the categories assigned to clients (such as Individual or Corporate).

verificationLevelIds

A comma-separated list of integer values identifying the verification levels obtained by clients.

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

GET[host]/api/v2/clients

curl --location -g --request GET 'https://host.name/api/v2/clients?limit=10&offset=0&sort_order=desc&sort_by=createTime&filter[clientId]=1&filter[emails]=foo@bar.com&filter[name]=Sergey&filter[nickname]=Voronov&filter[managerIds]=1, 2, 3&filter[countryCodes]=1, 2, 3&filter[city]=New York&filter[statusIds]=1, 2, 3&filter[internalTypeIds]=1, 2, 3&filter[companyShortName]=Company name&filter[companyFullName]=Company full name&filter[riskLevelIds]=1, 2, 3&filter[typeIds]=1, 2, 3&filter[verificationLevelIds]=-96750485' \
--header 'Authorization: Bearer <token>'

Response

A response includes an array of Client objects providing information about the clients matching the request parameters.

Get client details

Use this method to obtain detailed information about a specified client.

Request

Header parameters:

  • Authorization: Bearer <access_token>

Path parameters:

clientId required

The client identifier.

GET[host]/api/v2/clients/{clientId}

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

Response

A response contains a Client object providing information about the specified client.

Create a client profile

Use this method to register a new client and create a client profile.

Request

Header parameters:

  • Authorization: Bearer <token>

Body:

Important

The parameters that must be specified for a new client profile depend on the Registration wizard configuration.

To view the wizard configuration, navigate to System > Wizards in the Back Office, and then find a wizard of the registration type in a list.

The parameters listed below are for illustration purposes.

info object

The object specifying client personal data.

Show object fields
givenName string

The client’s first name.

familyName string

The client’s last name.

middleName string

The client’s middle name.

birthday string

The client’s date of birth.

addresses object

The object specifying a numeric country code indicating a client’s location.

Show object fields
country_code string

The numeric code of a country.

phones object

The object specifying one or several client phone numbers.

Show object fields
phone string

The client phone number.

email string

The email address used by a client to sign in to the B2Core UI.

POST[host]/api/v2/clients

curl --location --request POST 'https://host.name/api/v2/clients' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
  "info": {
    "givenName": "John",
    "familyName": "Doe"
  },
  "addresses": {
    "0": {
      "country_code": "784"
    }
  },
  "phones": {
    "0": {
      "phone": "+971000000000"
    }
  },
  "email": "jdoe@example.com"
}'

Response

A response includes a Client object providing information about the created client profile.