Skip to main content

Generate Upload Link (Payment)

Overview

Generate a temporary upload link for payment-related supporting files and use it as part of the broader payout, review, or compliance workflow.

This endpoint provides a secure pre-signed cloud storage URL. Supported formats are jpeg, jpg, pdf, png, and svg, with a maximum file size of 5MB. The link is valid for 10 minutes. The returned key can be linked to payment records or submitted during Request for Information (RFI) compliance reviews.

Resource Access

  • HTTP Method: POST
  • Endpoint: /banking/ibans/v2/documents/generate-upload-link
  • Authentication: Bearer token required

Request Headers

HeaderValueRequiredDescription
AuthorizationBearer {access_token}YesJWT Bearer access token
Content-Typeapplication/jsonYesRequest payload format
Acceptapplication/jsonYesResponse payload format
x-api-keystringNoOptional API key

Query Parameters

ParameterTypeRequiredDescription
companyIdstringNoUnique identifier for the company account to map the file being uploaded to (e.g. 45248).

Request Body

Request Fields

FieldTypeRequiredDescription
fileNamestringYesThe name of the document you wish to upload including extension (e.g. commercial_invoice_102.pdf).

Request Example

{
"fileName": "commercial_invoice_102.pdf"
}

Response

Success Response (200 OK)

{
"link": "https://storage.ahrvo.network/uploads/payments/2026/file-98721?X-Amz-Signature=xyz789&X-Amz-Expires=600",
"key": "payments/2026/09/commercial_invoice_102.pdf"
}

Response Fields

FieldTypeDescription
linkstringA unique pre-signed upload URL valid for 10 minutes. Send an HTTP PUT with the binary file content.
keystringAn identifier key that client can use in subsequent API calls to link uploaded supporting documents.

Upload Specifications

  • Expiry: 10 minutes from generation.
  • Maximum File Size: 5 MB.
  • Supported Formats: jpeg, jpg, pdf, png, svg.
  • Upload Method: Perform an HTTP PUT request directly to the returned link with the raw file buffer as the request body.

Error Responses

  • 400 Bad Request: Invalid file name or unsupported file extension.
  • 401 Unauthorized: Missing or expired Bearer token.
  • 403 Forbidden: Insufficient account permissions.
  • 500 Internal Server Error: Cloud storage provider error.

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?companyId=45248' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"fileName": "commercial_invoice_102.pdf"
}'

Python

import requests

url = "https://gateway.ahrvo.network/banking/ibans/v2/documents/generate-upload-link"
params = {"companyId": "45248"}
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}
payload = {
"fileName": "commercial_invoice_102.pdf"
}

response = requests.post(url, params=params, json=payload, headers=headers)
data = response.json()
print("Upload URL:", data.get("link"))
print("Document Key:", data.get("key"))

# Upload file directly via PUT
if "link" in data:
with open("commercial_invoice_102.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 params = { companyId: '45248' };
const payload = { fileName: 'commercial_invoice_102.pdf' };

axios.post(url, payload, { headers, params })
.then(async res => {
const { link, key } = res.data;
console.log('Upload Link:', link);
console.log('Document Key:', key);

const fileStream = fs.createReadStream('./commercial_invoice_102.pdf');
await axios.put(link, fileStream, {
headers: { 'Content-Type': 'application/pdf' }
});
console.log('File successfully uploaded to cloud storage.');
})
.catch(err => console.error(err.response ? err.response.data : err.message));

Interactive API Explorer