Download Verification Document
curl --request GET \
--url https://api.rolla.xyz/api/v1/external/accounts/{accountId}/verification/documents/{imageId} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.rolla.xyz/api/v1/external/accounts/{accountId}/verification/documents/{imageId}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.rolla.xyz/api/v1/external/accounts/{accountId}/verification/documents/{imageId}', 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.rolla.xyz/api/v1/external/accounts/{accountId}/verification/documents/{imageId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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.rolla.xyz/api/v1/external/accounts/{accountId}/verification/documents/{imageId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-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.get("https://api.rolla.xyz/api/v1/external/accounts/{accountId}/verification/documents/{imageId}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rolla.xyz/api/v1/external/accounts/{accountId}/verification/documents/{imageId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body"<string>"{
"status": 400,
"message": "Validation failed",
"code": "ACCOUNT_RESTRICTED",
"errors": [
{
"path": [
"amount"
],
"message": "amount must be a whole number of smallest currency units (e.g. cents)"
}
]
}{
"status": 400,
"message": "Validation failed",
"code": "ACCOUNT_RESTRICTED",
"errors": [
{
"path": [
"amount"
],
"message": "amount must be a whole number of smallest currency units (e.g. cents)"
}
]
}{
"status": 404,
"message": "Document not found for this account"
}Verification & KYC
Download Verification Document
Returns the document file itself. Files are proxied through Rolla, so you never call the identity provider directly. An imageId is only readable through the account it belongs to.
GET
/
accounts
/
{accountId}
/
verification
/
documents
/
{imageId}
Download Verification Document
curl --request GET \
--url https://api.rolla.xyz/api/v1/external/accounts/{accountId}/verification/documents/{imageId} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.rolla.xyz/api/v1/external/accounts/{accountId}/verification/documents/{imageId}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.rolla.xyz/api/v1/external/accounts/{accountId}/verification/documents/{imageId}', 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.rolla.xyz/api/v1/external/accounts/{accountId}/verification/documents/{imageId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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.rolla.xyz/api/v1/external/accounts/{accountId}/verification/documents/{imageId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-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.get("https://api.rolla.xyz/api/v1/external/accounts/{accountId}/verification/documents/{imageId}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rolla.xyz/api/v1/external/accounts/{accountId}/verification/documents/{imageId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body"<string>"{
"status": 400,
"message": "Validation failed",
"code": "ACCOUNT_RESTRICTED",
"errors": [
{
"path": [
"amount"
],
"message": "amount must be a whole number of smallest currency units (e.g. cents)"
}
]
}{
"status": 400,
"message": "Validation failed",
"code": "ACCOUNT_RESTRICTED",
"errors": [
{
"path": [
"amount"
],
"message": "amount must be a whole number of smallest currency units (e.g. cents)"
}
]
}{
"status": 404,
"message": "Document not found for this account"
}Returns the document file itself. Take
For a beneficial owner or director, use the related-person path:
Document not on this account (
imageId from Get Verification Documents.
The response is the raw file, not JSON. Files are proxied through Rolla, so you never talk to the identity provider directly.
Example Request
curl -X GET "https://api.rolla.xyz/api/v1/external/accounts/b6075be0-f1d0-451f-a468-3e94563101d2/verification/documents/909788538" \
-H "X-API-Key: your_api_key_here" \
-o passport.png
curl -X GET "https://api.rolla.xyz/api/v1/external/accounts/{accountId}/related-persons/{personId}/verification/documents/{imageId}" \
-H "X-API-Key: your_api_key_here" \
-o owner-passport.jpg
Response
The file, withContent-Type and Content-Disposition set from its actual format.
| Header | Example |
|---|---|
Content-Type | image/png, image/jpeg, image/webp or application/pdf (application/octet-stream if the format is not recognised) |
Content-Disposition | inline; filename="909788538.png" |
Do not assume JPEG. Applicants upload whatever their device produced — PNG and PDF are as common as JPEG, and the two documents we tested against came back as a 3.7 MB PNG and a 419 KB JPEG. Read
Content-Type and set your file extension from it.An
imageId is only readable through the account it belongs to. Requesting one that belongs to a different customer returns 404, whether or not the id is valid.Error Responses
Document not on this account (404)
{
"status": 404,
"message": "Document not found for this account"
}
Authorizations
Your Rolla API key
Path Parameters
Identifier of an individual account owned by the same user as your API key's business
Identifier of the document, taken from documents[].imageId
Response
The document file. Content-Type is sniffed from the file itself (PNG, JPEG, WebP or PDF; application/octet-stream if the format is not recognised), so read it rather than assuming JPEG.
The response is of type file.