Skip to content

Update

Request URL

POST /akepa/update

Description

This endpoint can be used to update documents for entities (either individual customers or business representatives associated with a business customer) who are undergoing the KYC/KYB (Know Your Customer/Business) process.

Before making an /akepa/update request, you must first make an /akepa/document/generate request to generate a document ID for each document. Then, complete an /akepa/document/upload/:documentId request to upload the document file. Finally, make an /akepa/update request to join the uploaded document to the desired entity.

One or more documents may be necessary for the customer to pass KYC/KYB. When performing the /akepa/update request, you may link several documents (contained in the documents array) to the customer in one request. However, once the KYC/KYB identification application has reached a status of "completed", no more documents can be attached to the application.

After updating the KYC/KYB journey through an /akepa/update request, if the status is still “pending_step_up”, then more documents are expected and you will need to make another /akepa/update request to link the additional documents. For example, if you have only updated the journey with the "back" image of a Driver's License, then you will need to make an additional request to update the journey with the "front" image of the Driver's License. For convenience, it is recommended to include both the "front" and "back" images of the document in the documents array in a single request.

For an individual customer, the entityId matches the customerId because the entity for whom the document is being uploaded is also the customer.

For a business customer, the entityId is the ID that was issued to the respective business representative in the /customer/init response. The documents that are uploaded are documents belonging to the business representative, such as a Driver's License.

Schema

Property table for akepa/update

Property Description Required Schema
customerId Customer ID in connectFi Yes {
  "type": "string",
  "pattern": "^[0-9a-zA-Z_]+$",
  "minLength": 1,
  "maxLength": 36,
  "description": "common-id"
}
applicationId The application ID in connectFi Yes {
  "type": "string",
  "pattern": "^[0-9a-zA-Z_]+$",
  "minLength": 1,
  "maxLength": 36,
  "description": "common-id"
}
documents An array of document objects No array of documents item objects

Property table for documents array item object

Property Description Required Schema
entityId The entity ID. This could be an individual customer ID in connectFi or a business representative ID Yes {
  "type": "string",
  "pattern": "^[0-9a-zA-Z_]+$",
  "minLength": 1,
  "maxLength": 36,
  "description": "common-id"
}
documentId The document ID in connectFi. This ID will be generated by making a request to /akepa/document/generate Yes {
  "type": "string",
  "pattern": "^[0-9a-zA-Z_]+$",
  "minLength": 1,
  "maxLength": 36,
  "description": "common-id"
}
view The document view Yes {
  "type": "string",
  "enum": [ "front", "back", "selfie" ]
}

Request Body

{
    "customerId" : "cstap_5mBHiIx3QbkvEpjGfKsI9k",
    "applicationId": "iapp_1BGgJeDQJFo5MCup15zq9A",
    "documents": [
        {
            "entityId": "cstap_5mBHiIx3QbkvEpjGfKsI9k",
            "documentId" : "doc_3aaOADnurXNY7wWwJPcUcq",
            "view" : "front"
        },
        {
            "entityId": "cstap_5mBHiIx3QbkvEpjGfKsI9k",
            "documentId" : "doc_3Lg7i4zu7zXZA285OP9gc2",
            "view" : "back"
        }
    ]
}

Snippet Examples

javascript

const axios = require('axios');
const data = {
    "customerId" : "cstap_5mBHiIx3QbkvEpjGfKsI9k",
    "applicationId": "iapp_1BGgJeDQJFo5MCup15zq9A",
    "documents": [
        {
            "entityId": "cstap_5mBHiIx3QbkvEpjGfKsI9k",
            "documentId" : "doc_3aaOADnurXNY7wWwJPcUcq",
            "view" : "front"
        },
        {
            "entityId": "cstap_5mBHiIx3QbkvEpjGfKsI9k",
            "documentId" : "doc_3Lg7i4zu7zXZA285OP9gc2",
            "view" : "back"
        }
    ]
};
const config = {
  method: 'POST',
  url: '${CONNECTFI_BASE_URL}/akepa/update',
  headers: {
    'Content-Type': "application/json",
    'x-connectfi-token': "A long random string token received from /auth/get-token request"
  },
  data
};

let result;
try {
  result = await axios.request(config);
  if (result.status === 200) {
    console.log(JSON.stringify(result.data));
  }
} catch (err) {
  console.log({
    errCode: err.code,
    responseStatus: err.response && err.response.status,
    data: err.response && JSON.stringify(err.response.data)
  });
}

