Update a Beneficiary (Legacy)
Overview
This service is used to update beneficiary details by specifying their beneficiaryId. Beneficiaries re-enter an approval process once updated in live environments.
Resource Access
- HTTP Method:
PUT - Endpoint:
/profile/v2.1/beneficiaries/{beneficiaryId} - Authentication: Bearer token required
Request Headers
| Header | Value | Required | Description |
|---|---|---|---|
Accept | application/json | Yes | Content type for the response |
Authorization | Bearer {access_token} | Yes | Bearer token for authentication |
Content-Type | application/json | Yes | Request body content type |
x-api-key | string | No | API key for additional authentication |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
beneficiaryId | number | Yes | The unique ID of the beneficiary to update (e.g. 283). |
Request Body
{
"beneficiaryEntityType": "company",
"beneficiaryFirstName": "Jon",
"beneficiaryLastName": "Doe",
"beneficiaryCompanyName": "Ahrvo",
"currency": "INR",
"beneficiaryCountryCode": "IN",
"accountNumber": "2000293918130",
"nationalId": "PUNB0644100",
"country": "India"
}
Request Fields
| Field | Type | Required | Description |
|---|---|---|---|
beneficiaryEntityType | string | No | individual or company. |
beneficiaryFirstName | string | No | Updated first name. |
beneficiaryLastName | string | No | Updated last name. |
beneficiaryCompanyName | string | No | Updated company name. |
currency | string | No | Currency code. |
accountNumber | string | No | Updated account number. |
nationalId | string | No | Bank SWIFT / IFSC / routing code. |
Response
Success Response (200 OK)
{
"success": true,
"account": {
"id": 283,
"accountNumber": "2000293918130",
"bankName": "PUNJAB NATIONAL BANK",
"beneficiaryCompanyName": "Ahrvo",
"status": "approved"
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
success | boolean | Whether beneficiary update succeeded. |
account.id | number | Beneficiary ID. |
account.status | string | Status after update. |
Error Responses
- 400 Bad Request: Invalid parameters or malformed request
- 401 Unauthorized: Missing or invalid Bearer authentication token
- 403 Forbidden: Insufficient account permissions
- 404 Not Found: Resource not found
- 500 Internal Server Error: An internal server error occurred
Code Examples
Base URL
Production: https://api.ahrvo.network
Staging: https://gateway.ahrvo.network
cURL
curl -X PUT \
'https://gateway.ahrvo.network/banking/ibans/v2/profile/v2.1/beneficiaries/283' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"beneficiaryEntityType": "company",
"beneficiaryCompanyName": "Ahrvo",
"currency": "INR",
"beneficiaryCountryCode": "IN",
"accountNumber": "2000293918130",
"nationalId": "PUNB0644100",
"country": "India"
}'
Python
import requests
url = "https://gateway.ahrvo.network/banking/ibans/v2/profile/v2.1/beneficiaries/283"
headers = {
"Accept": "application/json",
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}
payload = {
"beneficiaryCompanyName": "Ahrvo",
"currency": "INR",
"accountNumber": "2000293918130",
"nationalId": "PUNB0644100",
"country": "India"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
JavaScript (Node.js)
const axios = require('axios');
const beneficiaryId = 283;
const url = `https://gateway.ahrvo.network/banking/ibans/v2/profile/v2.1/beneficiaries/${beneficiaryId}`;
const headers = {
'Accept': 'application/json',
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
};
const data = {
beneficiaryCompanyName: 'Ahrvo',
currency: 'INR',
accountNumber: '2000293918130',
nationalId: 'PUNB0644100',
country: 'India'
};
axios.put(url, data, { headers })
.then(response => console.log(response.data))
.catch(error => console.error(error.response ? error.response.data : error.message));
Usage Notes
- Modifying critical banking fields (account number, sort code) will trigger re-approval before payouts can be routed.