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

# Retry forwarding an approved media buy

> Re-attempt the upstream forward for an already-approved media buy whose previous forward did not complete. Idempotent: the storefront reuses the same idempotency key, so a source that already received the buy is not double-booked. Returns the approval-queue entry with its refreshed forwarding state. A buy terminalized by a structural failure is recoverable in place with `forceTerminal: true`, which re-forwards it under the same `mediaBuyId` and keeps the original approval — the request is refused unless every persisted source route is a failed, unsent leg, so a forced retry cannot duplicate an upstream buy.



## OpenAPI

````yaml /v2/storefront-api-v2.yaml post /media-buy-approvals/{mediaBuyId}/retry-forward
openapi: 3.0.0
info:
  title: Scope3 Storefront API
  version: 2.0.0
  description: >-
    REST API for partners to manage Seller Accounts, inventory sources, and
    billing.


    ## Authentication


    All endpoints require a Bearer token in the Authorization header:

    ```

    Authorization: Bearer your-api-key

    ```


    ## Base URL


    `https://api.interchange.io/api/v2/storefront`


    ## For AI Agents


    AI agents can use the MCP endpoint at `/mcp/v2/storefront` with three tools:

    - `initialize`: Start an MCP session

    - `api_call`: Make REST API calls

    - `ask_about_capability`: Learn about API features
servers:
  - url: https://api.interchange.io/api/v2/storefront
    description: Production server
security: []
tags:
  - name: Account
    description: Account management, service tokens, and preferences
  - name: Asks
    description: >-
      What you are waiting on Scope3 for — support, product, and supply asks in
      one list
  - name: Storefront
    description: Manage storefront and inventory sources
  - name: Storefront Agents
    description: List and manage registered sales, signals, and outcomes agents
  - name: Storefront Activity
    description: Audit log of configuration and inventory changes on the storefront
  - name: Storefront Billing
    description: Payout bank details and billing configuration for Seller Accounts
  - name: AI Usage
    description: Seller Account AI token usage visibility by model
  - name: MCP
    description: Model Context Protocol endpoints
