# Add document V3

`POST /omni/add/document/v3`

Base URL: `https://demo-api.incodesmile.com` — Incode demo environment

Upload document image gathered and store data.

## Path & query parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `type` | query | string | yes | - **signature**: Upload user's digital signature. This can be later fetched in get images endpoint. - **document**: Upload user's proof of address document. This can be later fetched in get images endpoint. - **addressStatement**: (Legacy) Upload user's proof of address document. Used for backward compatibility. Use type 'document' instead. - **medicalDoc**: Upload user's medical document. - **thirdId**: Upload user's third ID. - **contract**: Upload contract image. - **v5cMultiPageLogbook**: Upload single page (image) of V5C logbook multi page document. - **carInvoice**: Upload single page (image) of two pages car invoice document. - **financeSettlement**: Upload single page (image) of two pages finance settlement letter. Enum: `signature`, `document`, `medicalDoc`, `thirdId`, `contract`, `v5cMultiPageLogbook`, `carInvoice`, `financeSettlement` |
| `title` | query | string |  | Only if type is contract. Title of contract. |
| `format` | query | string |  | Only if type is document. Possible values are image (jpg and png supported) or pdf. Default is image. Enum: `image`, `pdf` |
| `processingMethod` | query | string |  | Only applicable for some documents. Possible values are sync and async. Default is sync. Enum: `sync`, `async` |
| `api-version` | header | string | yes |  |

## Request body

Content-Type: `application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `base64Image` | string |  | Image in base64 format. One of base64Image or imageUrl is required |
| `imageUrl` | string |  | URL of the image. One of base64Image or imageUrl is required |

## Responses

### 200

OK

Response body (`application/json`):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `status` | string |  | AddDocumentStatus Enum: `SUCCESS`, `PROCESS_DOC_ERROR`, `SESSION_ERROR`, `ADD_NEXT_PAGE`, `OPTIONAL_PAGE_CAPTURE`, `CLASSIFICATION_ERROR`, `MULTI_PAGE_CLASSIFICATION_ERROR`, `V5C_REGISTRATION_NUMBER_MISMATCH`, `V5C_REFERENCE_NUMBER_MISMATCH`, `V5C_NUMBER_MISMATCH`, `FSL_AGREEMENT_REFERENCE_MISMATCH`, `FSL_NAME_MISMATCH`, `MANDATORY_FIELD_MISSING`, `UNSUPPORTED_PAGE_NUMBERS`, `VALIDATION_ERROR`, `UNEXPECTED_ERROR`, `FINALIZE_ERROR_NO_PAGES`, `UNSUPPORTED_MP_DOCUMENT_TYPE` |

### 400

Bad Request

Response body (`application/json`):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `timestamp` | integer (int64) |  | UTC timestamp in milliseconds |
| `status` | integer (int32) |  | Custom error code or HTTP status code |
| `error` | string |  | HTTP status error |
| `message` | string |  | Custom error message |
| `path` | string |  | Endpoint path |
| `details` | object |  | Custom error details |
