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 Code | 200 |
{
"data": "e8f42***", // personId
"succeeded": true,
"isError": false,
"errors": []
}
Possible errors:
Code | Message | Description | Code |
400 | The Dob is empty | Date of birth field in request body is empty | 120034 |
400 | Values "field names" are empty | First name, last name or middle name is empty | 120034 |
400 | BlacklistPerson already exists | BlacklistPerson with such data already exists | 120035 |
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 name | Description | Value |
Page | Page number | From 1 to 2147483647 |
PageSize | Maximum number of applicants listed on the page | From 1 to 400 |
You can use the following fields for search and sorting:
Field name | Description |
SortField | Sorting field. You can specify firstName, lastName, phone, etc. |
Order | Sorting order for the selected field. For descending order specify the value: descending. Ascending order is set by default. |
TextFilter | Text search |
Request example:
curl -X 'GET' \
'https://baf.3divi.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 Code | 200 |
{
"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:
Code | Message | Description | Code |
400 | No sorting by selected property. | Wrong sorting field selected | 120026 |
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.3divi.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 Code | 200 |
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.3divi.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 Code | 200 |
{
"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.3divi.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 Code | 200 |
Delete a Person From the Blacklist
Endpoint: DELETE /publicapi/api/v2/private/Blacklist/{personId}
Parameters:
personId
Request example:
curl -X 'DELETE' \
'https://baf.3divi.ai/publicapi/api/v2/private/Blacklist/9687***' \
-H 'accept: */*' \
-H 'Authorization: Bearer sk_3938ab7b-cdbf-4a1a-952b-e3782f061f4b'
Response example:
Status Code | 200 |