curl --request GET \
--url https://api.apostra.com/api/v2/storefront/esa/{esaId}/media-buys/{mediaBuyId}/gam-snapshot \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.apostra.com/api/v2/storefront/esa/{esaId}/media-buys/{mediaBuyId}/gam-snapshot"
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/storefront/esa/{esaId}/media-buys/{mediaBuyId}/gam-snapshot', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"mediaBuyId": "<string>",
"gamOrderId": "<string>",
"fetchedAt": "<string>",
"lineItemCount": 4503599627370495,
"lineItemsTruncated": true,
"lineItems": [
{
"lineItemId": "<string>",
"orderId": "<string>",
"packageId": "<string>",
"name": "<string>",
"status": "<string>",
"lineItemType": "<string>",
"geoTargeting": {
"targetedLocations": {
"count": 4503599627370495,
"truncated": true,
"items": [
{
"locationId": "<string>",
"type": "<string>",
"displayName": "<string>",
"adcpTargeting": {
"geo_country_any_of": [
"<string>"
],
"geo_region_any_of": [
"<string>"
],
"geo_metro_any_of": [
"<string>"
],
"geo_postal_code_any_of": [
"<string>"
]
}
}
]
},
"excludedLocations": {
"count": 4503599627370495,
"truncated": true,
"items": [
{
"locationId": "<string>",
"type": "<string>",
"displayName": "<string>",
"adcpTargeting": {
"geo_country_any_of": [
"<string>"
],
"geo_region_any_of": [
"<string>"
],
"geo_metro_any_of": [
"<string>"
],
"geo_postal_code_any_of": [
"<string>"
]
}
}
]
}
},
"geoTargetingUnavailableReason": "<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": {}
}
}Get the Google Ad Manager snapshot of an upstream media buy
Fetch the Google Ad Manager order and line items the ad server source booked for one upstream media buy. Each line item’s targeted and excluded Google Ad Manager locations are read live from Google Ad Manager, each with the AdCP v2.5 geo targeting it stands for; geo targeting is null, with a reason, when it could not be read. At most 50 line items and 100 locations per list are returned, each with its exact count.
curl --request GET \
--url https://api.apostra.com/api/v2/storefront/esa/{esaId}/media-buys/{mediaBuyId}/gam-snapshot \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.apostra.com/api/v2/storefront/esa/{esaId}/media-buys/{mediaBuyId}/gam-snapshot"
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/storefront/esa/{esaId}/media-buys/{mediaBuyId}/gam-snapshot', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"mediaBuyId": "<string>",
"gamOrderId": "<string>",
"fetchedAt": "<string>",
"lineItemCount": 4503599627370495,
"lineItemsTruncated": true,
"lineItems": [
{
"lineItemId": "<string>",
"orderId": "<string>",
"packageId": "<string>",
"name": "<string>",
"status": "<string>",
"lineItemType": "<string>",
"geoTargeting": {
"targetedLocations": {
"count": 4503599627370495,
"truncated": true,
"items": [
{
"locationId": "<string>",
"type": "<string>",
"displayName": "<string>",
"adcpTargeting": {
"geo_country_any_of": [
"<string>"
],
"geo_region_any_of": [
"<string>"
],
"geo_metro_any_of": [
"<string>"
],
"geo_postal_code_any_of": [
"<string>"
]
}
}
]
},
"excludedLocations": {
"count": 4503599627370495,
"truncated": true,
"items": [
{
"locationId": "<string>",
"type": "<string>",
"displayName": "<string>",
"adcpTargeting": {
"geo_country_any_of": [
"<string>"
],
"geo_region_any_of": [
"<string>"
],
"geo_metro_any_of": [
"<string>"
],
"geo_postal_code_any_of": [
"<string>"
]
}
}
]
}
},
"geoTargetingUnavailableReason": "<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
Ad server source connection id. The wire field remains esaId for API compatibility.
0 < x <= 9007199254740991123
Upstream media buy id for the ad server source.
1"adcp_mb_123"
Response
Get the Google Ad Manager snapshot of an upstream media buy
The GAM line items an ad server source booked for one upstream media buy, with each line item's targeted and excluded GAM locations read live from GAM and the AdCP v2.5 geo targeting each location stands for. Bounded: line items and locations carry exact counts and a truncated flag.