> ## Documentation Index
> Fetch the complete documentation index at: https://docs.semicola.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Media buy lifecycle

> How a media buy moves from draft to delivery, who owns each wait, and how both sides see it.

A **media buy** is one AdCP transaction between a buyer and one seller. Buyers and sellers see the
same buy from opposite ends, so its lifecycle has a platform status (what Semicola knows), an AdCP
status (what the seller reported) and, on the seller side, a timeline.

## Platform status

```text theme={null}
DRAFT --launch--> ACTIVE                         (seller accepted at once)
DRAFT --launch--> PENDING_APPROVAL               (seller is reviewing)
PENDING_APPROVAL --approved and forwarded--> ACTIVE
PENDING_APPROVAL --rejected--> REJECTED
any live state --seller needs input--> INPUT_REQUIRED --buyer answers--> PENDING_APPROVAL
DRAFT --dispatch failed--> FAILED                (safe failures return to DRAFT on retry)
ACTIVE <--pause / reactivate--> PAUSED
ACTIVE --flight over or budget spent--> COMPLETED
any live state --cancel--> CANCELED
```

`ACTIVE` does not always mean delivering. Its operational status is `pending_creatives` (accepted,
but a required creative is missing), `pending_start` (accepted, flight not started) or `active`.

## Whose side owns the wait

When a buy is not moving, `pendingAt` and `pendingReason` say who holds it:

| `pendingAt`  | Typical `pendingReason`      | Who acts                                            |
| ------------ | ---------------------------- | --------------------------------------------------- |
| `storefront` | `awaiting_seller_approval`   | The seller's operator, in Approvals & operations.   |
| `salesagent` | `awaiting_source_moderation` | The seller's inventory source or ad server.         |
| `unknown`    | none                         | Nobody known yet; read the timeline or ask support. |

A failed buy carries `errorCode` (for example `product_no_longer_available`, `source_rejected`,
`storefront_rejected`, `quote_expired`) and `errorOwner`: `buyer_input`, `platform` or `seller`.

## Asynchronous acceptance

Guaranteed and manually reviewed buys are not accepted in the same call. The seller returns an AdCP
task in `submitted` state; the buy shows `PENDING_APPROVAL`. When the seller decides, the task
completes, Semicola updates the buy and, if you registered a push notification URL, calls it with a
signed webhook. You can also poll the task.

## Three views of one buy

| Surface                                 | Shows                                                                         |
| --------------------------------------- | ----------------------------------------------------------------------------- |
| Buyer campaign workspace                | Each buy with its status, progress bar and `mb_… · pkg_…` ids.                |
| `GET …/campaigns/{id}/media-buy-status` | The campaign's operational status and each buy's blockers and pending reason. |
| Seller media buy timeline               | Stages: received → screened → decided → forwarded → accepted → delivering.    |

## Changes and cancellation

Pausing and reactivating are immediate. Changing the budget, pacing or flight of a live buy is sent
to the seller as an update; sellers that require approval review it like a new buy. Canceling stops
delivery; money already spent stays spent.
