Skip to content

Blacklist

TIP

Instructions for working with the blacklist in the Brainysoft interface can be found in the section:

"User Instructions""Operational Activities""Admin""Blacklist".

API Methods for Working with Blacklist

MethodURLDescription
GET|HEADauth/blacklist/templateGet template
POSTblacklist/load-template
auth/blacklist/load-template
Upload file with data for bulk addition
GET|HEAD|POST|
PUT|PATCH|
DELETE|OPTIONS
blacklist/list/limit/{limit}/page/{page}
auth/blacklist/list/limit/{limit}/page/{page}
Get blacklist with pagination
POSTblacklist/add-entry
auth/blacklist/add-entry
Add entry to blacklist
GET|HEADblacklist/{type}/client/{client_id}
auth/blacklist/{type}/client/{client_id}
Check client by type
GET|HEADblacklist/{type}/lead/{lead_id}
auth/blacklist/{type}/lead/{lead_id}
Check lead by type
GET|HEADapi/inside/complexblacklist/{type}/ taskId/{taskId}/leadId/{leadId}Check by step in DMS (taskId) for lead
GET|HEADblacklist/list/delete/{id}
auth/blacklist/list/delete/{id}
Delete entry by ID
GET|HEADblacklist/list/clear
auth/blacklist/list/clear
Clear blacklist

Get Blacklist Template

GET|HEAD /auth/blacklist/template

Description

This method allows you to get the current template for bulk addition of entries to the blacklist (.xlsx). Use this template to prepare data before bulk upload via API.

Download template:

blacklist_template.xlsx

Request Example

GET /auth/blacklist/template

Successful Response Example

json
{
  "status": "ok", // Request execution status
  "timestamp": 1751000006000, // Response time (UNIX timestamp, ms)
  "data": {
    "url": "https://example.com/blacklist-template.xlsx" // Link to template
  }
}

Upload File with Data for Bulk Addition

POST /blacklist/load-template

POST /auth/blacklist/load-template

Description

This method allows you to upload a file with data (.xlsx) for bulk addition of entries to the blacklist. Use the current template, previously downloaded via the template retrieval method, fill it with your data and upload it using this method.

Download filled template example:

blacklist_template(1).xlsx

Request Body (multipart/form-data)

FieldTypeDescription
filefileFile with data to upload

Request Example

POST /blacklist/load-template

Content-Type: multipart/form-data

file: blacklist.xlsx

Successful Response Example

json
{
  "status": "ok",
  "timestamp": 1751465170000,
  "data": {
    "result": "File successfully uploaded, queued for processing"
  }
}

Get Blacklist with Pagination

GET|HEAD|POST|PUT|PATCH|DELETE|OPTIONS /blacklist/list/limit/{limit}/page/{page} GET|HEAD|POST|PUT|PATCH|DELETE|OPTIONS /auth/blacklist/list/limit/{limit}/page/{page}

Description

This method allows you to get a list of blacklist entries with pagination. The response returns an array of entries (with an extended set of fields) and page information.

Pagination is a mechanism for dividing a large list of data into separate pages (page-by-page output). Instead of returning all records at once, the API or web interface returns only a limited number of elements per request (for example, 10, 20, or 100), and the rest can be obtained by navigating to the next pages.

Request Parameters (path)

ParameterTypeDescription
limitintegerNumber of entries per page
pageintegerPage number

Request Example

GET /blacklist/list/limit/10/page/1

Successful Response Example

json
{
  "status": "ok", // Request execution status
  "timestamp": 1751465512000, // Response time (UNIX timestamp, ms)
  "data": {
    "per_page": 10, // Number of entries per page
    "total_entries": 149, // Total number of entries
    "page": 1, // Current page
    "data": [
      {
        "id": 149, // Unique entry identifier
        "last_name": "Sato", // Last name
        "first_name": "Aoi", // First name
        "patronymic": "Deep", // Patronymic
        "birthdate": "1994-08-10", // Date of birth
        "passport_seria": "1334", // Passport series
        "passport_no": "601234", // Passport number
        "inn": "809234567890", // Tax ID (INN)
        "snils": "601-234-567 28", // Social Security Number (SNILS)
        "mobile_phone": "+7 (999) 123-47-15", // Mobile phone
        "email": "", // Email
        "qiwi_wallet": null, // Qiwi wallet
        "ya_wallet": null, // Yandex wallet
        "web_money": null, // WebMoney
        "account_no": null, // Bank account
        "bank_name": null, // Bank
        "card_no": null, // Bank card
        "company_name": "", // Company name
        "comments": null, // Comments
        "deleted_at": null, // Deletion date (if entry is deleted)
        "ip4": "", // IP address
        "mac": "", // MAC address
        "fio": "Sato Aoi Deep", // Full name as one string
        "passport_number": "601234", // Passport number (duplicate)
        "mobile": "+7 (999) 123-47-15", // Mobile phone (duplicate)
        "birthDate": "1994-08-10", // Date of birth (duplicate)
        "cardnumber": null // Bank card (duplicate)
      }
      // ... other entries
    ]
  }
}