cURL

curl --location "CONNECTFI_BASE_URL/akepa/update" --data "{\"customerId\": \"cstap_5mBHiIx3QbkvEpjGfKsI9k\",\"applicationId\":\"iapp_1BGgJeDQJFo5MCup15zq9A\",   \"documents\":[        {            \"entityId\":\"cstap_5mBHiIx3QbkvEpjGfKsI9k\",           \"documentId\": \"doc_3aaOADnurXNY7wWwJPcUcq\",           \"view\": \"front\"        },       {            \"entityId\":\"cstap_5mBHiIx3QbkvEpjGfKsI9k\",           \"documentId\": \"doc_3Lg7i4zu7zXZA285OP9gc2\",           \"view\": \"back\"        }    ]}" --header "Content-Type: application/json" --header "x-connectfi-token: A long random string token received from /auth/get-token request" 

Successful Response Examples

200 AKEPA/UPDATE SUCCESSFUL RESPONSE FOR INDIVIDUAL CUSTOMER

HEADERS

Header Value
Content-Type application/json
x-connectfi-token A long random string token received from /auth/get-token request

REQUEST BODY

{
    "customerId" : "cstap_5mBHiIx3QbkvEpjGfKsI9k",
    "applicationId": "iapp_1BGgJeDQJFo5MCup15zq9A",
    "documents": [
        {
            "entityId": "cstap_5mBHiIx3QbkvEpjGfKsI9k",
            "documentId" : "doc_3aaOADnurXNY7wWwJPcUcq",
            "view" : "front"
        },
        {
            "entityId": "cstap_5mBHiIx3QbkvEpjGfKsI9k",
            "documentId" : "doc_3Lg7i4zu7zXZA285OP9gc2",
            "view" : "back"
        }
    ]
}

RESPONSE BODY

{
    "code": "0",
    "data": {
        "applicationId": "iapp_1BGgJeDQJFo5MCup15zq9A",
        "aggregatorId": "CLIENTID",
        "customerId": "cstap_5mBHiIx3QbkvEpjGfKsI9k",
        "reference": "extRefApp101",
        "status": "completed",
        "outcome": "Approved",
        "entityApplications": [
            {
                "entityId": "cstap_5mBHiIx3QbkvEpjGfKsI9k",
                "isCustomer": true,
                "status": "completed",
                "outcome": "approved"
            }
        ]
    },
    "requestId": "a03e0e70b9fd11eeb6a5bb65dd1aad12"
}

200 AKEPA/UPDATE SUCCESSFUL RESPONSE FOR BUSINESS CUSTOMER

HEADERS

Header Value
Content-Type application/json
x-connectfi-token A long random string token received from /auth/get-token request

REQUEST BODY

{
    "customerId" : "cstab_2rw49JIoVAl3PCsaXdNoSS",
    "applicationId": "iapp_3akMumble7qYVIe8rmjq14",
    "documents": [
        {
            "entityId": "cstab_2rw49LnrnSuy9206ylJ2bU",
            "documentId" : "doc_3aaOADnurXNY7wWwJPcUcq",
            "view" : "front"
        },
        {
            "entityId": "cstab_2rw49LnrnSuy9206ylJ2bU",
            "documentId" : "doc_3Lg7i4zu7zXZA285OP9gc2",
            "view" : "back"
        }
    ]
}

RESPONSE BODY

{
    "code": "0",
    "data": {
        "applicationId": "iapp_3akMumble7qYVIe8rmjq14",
        "aggregatorId": "CLIENTID",
        "customerId": "cstab_2rw49JIoVAl3PCsaXdNoSS",
        "reference": "extRefBApp101",
        "status": "completed",
        "outcome": "Approved",
        "entityApplications": [
            {
                "entityId": "cstab_2rw49LnrnSuy9206ylJ2bU",
                "isCustomer": false,
                "status": "completed",
                "outcome": "approved"
            },
            {
                "entityId": "cstab_2rw49JIoVAl3PCsaXdNoSS",
                "isCustomer": true,
                "status": "completed",
                "outcome": "approved"
            }
        ]
    },
    "requestId": "75f44ac0b9fe11eeb6a5bb65dd1aad12"
}