Sub-Account Login (Atlas Company)
Overview
The POST /banking/ibans/v2/sub-accounts/{subCompanyId}/login endpoint allows parent platform partners to generate an authenticated session token for any approved downstream sub-account (subCompanyId).
This delegated session token allows the platform to interact with the Atlas API suite on behalf of the sub-account—such as creating beneficiaries, managing sub-account wallets, and executing payouts—under the strict isolation of the target sub-company ID.
Resource Access
- HTTP Method:
POST - Endpoint:
/banking/ibans/v2/sub-accounts/{subCompanyId}/login - Authentication: Bearer token required (Parent company JWT token)
Request Headers
| Header | Value | Required | Description |
|---|---|---|---|
Authorization | Bearer {parent_access_token} | Yes | JWT Bearer token of the master/parent partner company |
Accept | application/json | Yes | Response payload format |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
subCompanyId | string | Yes | Unique identifier of the downstream sub-company to authenticate into. |
Request Body
No request body is required. The authentication context is established from the path parameter subCompanyId and parent authorization token.
Response
Success Response (200 OK)
{
"userId": "5820",
"companyId": "1045",
"jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uSWQiOiI5OTI0YWVkOC0xMmZmLTIzMmQtZWE0OC0yYWYzMjllMGVjNTEiLCJsb2dpbk1vZGUiOiJhcGlLZXkiLCJpZCI6NTgyMCwiY29tcGFueUlkIjoxMDQ1LCJyb2xlIjoiU1VCX0NMSUVOVCIsImV4cCI6MTcyMTEyMzgwN30.77dVQFjQuAOAjKRU5lH49BCjdKaO3OpDOwOImdHCPqg"
}
Response Fields
| Field | Type | Description |
|---|---|---|
userId | string | Scoped user identifier for the sub-account session. |
companyId | string | The subCompanyId confirming the active target tenant context. |
jwt | string | Scoped Bearer JWT token valid for authorized requests under the sub-account. |
Error Responses
- 400 Bad Request: Invalid
subCompanyIdformat or malformed request. - 401 Unauthorized: Missing or expired parent Bearer access token.
- 403 Forbidden: Access denied because sub-account onboarding is rejected or the company has been archived.
- 500 Internal Server Error: Internal platform error.
Code Examples
cURL
curl -X POST "https://gateway.ahrvo.network/banking/ibans/v2/sub-accounts/1045/login" \
-H "Authorization: Bearer YOUR_PARENT_TOKEN" \
-H "Accept: application/json"
Python
import requests
url = "https://gateway.ahrvo.network/banking/ibans/v2/sub-accounts/1045/login"
headers = {
"Authorization": "Bearer YOUR_PARENT_TOKEN",
"Accept": "application/json"
}
response = requests.post(url, headers=headers)
data = response.json()
print("Sub-Account JWT:", data.get("jwt"))
print("Active Sub-Company ID:", data.get("companyId"))
JavaScript (Node.js)
const axios = require('axios');
const url = 'https://gateway.ahrvo.network/banking/ibans/v2/sub-accounts/1045/login';
const headers = {
'Authorization': 'Bearer YOUR_PARENT_TOKEN',
'Accept': 'application/json'
};
axios.post(url, {}, { headers })
.then(res => {
console.log('Sub-Account JWT:', res.data.jwt);
console.log('Sub-Company ID:', res.data.companyId);
})
.catch(err => console.error(err.response ? err.response.data : err.message));