This endpoint is used to upload a document that is not associated with a 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. There are three steps that must occur to upload a document that is not associated with a particular customer.
- 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)
- Store the returned document ID locally.
- 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)
The following endpoints are deprecated.
|Endpoint or Section||Action|
|/document/generate||Generate a document ID|
|/document/upload/:documentId||Upload the document file|
Generate a Separate Document ID (deprecated)
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.
Request method and URL:
Request body: none
200 (HTTP response status code) -- Success, a document ID is returned
Upload a Separate Document File (deprecated)
This endpoint will upload a document file that is not associated with any specific customer. The document ID generated in the prerequisite /document/generate request above 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.
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 method and URL:
Request body: File data will be passed using multipart/form-data mode.
200 (HTTP response status code) -- Success, document was uploaded
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.