Skip to main content
Version: 1.6.0

Black lists

BAF blacklists provide access to customer resources exclusively for verified users. Blacklist control includes the ability to obtain user information, as well as edit and delete user data.

Add a person to a blacklist

Endpoint: POST /publicapi/api/v2/private/Blacklist

Request example:

{
"firstName": "Bob",
"middleName": "Jamesbob",
"familyName": "Familybob",
"dob": "2023-06-22T13:57:35.163Z"
}

Response example:

Status Code200
{
"data": "e8f42***", // personId
"succeeded": true,
"isError": false,
"errors": []
}

Possible errors:

CodeMessageDescriptionCode
400The Dob is emptyDate of birth field in request body is empty120034
400Values "field names" are emptyFirst name, last name or middle name is empty120034
400BlacklistPerson already existsBlacklistPerson with such data already exists120035

Once added to the blacklist, the user with such data will be denied access.

Get a blacklist

To get the current blacklist, you need to send a request to the endpoint with filtering.

Endpoint: GET /publicapi/api​/v2​/private/Blacklist

Field nameDescriptionValue
PagePage numberFrom 1 to 2147483647
PageSizeMaximum number of applicants listed on the pageFrom 1 to 400

You can use the following fields for search and sorting:

Field nameDescription
SortFieldSorting field. You can specify firstName, lastName, phone, etc.
OrderSorting order for the selected field. For descending order specify the value: descending. Ascending order is set by default.
TextFilterText search

Request example:

curl -X 'GET' \
'https://baf.ai/publicapi/api/v2/private/Blacklist?Page=1&PageSize=10' \
-H 'accept: text/plain' \
-H 'Authorization: Bearer sk_3938ab7b-cdbf-4a1a-952b-e3782f061f4b'

Response example:

Status Code200
{
"data": {
"page": 1,
"pageSize": 10,
"total": 1,
"totalPages": 1,
"items": [
{
"id": "e8f4***",
"firstName": "BOB",
"middleName": "JAMESBOB",
"familyName": "FAMILYBOB",
"dob": "2023-06-22T13:57:35.163"
}
]
},
"succeeded": true,
"isError": false,
"errors": []
}

Possible errors:

CodeMessageDescriptionCode
400No sorting by selected property.Wrong sorting field selected120026

Add an Applicant to a Blacklist

Endpoint: POST /publicapi/api​/v2​/private/Blacklist/FromApplicantId

Request body:

{
"applicantId": "string"
}

Request example:

curl -X 'POST' \
'https://baf.ai/publicapi/api/v2/private/Blacklist/FromApplicantId' \
-H 'accept: text/plain' \
-H 'Authorization: Bearer sk_3938ab7b-cdbf-4a1a-952b-e3782f061f4b' \
-H 'Content-Type: application/json' \
-d '{
"applicantId": "insert applicantId here"
}'

Response example:

Status Code200
3fa85*** // personId

Get information about a person from the blacklist

Endpoint: GET /publicapi/api​/v2​/private/Blacklist/{personId}

Parameters:

personId

Request example:

curl -X 'GET' \
'https://baf.ai/publicapi/api/v2/private/Blacklist/3fa85f64-5717-4562-b3fc-2c963f66afa6' \
-H 'accept: text/plain' \
-H 'Authorization: Bearer sk_3938ab7b-cdbf-4a1a-952b-e3782f061f4b'

Response example:

Status Code200
{
"id": "3fa85***",
"applicantId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"firstName": "string",
"middleName": "string",
"familyName": "string",
"dob": "2023-09-21T16:40:58.882Z"
}

Change information about a person from the blacklist

Endpoint: PUT /publicapi/api​/v2​/private/Blacklist/{personId}

Parameters:

personId

Request body:

{
"firstName": "string",
"middleName": "string",
"familyName": "string",
"dob": "2023-09-21T16:44:32.658Z"
}

Request example:

curl -X 'PUT' \
'https://baf.ai/publicapi/api/v2/private/Blacklist/9687***' \
-H 'accept: */*' \
-H 'Authorization: Bearer sk_3938ab7b-cdbf-4a1a-952b-e3782f061f4b' \
-H 'Content-Type: application/json' \
-d '{
"firstName": "string",
"middleName": "string",
"familyName": "string",
"dob": "2023-09-21T16:44:32.658Z"
}'

Response example:

Status Code200

Delete a Person From the Blacklist

Endpoint: DELETE /publicapi/api​/v2​/private/Blacklist/{personId}

Parameters:

personId

Request example:

curl -X 'DELETE' \
'https://baf.ai/publicapi/api/v2/private/Blacklist/9687***' \
-H 'accept: */*' \
-H 'Authorization: Bearer sk_3938ab7b-cdbf-4a1a-952b-e3782f061f4b'

Response example:

Status Code200