Fetch Subaccount
Get a single product on your Terraswitch account
GET {{ BASE_URL }}/v1/corporate/subaccount/{code}Url Parameters
Property
Data Type
Description
Example
Required
code
string
The subaccount code
"VSA_6yhyzzkcHc"
Yes
import Axios from 'axios';
// set the api url
const API_URL = `${BASE_URL}/v1/corporate/subaccount/${code}`;
// make request using axios
Axios({
method: "GET",
url: `${API_URL}`,
headers: {
lg: 'en',
ch: 'web'
Authorization: `Bearer ${API_KEY}`,
'Content-Type': 'application/json',
}
}).then((resp) => {
console.log(resp)
}).catch((err) => {
console.log(err)
}){
"error": false,
"errors": [],
"data": {
"code": "VSA_6yhyzzkcHc",
"description": "Concreap subaccount for Terrawsitch",
"isEnabled": true,
"name": "Concreap",
"email": "[email protected]",
"phoneNumber": "02137031202",
"phoneCode": "+234",
"inflow": {
"value": 0,
"count": 0
},
"split": {
"value": 10.05,
"type": "percentage"
},
"bank": {
"accountNo": "0125318431",
"acccountName": "CONCREAP TECHNOLOGY SOLUTIONS LIMITED",
"bankCode": "035",
"name": "Wema Bank"
},
"slug": "concreap",
"createdAt": "2024-01-12T03:00:09.675Z",
"updatedAt": "2024-01-12T03:00:09.675Z"
},
"message": "successful",
"status": 200
}Last updated