Delete Document
curl --request DELETE \
--url https://api.rolla.xyz/api/v1/external/accounts/{accountId}/documents \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"documentType": "bank_statement"
}
'import requests
url = "https://api.rolla.xyz/api/v1/external/accounts/{accountId}/documents"
payload = { "documentType": "bank_statement" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({documentType: 'bank_statement'})
};
fetch('https://api.rolla.xyz/api/v1/external/accounts/{accountId}/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://api.rolla.xyz/api/v1/external/accounts/{accountId}/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'documentType' => 'bank_statement'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.rolla.xyz/api/v1/external/accounts/{accountId}/documents"
payload := strings.NewReader("{\n \"documentType\": \"bank_statement\"\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("X-API-Key", "<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))
}HttpResponse<String> response = Unirest.delete("https://api.rolla.xyz/api/v1/external/accounts/{accountId}/documents")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"documentType\": \"bank_statement\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rolla.xyz/api/v1/external/accounts/{accountId}/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"documentType\": \"bank_statement\"\n}"
response = http.request(request)
puts response.read_body{
"status": 200,
"message": "Document deleted successfully",
"success": true
}{
"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"
}Documents
Delete Document
Deletes an uploaded document by type. The type is sent in a JSON request body, not in the path. Use relatedPersonId to target a document attached to a specific related person; without it, only documents held against the business itself are considered.
DELETE
/
accounts
/
{accountId}
/
documents
Delete Document
curl --request DELETE \
--url https://api.rolla.xyz/api/v1/external/accounts/{accountId}/documents \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"documentType": "bank_statement"
}
'import requests
url = "https://api.rolla.xyz/api/v1/external/accounts/{accountId}/documents"
payload = { "documentType": "bank_statement" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({documentType: 'bank_statement'})
};
fetch('https://api.rolla.xyz/api/v1/external/accounts/{accountId}/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://api.rolla.xyz/api/v1/external/accounts/{accountId}/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'documentType' => 'bank_statement'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.rolla.xyz/api/v1/external/accounts/{accountId}/documents"
payload := strings.NewReader("{\n \"documentType\": \"bank_statement\"\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("X-API-Key", "<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))
}HttpResponse<String> response = Unirest.delete("https://api.rolla.xyz/api/v1/external/accounts/{accountId}/documents")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"documentType\": \"bank_statement\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rolla.xyz/api/v1/external/accounts/{accountId}/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"documentType\": \"bank_statement\"\n}"
response = http.request(request)
puts response.read_body{
"status": 200,
"message": "Document deleted successfully",
"success": true
}{
"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"
}Deletes an uploaded document by type. The type travels in a JSON request body, not in the path, so send a
Content-Type: application/json body on the DELETE. Include relatedPersonId to target a document attached to a specific related person; without it only documents held against the business itself are considered.
Body Fields
| Field | Type | Required | Description |
|---|---|---|---|
documentType | string | Yes | One of the document types |
relatedPersonId | string | No | Delete the document attached to this related person instead |
Example Request
curl -X DELETE "https://api.rolla.xyz/api/v1/external/accounts/eec3cbed-79d8-4370-87a0-b6be9e287337/documents" \
-H "X-API-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"documentType": "bank_statement"
}'
Example Response
{
"status": 200,
"message": "Document deleted successfully",
"success": true
}
Errors
| Status | When |
|---|---|
400 | documentType is missing or not one of the supported types |
404 | Account not found, or no document of that type is stored for this target (Document not found) |
Deleting a document from an application that was already completed moves it back to
draft, and it must be re-submitted.Authorizations
Your Rolla API key
Path Parameters
Identifier of an account owned by the same user as your API key's business
Body
application/json
The type of document to delete
Available options:
certificate_of_incorporation, articles_of_association, proof_of_address, source_of_wealth_doc, director_register, shareholder_register, proof_of_tax_id, bank_statement, wolfsberg_questionnaire, msb_flow_form, flow_of_funds_diagram, aml_policy_procedures, ach_procedures, wire_procedures, customer_complaint_procedures, prohibited_jurisdictions_industries Delete the document attached to this related person instead