Attach Documents
curl --request POST \
--url https://{your-domain}.fincode.software/api/v6/services/documentmanagement/attach-documents \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <x-auth-token>' \
--header 'platform: <platform>' \
--header 'uuid: <uuid>' \
--data '
{
"customerCode": "CUST123456",
"attachedDocument": [
{
"name": "proof_of_address.jpg",
"idType": "ADDRESS_PROOF",
"file_base64": "data:image/jpeg;base64,/9j/4AAQSkZJRg..."
}
]
}
'import requests
url = "https://{your-domain}.fincode.software/api/v6/services/documentmanagement/attach-documents"
payload = {
"customerCode": "CUST123456",
"attachedDocument": [
{
"name": "proof_of_address.jpg",
"idType": "ADDRESS_PROOF",
"file_base64": "data:image/jpeg;base64,/9j/4AAQSkZJRg..."
}
]
}
headers = {
"platform": "<platform>",
"uuid": "<uuid>",
"X-Auth-Token": "<x-auth-token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
platform: '<platform>',
uuid: '<uuid>',
'X-Auth-Token': '<x-auth-token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
customerCode: 'CUST123456',
attachedDocument: [
{
name: 'proof_of_address.jpg',
idType: 'ADDRESS_PROOF',
file_base64: 'data:image/jpeg;base64,/9j/4AAQSkZJRg...'
}
]
})
};
fetch('https://{your-domain}.fincode.software/api/v6/services/documentmanagement/attach-documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{your-domain}.fincode.software/api/v6/services/documentmanagement/attach-documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'customerCode' => 'CUST123456',
'attachedDocument' => [
[
'name' => 'proof_of_address.jpg',
'idType' => 'ADDRESS_PROOF',
'file_base64' => 'data:image/jpeg;base64,/9j/4AAQSkZJRg...'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Auth-Token: <x-auth-token>",
"platform: <platform>",
"uuid: <uuid>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{your-domain}.fincode.software/api/v6/services/documentmanagement/attach-documents"
payload := strings.NewReader("{\n \"customerCode\": \"CUST123456\",\n \"attachedDocument\": [\n {\n \"name\": \"proof_of_address.jpg\",\n \"idType\": \"ADDRESS_PROOF\",\n \"file_base64\": \"data:image/jpeg;base64,/9j/4AAQSkZJRg...\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("platform", "<platform>")
req.Header.Add("uuid", "<uuid>")
req.Header.Add("X-Auth-Token", "<x-auth-token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{your-domain}.fincode.software/api/v6/services/documentmanagement/attach-documents")
.header("platform", "<platform>")
.header("uuid", "<uuid>")
.header("X-Auth-Token", "<x-auth-token>")
.header("Content-Type", "application/json")
.body("{\n \"customerCode\": \"CUST123456\",\n \"attachedDocument\": [\n {\n \"name\": \"proof_of_address.jpg\",\n \"idType\": \"ADDRESS_PROOF\",\n \"file_base64\": \"data:image/jpeg;base64,/9j/4AAQSkZJRg...\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{your-domain}.fincode.software/api/v6/services/documentmanagement/attach-documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["platform"] = '<platform>'
request["uuid"] = '<uuid>'
request["X-Auth-Token"] = '<x-auth-token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customerCode\": \"CUST123456\",\n \"attachedDocument\": [\n {\n \"name\": \"proof_of_address.jpg\",\n \"idType\": \"ADDRESS_PROOF\",\n \"file_base64\": \"data:image/jpeg;base64,/9j/4AAQSkZJRg...\"\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyAPI Endpoints
Submit KYC Documents
Upload identity and compliance documents for a customer.
POST
/
documentmanagement
/
attach-documents
Attach Documents
curl --request POST \
--url https://{your-domain}.fincode.software/api/v6/services/documentmanagement/attach-documents \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <x-auth-token>' \
--header 'platform: <platform>' \
--header 'uuid: <uuid>' \
--data '
{
"customerCode": "CUST123456",
"attachedDocument": [
{
"name": "proof_of_address.jpg",
"idType": "ADDRESS_PROOF",
"file_base64": "data:image/jpeg;base64,/9j/4AAQSkZJRg..."
}
]
}
'import requests
url = "https://{your-domain}.fincode.software/api/v6/services/documentmanagement/attach-documents"
payload = {
"customerCode": "CUST123456",
"attachedDocument": [
{
"name": "proof_of_address.jpg",
"idType": "ADDRESS_PROOF",
"file_base64": "data:image/jpeg;base64,/9j/4AAQSkZJRg..."
}
]
}
headers = {
"platform": "<platform>",
"uuid": "<uuid>",
"X-Auth-Token": "<x-auth-token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
platform: '<platform>',
uuid: '<uuid>',
'X-Auth-Token': '<x-auth-token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
customerCode: 'CUST123456',
attachedDocument: [
{
name: 'proof_of_address.jpg',
idType: 'ADDRESS_PROOF',
file_base64: 'data:image/jpeg;base64,/9j/4AAQSkZJRg...'
}
]
})
};
fetch('https://{your-domain}.fincode.software/api/v6/services/documentmanagement/attach-documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{your-domain}.fincode.software/api/v6/services/documentmanagement/attach-documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'customerCode' => 'CUST123456',
'attachedDocument' => [
[
'name' => 'proof_of_address.jpg',
'idType' => 'ADDRESS_PROOF',
'file_base64' => 'data:image/jpeg;base64,/9j/4AAQSkZJRg...'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Auth-Token: <x-auth-token>",
"platform: <platform>",
"uuid: <uuid>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{your-domain}.fincode.software/api/v6/services/documentmanagement/attach-documents"
payload := strings.NewReader("{\n \"customerCode\": \"CUST123456\",\n \"attachedDocument\": [\n {\n \"name\": \"proof_of_address.jpg\",\n \"idType\": \"ADDRESS_PROOF\",\n \"file_base64\": \"data:image/jpeg;base64,/9j/4AAQSkZJRg...\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("platform", "<platform>")
req.Header.Add("uuid", "<uuid>")
req.Header.Add("X-Auth-Token", "<x-auth-token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{your-domain}.fincode.software/api/v6/services/documentmanagement/attach-documents")
.header("platform", "<platform>")
.header("uuid", "<uuid>")
.header("X-Auth-Token", "<x-auth-token>")
.header("Content-Type", "application/json")
.body("{\n \"customerCode\": \"CUST123456\",\n \"attachedDocument\": [\n {\n \"name\": \"proof_of_address.jpg\",\n \"idType\": \"ADDRESS_PROOF\",\n \"file_base64\": \"data:image/jpeg;base64,/9j/4AAQSkZJRg...\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{your-domain}.fincode.software/api/v6/services/documentmanagement/attach-documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["platform"] = '<platform>'
request["uuid"] = '<uuid>'
request["X-Auth-Token"] = '<x-auth-token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customerCode\": \"CUST123456\",\n \"attachedDocument\": [\n {\n \"name\": \"proof_of_address.jpg\",\n \"idType\": \"ADDRESS_PROOF\",\n \"file_base64\": \"data:image/jpeg;base64,/9j/4AAQSkZJRg...\"\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyAttach one or more identity or compliance documents to a customer record. Documents are matched to outstanding KYC rules via
associatedRuleId.
Request Headers
string
required
The JWT Access Token of the authenticated user.
string
default:"fincode"
required
Platform identifier. Use
fincode.string
default:"200"
required
Unique request identifier.
Request Body
string
required
The customer’s alphanumeric customer code (e.g.
VJJGVE). Not the userId UUID.array
required
List of documents to attach. Each item has the following fields:
Show attachedDocument item
Show attachedDocument item
string
required
The document image encoded as a data URI. Must be in the format:Raw base64 (without the
data:image/jpeg;base64,<base64-encoded-content>
data:image/...;base64, prefix) is not accepted and will cause a server error.Supported MIME types: image/jpeg, image/png, application/pdf.string
required
File name including extension (e.g.
passport_front.jpg). The extension must be present — it is used to determine the file type.string
Document type. One of:
| Value | Description |
|---|---|
PASSPORT | Passport |
NATIONAL_ID_CARD | National identity card |
DRIVING_LICENSE | Driving licence |
VOTE_CARD | Voter ID / voter card |
ADDRESS_PROOF | Proof of address |
SOURCE_OF_INCOME_PROOF | Source of income proof |
EKYC_FACE_PHOTO | eKYC face photo (selfie) |
EKYC_FACE_VIDEO | eKYC face video |
BUSINESS_REGISTRATION | Business registration document |
OTHER_OFFICIAL_DOCUMENT | Other official document |
OTHER | Other |
string
The
associatedRuleId from the Awaiting Compliance Requirements response. Links this document to the outstanding KYC rule. Required when submitting a document against a specific rule — if omitted, the document is uploaded but does not automatically close any open requirement.Use the
associatedRuleId field from the awaiting compliance item, not the customer-kyc-record-id. They are different values.string
Document number (e.g. passport number).
string
ISO 3166-1 alpha-3 country code of the issuing country (e.g.
GBR).string
Issue date in ISO format (e.g.
2015-06-01).string
Expiry date in ISO format (e.g.
2030-06-01).string
Date of birth as shown on the document, in ISO format (e.g.
1990-05-15).Code Example
cURL
curl -X POST 'https://{your-domain}.fincode.software/api/v6/services/documentmanagement/attach-documents' \
--header 'X-Auth-Token: YOUR_TOKEN' \
--header 'Content-Type: application/json' \
--header 'platform: fincode' \
--header 'uuid: 200' \
--data '{
"customerCode": "VJJGVE",
"attachedDocument": [
{
"file_base64": "data:image/jpeg;base64,/9j/4AAQSkZJRgAB...",
"name": "passport_front.jpg",
"idType": "PASSPORT",
"associatedRuleId": "rule-uuid-from-awaiting-compliance",
"issueNo": "123456789",
"issueCountry": "GBR",
"issueDate": "2015-06-01",
"expiryDate": "2030-06-01",
"dob": "1990-05-15"
}
]
}'
