Appearance
Get a sub-account​
GET
/v1/account/subaccount/{accountPublicId}
Requires SUB_ACCOUNTS_READ, granted by TREASURY_READ or TREASURY_WRITE (bundles)
Returns a sub-account's ID and name. A sub-account registered with its account holder's KYC details also returns those details, such as firstName, lastName, identityNumber and email. Call it on your primary account (don't send X-VALR-SUB-ACCOUNT-ID); keys limited to some sub-accounts can't use it.
Parameters​
Path Parameters
accountPublicId*
Sub-account ID: the id returned by List sub-accounts.
Type
Requiredstring
Example
"7340032581337088"Pattern
"^[0-9]+$"Responses​
OK
application/json
JSON
{
"id": "7340032581337088",
"label": "Treasury"
}
Samples​
Errors
| HTTP | Error | When |
|---|---|---|
| 400 | -11INVALID_REQUEST | The sub-account ID isn't a whole number. |
| 400 | -11134SUB_ACCOUNT_NOT_FOUND | None of your business's sub-accounts has this ID. Your primary account (0) isn't a sub-account. |
Plus the errors common to all signed endpoints.