Preview account archive
curl --request GET \
--url https://api.apostra.com/api/v2/accounts/{customerId}/archive-preview \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.apostra.com/api/v2/accounts/{customerId}/archive-preview"
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/{customerId}/archive-preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"account": {
"id": 4503599627370495,
"parentId": 4503599627370495,
"status": "ACTIVE",
"active": true,
"archivedAt": "2023-11-07T05:31:56Z",
"archivedByUserId": 4503599627370495,
"restoredAt": "2023-11-07T05:31:56Z",
"restoredByUserId": 4503599627370495
},
"canArchive": true,
"reason": "CURRENT_ACCOUNT",
"blockers": {
"campaigns": [
{
"campaignId": "<string>",
"name": "<string>",
"status": "<string>"
}
],
"mediaBuys": [
{
"mediaBuyId": "<string>",
"name": "<string>",
"status": "<string>",
"campaignId": "<string>"
}
]
}
}{
"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
Preview account archive
List every live campaign and executable or unsettled media buy that must be resolved before a child account can be archived. Requires administrator authority on the parent organization.
GET
/
accounts
/
{customerId}
/
archive-preview
Preview account archive
curl --request GET \
--url https://api.apostra.com/api/v2/accounts/{customerId}/archive-preview \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.apostra.com/api/v2/accounts/{customerId}/archive-preview"
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/{customerId}/archive-preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"account": {
"id": 4503599627370495,
"parentId": 4503599627370495,
"status": "ACTIVE",
"active": true,
"archivedAt": "2023-11-07T05:31:56Z",
"archivedByUserId": 4503599627370495,
"restoredAt": "2023-11-07T05:31:56Z",
"restoredByUserId": 4503599627370495
},
"canArchive": true,
"reason": "CURRENT_ACCOUNT",
"blockers": {
"campaigns": [
{
"campaignId": "<string>",
"name": "<string>",
"status": "<string>"
}
],
"mediaBuys": [
{
"mediaBuyId": "<string>",
"name": "<string>",
"status": "<string>",
"campaignId": "<string>"
}
]
}
}{
"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
Path Parameters
Customer ID
Minimum string length:
1Example:
"200"
Response
Preview account archive
Whether a child account can be archived and every campaign or media buy that blocks the change.