curl --request POST \
--url https://qa-api.endl.xyz/api/v0/customer/{userId}/documents \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: multipart/form-data' \
--form document='@example-file' \
--form 'idDocType=<string>' \
--form 'country=<string>' \
--form 'idDocSubType=<string>' \
--form 'side=<string>'import requests
url = "https://qa-api.endl.xyz/api/v0/customer/{userId}/documents"
files = { "document": ("example-file", open("example-file", "rb")) }
payload = {
"idDocType": "<string>",
"country": "<string>",
"idDocSubType": "<string>",
"side": "<string>"
}
headers = {"API-KEY": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('document', '<string>');
form.append('idDocType', '<string>');
form.append('country', '<string>');
form.append('idDocSubType', '<string>');
form.append('side', '<string>');
const options = {method: 'POST', headers: {'API-KEY': '<api-key>'}};
options.body = form;
fetch('https://qa-api.endl.xyz/api/v0/customer/{userId}/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://qa-api.endl.xyz/api/v0/customer/{userId}/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 => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"idDocType\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"country\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"idDocSubType\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"side\"\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"Content-Type: multipart/form-data"
],
]);
$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://qa-api.endl.xyz/api/v0/customer/{userId}/documents"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"idDocType\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"country\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"idDocSubType\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"side\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://qa-api.endl.xyz/api/v0/customer/{userId}/documents")
.header("API-KEY", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"idDocType\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"country\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"idDocSubType\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"side\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://qa-api.endl.xyz/api/v0/customer/{userId}/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["API-KEY"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"idDocType\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"country\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"idDocSubType\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"side\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"accepted": true,
"status": "SUBMITTED",
"missing": [
"SELFIE"
]
}{
"code": "400",
"message": "Document content is not a valid JPEG, PNG, or PDF",
"name": "PartnerOnboardingDocUpload failed to process"
}{
"code": "401",
"message": "Authentication Failed!",
"name": "PartnerOnboarding failed to process"
}{
"code": "404",
"message": "Not found",
"name": "PartnerOnboardingGet failed to process"
}{
"code": "413",
"message": "File too large",
"name": "File exceeds the maximum upload size of 2 MB"
}Upload document
Uploads an individual’s identity document, or a company document for a business.
For an individual, uploading the photo ID auto-submits the applicant and moves the customer to PENDING. For a business, submission waits until the company documents and every owner’s documents are in.
Content is sniffed rather than trusted by extension, so a renamed file is rejected.
curl --request POST \
--url https://qa-api.endl.xyz/api/v0/customer/{userId}/documents \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: multipart/form-data' \
--form document='@example-file' \
--form 'idDocType=<string>' \
--form 'country=<string>' \
--form 'idDocSubType=<string>' \
--form 'side=<string>'import requests
url = "https://qa-api.endl.xyz/api/v0/customer/{userId}/documents"
files = { "document": ("example-file", open("example-file", "rb")) }
payload = {
"idDocType": "<string>",
"country": "<string>",
"idDocSubType": "<string>",
"side": "<string>"
}
headers = {"API-KEY": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('document', '<string>');
form.append('idDocType', '<string>');
form.append('country', '<string>');
form.append('idDocSubType', '<string>');
form.append('side', '<string>');
const options = {method: 'POST', headers: {'API-KEY': '<api-key>'}};
options.body = form;
fetch('https://qa-api.endl.xyz/api/v0/customer/{userId}/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://qa-api.endl.xyz/api/v0/customer/{userId}/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 => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"idDocType\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"country\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"idDocSubType\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"side\"\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"Content-Type: multipart/form-data"
],
]);
$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://qa-api.endl.xyz/api/v0/customer/{userId}/documents"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"idDocType\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"country\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"idDocSubType\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"side\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://qa-api.endl.xyz/api/v0/customer/{userId}/documents")
.header("API-KEY", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"idDocType\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"country\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"idDocSubType\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"side\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://qa-api.endl.xyz/api/v0/customer/{userId}/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["API-KEY"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"idDocType\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"country\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"idDocSubType\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"side\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"accepted": true,
"status": "SUBMITTED",
"missing": [
"SELFIE"
]
}{
"code": "400",
"message": "Document content is not a valid JPEG, PNG, or PDF",
"name": "PartnerOnboardingDocUpload failed to process"
}{
"code": "401",
"message": "Authentication Failed!",
"name": "PartnerOnboarding failed to process"
}{
"code": "404",
"message": "Not found",
"name": "PartnerOnboardingGet failed to process"
}{
"code": "413",
"message": "File too large",
"name": "File exceeds the maximum upload size of 2 MB"
}Authorizations
Your partner API key. The key must carry the onboarding permission.
Path Parameters
Body
JPEG, PNG or PDF. Maximum 2 MB.
For an individual: PASSPORT, ID_CARD, DRIVERS_LICENSE, RESIDENCE_PERMIT or SELFIE — validated. For a business use COMPANY_DOC.
ISO 3166-1 alpha-3.
Which company document: INCORPORATION_CERT, INCORPORATION_ARTICLES or SHAREHOLDER_REGISTRY. Not needed for individual photo IDs.
FRONT or BACK, meaningful only for two-sided documents. Not validated — any value is passed through.
Response
Accepted. missing lists documents the provider still needs.