Skip to content

Generate Document

Request URL

POST /document/generate (deprecated)


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 generate a random document ID. This ID is not associated with any particular customer when generated. The document ID, along with an initial upload status of false will be returned in JSON format. As long as a valid "x-connectfi-token" is included in the request headers, this request will always return status code 200. No request body or path parameters are needed. After successfully generating a document ID, you will then need to upload the document file using the /document/upload/:documentId endpoint.

There are three steps that must occur to upload a document that is not associated with a particular customer.

  1. First, a document ID must be generated using the /document/generate endpoint. This is the ID that will be used to refer to the document in the connectFi system. This ID can also be used to later create an association between the document and a specific customer, essentially linking the document to the customer. (see /customer/kyc/document-link)
  2. Store the returned document ID locally.
  3. Once a document ID exists, the document file can be uploaded using the /document/upload/:documentId endpoint. Make sure to include the document ID as a path parameter when making this request.

After the document id has been generated and a file has been uploaded for it, then you may use a document-link request to associate the document with an existing customer document id. (see linking a document to an existing customer)

Request Body


    "x-connectfi-token": "a long random string" //Authorization token received from /auth/get-token request



Successful Response Example

200 (HTTP response status code) -- Success, a document ID is returned

        "code": "0", //Success
        "data": {
            "id": "sdoc_41S8eM8HpVb12fKSCLF1S0", //document ID in connectFi
            "uploadStatus": false //initial upload status of false