# Create document

Create a new document object in our system

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

## Security:

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

## Request fields (application/json):

  - `applicant_id` (string, required)
    A unique identifier of an applicant, that is assigned by our system after an applicant object was created with a “Create an applicant” request
    Example: 27c5caea93ee4656881ef9a30fadd21a3768

  - `type` (string, required)
    Example: DOMESTIC_PASSPORT

  - `document_number` (string | null)
    A number of a document
    Example: TH703318A

  - `additional_number` (string | null)
    An additional number located on a document (e.g. tax ID number located on an ID card)
    Example: E2100007T-5

  - `issue_date` (string | null)
    An issue date of a document in `YYYY-MM-DD` format
    Example: 2020-11-04

  - `expiry_date` (string | null)
    The date of document expiration, formatted according to ISO 8601
    Example: 2028-11-04

  - `issuing_authority` (string | null)
    A name of a govenment entity that issues official documents
    Example: Social Security Administration

  - `front_side_id` (string | null)
    A unique identifier of a document file, that is assigned by our system after a file object was created with a “Create a file” request for a specific side (page) of a document
    Example: 27c5caea93ee4656881ef9a30fadd21a3768

  - `back_side_id` (string | null)
    A unique identifier of a document file, that is assigned by our system after a file object was created with a “Create a file” request for a specific side (page) of a document
    Example: 27c5caea93ee4656881ef9a30fadd21a3768

  - `other_side_1_id` (string | null)
    A unique identifier of a document file, that is assigned by our system after a file object was created with a “Create a file” request for a specific side (page) of a document
    Example: 27c5caea93ee4656881ef9a30fadd21a3768

  - `other_side_2_id` (string | null)
    A unique identifier of a document file, that is assigned by our system after a file object was created with a “Create a file” request for a specific side (page) of a document
    Example: 27c5caea93ee4656881ef9a30fadd21a3768

  - `other_side_3_id` (string | null)
    A unique identifier of a document file, that is assigned by our system after a file object was created with a “Create a file” request for a specific side (page) of a document
    Example: 27c5caea93ee4656881ef9a30fadd21a3768

  - `card_number` (string | null)
    A number of a credit card for payments
    Example: 0000000000000000

  - `account_number` (string | null)
    A bank account number (e.g. IBAN)
    Example: GB29NWBK60161331926819

  - `income_sources` (array)
    Category of a person or an entity earnings
    Example: ["SAVINGS","OTHER"]

  - `annual_income` (string | null)
    An annual income group that categorizes persons or entities based on their total yearly income. There are four groups available:
- `ANNUAL_INCOME_GROUP_1`
: less than 50,000 EUR
- `ANNUAL_INCOME_GROUP_2`
: between 50,000 and 100,000 EUR
- `ANNUAL_INCOME_GROUP_3`
: between 100,000 and 300,000 EUR
- `ANNUAL_INCOME_GROUP_4`
: more than 300,000 EUR
    Enum: "ANNUAL_INCOME_GROUP_1", "ANNUAL_INCOME_GROUP_2", "ANNUAL_INCOME_GROUP_3", "ANNUAL_INCOME_GROUP_4", "null"

  - `transaction_amount` (number | null)
    The amount of a financial transaction
    Example: 1468.55

  - `transaction_currency` (string | null)
    An amount of a financial transaction. A three-letter currency code according to ISO 4217. Ticker symbols are also accepted (e.g. BTC, ETH, SOL)
    Example: EUR

  - `transaction_datetime` (string | null)
    A date and time of a financial transaction in `YYYY-MM-DD HH:mm:ss` format
    Example: 2024-11-16 14:22:54

  - `transaction_purpose` (string | null)
    A definition of an intended reason or objective for a financial transaction
    Example: Payment for additional services

  - `origin_funds` (string | null)
    A source of financial resources
    Example: Business revenues

  - `affiliated_person_id` (string, required)
    A unique identifier of an affiliated person object, that is assigned by our system after an affiliated person object was created with a “Create an affiliated person” request
    Example: 27c5caea93ee4656881ef9a30fadd21a3768

## Response 200:

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

## Response 200 fields (application/json):

  - `document_id` (string)
    A unique identifier of a document, that is assigned by our system after a document object was created with a “Create a document” request
    Example: 27c5caea93ee4656881ef9a30fadd21a3768

## 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 404:

  - `404` (unknown)
    **Not Found**
The requested resource does not exist or can’t be found in our system.

## Response 404 fields (application/json):

  - `type` (string)
    Example: not_found

  - `errors` (array)

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

  - `errors.message` (string)
    Example: Applicant was not found

## 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):

  - `type` (string)
    Example: validation

  - `errors` (array)

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

  - `errors.message` (string)
    Example: Type of document is not valid

## 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: limit_exceeded

  - `duplicate_document_ids` (string)
    Example: a8b90a3715232245ab28a97051dab2ab45f8

  - `errors` (array)

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

  - `errors.message` (string)
    Example: Document with type DOMESTIC_PASSPORT can not be more than 1

## 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.

