POST
/
v1
/
applications
/
{applicationId}
/
documents
Upload a KYC document
curl --request POST \
  --url https://api.next.orenda.finance/v1/applications/{applicationId}/documents \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "documentType": "PROOF_OF_ADDRESS",
  "fileName": "proof-of-address.pdf",
  "fileBase64": "JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PC9UeXBlL...",
  "country": "GB",
  "contentType": "application/pdf"
}
'
import requests

url = "https://api.next.orenda.finance/v1/applications/{applicationId}/documents"

payload = {
"documentType": "PROOF_OF_ADDRESS",
"fileName": "proof-of-address.pdf",
"fileBase64": "JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PC9UeXBlL...",
"country": "GB",
"contentType": "application/pdf"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
documentType: 'PROOF_OF_ADDRESS',
fileName: 'proof-of-address.pdf',
fileBase64: 'JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PC9UeXBlL...',
country: 'GB',
contentType: 'application/pdf'
})
};

fetch('https://api.next.orenda.finance/v1/applications/{applicationId}/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://api.next.orenda.finance/v1/applications/{applicationId}/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([
'documentType' => 'PROOF_OF_ADDRESS',
'fileName' => 'proof-of-address.pdf',
'fileBase64' => 'JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PC9UeXBlL...',
'country' => 'GB',
'contentType' => 'application/pdf'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$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://api.next.orenda.finance/v1/applications/{applicationId}/documents"

payload := strings.NewReader("{\n \"documentType\": \"PROOF_OF_ADDRESS\",\n \"fileName\": \"proof-of-address.pdf\",\n \"fileBase64\": \"JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PC9UeXBlL...\",\n \"country\": \"GB\",\n \"contentType\": \"application/pdf\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <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://api.next.orenda.finance/v1/applications/{applicationId}/documents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"documentType\": \"PROOF_OF_ADDRESS\",\n \"fileName\": \"proof-of-address.pdf\",\n \"fileBase64\": \"JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PC9UeXBlL...\",\n \"country\": \"GB\",\n \"contentType\": \"application/pdf\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.next.orenda.finance/v1/applications/{applicationId}/documents")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"documentType\": \"PROOF_OF_ADDRESS\",\n \"fileName\": \"proof-of-address.pdf\",\n \"fileBase64\": \"JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PC9UeXBlL...\",\n \"country\": \"GB\",\n \"contentType\": \"application/pdf\"\n}"

response = http.request(request)
puts response.read_body
{
  "success": true,
  "documentUrl": "s3://orenda-kyc-documents/app_5e8d2f1a/proof-of-address.pdf"
}
{
"success": false,
"code": "VALIDATION_ERROR",
"message": "isCompany is required"
}

Authorizations

Authorization
string
header
required

The user's access_token from authentication. The program and environment (sandbox/prod) are read from the token.

Path Parameters

applicationId
string
required

The application id from create / get.

Body

application/json
documentType
string
required

Required. A document type from the program's KYC schema.

fileName
string
required

Required. Original filename with extension.

fileBase64
string
required

Required. Base64-encoded file content.

country
string
required

Required. Country of issue (ISO code).

contentType
string
required

Required. MIME type, e.g. application/pdf.

Response

Uploaded

success
boolean
Example:

true

documentUrl
string

Storage URI of the uploaded document.