Add Entry to Blacklist via Request Body (Option 1: application/json)

POST /blacklist/add-entry

POST /auth/blacklist/add-entry

Description

The first way to add an entry to the blacklist is through a direct API request with a request body in JSON format (application/json).

Request Body (application/json)

FieldTypeDescription
valuestringValue (e.g., phone, tax ID, email)
typestringValue type (mobile_phone, inn, email, etc.)

Use values from the type column of the "Blacklist 'type' Allowed Values Reference" in the type field when adding an entry.

In the value field, specify the corresponding value.

Blacklist "type" Allowed Values Reference

typeDescriptionExample value
last_nameLast nameSato
first_nameFirst nameAoi
patronymicPatronymicDeep
birthdateDate of birth (y-m-d)1994-08-1
passport_seriaPassport series1334
passport_noPassport number601234
innTax ID (INN)809234567890
snilsSocial Security Number (SNILS)601-234-567 28
mobile_phoneMobile phone79991234715
emailEmailtest@example.com
qiwi_walletQiwi walletQIWI123456
ya_walletYandex walletYANDEX123456
web_moneyWebMoneyWMID123456
account_noBank account40817810099910004312
bank_nameBankSberbank
card_noBank card4276380012345678
company_nameCompany nameLLC "Romashka"
commentsCommentsFraud
deleted_atDeletion date2025-07-01T10:00:00+00:00
ip4IP address192.168.1.1
macMAC address00:1A:2B:3C:4D:5E
fioFull name as one stringSato Aoi Deep
passport_numberPassport number (duplicate)601234
mobileMobile (duplicate)79991234715
birthDateDate of birth (y-m-d) (duplicate)1994-08-1
cardnumberBank card (duplicate)4276380012345678

Request Example

json
{
  "last_name": "Joe", // Last name
  "first_name": "Joe", // First name
  "patronymic": "Joe", // Patronymic
  "birthdate": "1994-08-10", // Date of birth (YYYY-MM-DD)
  "comment": "Fraud" // Comment
}

Successful Response Example

json
{
  "status": "ok",
  "timestamp": 1751000001000,
  "data": {
    "result": "ok"
  }
}

Add Entry to Blacklist via File (Option 2: multipart/form-data)

POST /blacklist/add-entry

POST /auth/blacklist/add-entry

Description

The second way to add an entry to the blacklist is by uploading a file (.xlsx) containing the data to add.

Request Body (multipart/form-data)

FieldTypeDescription
filefileFile with data to upload

Download template:

blacklist_template.xlsx

Request Example

POST /blacklist/add-entry

Content-Type: multipart/form-data

file: single_blacklist_entry.xlsx

Successful Response Example

json
{
  "status": "ok",
  "timestamp": 1751479717000,
  "data": {
    "result": "ok"
  }
}

Check Client by Type

GET|HEAD /blacklist/{type}/client/{client_id}

GET|HEAD /auth/blacklist/{type}/client/{client_id}

Description

This method allows you to check if a client has entries in the blacklist by a specific type (e.g., phone, inn, email). The response returns a recommendation (allow or deny the operation) and information about matches.

Request Parameters

  • {type} (string, required) — value type (phone, inn, email, etc.). See above "Blacklist 'type' Allowed Values Reference".
  • {client_id} (integer, required) — client identifier

Request Example

GET /blacklist/mobile_phone/client/3173

Response Example: Entry Not Found in Blacklist

