Get the KYC form schema
curl --request GET \
--url https://api.next.orenda.finance/v1/applications/{applicationId}/kyc/schema \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.next.orenda.finance/v1/applications/{applicationId}/kyc/schema"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.next.orenda.finance/v1/applications/{applicationId}/kyc/schema', 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}/kyc/schema",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.next.orenda.finance/v1/applications/{applicationId}/kyc/schema"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.next.orenda.finance/v1/applications/{applicationId}/kyc/schema")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.next.orenda.finance/v1/applications/{applicationId}/kyc/schema")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"schema": {
"schemaId": "basic-kyc-consumer",
"schemaInfo": {
"step-1": {
"stepName": "Employment & Financials",
"stepDescription": "",
"stepImage": "art-employment-status.svg"
},
"step-2": {
"stepName": "Personal Information",
"stepDescription": "",
"stepImage": "art-country-nationality.svg"
}
},
"step-1": [
{
"key": "employmentStatus",
"label": "Employment Status",
"description": "Please select your employment status",
"input_type": "dropdown",
"kyc_type": "questions",
"data": "string",
"required": true,
"options": [
{
"value": "Employed",
"label": "Employed"
},
{
"value": "Unemployed",
"label": "Unemployed"
},
{
"value": "Retired",
"label": "Retired"
},
{
"value": "Student",
"label": "Student"
}
]
},
{
"key": "employmentSector",
"label": "Employment Sector",
"description": "Please let us know what industry you work in",
"input_type": "dropdown",
"kyc_type": "questions",
"data": "string",
"options": [
{
"value": "Accountancy firm",
"label": "Accountancy firm"
}
],
"hide_if": {
"key": "employmentStatus",
"value": [
"Unemployed",
"Retired",
"Student"
]
},
"required_if_not": {
"key": "employmentStatus",
"value": [
"Unemployed",
"Retired",
"Student"
]
}
}
],
"step-2": [
{
"key": "countryOfBirth",
"label": "Country of Birth",
"input_type": "dropdown",
"kyc_type": "questions",
"data": "string",
"required": true,
"options": [
{
"value": "AFG",
"label": "Afghanistan"
},
{
"value": "ALB",
"label": "Albania"
}
]
},
{
"key": "confirmationOfResidence",
"label": "Confirmation of Residence",
"description": "Is your country of residence different to your nationality?",
"input_type": "dropdown",
"kyc_type": "questions",
"data": "string",
"required": true,
"options": [
{
"value": "Yes",
"label": "Yes"
},
{
"value": "No",
"label": "No"
}
]
},
{
"key": "confirmationOfResidenceDocument",
"label": "Confirmation of Residence",
"description": "Please upload a document (e.g. residence permit, visa or other government document) which confirms your right to legally live and work in your resident country",
"input_type": "document",
"kyc_type": "documentUrls",
"data": "string",
"formats": [
"jpeg",
"jpg",
"png",
"pdf"
],
"validation": {
"minFileSize": 1,
"maxFileSize": 5120
},
"show_if": {
"key": "confirmationOfResidence",
"value": [
"Yes"
]
},
"required_if": {
"key": "confirmationOfResidence",
"value": [
"Yes"
]
}
}
]
}
}
}Onboarding
Get the KYC form schema
Fetch the form to render for the current KYC/KYB step, and read its fields and rules.
GET
/
v1
/
applications
/
{applicationId}
/
kyc
/
schema
Get the KYC form schema
curl --request GET \
--url https://api.next.orenda.finance/v1/applications/{applicationId}/kyc/schema \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.next.orenda.finance/v1/applications/{applicationId}/kyc/schema"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.next.orenda.finance/v1/applications/{applicationId}/kyc/schema', 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}/kyc/schema",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.next.orenda.finance/v1/applications/{applicationId}/kyc/schema"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.next.orenda.finance/v1/applications/{applicationId}/kyc/schema")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.next.orenda.finance/v1/applications/{applicationId}/kyc/schema")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"schema": {
"schemaId": "basic-kyc-consumer",
"schemaInfo": {
"step-1": {
"stepName": "Employment & Financials",
"stepDescription": "",
"stepImage": "art-employment-status.svg"
},
"step-2": {
"stepName": "Personal Information",
"stepDescription": "",
"stepImage": "art-country-nationality.svg"
}
},
"step-1": [
{
"key": "employmentStatus",
"label": "Employment Status",
"description": "Please select your employment status",
"input_type": "dropdown",
"kyc_type": "questions",
"data": "string",
"required": true,
"options": [
{
"value": "Employed",
"label": "Employed"
},
{
"value": "Unemployed",
"label": "Unemployed"
},
{
"value": "Retired",
"label": "Retired"
},
{
"value": "Student",
"label": "Student"
}
]
},
{
"key": "employmentSector",
"label": "Employment Sector",
"description": "Please let us know what industry you work in",
"input_type": "dropdown",
"kyc_type": "questions",
"data": "string",
"options": [
{
"value": "Accountancy firm",
"label": "Accountancy firm"
}
],
"hide_if": {
"key": "employmentStatus",
"value": [
"Unemployed",
"Retired",
"Student"
]
},
"required_if_not": {
"key": "employmentStatus",
"value": [
"Unemployed",
"Retired",
"Student"
]
}
}
],
"step-2": [
{
"key": "countryOfBirth",
"label": "Country of Birth",
"input_type": "dropdown",
"kyc_type": "questions",
"data": "string",
"required": true,
"options": [
{
"value": "AFG",
"label": "Afghanistan"
},
{
"value": "ALB",
"label": "Albania"
}
]
},
{
"key": "confirmationOfResidence",
"label": "Confirmation of Residence",
"description": "Is your country of residence different to your nationality?",
"input_type": "dropdown",
"kyc_type": "questions",
"data": "string",
"required": true,
"options": [
{
"value": "Yes",
"label": "Yes"
},
{
"value": "No",
"label": "No"
}
]
},
{
"key": "confirmationOfResidenceDocument",
"label": "Confirmation of Residence",
"description": "Please upload a document (e.g. residence permit, visa or other government document) which confirms your right to legally live and work in your resident country",
"input_type": "document",
"kyc_type": "documentUrls",
"data": "string",
"formats": [
"jpeg",
"jpg",
"png",
"pdf"
],
"validation": {
"minFileSize": 1,
"maxFileSize": 5120
},
"show_if": {
"key": "confirmationOfResidence",
"value": [
"Yes"
]
},
"required_if": {
"key": "confirmationOfResidence",
"value": [
"Yes"
]
}
}
]
}
}
}When
Any other property on a field is for internal use. Ignore it, and don’t send it back.
Dropdown answers must be one of the field’s option
It holds when the field named by
Rules for combining them:
Here
currentStep is KYC_FORM, fetch the form definition and render it. Each program
has its own form, so build the UI from the schema rather than from a fixed list of fields.
Collect the answers and send them to Submit KYC data (companies:
Submit KYB data).
Schema layout
data.schema is an object with three kinds of key:
| Key | What it holds |
|---|---|
schemaId | The form’s id, e.g. basic-kyc-consumer. |
schemaInfo | Per-step display text: schemaInfo["step-1"] has stepName, stepDescription and stepImage. |
step-1, step-2, … | One page of the form each: an array of fields, in display order. |
stepImage is a file name such as art-employment-status.svg, not a URL. Treat it as a
hint for which illustration to show, from your own assets, or leave it out.
Fields
Each entry in a step is a field:{
"key": "employmentStatus",
"label": "Employment Status",
"description": "Please select your employment status",
"input_type": "dropdown",
"kyc_type": "questions",
"data": "string",
"required": true,
"options": [
{ "value": "Employed", "label": "Employed" },
{ "value": "Unemployed", "label": "Unemployed" }
]
}
| Property | Meaning |
|---|---|
key | The field’s id. It’s the key you submit the answer under. |
label | The field’s title. |
description | Help text to show under the label. Optional. |
input_type | The control to render: text, textarea, email, phone, number, date, dropdown, document, group or heading. |
kyc_type | How the answer is handled: questions (a typed answer), documentUrls (files you upload first, then submit as storage URLs), documents (a file field that can’t currently be submitted through the API) or heading (display only). |
data | The JSON type the answer takes: "string", "array" or "number". In the submit, data carries the answer itself. |
required | true: the field must be answered. Absent means false. |
options | For dropdown: an array of { value, label }. Show the label, submit the value. They often differ: { "value": "AFG", "label": "Afghanistan" }, { "value": "500", "label": "1 to 500" }. An option can carry its own hide_if (see Conditions). |
default | An option value to preselect. |
multiple | true: the field takes several answers, submitted as an array (data: "array"). On a document field, maxEntries is how many files it takes. |
formats | Document fields: the allowed file extensions, e.g. ["jpeg", "jpg", "png", "pdf"]. |
validation | Rules for the answer. See Validation. |
required_if, required_if_not, show_if, hide_if | Conditions that make the field required or visible depending on another answer. See Conditions. |
parent_element | The key of the heading field this field sits under. Use it to group fields visually. |
Groups
Agroup field (KYB forms, e.g. beneficial owners) is a repeatable sub-form. Its inputs are
in fields, an array of fields in the same format. repeatable: true means the user can add
several entries, minEntries is the fewest entries allowed, and entryLabel titles the
section. See Submit KYB data for how entries are submitted.
Headings
A field withkyc_type: "heading" (and input_type: "heading") is a section title, not an
input. Show its label, and don’t submit an answer for it.
Validation
validation can carry these rules. The “Checked on submit” column says whether the submit
endpoint rejects an answer that breaks the rule. Check every rule in your form anyway, so the
user sees the problem before submitting.
| Rule | Applies to | Meaning | Checked on submit |
|---|---|---|---|
regex | text-like answers | A JavaScript (ECMAScript) regular expression, without flags, tested against the answer. Only non-empty answers are tested. | Yes |
errorMessage | with regex | The message to show when regex fails. | Yes. The submit error uses it as its message. |
minAge | date | Minimum age in whole years, counted from the date of birth given. | Yes |
min, max | number | Lowest and highest allowed value. | Yes |
maxLength | text-like answers | Most characters allowed. | No |
minFileSize, maxFileSize | document fields | Smallest and largest file allowed, in kilobytes (1 KB = 1,024 bytes). maxFileSize: 5120 is 5 MB. | No. Check the file size before you upload it. |
values. The submit rejects anything else.
Conditions
A condition is an object with akey and a value list:
"show_if": { "key": "confirmationOfResidence", "value": ["Yes"] }
key currently has an answer equal to any entry in
value. Compare against the option value, not the label. An unanswered field matches
nothing, so the condition doesn’t hold. A condition names one field; the value list
is an OR across answers. There is no AND/OR across fields within one condition.
| Condition | Effect |
|---|---|
show_if | Show the field only while the condition holds. |
hide_if | Hide the field while the condition holds. On an option, hide that option. |
required_if | The field is required while the condition holds. |
required_if_not | The field is required while the condition does not hold. |
- A field can carry more than one condition. Apply each one on its own. Fields usually
pair a visibility rule with a required rule on the same answer, for example
show_if+required_if(shown and required only for “Yes”), orhide_if+required_if_not(hidden for some answers, required for the rest). required: truealways makes a field required, whatever its conditions say.keynames a field in the same step. Inside a group entry, it can also name another field of that entry. A condition can’t depend on a field in another step, because only the answers sent for this step are checked.- Conditions chain. A field that is hidden has no answer, so any field that depends on it
is hidden as well. For example,
moreInfoOnTiesToCountryshows only for a “Yes” tonationalCountryTies, which itself shows only for a “Yes” toconfirmationOfResidence. - Don’t submit answers for hidden fields. The submit validates and stores every answer you send, including one for a field the user can’t see.
required and required_if against the answers in the same
request. It does not evaluate show_if, hide_if or required_if_not, so your form must
apply them.
Example
A trimmedbasic-kyc-consumer schema (option lists shortened, internal properties left out):
{
"schemaId": "basic-kyc-consumer",
"schemaInfo": {
"step-1": { "stepName": "Employment & Financials", "stepDescription": "", "stepImage": "art-employment-status.svg" },
"step-2": { "stepName": "Personal Information", "stepDescription": "", "stepImage": "art-country-nationality.svg" }
},
"step-1": [
{
"key": "employmentStatus", "label": "Employment Status", "input_type": "dropdown",
"kyc_type": "questions", "data": "string", "required": true,
"options": [
{ "value": "Employed", "label": "Employed" },
{ "value": "Unemployed", "label": "Unemployed" },
{ "value": "Retired", "label": "Retired" },
{ "value": "Student", "label": "Student" }
]
},
{
"key": "employmentSector", "label": "Employment Sector", "input_type": "dropdown",
"kyc_type": "questions", "data": "string",
"options": [{ "value": "Accountancy firm", "label": "Accountancy firm" }],
"hide_if": { "key": "employmentStatus", "value": ["Unemployed", "Retired", "Student"] },
"required_if_not": { "key": "employmentStatus", "value": ["Unemployed", "Retired", "Student"] }
}
],
"step-2": [
{
"key": "confirmationOfResidence", "label": "Confirmation of Residence", "input_type": "dropdown",
"kyc_type": "questions", "data": "string", "required": true,
"options": [{ "value": "Yes", "label": "Yes" }, { "value": "No", "label": "No" }]
},
{
"key": "confirmationOfResidenceDocument", "label": "Confirmation of Residence",
"input_type": "document", "kyc_type": "documentUrls", "data": "string",
"formats": ["jpeg", "jpg", "png", "pdf"],
"validation": { "minFileSize": 1, "maxFileSize": 5120 },
"show_if": { "key": "confirmationOfResidence", "value": ["Yes"] },
"required_if": { "key": "confirmationOfResidence", "value": ["Yes"] }
}
]
}
employmentSector is shown and required unless the user is unemployed, retired or a
student. confirmationOfResidenceDocument is shown and required only when
confirmationOfResidence is Yes. Submit KYC data shows the
matching submission.Authorizations
The user's access_token from authentication. The program and environment (sandbox/prod) are read from the token.
Path Parameters
The application id from create / get.