> ## 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.

# Evaluate a media buy against acceptance policy

> Classify whether a pending media buy is definitely on policy, definitely not on policy, or needs human approval. The evaluator only recommends automatic approval when the buy references quoted storefront products, contains advertiser evidence, and does not match active acceptance-policy review or block rules. This endpoint does not record a decision.



## OpenAPI

````yaml /v2/storefront-api-v2.yaml post /media-buy-approvals/{mediaBuyId}/evaluate
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}/evaluate:
    post:
      tags:
        - Storefront
      summary: Evaluate a media buy against acceptance policy
      description: >-
        Classify whether a pending media buy is definitely on policy, definitely
        not on policy, or needs human approval. The evaluator only recommends
        automatic approval when the buy references quoted storefront products,
        contains advertiser evidence, and does not match active
        acceptance-policy review or block rules. This endpoint does not record a
        decision.
      operationId: evaluatePendingMediaBuy
      parameters:
        - in: query
          name: buyerCustomerId
          schema:
            description: >-
              Buyer customer id that disambiguates a buyer-scoped media-buy id.
              Omit only when the id is unique for this storefront.
            type: integer
            minimum: 0
            exclusiveMinimum: true
            maximum: 9007199254740991
          description: >-
            Buyer customer id that disambiguates a buyer-scoped media-buy id.
            Omit only when the id is unique for this storefront.
        - 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`).
      responses:
        '200':
          description: Evaluate a media buy against acceptance policy
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MediaBuyApprovalEvaluationResponse'
        '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:
    MediaBuyApprovalEvaluationResponse:
      type: object
      properties:
        mediaBuyId:
          type: string
          description: Buyer-supplied media buy identifier that was evaluated.
        evaluatorId:
          type: string
          description: Stable evaluator implementation id.
        evaluatorVersion:
          type: string
          description: Evaluator implementation version.
        policyDecision:
          description: >-
            `definitely_on_policy` means this buy is eligible under Brief
            Acceptance. `needs_human_approval` is the safe escalation default.
            `definitely_not_on_policy` means the payload clearly conflicts with
            Brief Acceptance and supplies a strong operator-facing rejection
            signal.
          allOf:
            - $ref: '#/components/schemas/StorefrontApprovalPolicyDecision'
        recommendation:
          type: string
          enum:
            - auto_approve
            - escalate_to_human
            - auto_reject
          description: >-
            Evaluator recommendation for the manual approval path.
            `auto_approve` = definitely on policy. `escalate_to_human` =
            eligibility needs operator review. `auto_reject` = hard
            deterministic Brief Acceptance violation and strong operator-facing
            rejection signal. In the current rollout, create_media_buy queues
            auto_reject findings for human review; LLM conflicts only escalate.
        rejectionReason:
          nullable: true
          description: >-
            When `recommendation` is `auto_reject`, an evaluator-generated
            explanation naming the acceptance-policy terms the buy matched
            (drawn from the operator's policy). Null otherwise.
          type: string
        summary:
          type: string
          description: Short evaluator summary.
        checks:
          type: array
          items:
            type: object
            properties:
              evaluator_id:
                type: string
                minLength: 1
              evaluator_version:
                type: string
                minLength: 1
              category:
                type: string
                enum:
                  - readiness
                  - asset
                  - brand_brief
                  - format_seller
                  - policy_safety
                  - performance
              code:
                type: string
              label:
                type: string
              stage:
                type: string
                enum:
                  - generation
                  - selection
                  - refinement
                  - finalization
                  - adaptation
                  - approval
                  - live_learning
                  - draft
                  - final
              status:
                type: string
                enum:
                  - pass
                  - warn
                  - fail
              detail:
                type: string
              severity:
                type: string
                enum:
                  - hard
                  - soft
              blocking:
                type: boolean
              confidence:
                type: number
                minimum: 0
                maximum: 1
              evidence_refs:
                type: array
                items:
                  type: string
                  minLength: 1
              remediation:
                type: string
                maxLength: 1000
            required:
              - label
              - status
              - detail
            additionalProperties: false
          description: >-
            Individual policy, advertiser, and quoted-product checks supporting
            the recommendation.
      required:
        - mediaBuyId
        - evaluatorId
        - evaluatorVersion
        - policyDecision
        - recommendation
        - rejectionReason
        - summary
        - checks
      additionalProperties: false
      description: >-
        Brief Acceptance evaluation for a storefront media buy on the manual
        approval path. Definitely-on-policy buys auto-forward; ambiguous,
        failed, and hard findings enter the current human-review queue unless an
        existing per-buyer override bypasses the gate.
    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
    StorefrontApprovalPolicyDecision:
      type: string
      enum:
        - definitely_on_policy
        - definitely_not_on_policy
        - needs_human_approval
      description: >-
        Policy confidence for storefront approval automation.
        `definitely_on_policy` is eligible for automatic approval,
        `definitely_not_on_policy` is a clear policy conflict, and
        `needs_human_approval` is the safe default for ambiguous or incomplete
        evidence.
    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
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key or access token

````