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)
})

Last updated