List customer accounts
curl --request GET \
--url https://api.apostra.com/api/v2/accounts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.apostra.com/api/v2/accounts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.apostra.com/api/v2/accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"accounts": [
{
"id": 100,
"company": "Acme Inc",
"name": "Acme",
"accountType": "BUYER",
"customerType": "STANDALONE",
"parentId": 4503599627370495,
"active": true,
"status": "ACTIVE",
"archivedAt": "2023-11-07T05:31:56Z",
"role": "ADMIN",
"current": true
}
]
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Account
List customer accounts
List active accounts available to the authenticated user. Set includeArchived=true for an organization management list that also includes lifecycle-archived child accounts; archived accounts cannot be selected until restored.
GET
/
accounts
List customer accounts
curl --request GET \
--url https://api.apostra.com/api/v2/accounts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.apostra.com/api/v2/accounts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.apostra.com/api/v2/accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"accounts": [
{
"id": 100,
"company": "Acme Inc",
"name": "Acme",
"accountType": "BUYER",
"customerType": "STANDALONE",
"parentId": 4503599627370495,
"active": true,
"status": "ACTIVE",
"archivedAt": "2023-11-07T05:31:56Z",
"role": "ADMIN",
"current": true
}
]
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Authorizations
API key or access token
Query Parameters
Include lifecycle-archived child accounts in the organization management list. Archived accounts remain unavailable for account switching. A buyer agent's list never includes archived accounts, because its grants do not reach them.
Example:
false
Response
List customer accounts
List of customer accounts for the authenticated user
Customer accounts the user has access to. For a buyer agent, the active accounts that own advertisers it holds active grants on, plus the current account.
Show child attributes
Show child attributes