paths:
  /media-buy-approvals/{mediaBuyId}/retry-forward:
    post:
      tags:
        - Storefront
      summary: Retry forwarding an approved media buy
      description: >-
        Re-attempt the upstream forward for an already-approved media buy whose
        previous forward did not complete. Idempotent: the storefront reuses the
        same idempotency key, so a source that already received the buy is not
        double-booked. Returns the approval-queue entry with its refreshed
        forwarding state. A buy terminalized by a structural failure is
        recoverable in place with `forceTerminal: true`, which re-forwards it
        under the same `mediaBuyId` and keeps the original approval — the
        request is refused unless every persisted source route is a failed,
        unsent leg, so a forced retry cannot duplicate an upstream buy.
      operationId: retryForwardPendingMediaBuy
      parameters:
        - in: path
          name: mediaBuyId
          schema:
            type: string
            minLength: 1
            description: Buyer-supplied media buy identifier (AdCP `media_buy_id`).
          required: true
          description: Buyer-supplied media buy identifier (AdCP `media_buy_id`).
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RetryForwardMediaBuyBody'
      responses:
        '200':
          description: Retry forwarding an approved media buy
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetryForwardMediaBuyResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    RetryForwardMediaBuyBody:
      default:
        forceTerminal: false
      description: >-
        Request body for retrying forwarding. The terminal override is an
        operator recovery control and is guarded against duplicate upstream
        writes.
      type: object
      properties:
        buyerCustomerId:
          description: >-
            Buyer customer id that disambiguates a buyer-scoped media-buy id.
            Omit only when the id is known to be unique for this storefront.
          type: integer
          minimum: 0
          exclusiveMinimum: true
          maximum: 9007199254740991
        forceTerminal:
          default: false
          description: >-
            Allow retrying an incorrectly terminalized approval only when every
            persisted source route is a failed, unsent leg. The request is
            rejected if any source has an upstream media-buy or task id.
          type: boolean
        reason:
          description: >-
            Why this retry is being made — recorded against the attempt so a
            later reviewer can tell a considered recovery from a reflexive one.
            Strongly recommended with `forceTerminal`, which overrides a
            terminal state in front of an ad server.
          example: Dimension-derivation fix shipped in v4.118.0; GAM order absent.
          type: string
          minLength: 1
          maxLength: 500
      additionalProperties: false
    RetryForwardMediaBuyResponse:
      type: object
      properties:
        id:
          type: string
          description: Surrogate id of the approval row (BIGINT serialized as string).
          example: '42'
        kind:
          default: create
          description: >-
            Approval workstream kind. `create` is an initial create_media_buy
            approval; `update` is a material update_media_buy approval for an
            already-created buy.
          type: string
          enum:
            - create
            - update
        storefrontId:
          type: string
          description: >-
            Storefront the pending buy was submitted to (BIGINT serialized as
            string).
          example: '1234'
        mediaBuyId:
          type: string
          description: >-
            Buyer-supplied media buy identifier (AdCP `media_buy_id`). Unique
            per storefront — re-submitting the same id is idempotent.
        buyerCustomerId:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
          description: Customer id of the buyer who submitted the media buy.
        submittedPayload:
          description: >-
            Raw AdCP `create_media_buy` payload as the buyer submitted it, with
            buyer webhook credentials (`push_notification_config` /
            `pushNotificationConfig`) removed before it reaches operator-facing
            responses. Not normalized — the operator UI renders a summary
            directly from this object.
        status:
          type: string
          enum:
            - pending
            - approved
            - rejected
            - revoked
          description: >-
            Lifecycle state. `pending` until the operator decides; `approved`
            once the operator accepts (forwarding upstream happens out-of-band
            and is reflected by `forwardedAt`); `rejected` when the operator
            declines; `revoked` when a buyer withdraws a pending create or when
            forwarding detects that its buyer-side buy was already canceled or
            archived.
        reviewedBy:
          nullable: true
          description: >-
            User id of the operator who recorded the decision (BIGINT serialized
            as string). Null while pending.
          type: string
        reviewedAt:
          nullable: true
          description: >-
            When the operator decision was recorded (ISO 8601). Null while
            pending.
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        reviewerNotes:
          nullable: true
          description: Operator note attached to the decision. Null while pending.
          type: string
        forwardedAt:
          nullable: true
          description: >-
            When forwarding to the underlying sales agent settled (ISO 8601) —
            stamped both when every source accepted the buy and when the forward
            was terminalized, because the stamp is also what stops the
            background worker re-attempting a dead forward. Null means the
            forward has not been attempted or is still in flight. Read it with
            the per-source legs to tell a delivered buy from a refused one: a
            delivered buy carries an `upstreamMediaBuyId`.
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        createdAt:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: When the buyer submitted the media buy (ISO 8601).
        updatedAt:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: >-
            When the row was last modified — submission, decision, or forwarding
            stamp (ISO 8601).
        readiness:
          nullable: true
          description: >-
            Structural fillability of the buy. Present on pending `create`
            entries; null when the buy has already been decided, when it is an
            `update` approval, or when the projection could not be computed —
            never as a way of saying "nothing is wrong".
          allOf:
            - $ref: '#/components/schemas/MediaBuyApprovalReadiness'
        forwardOutcome:
          description: >-
            Result of the dispatch this call triggered. `deferred` means the
            retry was accepted and is running asynchronously — poll `GET
            /media-buy-approvals/{mediaBuyId}` for the settled result. Absent
            when no dispatch ran.
          type: string
          enum:
            - deferred
            - all_completed
            - all_submitted
            - partial
            - all_failed
            - precondition_failed
        forwardResult:
          description: >-
            Per-source forwarding legs for this dispatch. Empty while
            `forwardOutcome` is `deferred`.
          type: array
          items:
            $ref: '#/components/schemas/SourceForwardResult'
      required:
        - id
        - kind
        - storefrontId
        - mediaBuyId
        - buyerCustomerId
        - submittedPayload
        - status
        - reviewedBy
        - reviewedAt
        - reviewerNotes
        - forwardedAt
        - createdAt
        - updatedAt
        - readiness
      additionalProperties: false
      description: >-
        An approval-queue entry returned from a retry-forward attempt, carrying
        the outcome of the dispatch when one ran.
    ErrorResponse:
      type: object
      properties:
        data:
          type: string
          nullable: true
          enum:
            - null
        error:
          $ref: '#/components/schemas/ApiError'
      required:
        - data
        - error
      additionalProperties: false
      description: Standard error response
    MediaBuyApprovalReadiness:
      type: object
      properties:
        packages:
          type: array
          items:
            $ref: '#/components/schemas/PackageReadiness'
          description: >-
            Per-package creative state as it will actually forward, read from
            the buyer's live media-buy products rather than the payload frozen
            at submit time. Capped at 20 entries, creative-less packages first
            so the cap can never be what hides one; compare with `packageCount`
            to tell a whole answer from a capped one.
        packageCount:
          type: integer
          minimum: 0
          maximum: 9007199254740991
          description: >-
            How many packages the buy carries in total, before `packages` was
            capped.
        creativelessPackageCount:
          type: integer
          minimum: 0
          maximum: 9007199254740991
          description: >-
            How many of the buy's packages carry no creative, counted across
            every package rather than the returned slice. Trust this over
            scanning `packages` when `packageCount` shows entries were capped.
        creativeSyncFailures:
          type: array
          items:
            $ref: '#/components/schemas/CreativeSyncFailure'
          description: >-
            Creatives on this buy's campaign whose sync to this storefront is in
            a failed state, reflecting each creative's latest sync rather than
            its latest failure — a failure the buyer has since fixed drops off.
            Capped at 10 entries; see `creativeSyncFailureCount`.
        creativeSyncFailureCount:
          type: integer
          minimum: 0
          maximum: 9007199254740991
          description: >-
            How many of this buy's creatives failed to sync in total, before
            `creativeSyncFailures` was capped.
      required:
        - packages
        - packageCount
        - creativelessPackageCount
        - creativeSyncFailures
        - creativeSyncFailureCount
      additionalProperties: false
      description: >-
        Whether the buy is structurally able to deliver, computed from facts the
        platform already holds. Disclosure only — an unready buy still forwards
        on approval, because a buy must never fail to forward on creative
        grounds.
    SourceForwardResult:
      type: object
      properties:
        sourceId:
          type: string
          description: Identifier of the inventory source this leg targeted.
        status:
          type: string
          description: >-
            The source's AdCP task status for the forward call (e.g.
            `completed`, `failed`, `pending_start`). Says whether the source
            accepted the buy, not where the buy sits in its lifecycle.
        upstreamMediaBuyId:
          description: >-
            Identifier the source assigned to the buy on its side. Present only
            once the source has accepted and recorded it.
          type: string
      required:
        - sourceId
        - status
      additionalProperties: {}
      description: Per-source outcome of one forwarding leg.
    ApiError:
      type: object
      properties:
        code:
          type: string
          description: Machine-readable error code
        message:
          type: string
          description: Human-readable error message
        field:
          description: Field path associated with the error
          type: string
        details:
          description: Additional error context
          type: object
          additionalProperties: {}
      required:
        - code
        - message
      additionalProperties: false
      description: Structured error object
    PackageReadiness:
      type: object
      properties:
        mediaProductId:
          type: string
          description: Seller product id of the buy's package.
        buyerRef:
          nullable: true
          description: Buyer's own reference for the package, when it set one.
          type: string
        assignedCreativeIds:
          type: array
          items:
            type: string
          description: >-
            Library creatives that will forward on this package. Empty means the
            package forwards with no creative.
        unusableCreatives:
          type: array
          items:
            $ref: '#/components/schemas/UnusableCreative'
          description: >-
            Campaign creatives that cannot satisfy this package, with the reason
            each was turned away. Populated only for packages carrying no
            assignment — a package that already has a creative needs no
            explanation. Empty alongside an empty `assignedCreativeIds` means
            the buyer's campaign has no creatives at all. Capped at 5 entries;
            compare with `unusableCreativeCount` to tell a full list from a
            truncated one.
        unusableCreativeCount:
          type: integer
          minimum: 0
          maximum: 9007199254740991
          description: >-
            How many campaign creatives were turned away in total, before
            `unusableCreatives` was capped.
        compatibleUnattachedCreativeIds:
          type: array
          items:
            type: string
          description: >-
            Campaign creatives that CAN satisfy this package and are still not
            attached to it. Nothing is wrong with these creatives and there is
            nothing for the buyer to change — the attach did not happen.
            Reported separately so a package that demonstrably fits is never
            described as one the campaign has no creative for. Capped at 5
            entries.
        compatibleUnattachedCreativeCount:
          type: integer
          minimum: 0
          maximum: 9007199254740991
          description: >-
            How many compatible creatives went unattached in total, before
            `compatibleUnattachedCreativeIds` was capped.
      required:
        - mediaProductId
        - buyerRef
        - assignedCreativeIds
        - unusableCreatives
        - unusableCreativeCount
        - compatibleUnattachedCreativeIds
        - compatibleUnattachedCreativeCount
      additionalProperties: false
    CreativeSyncFailure:
      type: object
      properties:
        creativeId:
          type: string
        status:
          type: string
          description: Sync state recorded against this storefront.
        detail:
          nullable: true
          description: Rejection reason recorded by the sync, when one was given.
          type: string
      required:
        - creativeId
        - status
        - detail
      additionalProperties: false
    UnusableCreative:
      type: object
      properties:
        creativeId:
          type: string
          description: Campaign creative that cannot satisfy the package.
        reason:
          type: string
          description: >-
            Why the creative was turned away, naming the measured value against
            the declared pin (e.g. "requires a duration of at most 15000ms but
            asset is 15047ms") or the ambiguity that prevented a canonical
            match.
      required:
        - creativeId
        - reason
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key or access token

````