json
{
  "status": "ok",
  "timestamp": 1751482337000,
  "data": {
    "recommendation": "APPROVE", // Recommendation: allow (not in blacklist)
    "options": {
      "mobile_record_id": null, // No entry in blacklist
      "mobile_match": 0, // Match not found
      "mobile_match_partly": 0 // Partial match not found
    }
  }
}

If recommendation = "APPROVE" and mobile_match = 0 — entry not found in blacklist, operation can be allowed.

Request Example

GET /blacklist/mobile_phone/client/3174

Response Example: Entry Found in Blacklist

json
{
  "status": "ok",
  "timestamp": 1751482391000,
  "data": {
    "recommendation": "DENY", // Recommendation: deny (found in blacklist)
    "options": {
      "mobile_record_id": 121, // ID of found entry in blacklist
      "mobile_match": 1, // Match found
      "mobile_match_partly": 0, // Partial match not found
      "mobile_comments": null // Comments
    }
  }
}

If recommendation = "DENY" and mobile_match = 1 — entry found in blacklist, it is recommended to deny the operation.

Response Fields Description

FieldTypeDescription
statusstringRequest execution status
timestampintegerResponse time (UNIX timestamp, ms)
data.recommendationstringRecommendation based on check result (DENY — deny, ALLOW — allow)
data.options.mobile_record_idintegerInternal mobile phone record identifier
data.options.mobile_matchintegerFull match indicator (1 — found in blacklist, 0 — not found)
data.options.mobile_match_partlyintegerPartial match indicator (1 — partial match, 0 — not found)
data.options.mobile_commentsstring|nullComments on check result

Check Lead by Type

GET|HEAD /blacklist/{type}/lead/{lead_id}

GET|HEAD /auth/blacklist/{type}/lead/{lead_id}

Description

This method allows you to check if a lead has entries in the blacklist by a specific type (e.g., phone, inn, email).

Request Parameters

  • {type} (string, required) — value type (phone, inn, email, etc.). See above "Blacklist 'type' Allowed Values Reference".
  • {lead_id} (integer, required) — lead identifier.

Request Example

GET /blacklist/mobile_phone/lead/7336

Response Example: Entry Not Found in Blacklist

json
{
  "status": "ok",
  "timestamp": 1751481784000,
  "data": {
    "recommendation": "APPROVE", // Recommendation: allow (not in blacklist)
    "options": {
      "mobile_record_id": null, // No entry in blacklist
      "mobile_match": 0, // Match not found
      "mobile_match_partly": 0 // Partial match not found
    }
  }
}

If recommendation = "APPROVE" and mobile_match = 0 — entry not found in blacklist, operation can be allowed.

Request Example

GET /blacklist/mobile_phone/lead/7337

Response Example: Entry Found in Blacklist

json
{
  "status": "ok",
  "timestamp": 1751481902000,
  "data": {
    "recommendation": "DENY", // Recommendation: deny (found in blacklist)
    "options": {
      "mobile_record_id": 121, // ID of found entry in blacklist
      "mobile_match": 1, // Match found
      "mobile_match_partly": 0, // Partial match not found
      "mobile_comments": null // Comments
    }
  }
}

If recommendation = "DENY" and mobile_match = 1 — entry found in blacklist, it is recommended to deny the operation.

Response Fields Description

FieldTypeDescription
statusstringRequest execution status
timestampintegerResponse time (UNIX timestamp, ms)
data.recommendationstringRecommendation based on check result (DENY — deny, ALLOW — allow)
data.options.mobile_record_idintegerInternal mobile phone record identifier
data.options.mobile_matchintegerFull match indicator (1 — found in blacklist, 0 — not found)
data.options.mobile_match_partlyintegerPartial match indicator (1 — partial match, 0 — not found)
data.options.mobile_commentsstring|nullComments on check result

Check by Step in DMS (taskId) for Lead

GET|HEAD /blacklist/checks/{type}/taskId/{taskId}/leadId/{leadId}

!GET|HEAD /api/inside/complexblacklist/{type}/taskId/{taskId}/leadId/{leadId}

!GET|HEAD /api/inside/blacklist/{type}/taskId/{task_id}/leadId/{lead_id}

Description

This method allows you to check for entries in the blacklist by a specific type for a lead within a specific step in the Decision Making System (DMS), identified by taskId.

Note about taskId:

taskId is the step identifier in the DMS (Decision Making System). To find the current taskId for an application, open DevTools on the application page and execute the following command in the console:

