GET /api/v2/buyer/campaigns/:id/media-buy-status
Refreshes the campaign’s non-terminal media buys and returns the current status Apostra has for each buy. Direct sales-agent and delegated-adapter buys are polled during this request. Storefront-routed buys are checked from persisted upstream-leg state, because one buyer-facing storefront buy can fan out to multiple upstream sources rather than one pollable storefront agent. Useful right after execute while waiting on publisher approvals.
Request
Parameters
Response
media_buys reflects one media buy returned during the request:
campaign_status— the stored campaign lifecycle status.operational_status— the rolled-up delivery status to present to users (draft,pending_creatives,pending_start,active,paused,completed,attention_required, orno_media_buys). A persistedCOMPLETEDor cleanlyCANCELEDbuy reportscompleted, unless its seller has not agreed it ended (see When a buy ends) or reports different financial terms (seecontract_out_of_linebelow);attention_requiredalways has a named blocker or reconciliation reason.internal_status— Apostra status after this poll (one ofDRAFT,PENDING_APPROVAL,INPUT_REQUIRED,ACTIVE,PAUSED,COMPLETED,CANCELED,FAILED,REJECTED,ARCHIVED).adcp_status— the raw AdCP media-buy status string currently stored or returned by the status check.media_buys[].operational_status— the per-buy delivery status behind the campaign rollup.previous_internal_status/previous_adcp_status— values before this poll.updated—trueonly when this request changed Apostra’s stored status.falsedoes not mean the status is stale; it can also mean the buy was already current.status_refresh_source— where this media buy’s status signal came from:direct_agent— this request called the sales agent’sget_media_buys.delegated_adapter— this request called the delegated adapter’sget_media_buys.storefront_route_rollup— this request read persisted upstream-leg statuses for a storefront-routed buy. This can confirm active delivery without incrementingagents_queried.not_submitted— the buy has no upstream media-buy ID yet.persisted_terminal— the buy is terminal (COMPLETED,CANCELED,FAILED, orREJECTED) and was read from persisted PRIMARY state without contacting the seller during this request. ACOMPLETEDbuy that no seller reported completed is not read this way: it is checked with the seller on every request, and the seller’s own status replaces it.refresh_failed— the refresh failed before a per-buy status signal was available; seeerrorsandblockers.
agents_queried— number of direct sales-agent or delegated-adapter status calls made during this request. It can be0for a current storefront-routed buy whenstatus_refresh_sourceisstorefront_route_rollup.errors— per-media-buy errors from agents that failed to respond;media_buy_idanderrormessage are included for each failure. A partial error does not prevent successful entries from being returned.blockers/media_buys[].blockers— campaign-level and per-buy reasons delivery is not ready or needs attention, such as pending creative review, missing upstream IDs, or a seller that has not agreed an ended buy stopped (seller_still_active,seller_end_unconfirmed).not_delivering_after_flight_start— the buy is booked but still not delivering more than 24 hours after its flight started: the seller has not started it, or the seller reports it running and has reported no delivery. See When a buy has not started delivering.seller_paused_not_requested— the seller reports the buypaused, nobody asked for the pause, and the buy’s flight has started. See When a buy has not started delivering.seller_status_unavailable— the buy is live, and the seller’s status and reporting for it are temporarily unavailable because the seller’s connection to its ad server stopped working. The message never names the ad server. The buy reportsattention_requiredfor as long as the seller’s failure lasts, and the notice clears by itself when the seller restores the connection. It adds attention only: the buy’sinternal_statusandhas_deliverydo not change, and delivery numbers may be late until it clears. The seller has been told. A buy that is not live, such as one that has completed, never carries it.seller_status_unreadable— Apostra has the buy recorded as completed, but the seller never reported it completed, and Apostra cannot read the buy’s status from the seller. The buy may still be running. The campaign-levelblockersentry’smessagenames the seller and the read failure, for example that the seller’s agent is below the AdCP version Apostra supports. The buy reportsattention_requiredfor as long as the seller cannot be read, keepsinternal_statusCOMPLETED, and clears by itself once a read of the seller succeeds, at which point the buy takes the status the seller reports. Contact the seller to confirm the current state. A buy the seller reported completed never carries it.contract_out_of_line— the seller’s latest report of the buy differs from the booked contract on budget, rate or flight: for example, the seller reports an earlier or later end date, a different budget, or a different rate. The buy reportsattention_requiredwhile the difference stays open, from the time the buy is live until 7 days after its flight end, including after it completes. The marker appears only when Apostra can show the two figures differ. It does not appear when the seller reports an amount in a currency the booking does not state, when the booked total includes fees the seller’s packages do not, when the seller split an evenly spread budget differently across packages, or when two geography shapes cannot be shown to reach different areas: those are listed as not comparable. A currency that both sides state and that differs, a moved end date and a rate that differs on a shared currency still show. It adds attention only: the buy’sinternal_statusandhas_deliverydo not change. Apostra’s operations team takes the difference up with the seller; it clears when the seller’s report matches the contract again, or when you update the buy so the contract matches what the seller reports.
pending_creative_reviews— count of creative reviews still waiting.has_upstream_media_buy— whether any media buy has an upstream ADCP media-buy ID.has_delivery— whether the campaign has an active or completed delivery signal.
has_delivery, has_upstream_media_buy, operational_status, and each buy’s status_refresh_source as the delivery signal. Do not use agents_queried: 0 or updated: false alone as a stale-status or dispatch-failure signal.
This request polls non-terminal PRIMARY media buys (PENDING_APPROVAL, ACTIVE, PAUSED, ENDING), and any COMPLETED buy that no seller reported completed. Other terminal PRIMARY buys remain in the response, read from persisted state. The seller owns a buy’s state: if the seller reports a buy active or paused that Apostra had recorded as completed without the seller’s report, the buy takes the seller’s status.
When a buy has not started delivering
A booked buy (internal_status PENDING_APPROVAL or ACTIVE) that is still not delivering more than 24 hours after its flight started reports operational_status: "attention_required" with the blocker not_delivering_after_flight_start. A flight with start_time: "asap" counts as starting when the buy was booked. Not delivering means the seller has not reported the buy active, delivering, or running: it may still be waiting for the seller’s approval, for the seller’s ad server to approve or traffic the order, or for creatives.
A guaranteed buy the seller reports active, delivering or running gets the same blocker when it has delivered nothing: no impressions and no spend, with the seller having reported at least one day on or after the flight start. The seller’s status says running, but nothing is serving, so the seller has to say why, for example that creatives are missing or not approved on the order or that the line item is not trafficked. A buy that is not guaranteed never gets the blocker for this reason, because winning nothing at auction is a normal outcome. A buy the seller has not reported on at all does not get it either.
A buy the seller reports paused gets the blocker seller_paused_not_requested when you did not ask for the pause: its internal_status is PAUSED, the seller’s adcp_status is paused, the flight has started and has not ended, and the pause has stood for 24 hours. A pause you asked for, through a buy or campaign pause, never gets it, and neither does a pause you requested that the seller has not yet confirmed. The blocker’s message names the seller’s reported paused status and since when. The seller holds the buy, so ask the seller why it is paused and have it resumed. It clears when the seller reports the buy running again, when you pause the buy yourself, or when the flight ends.
A tracked buy, one found in your connected ad account rather than placed through Apostra, never gets this blocker: it was not set up through Apostra, so Apostra cannot tell whether it is meant to be delivering.
The buy’s internal_status and adcp_status do not change. Its pending_reason says what it is waiting on and whose move it is (see Diagnosing a stuck media buy for every value); for example, no_creatives_attached means you need to attach creatives, and awaiting_ad_server_approval_permission means the seller does. Apostra alerts its operations team once per buy so someone follows up with the seller. The blocker clears as soon as the seller reports a buy it had not started as active, delivering, or running, or as soon as a buy the seller already reports running shows its first impressions or spend. It also clears when you pause or cancel the buy, or its flight ends.
When a buy ends
The seller decides when a buy has stopped. Apostra does not mark a buyCOMPLETED when its flight end passes: the buy keeps the status the seller last reported, and Apostra keeps checking with the seller, about once an hour, until the seller reports it completed, canceled, or rejected.
- The seller agrees. The buy becomes
COMPLETED, withoperational_status: "completed", and checking stops. - The seller still reports the buy active. If the seller still reports it
activemore than 24 hours after the end, the buy staysACTIVEbut reportsoperational_status: "attention_required"with the blockerseller_still_active. The seller may still be delivering.adcp_statusshows what the seller last reported. Apostra keeps checking and alerts its operations team. - The seller never confirms. If the seller has not reported the buy ended 14 days after the end (for example, it still reports it
pausedor pending, or says nothing), the buy reportsattention_requiredwith the blockerseller_end_unconfirmed. Apostra alerts its operations team.
Errors
See Errors for the full error shape and recovery semantics.
Related
Media buys
Media buy structure and the status enum
Execute campaign
Launch the campaign into media buys
Pause campaign
Halt spend across all media buys
Campaign overview
The campaign object and lifecycle