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

# Get the demand-inbox ledger

> The Proposal Studio front-of-house ledger for the calling storefront: a page of brief → proposal → feedback → result rows (each carrying the canonical brief and proposal artifact ids), plus a metrics strip computed only from persisted rows — briefs YTD, answered %, win rate, average grade, and the agent-vs-human split. A metric with no inputs is reported as null (unavailable), never 0. Page with `?skip=` and `?take=`.



## OpenAPI

````yaml /v2/storefront-api-v2.yaml get /demand-inbox
openapi: 3.0.0
info:
  title: Scope3 Storefront API
  version: 2.0.0
  description: |-
    REST API for partners to manage storefronts, 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: 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 storefronts
  - name: AI Usage
    description: Storefront AI token usage visibility by model
  - name: MCP
    description: Model Context Protocol endpoints
paths:
  /demand-inbox:
    get:
      tags:
        - Storefront
      summary: Get the demand-inbox ledger
      description: >-
        The Proposal Studio front-of-house ledger for the calling storefront: a
        page of brief → proposal → feedback → result rows (each carrying the
        canonical brief and proposal artifact ids), plus a metrics strip
        computed only from persisted rows — briefs YTD, answered %, win rate,
        average grade, and the agent-vs-human split. A metric with no inputs is
        reported as null (unavailable), never 0. Page with `?skip=` and
        `?take=`.
      operationId: getDemandInbox
      parameters:
        - in: query
          name: skip
          schema:
            default: 0
            type: integer
            minimum: 0
            maximum: 9007199254740991
        - in: query
          name: take
          schema:
            default: 50
            type: integer
            minimum: 1
            maximum: 100
      responses:
        '200':
          description: Get the demand-inbox ledger
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DemandInboxResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: No storefront exists for the calling operator.
          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:
    DemandInboxResponse:
      description: >-
        The demand-inbox ledger: a persisted-only metrics strip, a page of brief
        → proposal → feedback → result rows, and the total brief count for
        page-cap disclosure.
      type: object
      properties:
        metrics:
          $ref: '#/components/schemas/DemandInboxMetrics'
        rows:
          type: array
          items:
            $ref: '#/components/schemas/DemandInboxRow'
        total:
          description: >-
            Total number of brief rows for the storefront. When it exceeds the
            returned page, the client discloses the cap ("showing the N most
            recent of total").
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
      required:
        - metrics
        - rows
        - total
      additionalProperties: false
    ErrorResponse:
      description: Standard error response
      type: object
      properties:
        data:
          type: string
          nullable: true
          enum:
            - null
        error:
          $ref: '#/components/schemas/ApiError'
      required:
        - data
        - error
      additionalProperties: false
    DemandInboxMetrics:
      description: >-
        Front-of-house scoreboard. Every field is computed only from persisted
        rows; a metric with no inputs reports null (unavailable), never 0.
      type: object
      properties:
        briefsYtd:
          description: Count of brief passes received this calendar year.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        answeredPercent:
          description: >-
            Share of this year’s briefs the agent answered with a proposal
            (0–100). Null when no briefs exist yet.
          nullable: true
          type: number
        winRate:
          description: >-
            Won / (won + lost) across briefs with a decided commercial result
            (0–100). Null when no result is recorded yet.
          nullable: true
          type: number
        avgGrade:
          description: >-
            Mean seller grade rounded to the nearest letter. Null when nothing
            is graded yet.
          nullable: true
          type: string
          enum:
            - A
            - B
            - C
            - D
            - F
        agentVsHuman:
          description: >-
            Led-by split across briefs with recorded attribution. Null when no
            run has been attributed yet.
          nullable: true
          type: object
          properties:
            agent:
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            human:
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
          required:
            - agent
            - human
          additionalProperties: false
        bookedYtd:
          description: >-
            Money won this calendar year, one entry per currency, from
            attributed outcomes that carried both an amount and its currency
            (delivered spend when reported, else the booked media-buy budget).
            Null when nothing won this year recorded a priced outcome.
          nullable: true
          type: array
          items:
            type: object
            properties:
              amount:
                type: number
              currency:
                type: string
            required:
              - amount
              - currency
            additionalProperties: false
      required:
        - briefsYtd
        - answeredPercent
        - winRate
        - avgGrade
        - agentVsHuman
        - bookedYtd
      additionalProperties: false
    DemandInboxRow:
      type: object
      properties:
        id:
          type: string
        brief:
          description: The brief text the agent answered (label for the row).
          nullable: true
          type: string
        buyer:
          description: Buyer label derived from the buyer scope (operator or brand domain).
          nullable: true
          type: string
        budgetRange:
          description: >-
            The buyer's stated budget range, exactly as sent in the brief's
            filters.budget_range and captured in the brief artifact. Null when
            the buyer did not state one.
          nullable: true
          type: object
          properties:
            min:
              nullable: true
              type: number
            max:
              nullable: true
              type: number
            currency:
              type: string
          required:
            - min
            - max
            - currency
          additionalProperties: false
        receivedAt:
          type: string
        respondedAt:
          description: When the agent answered. Null while the brief is unanswered.
          nullable: true
          type: string
        ledBy:
          nullable: true
          type: string
          enum:
            - agent
            - human
        feedback:
          nullable: true
          type: string
        result:
          description: >-
            Commercial result derived from this run’s own attributed outcome:
            closed_won (booked/delivered), closed_lost (rejected), else pending.
            A booking attributed to a later refine pass is not rolled up here
            (see the win-rate scope note).
          type: string
          enum:
            - closed_won
            - closed_lost
            - pending
        grade:
          nullable: true
          type: string
          enum:
            - A
            - B
            - C
            - D
            - F
        wonValue:
          description: >-
            Money attributed to this run's won outcome: delivered spend when
            reporting exists, else the booked media-buy budget. Null unless the
            outcome persisted both an amount and its currency.
          nullable: true
          type: object
          properties:
            amount:
              type: number
            currency:
              type: string
          required:
            - amount
            - currency
          additionalProperties: false
        briefArtifactId:
          description: >-
            Canonical brief artifact id (AI-4693) for the build-3 drill-in. Null
            = artifact unavailable (historical pre-capture run).
          nullable: true
          type: string
        proposalArtifactId:
          description: >-
            Canonical proposal artifact id for the build-3 drill-in. Null = no
            proposal artifact captured.
          nullable: true
          type: string
        artifactAvailable:
          description: >-
            False when the brief artifact was not captured; readers must say
            "artifact unavailable" rather than reconstruct it.
          type: boolean
      required:
        - id
        - brief
        - buyer
        - budgetRange
        - receivedAt
        - respondedAt
        - ledBy
        - feedback
        - result
        - grade
        - wonValue
        - briefArtifactId
        - proposalArtifactId
        - artifactAvailable
      additionalProperties: false
    ApiError:
      description: Structured error object
      type: object
      properties:
        code:
          description: Machine-readable error code
          type: string
        message:
          description: Human-readable error message
          type: string
        field:
          description: Field path associated with the error
          type: string
        details:
          description: Additional error context
          type: object
          additionalProperties: {}
      required:
        - code
        - message
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key or access token

````