js
engymod();

As a result, an object will be displayed in the console where you can find the required taskId (ruleTaskId=...).

Request Parameters

  • {type} (string, required) — value type (e.g., mobile_phone, inn, email, etc.)
  • {taskId} (integer, required) — step identifier in DMS (taskId)
  • {leadId} (integer, required) — lead identifier

Request Example

GET /api/inside/complexblacklist/mobile_phone/taskId/15531/leadId/7328

Response Example: Entry Found in Blacklist

json
{
  "status": "ok",
  "timestamp": 1751481902000,
  "data": {
    "recommendation": "DENY", // Recommendation: deny (found in blacklist)
    "options": {
      "mobile_record_id": 121, // ID of found entry in blacklist
      "mobile_match": 1, // Match found
      "mobile_match_partly": 0, // Partial match not found
      "mobile_comments": null // Comments
    }
  }
}

Response Fields Description

FieldTypeDescription
statusstringRequest execution status
timestampintegerResponse time (UNIX timestamp, ms)
data.recommendationstringRecommendation based on check result (DENY — deny, ALLOW — allow)
data.options.mobile_record_idintegerInternal mobile phone record identifier
data.options.mobile_matchintegerFull match indicator (1 — found in blacklist, 0 — not found)
data.options.mobile_match_partlyintegerPartial match indicator (1 — partial match, 0 — not found)
data.options.mobile_commentsstring|nullComments on check result

Delete Entry by ID

GET|HEAD /blacklist/list/delete/{id}

GET|HEAD /auth/blacklist/list/delete/{id}

Description

This method allows you to delete an entry from the blacklist by its unique identifier. Use this method when you need to delete a specific entry from the blacklist (e.g., by mistake or by user request).

Request Parameters (path)

ParameterTypeDescription
idintegerUnique entry identifier

Request Example

GET /blacklist/list/delete/121

Successful Response Example

json
{
  "status": "ok",
  "timestamp": 1751483864000,
  "data": null
}

Clear Blacklist

GET|HEAD /blacklist/list/clear

GET|HEAD /auth/blacklist/list/clear

Description

This method allows you to completely clear the blacklist (delete all entries from the blacklist).

Request Example

GET /blacklist/list/clear

Successful Response Example

json
{
  "status": "ok",
  "timestamp": 1751483030000,
  "data": null
}

Field Descriptions

FieldTypeDescription
statusstringRequest execution status
timestampintegerResponse time (UNIX timestamp, ms)
per_pageintegerNumber of entries per page (for pagination)
total_entriesintegerTotal number of entries (for pagination)
pageintegerCurrent page (for pagination)
dataarray/objectArray or object with data (e.g., blacklist entries, upload result, etc.)
idintegerUnique entry identifier
last_namestringLast name
first_namestringFirst name
patronymicstringPatronymic
birthdate / birthDatestringDate of birth (YYYY-MM-DD). May appear as birthdate or birthDate
passport_seriastringPassport series
passport_no / passport_numberstringPassport number
innstringTax ID (INN)
snilsstringSocial Security Number (SNILS)
mobile_phone / mobilestringMobile phone. May appear as mobile_phone or mobile
emailstringEmail
qiwi_walletstringQiwi wallet
ya_walletstringYandex wallet
web_moneystringWebMoney
account_nostringBank account
bank_namestringBank
card_no / cardnumberstringBank card. May appear as card_no or cardnumber
company_namestringCompany name
commentsstringComment
deleted_atstringEntry deletion date
ip4stringIPv4 address
macstringMAC address
fiostringFull name as one string
valuestringValue to add to blacklist (e.g., phone, tax ID, email, etc.)
typestringValue type (mobile_phone, inn, email, etc.; see type reference)
filefileFile for bulk upload
recommendationstringRecommendation based on check result (APPROVE — allow, DENY — deny, ALLOW — allow)
optionsobjectObject with check result details
mobile_record_idinteger/nullInternal mobile phone record identifier (or null if not found)
mobile_matchintegerFull match indicator (1 — found in blacklist, 0 — not found)
mobile_match_partlyintegerPartial match indicator (1 — partial match, 0 — not found)
mobile_commentsstring/nullComments on check result (if any)
urlstringLink to download template or file
resultstringOperation execution result (e.g., "ok" or text message)