Skip to content

Upload Document

Request URL

POST /document/upload/:documentId (deprecated)

Description

This endpoint is deprecated. Instead of using /customer/kyc and /document endpoints, we recommend the use of the /akepa endpoints for KYC/KYB verification and document upload.

This endpoint will upload a document file that is not associated with any specific customer (also referred to as a separate document). This document can then be linked to a specific customer using the /customer/kyc/document-link endpoint. The document ID generated in the prerequisite /document/generate request is required as a path parameter. You may use this endpoint multiple times with the same document ID. However, subsequent requests will overwrite the previously uploaded file. If you wish to upload more than one file using this endpoint, you will need to first generate document IDs for each file.

Use multipart/form-data mode to upload the file.

The document file that you upload may be an image, a PDF, a word document, etc. Only one document may be uploaded at a time.

Request Body

HEADERS

{
    "Content-Type": "multipart/form-data",
    "x-connectfi-token": "a long random string" //Authorization token received from /auth/get-token request
}

REQUEST BODY

File data will be passed using multipart/form-data mode.

Successful Response Example

200 (HTTP response status code) -- Success, document was uploaded

    {
        "code": "0", //Success
        "data": {
            "id": "sdoc_41S8eM8HpVb12fKSCLF1S0", //document ID in connectFi
            "uploadStatus": true, //upload status updated to true
            "extension": "png" //file extension of the document
        }
    }

Errors

400 (HTTP response status code) -- Separate document not found

In this example, an invalid document ID was given. Make sure that you have generated a document ID using a /document/generate request before uploading the corresponding document file.

    {
        "code": "documentNotFound",
        "message": "Document sdoc_41S8eM8HpVb12fKSCLF1S05 not found"
    }