Generate Upload Link
Overview
Generate a temporary upload link and document key for onboarding files, then use them in the broader onboarding and compliance workflow.
This endpoint provides a secure pre-signed cloud storage URL. You can upload files directly (up to 5MB, supported formats: jpeg, jpg, pdf, png, svg). The link is valid for 10 minutes. The returned key is then supplied in the companyDocuments or shareholderDocuments payload when submitting onboarding data.
Resource Access
- HTTP Method:
POST - Endpoint:
/banking/ibans/v2/documents/generate-upload-link - Authentication: Bearer token required
Request Headers
| Header | Value | Required | Description |
|---|---|---|---|
Authorization | Bearer {access_token} | Yes | JWT Bearer access token |
Content-Type | application/json | Yes | Request payload format |
Accept | application/json | Yes | Response payload format |
x-api-key | string | No | Optional API key |
Request Body
Request Fields
| Field | Type | Required | Description |
|---|---|---|---|
fileName | string | Yes | Name of the file including extension (e.g. certificate_of_incorporation.pdf). |
documentTypeId | string | Yes | Document Type ID of the document to be uploaded (e.g. doc_type_incorp_01). |
Request Example
{
"fileName": "certificate_of_incorporation.pdf",
"documentTypeId": "doc_type_incorp_01"
}
Response
Success Response (200 OK)
{
"link": "https://storage.ahrvo.network/uploads/compliance/2026/doc-12345?X-Amz-Signature=abc123def456&X-Amz-Expires=600",
"key": "compliance/2026/09/doc-12345-incorporation.pdf"
}
Response Fields
| Field | Type | Description |
|---|---|---|
link | string | A unique pre-signed upload URL valid for 10 minutes. |
key | string | A unique document key to link the uploaded supporting document in onboarding submissions. |
Upload Specifications
- Expiry: 10 minutes from generation.
- Maximum File Size: 5 MB.
- Supported Formats:
jpeg,jpg,pdf,png,svg. - Upload Method: Perform an HTTP
PUTrequest directly to the returnedlinkwith the binary file data as the request body.
Error Responses
- 400 Bad Request: Missing file name, invalid extension, or unsupported document type.
- 401 Unauthorized: Missing or invalid Bearer token.
- 403 Forbidden: Insufficient permissions to generate upload links.
- 500 Internal Server Error: Storage service temporarily unavailable.
Code Examples
Base URL
Production: https://api.ahrvo.network
Staging: https://gateway.ahrvo.network
cURL
curl -X POST \
'https://gateway.ahrvo.network/banking/ibans/v2/documents/generate-upload-link' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"fileName": "certificate_of_incorporation.pdf",
"documentTypeId": "doc_type_incorp_01"
}'
Python
import requests
url = "https://gateway.ahrvo.network/banking/ibans/v2/documents/generate-upload-link"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}
payload = {
"fileName": "certificate_of_incorporation.pdf",
"documentTypeId": "doc_type_incorp_01"
}
response = requests.post(url, json=payload, headers=headers)
data = response.json()
print("Upload URL:", data.get("link"))
print("Document Key:", data.get("key"))
# Upload the file directly to the pre-signed link
if "link" in data:
with open("certificate_of_incorporation.pdf", "rb") as f:
upload_resp = requests.put(data["link"], data=f)
print("Upload Status:", upload_resp.status_code)
JavaScript (Node.js)
const axios = require('axios');
const fs = require('fs');
const url = 'https://gateway.ahrvo.network/banking/ibans/v2/documents/generate-upload-link';
const headers = {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
};
const payload = {
fileName: 'certificate_of_incorporation.pdf',
documentTypeId: 'doc_type_incorp_01'
};
axios.post(url, payload, { headers })
.then(async res => {
const { link, key } = res.data;
console.log('Upload URL:', link);
console.log('Document Key:', key);
// Upload file buffer
const fileStream = fs.createReadStream('./certificate_of_incorporation.pdf');
await axios.put(link, fileStream, {
headers: { 'Content-Type': 'application/pdf' }
});
console.log('File uploaded successfully!');
})
.catch(err => console.error(err.response ? err.response.data : err.message));