Prepare document uploads
curl --request POST \
--url https://api.xentfi.com/v1/onboarding/cases/{caseId}/uploads/prepare \
--header 'Content-Type: application/json' \
--header 'apiKey: <api-key>' \
--header 'orgId: <api-key>' \
--data '
{
"files": [
{
"field": "identifyingInformation[0].documentFront",
"side": "front"
}
]
}
'const options = {
method: 'POST',
headers: {apiKey: '<api-key>', orgId: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({files: [{field: 'identifyingInformation[0].documentFront', side: 'front'}]})
};
fetch('https://api.xentfi.com/v1/onboarding/cases/{caseId}/uploads/prepare', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.xentfi.com/v1/onboarding/cases/{caseId}/uploads/prepare"
payload = { "files": [
{
"field": "identifyingInformation[0].documentFront",
"side": "front"
}
] }
headers = {
"apiKey": "<api-key>",
"orgId": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.xentfi.com/v1/onboarding/cases/{caseId}/uploads/prepare"
payload := strings.NewReader("{\n \"files\": [\n {\n \"field\": \"identifyingInformation[0].documentFront\",\n \"side\": \"front\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apiKey", "<api-key>")
req.Header.Add("orgId", "<api-key>")
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))
}const options = {
method: 'POST',
headers: {apiKey: '<api-key>', orgId: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({files: [{field: 'identifyingInformation[0].documentFront', side: 'front'}]})
};
fetch('https://api.xentfi.com/v1/onboarding/cases/{caseId}/uploads/prepare', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"caseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"uploads": [
{
"uploadId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"field": "<string>",
"side": "<string>",
"method": "POST",
"url": "<string>",
"headers": {},
"accept": [
"<string>"
],
"maxFileSizeBytes": 123,
"expiresAt": "2023-11-07T05:31:56Z"
}
]
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Wallet not found",
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Wallet not found",
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}Customer Onboarding
Prepare document uploads
Issues one upload slot per image (one side of one document). Put each returned uploadId into the matching schema property (documentFront / documentBack). Slots expire after 1 hour.
POST
/
v1
/
onboarding
/
cases
/
{caseId}
/
uploads
/
prepare
Prepare document uploads
curl --request POST \
--url https://api.xentfi.com/v1/onboarding/cases/{caseId}/uploads/prepare \
--header 'Content-Type: application/json' \
--header 'apiKey: <api-key>' \
--header 'orgId: <api-key>' \
--data '
{
"files": [
{
"field": "identifyingInformation[0].documentFront",
"side": "front"
}
]
}
'const options = {
method: 'POST',
headers: {apiKey: '<api-key>', orgId: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({files: [{field: 'identifyingInformation[0].documentFront', side: 'front'}]})
};
fetch('https://api.xentfi.com/v1/onboarding/cases/{caseId}/uploads/prepare', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.xentfi.com/v1/onboarding/cases/{caseId}/uploads/prepare"
payload = { "files": [
{
"field": "identifyingInformation[0].documentFront",
"side": "front"
}
] }
headers = {
"apiKey": "<api-key>",
"orgId": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.xentfi.com/v1/onboarding/cases/{caseId}/uploads/prepare"
payload := strings.NewReader("{\n \"files\": [\n {\n \"field\": \"identifyingInformation[0].documentFront\",\n \"side\": \"front\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apiKey", "<api-key>")
req.Header.Add("orgId", "<api-key>")
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))
}const options = {
method: 'POST',
headers: {apiKey: '<api-key>', orgId: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({files: [{field: 'identifyingInformation[0].documentFront', side: 'front'}]})
};
fetch('https://api.xentfi.com/v1/onboarding/cases/{caseId}/uploads/prepare', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"caseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"uploads": [
{
"uploadId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"field": "<string>",
"side": "<string>",
"method": "POST",
"url": "<string>",
"headers": {},
"accept": [
"<string>"
],
"maxFileSizeBytes": 123,
"expiresAt": "2023-11-07T05:31:56Z"
}
]
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Wallet not found",
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Wallet not found",
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}
