# Documents

Retrieve information on documents from the Kycaid blacklist databases to check for compliance with laws and regulations. Each response may have several objects, with one object per a blacklist

Endpoint: POST /bdb/documents
Version: 1.0
Security: API-Key

## Security:

  - `API-Key` (unknown)
    apiKey in header API-Key

## Request fields (application/json):

  - `document_number` (string, required)
    A number of a document to check with blacklist databases
    Example: 920927302325

  - `document_type` (string)
    A type of a document
    Enum: "PASSPORT", "DOMESTIC_PASSPORT", "GOVERNMENT_ID", "DRIVERS_LICENSE", "FOREIGN_CITIZEN_PASSPORT", "PERMANENT_RESIDENCE_PERMIT", "REFUGEE_CARD"

  - `document_country` (string | null)
    An issuing country of a document. A two-letter country code according to ISO 3166-2
    Example: GB

  - `bdb_types` (array)
    A type of blacklist databases to make a check
- `SANCTIONS`: Global and local sanctions
databases
- `PEP`: Databases of politically exposed persons (PEP)
- `WANTED`: Databases of persons being searched for by the police
- `EXPIRED`: Databases of stolen or lost documents
    Example: ["SANCTIONS"]

## Response 200:

  - `200` (unknown)
    **OK**
The request was successful, and our system returned an expected response.

## Response 200 fields (application/json):

  - `data` (array)

  - `data.document_number` (string)
    A number of a document to check with blacklist databases
    Example: 920927302325

  - `data.document_type` (string)
    A type of a document
    Enum: "PASSPORT", "DOMESTIC_PASSPORT", "GOVERNMENT_ID", "DRIVERS_LICENSE", "FOREIGN_CITIZEN_PASSPORT", "PERMANENT_RESIDENCE_PERMIT", "REFUGEE_CARD"

  - `data.document_country` (string | null)
    An issuing country of a document. A two-letter country code according to ISO 3166-2
    Example: GB

  - `data.description` (string | null)
    The detailed description of a status in blacklist databases
    Example: Reciprocal - 2010-04-30

  - `data.bdb_name` (string | null)
    A name of a blacklist database
    Example: Open Sanctions Default

  - `data.bdb_type` (array)
    A type of blacklist databases to make a check
- `SANCTIONS`: Global and local sanctions
databases
- `PEP`: Databases of politically exposed persons (PEP)
- `WANTED`: Databases of persons being searched for by the police
- `EXPIRED`: Databases of stolen or lost documents
    Example: ["SANCTIONS"]

## Response 400:

  - `400` (unknown)
    **Bad Request**
Our system could not process the request due to invalid syntax, missing parameters, or incorrect data format. Check the request structure and try again.

## Response 400 fields (application/json):

  - `type` (string)
    Example: bad_request

  - `errors` (array)

## Response 402:

  - `402` (unknown)
    **Payment Required**
Access to the requested resource is restricted until a payment is successfully processed. Ensure your account has a valid payment method or sufficient funds to complete this action.

## Response 402 fields (application/json):

  - `type` (string)
    Example: insufficient_funds

  - `errors` (array)

## Response 422:

  - `422` (unknown)
    **Unprocessable Content**
Our system understands the request but can’t process it due to invalid fields in the request body.

## Response 422 fields (application/json):

  - `errors` (array)

  - `errors.parameter` (string)
    Example: document_number

  - `errors.message` (string)
    Example: document_number must have from 2 to 32 characters and only letters and numbers

## Response 429:

  - `429` (unknown)
    **Too Many Requests**
This response indicates that a user has sent too many requests in a given amount of time.

## Response 429 fields (application/json):

  - `type` (string)
    Example: flow

  - `errors` (array)

  - `errors.parameter` (string)
    Example: limit_exceeded

  - `errors.message` (string)
    Example: Rate limit exceeded

## Response 500:

  - `500` (unknown)
    **Internal Server Error**
This response indicates that our system encountered an unexpected condition that prevented it from fulfilling the request.

## Response 500 fields (application/json):

  - `type` (string)
    Example: internal_server

  - `errors` (array)

## Response 502:

  - `502` (unknown)
    **Bad Gateway**
This response indicates that our system is unable to reach or communicate properly with an upstream server it relies on, the URL provided is incorrect, or a required token is missing from the request.

