Confirm a direct KYC document upload
curl --request POST \
--url https://sandbox.apocor.ai/v1/applicants/{id}/kyc-direct/uploads/complete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"category": "id_front",
"s3Key": "kyc-direct/org_abc/app_abc123/id_front/….jpg",
"contentType": "image/jpeg",
"fileName": "passport-front.jpg"
}
'import requests
url = "https://sandbox.apocor.ai/v1/applicants/{id}/kyc-direct/uploads/complete"
payload = {
"category": "id_front",
"s3Key": "kyc-direct/org_abc/app_abc123/id_front/….jpg",
"contentType": "image/jpeg",
"fileName": "passport-front.jpg"
}
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({
category: 'id_front',
s3Key: 'kyc-direct/org_abc/app_abc123/id_front/….jpg',
contentType: 'image/jpeg',
fileName: 'passport-front.jpg'
})
};
fetch('https://sandbox.apocor.ai/v1/applicants/{id}/kyc-direct/uploads/complete', 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://sandbox.apocor.ai/v1/applicants/{id}/kyc-direct/uploads/complete",
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([
'category' => 'id_front',
's3Key' => 'kyc-direct/org_abc/app_abc123/id_front/….jpg',
'contentType' => 'image/jpeg',
'fileName' => 'passport-front.jpg'
]),
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://sandbox.apocor.ai/v1/applicants/{id}/kyc-direct/uploads/complete"
payload := strings.NewReader("{\n \"category\": \"id_front\",\n \"s3Key\": \"kyc-direct/org_abc/app_abc123/id_front/….jpg\",\n \"contentType\": \"image/jpeg\",\n \"fileName\": \"passport-front.jpg\"\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://sandbox.apocor.ai/v1/applicants/{id}/kyc-direct/uploads/complete")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"category\": \"id_front\",\n \"s3Key\": \"kyc-direct/org_abc/app_abc123/id_front/….jpg\",\n \"contentType\": \"image/jpeg\",\n \"fileName\": \"passport-front.jpg\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.apocor.ai/v1/applicants/{id}/kyc-direct/uploads/complete")
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 \"category\": \"id_front\",\n \"s3Key\": \"kyc-direct/org_abc/app_abc123/id_front/….jpg\",\n \"contentType\": \"image/jpeg\",\n \"fileName\": \"passport-front.jpg\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"documents": [
{
"category": "id_front",
"s3Key": "kyc-direct/org_abc/app_abc123/id_front/….jpg",
"contentType": "image/jpeg",
"fileName": "passport-front.jpg"
}
]
}
}{
"error": {
"code": "INVALID_REQUEST",
"message": "Applicant must be approved"
}
}Identity verification (KYC)
Confirm a direct KYC document upload
Step 2 of direct document KYC. Call after a successful PUT to the presigned URL. Pass the key from step 1 as s3Key. Repeat for id_front, selfie, and id_back (id_back is not required for PASSPORT).
POST
/
v1
/
applicants
/
{id}
/
kyc-direct
/
uploads
/
complete
Confirm a direct KYC document upload
curl --request POST \
--url https://sandbox.apocor.ai/v1/applicants/{id}/kyc-direct/uploads/complete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"category": "id_front",
"s3Key": "kyc-direct/org_abc/app_abc123/id_front/….jpg",
"contentType": "image/jpeg",
"fileName": "passport-front.jpg"
}
'import requests
url = "https://sandbox.apocor.ai/v1/applicants/{id}/kyc-direct/uploads/complete"
payload = {
"category": "id_front",
"s3Key": "kyc-direct/org_abc/app_abc123/id_front/….jpg",
"contentType": "image/jpeg",
"fileName": "passport-front.jpg"
}
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({
category: 'id_front',
s3Key: 'kyc-direct/org_abc/app_abc123/id_front/….jpg',
contentType: 'image/jpeg',
fileName: 'passport-front.jpg'
})
};
fetch('https://sandbox.apocor.ai/v1/applicants/{id}/kyc-direct/uploads/complete', 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://sandbox.apocor.ai/v1/applicants/{id}/kyc-direct/uploads/complete",
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([
'category' => 'id_front',
's3Key' => 'kyc-direct/org_abc/app_abc123/id_front/….jpg',
'contentType' => 'image/jpeg',
'fileName' => 'passport-front.jpg'
]),
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://sandbox.apocor.ai/v1/applicants/{id}/kyc-direct/uploads/complete"
payload := strings.NewReader("{\n \"category\": \"id_front\",\n \"s3Key\": \"kyc-direct/org_abc/app_abc123/id_front/….jpg\",\n \"contentType\": \"image/jpeg\",\n \"fileName\": \"passport-front.jpg\"\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://sandbox.apocor.ai/v1/applicants/{id}/kyc-direct/uploads/complete")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"category\": \"id_front\",\n \"s3Key\": \"kyc-direct/org_abc/app_abc123/id_front/….jpg\",\n \"contentType\": \"image/jpeg\",\n \"fileName\": \"passport-front.jpg\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.apocor.ai/v1/applicants/{id}/kyc-direct/uploads/complete")
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 \"category\": \"id_front\",\n \"s3Key\": \"kyc-direct/org_abc/app_abc123/id_front/….jpg\",\n \"contentType\": \"image/jpeg\",\n \"fileName\": \"passport-front.jpg\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"documents": [
{
"category": "id_front",
"s3Key": "kyc-direct/org_abc/app_abc123/id_front/….jpg",
"contentType": "image/jpeg",
"fileName": "passport-front.jpg"
}
]
}
}{
"error": {
"code": "INVALID_REQUEST",
"message": "Applicant must be approved"
}
}Authorizations
Bearer access token obtained from POST /v1/oauth/token using your Apocor API key.
Path Parameters
Resource identifier.
Body
application/json
Response
Documents recorded on the applicant.
Show child attributes
Show child attributes