Get media buy
curl --request GET \
--url https://api.apostra.com/api/v2/buyer/media-buys/{mediaBuyId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.apostra.com/api/v2/buyer/media-buys/{mediaBuyId}"
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/buyer/media-buys/{mediaBuyId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"mediaBuy": {
"mediaBuyId": "mb_ETBn4gJ9Wu",
"name": "<string>",
"status": "PENDING_APPROVAL",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"channelGroup": {
"channelGroupId": "<string>",
"name": "<string>"
},
"campaignId": "cmp_ETBn4gJ9Wu",
"archivedAt": "2023-11-07T05:31:56Z",
"pendingAt": "storefront",
"reconciliation": {
"required": true,
"since": "2023-11-07T05:31:56Z",
"reason": "<string>"
},
"pendingChange": {
"status": "PENDING_APPROVAL",
"differences": {
"endTime": {
"live": "<string>",
"proposed": "<string>"
},
"budget": {
"live": 123,
"proposed": 123
},
"creatives": {
"live": [
"<string>"
],
"proposed": [
"<string>"
]
}
},
"pendingAt": "storefront",
"reason": "Extended to 8/11 with W5+W6 gross budget",
"proposalId": "uprop_abc1234567"
},
"pendingReason": "forward_failed_needs_correction",
"pendingSince": "2023-11-07T05:31:56Z",
"errorCode": "product_no_longer_available",
"errorOwner": "buyer_input",
"sourceMessage": "<string>",
"forwardedAt": "2023-11-07T05:31:56Z",
"buyerReference": "sf:42:sf_mb_1783031864469_8pbc8mmr",
"startTime": "<string>",
"endTime": "<string>",
"optimizationGoals": [
{
"kind": "metric",
"metric": "clicks",
"standard": "mrc",
"vendor": {
"domain": "<string>",
"brand_id": "<string>",
"countries": [
"<string>"
],
"industries": [
"<string>"
],
"data_subject_contestation": {},
"brand_kit_override": {
"logo": {
"asset_type": "image",
"url": "<string>",
"width": 4503599627370496,
"height": 4503599627370496,
"file_size_bytes": 4503599627370496,
"pixel_ratio": 1,
"state_id": "<string>",
"breakpoint_id": "<string>",
"focal_point": [
123
],
"format": "<string>",
"alt_text": "<string>",
"provenance": {
"digital_source_type": "digital_capture",
"synthetic_depiction": true,
"ai_tool": {
"name": "<string>",
"version": "<string>",
"provider": "<string>"
},
"human_oversight": "none",
"declared_by": {
"role": "creator",
"agent_url": "<string>"
},
"declared_at": "<string>",
"created_time": "<string>",
"c2pa": {
"manifest_url": "<string>"
},
"embedded_provenance": [
{
"method": "manifest_wrapper",
"provider": "<string>",
"standard": "<string>",
"verify_agent": {
"agent_url": "<string>",
"feature_id": "<string>"
},
"embedded_at": "<string>"
}
],
"watermarks": [
{
"media_type": "audio",
"provider": "<string>",
"verify_agent": {
"agent_url": "<string>",
"feature_id": "<string>"
},
"c2pa_action": "c2pa.watermarked.bound",
"embedded_at": "<string>"
}
],
"disclosure": {
"required": true,
"jurisdictions": [
{
"country": "<string>",
"regulation": "<string>",
"region": "<string>",
"label_text": "<string>",
"render_guidance": {
"persistence": "continuous",
"min_duration_ms": 4503599627370496,
"positions": [
"prominent"
],
"ext": {}
}
}
]
},
"verification": [
{
"verified_by": "<string>",
"result": "authentic",
"verified_time": "<string>",
"confidence": 0.5,
"details_url": "<string>"
}
],
"ext": {}
}
},
"colors": {
"primary": "<string>",
"secondary": "<string>",
"accent": "<string>"
},
"voice": "<string>",
"tagline": "<string>"
}
},
"reach_unit": "individuals",
"target_frequency": {
"window": {
"interval": 4503599627370496,
"unit": "seconds"
},
"min": 4503599627370496,
"max": 4503599627370496
},
"view_duration_seconds": 1,
"target": {
"kind": "cost_per",
"value": 1
},
"priority": 4503599627370496
}
],
"goalCommitment": {
"source": "proposal",
"kind": "guaranteed",
"askedGoal": {
"kind": "metric",
"subject": "<string>",
"eventTypes": [
"<string>"
],
"target": {
"kind": "cost_per",
"value": 123
}
},
"answeredTarget": {
"kind": "cost_per",
"value": 123
},
"meetsAskedTarget": true,
"goalAnswers": [
{
"productId": "<string>",
"pricingOptionId": "<string>",
"pricingModel": "<string>",
"fixedPrice": 123,
"currency": "<string>",
"deliveryType": "guaranteed",
"measurementTerms": null,
"sellerOptimizationGoals": [
"<unknown>"
],
"askedGoal": {
"kind": "metric",
"subject": "<string>",
"eventTypes": [
"<string>"
],
"target": {
"kind": "cost_per",
"value": 123
}
},
"answeredTarget": {
"kind": "cost_per",
"value": 123
},
"commitment": "guaranteed",
"storefrontId": "<string>"
}
],
"proposalVersionId": "<string>"
},
"frequencyCap": {
"level": "mediaBuy",
"requested": {
"maxImpressions": 4503599627370495,
"per": "individuals",
"window": {
"interval": 4503599627370495,
"unit": "seconds"
}
},
"status": "requested",
"effective": {
"maxImpressions": 4503599627370495,
"per": "individuals",
"window": {
"interval": 4503599627370495,
"unit": "seconds"
}
}
},
"pausedBy": "buyer",
"pauseRequestedAt": "2023-11-07T05:31:56Z"
}
}{
"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": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Campaigns
Get media buy
Get a single media buy with its why-visibility fields: pendingReason (why it is not delivering yet and since when), buyer-safe errorCode with ownership, the sanitized source message, forwardedAt, and the buyerReference support handle. One call answers “why is my buy stuck”. Use GET /campaigns/ for packages, products, and delivery.
GET
/
media-buys
/
{mediaBuyId}
Get media buy
curl --request GET \
--url https://api.apostra.com/api/v2/buyer/media-buys/{mediaBuyId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.apostra.com/api/v2/buyer/media-buys/{mediaBuyId}"
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/buyer/media-buys/{mediaBuyId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"mediaBuy": {
"mediaBuyId": "mb_ETBn4gJ9Wu",
"name": "<string>",
"status": "PENDING_APPROVAL",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"channelGroup": {
"channelGroupId": "<string>",
"name": "<string>"
},
"campaignId": "cmp_ETBn4gJ9Wu",
"archivedAt": "2023-11-07T05:31:56Z",
"pendingAt": "storefront",
"reconciliation": {
"required": true,
"since": "2023-11-07T05:31:56Z",
"reason": "<string>"
},
"pendingChange": {
"status": "PENDING_APPROVAL",
"differences": {
"endTime": {
"live": "<string>",
"proposed": "<string>"
},
"budget": {
"live": 123,
"proposed": 123
},
"creatives": {
"live": [
"<string>"
],
"proposed": [
"<string>"
]
}
},
"pendingAt": "storefront",
"reason": "Extended to 8/11 with W5+W6 gross budget",
"proposalId": "uprop_abc1234567"
},
"pendingReason": "forward_failed_needs_correction",
"pendingSince": "2023-11-07T05:31:56Z",
"errorCode": "product_no_longer_available",
"errorOwner": "buyer_input",
"sourceMessage": "<string>",
"forwardedAt": "2023-11-07T05:31:56Z",
"buyerReference": "sf:42:sf_mb_1783031864469_8pbc8mmr",
"startTime": "<string>",
"endTime": "<string>",
"optimizationGoals": [
{
"kind": "metric",
"metric": "clicks",
"standard": "mrc",
"vendor": {
"domain": "<string>",
"brand_id": "<string>",
"countries": [
"<string>"
],
"industries": [
"<string>"
],
"data_subject_contestation": {},
"brand_kit_override": {
"logo": {
"asset_type": "image",
"url": "<string>",
"width": 4503599627370496,
"height": 4503599627370496,
"file_size_bytes": 4503599627370496,
"pixel_ratio": 1,
"state_id": "<string>",
"breakpoint_id": "<string>",
"focal_point": [
123
],
"format": "<string>",
"alt_text": "<string>",
"provenance": {
"digital_source_type": "digital_capture",
"synthetic_depiction": true,
"ai_tool": {
"name": "<string>",
"version": "<string>",
"provider": "<string>"
},
"human_oversight": "none",
"declared_by": {
"role": "creator",
"agent_url": "<string>"
},
"declared_at": "<string>",
"created_time": "<string>",
"c2pa": {
"manifest_url": "<string>"
},
"embedded_provenance": [
{
"method": "manifest_wrapper",
"provider": "<string>",
"standard": "<string>",
"verify_agent": {
"agent_url": "<string>",
"feature_id": "<string>"
},
"embedded_at": "<string>"
}
],
"watermarks": [
{
"media_type": "audio",
"provider": "<string>",
"verify_agent": {
"agent_url": "<string>",
"feature_id": "<string>"
},
"c2pa_action": "c2pa.watermarked.bound",
"embedded_at": "<string>"
}
],
"disclosure": {
"required": true,
"jurisdictions": [
{
"country": "<string>",
"regulation": "<string>",
"region": "<string>",
"label_text": "<string>",
"render_guidance": {
"persistence": "continuous",
"min_duration_ms": 4503599627370496,
"positions": [
"prominent"
],
"ext": {}
}
}
]
},
"verification": [
{
"verified_by": "<string>",
"result": "authentic",
"verified_time": "<string>",
"confidence": 0.5,
"details_url": "<string>"
}
],
"ext": {}
}
},
"colors": {
"primary": "<string>",
"secondary": "<string>",
"accent": "<string>"
},
"voice": "<string>",
"tagline": "<string>"
}
},
"reach_unit": "individuals",
"target_frequency": {
"window": {
"interval": 4503599627370496,
"unit": "seconds"
},
"min": 4503599627370496,
"max": 4503599627370496
},
"view_duration_seconds": 1,
"target": {
"kind": "cost_per",
"value": 1
},
"priority": 4503599627370496
}
],
"goalCommitment": {
"source": "proposal",
"kind": "guaranteed",
"askedGoal": {
"kind": "metric",
"subject": "<string>",
"eventTypes": [
"<string>"
],
"target": {
"kind": "cost_per",
"value": 123
}
},
"answeredTarget": {
"kind": "cost_per",
"value": 123
},
"meetsAskedTarget": true,
"goalAnswers": [
{
"productId": "<string>",
"pricingOptionId": "<string>",
"pricingModel": "<string>",
"fixedPrice": 123,
"currency": "<string>",
"deliveryType": "guaranteed",
"measurementTerms": null,
"sellerOptimizationGoals": [
"<unknown>"
],
"askedGoal": {
"kind": "metric",
"subject": "<string>",
"eventTypes": [
"<string>"
],
"target": {
"kind": "cost_per",
"value": 123
}
},
"answeredTarget": {
"kind": "cost_per",
"value": 123
},
"commitment": "guaranteed",
"storefrontId": "<string>"
}
],
"proposalVersionId": "<string>"
},
"frequencyCap": {
"level": "mediaBuy",
"requested": {
"maxImpressions": 4503599627370495,
"per": "individuals",
"window": {
"interval": 4503599627370495,
"unit": "seconds"
}
},
"status": "requested",
"effective": {
"maxImpressions": 4503599627370495,
"per": "individuals",
"window": {
"interval": 4503599627370495,
"unit": "seconds"
}
}
},
"pausedBy": "buyer",
"pauseRequestedAt": "2023-11-07T05:31:56Z"
}
}{
"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": {}
}
}{
"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
Buyer media buy ID
Minimum string length:
1Example:
"mb_ETBn4gJ9Wu"
Response
Get media buy
Response containing a single media buy with why-visibility
A single media buy with its optimization goals and why-visibility annotation (pendingReason, errorCode, forwardedAt, buyerReference). Use get_campaign for packages, products, and delivery.
Show child attributes
Show child attributes