Skip to content

Upload Document

Request URL

POST /customer/kyc/upload/:customerId/: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 API can be used to upload documents to complete the KYC process, if required. There are two path parameters:

  • customerId - Customer ID in connectFi
  • documentId - Document ID in connectFi, can be found in data.kycDocumentList of the previous step

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

The system will respond with HTTP status 200 if the file was successfully accepted. Any consecutive uploads overwrite previous ones as long as the KYC process has not been completed.

The system will respond with HTTP status 400 if the given customerId or documentId were not found.

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": {
        "customer": {
            "reference": "2222369478", //unique external reference in your system
            "customerId": "csta-YbQeg60v7orvQFIYA7gKU", //customer ID in connectFi
            "customerType": "individual",
            "customer": { //customer object
            },
            "kycStatus": "WAITING_DATA",
            "boises": [],
            "dtsCreatedAt": "2022-10-07T17:18:56.424Z"
        },
        "kyc": {
            "attributeCodes": [
                "cardAttributes"
            ],
            "system": "condor",
            "mode": "licenseUSACondor",
            "status": "WAITING_DATA"
        },
        "kycDocumentList": [
            {
                "id": "doc-45SKHDbSp1Imxr1hjGOmfW", //document ID in connectFi
                "label": "LICENSE FRONT",
                "type": "LICENSE",
                "documentSide": "FRONT",
                "uploadStatus": true, //uploadStatus changed to true to indicate successful upload of this document
                "extension": "png"
            },
            {
                "id": "doc-45SKHEQURjRQQQzcUOJZyY", //document ID in connectFi
                "label": "LICENSE BACK",
                "type": "LICENSE",
                "documentSide": "BACK",
                "uploadStatus": false
            }
        ],
        "kycAttributes": {
            "cardAttributes": {
                "productID": "AWSM_API_Evolve_Test",
                "nameOnCard": "JOHN TESTMAN UWUR",
                "designId": "1",
                "addressType": "PRIMARY",
                "issueType": "NEW",
                "additionalData": {
                    "designId": "1"
                }
            }
        }
    }
    "requestId": "82a158d0b91411ed94b4966a132cde12"
}

Errors

400 (HTTP response status code) -- Document not found

In this example, an invalid documentId was requested for a valid customer.

{
    "requestId": "86af86c0b85311ed94b4966a132cde12",
    "code": "documentNotFound",
    "message": "Document Not Found"
}

400 (HTTP response status code) -- File not found

In this example, the file requested for upload was not found.

{
    "requestId": "74e51540b85311ed94b4966a132cde12",
    "code": "badRequest",
    "message": "Bad request. File not found"
}