> ## 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 ad server source status

> Fetch the upstream managed-source operational snapshot (adapter health, syncs, workflows, packages, creatives, webhooks, setup tasks). Connection-id alias of `GET /inventory-sources/{sourceId}/status`.



## OpenAPI

````yaml /v2/storefront-api-v2.yaml get /esa/{esaId}/status
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:
  /esa/{esaId}/status:
    get:
      tags:
        - Storefront
      summary: Get ad server source status
      description: >-
        Fetch the upstream managed-source operational snapshot (adapter health,
        syncs, workflows, packages, creatives, webhooks, setup tasks).
        Connection-id alias of `GET /inventory-sources/{sourceId}/status`.
      operationId: getEsaStatus
      parameters:
        - in: query
          name: includeSyncHistory
          schema:
            type: boolean
        - in: query
          name: syncHistoryLimit
          schema:
            default: 5
            type: integer
            minimum: 1
            maximum: 10
        - in: path
          name: esaId
          schema:
            description: >-
              Ad server source connection id. The wire field remains `esaId` for
              API compatibility.
            example: 123
            type: integer
            maximum: 9007199254740991
            minimum: 1
          required: true
          description: >-
            Ad server source connection id. The wire field remains `esaId` for
            API compatibility.
      responses:
        '200':
          description: Get ad server source status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EsaTenantStatus'
        '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 ad server source with this id.
          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:
    EsaTenantStatus:
      description: >-
        Operational snapshot of a managed ad-server source: adapter health, sync
        state, workflows, packages, creatives, webhook stats.
      type: object
      properties:
        operational:
          $ref: '#/components/schemas/EsaOperationalStatus'
        wholesalePricingMode:
          description: >-
            Legacy source-level pricing preference. Inspect
            syncs.pricingAvailability.coverageSummary for effective per-product
            coverage.
          allOf:
            - $ref: '#/components/schemas/EsaWholesalePricingMode'
        adapter:
          type: object
          properties:
            type:
              type: string
            connected:
              type: boolean
            lastTestedAt:
              nullable: true
              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))$
            lastTestError:
              nullable: true
              type: string
          required:
            - type
            - connected
            - lastTestedAt
            - lastTestError
          additionalProperties: false
        syncs:
          type: object
          properties:
            inventory:
              type: object
              properties:
                status:
                  type: string
                severity:
                  default: ok
                  anyOf:
                    - type: string
                      enum:
                        - ok
                        - warning
                        - critical
                    - type: string
                lastSuccessAt:
                  default: null
                  nullable: true
                  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))$
                issue:
                  default: null
                  nullable: true
                  type: object
                  properties:
                    code:
                      type: string
                    category:
                      type: string
                    message:
                      type: string
                    retryable:
                      type: boolean
                    action:
                      nullable: true
                      type: string
                    capability:
                      nullable: true
                      type: string
                  required:
                    - code
                    - category
                    - message
                    - retryable
                  additionalProperties: false
                lastRunAt:
                  default: null
                  nullable: true
                  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))$
                lastStartedAt:
                  default: null
                  nullable: true
                  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))$
                itemCount:
                  default: null
                  nullable: true
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                error:
                  default: null
                  nullable: true
                  type: string
                history:
                  default:
                    recentRunCount: 0
                    recentFailureCount: 0
                    consecutiveFailureCount: 0
                    latestFailureAt: null
                    latestError: null
                  type: object
                  properties:
                    recentRunCount:
                      default: 0
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    recentFailureCount:
                      default: 0
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    consecutiveFailureCount:
                      default: 0
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    latestFailureAt:
                      default: null
                      nullable: true
                      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))$
                    latestError:
                      default: null
                      nullable: true
                      type: string
                    recentRuns:
                      type: array
                      items:
                        $ref: '#/components/schemas/EsaSyncHistoryRun'
                  required:
                    - recentRunCount
                    - recentFailureCount
                    - consecutiveFailureCount
                    - latestFailureAt
                    - latestError
                  additionalProperties: false
              required:
                - status
                - severity
                - lastSuccessAt
                - issue
                - lastRunAt
                - lastStartedAt
                - itemCount
                - error
                - history
              additionalProperties: false
            customTargeting:
              type: object
              properties:
                status:
                  type: string
                severity:
                  default: ok
                  anyOf:
                    - type: string
                      enum:
                        - ok
                        - warning
                        - critical
                    - type: string
                lastSuccessAt:
                  default: null
                  nullable: true
                  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))$
                issue:
                  default: null
                  nullable: true
                  type: object
                  properties:
                    code:
                      type: string
                    category:
                      type: string
                    message:
                      type: string
                    retryable:
                      type: boolean
                    action:
                      nullable: true
                      type: string
                    capability:
                      nullable: true
                      type: string
                  required:
                    - code
                    - category
                    - message
                    - retryable
                  additionalProperties: false
                lastRunAt:
                  default: null
                  nullable: true
                  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))$
                lastStartedAt:
                  default: null
                  nullable: true
                  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))$
                itemCount:
                  default: null
                  nullable: true
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                error:
                  default: null
                  nullable: true
                  type: string
                history:
                  default:
                    recentRunCount: 0
                    recentFailureCount: 0
                    consecutiveFailureCount: 0
                    latestFailureAt: null
                    latestError: null
                  type: object
                  properties:
                    recentRunCount:
                      default: 0
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    recentFailureCount:
                      default: 0
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    consecutiveFailureCount:
                      default: 0
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    latestFailureAt:
                      default: null
                      nullable: true
                      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))$
                    latestError:
                      default: null
                      nullable: true
                      type: string
                    recentRuns:
                      type: array
                      items:
                        $ref: '#/components/schemas/EsaSyncHistoryRun'
                  required:
                    - recentRunCount
                    - recentFailureCount
                    - consecutiveFailureCount
                    - latestFailureAt
                    - latestError
                  additionalProperties: false
              required:
                - status
                - severity
                - lastSuccessAt
                - issue
                - lastRunAt
                - lastStartedAt
                - itemCount
                - error
                - history
              additionalProperties: false
            advertisers:
              type: object
              properties:
                status:
                  type: string
                severity:
                  default: ok
                  anyOf:
                    - type: string
                      enum:
                        - ok
                        - warning
                        - critical
                    - type: string
                lastSuccessAt:
                  default: null
                  nullable: true
                  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))$
                issue:
                  default: null
                  nullable: true
                  type: object
                  properties:
                    code:
                      type: string
                    category:
                      type: string
                    message:
                      type: string
                    retryable:
                      type: boolean
                    action:
                      nullable: true
                      type: string
                    capability:
                      nullable: true
                      type: string
                  required:
                    - code
                    - category
                    - message
                    - retryable
                  additionalProperties: false
                lastRunAt:
                  default: null
                  nullable: true
                  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))$
                lastStartedAt:
                  default: null
                  nullable: true
                  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))$
                itemCount:
                  default: null
                  nullable: true
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                error:
                  default: null
                  nullable: true
                  type: string
                history:
                  default:
                    recentRunCount: 0
                    recentFailureCount: 0
                    consecutiveFailureCount: 0
                    latestFailureAt: null
                    latestError: null
                  type: object
                  properties:
                    recentRunCount:
                      default: 0
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    recentFailureCount:
                      default: 0
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    consecutiveFailureCount:
                      default: 0
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    latestFailureAt:
                      default: null
                      nullable: true
                      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))$
                    latestError:
                      default: null
                      nullable: true
                      type: string
                    recentRuns:
                      type: array
                      items:
                        $ref: '#/components/schemas/EsaSyncHistoryRun'
                  required:
                    - recentRunCount
                    - recentFailureCount
                    - consecutiveFailureCount
                    - latestFailureAt
                    - latestError
                  additionalProperties: false
              required:
                - status
                - severity
                - lastSuccessAt
                - issue
                - lastRunAt
                - lastStartedAt
                - itemCount
                - error
                - history
              additionalProperties: false
            reporting:
              type: object
              properties:
                status:
                  type: string
                severity:
                  default: ok
                  anyOf:
                    - type: string
                      enum:
                        - ok
                        - warning
                        - critical
                    - type: string
                lastSuccessAt:
                  default: null
                  nullable: true
                  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))$
                issue:
                  default: null
                  nullable: true
                  type: object
                  properties:
                    code:
                      type: string
                    category:
                      type: string
                    message:
                      type: string
                    retryable:
                      type: boolean
                    action:
                      nullable: true
                      type: string
                    capability:
                      nullable: true
                      type: string
                  required:
                    - code
                    - category
                    - message
                    - retryable
                  additionalProperties: false
                lastRunAt:
                  default: null
                  nullable: true
                  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))$
                lastStartedAt:
                  default: null
                  nullable: true
                  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))$
                itemCount:
                  default: null
                  nullable: true
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                error:
                  default: null
                  nullable: true
                  type: string
                history:
                  default:
                    recentRunCount: 0
                    recentFailureCount: 0
                    consecutiveFailureCount: 0
                    latestFailureAt: null
                    latestError: null
                  type: object
                  properties:
                    recentRunCount:
                      default: 0
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    recentFailureCount:
                      default: 0
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    consecutiveFailureCount:
                      default: 0
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    latestFailureAt:
                      default: null
                      nullable: true
                      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))$
                    latestError:
                      default: null
                      nullable: true
                      type: string
                    recentRuns:
                      type: array
                      items:
                        $ref: '#/components/schemas/EsaSyncHistoryRun'
                  required:
                    - recentRunCount
                    - recentFailureCount
                    - consecutiveFailureCount
                    - latestFailureAt
                    - latestError
                  additionalProperties: false
              required:
                - status
                - severity
                - lastSuccessAt
                - issue
                - lastRunAt
                - lastStartedAt
                - itemCount
                - error
                - history
              additionalProperties: false
            signalCoverage:
              type: object
              properties:
                status:
                  type: string
                severity:
                  default: ok
                  anyOf:
                    - type: string
                      enum:
                        - ok
                        - warning
                        - critical
                    - type: string
                lastSuccessAt:
                  default: null
                  nullable: true
                  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))$
                issue:
                  default: null
                  nullable: true
                  type: object
                  properties:
                    code:
                      type: string
                    category:
                      type: string
                    message:
                      type: string
                    retryable:
                      type: boolean
                    action:
                      nullable: true
                      type: string
                    capability:
                      nullable: true
                      type: string
                  required:
                    - code
                    - category
                    - message
                    - retryable
                  additionalProperties: false
                lastRunAt:
                  default: null
                  nullable: true
                  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))$
                lastStartedAt:
                  default: null
                  nullable: true
                  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))$
                itemCount:
                  default: null
                  nullable: true
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                error:
                  default: null
                  nullable: true
                  type: string
                history:
                  default:
                    recentRunCount: 0
                    recentFailureCount: 0
                    consecutiveFailureCount: 0
                    latestFailureAt: null
                    latestError: null
                  type: object
                  properties:
                    recentRunCount:
                      default: 0
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    recentFailureCount:
                      default: 0
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    consecutiveFailureCount:
                      default: 0
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    latestFailureAt:
                      default: null
                      nullable: true
                      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))$
                    latestError:
                      default: null
                      nullable: true
                      type: string
                    recentRuns:
                      type: array
                      items:
                        $ref: '#/components/schemas/EsaSyncHistoryRun'
                  required:
                    - recentRunCount
                    - recentFailureCount
                    - consecutiveFailureCount
                    - latestFailureAt
                    - latestError
                  additionalProperties: false
              required:
                - status
                - severity
                - lastSuccessAt
                - issue
                - lastRunAt
                - lastStartedAt
                - itemCount
                - error
                - history
              additionalProperties: false
            pricingAvailability:
              type: object
              properties:
                status:
                  type: string
                severity:
                  default: ok
                  anyOf:
                    - type: string
                      enum:
                        - ok
                        - warning
                        - critical
                    - type: string
                lastSuccessAt:
                  default: null
                  nullable: true
                  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))$
                issue:
                  default: null
                  nullable: true
                  type: object
                  properties:
                    code:
                      type: string
                    category:
                      type: string
                    message:
                      type: string
                    retryable:
                      type: boolean
                    action:
                      nullable: true
                      type: string
                    capability:
                      nullable: true
                      type: string
                  required:
                    - code
                    - category
                    - message
                    - retryable
                  additionalProperties: false
                lastRunAt:
                  default: null
                  nullable: true
                  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))$
                lastStartedAt:
                  default: null
                  nullable: true
                  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))$
                itemCount:
                  default: null
                  nullable: true
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                error:
                  default: null
                  nullable: true
                  type: string
                history:
                  default:
                    recentRunCount: 0
                    recentFailureCount: 0
                    consecutiveFailureCount: 0
                    latestFailureAt: null
                    latestError: null
                  type: object
                  properties:
                    recentRunCount:
                      default: 0
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    recentFailureCount:
                      default: 0
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    consecutiveFailureCount:
                      default: 0
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    latestFailureAt:
                      default: null
                      nullable: true
                      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))$
                    latestError:
                      default: null
                      nullable: true
                      type: string
                    recentRuns:
                      type: array
                      items:
                        $ref: '#/components/schemas/EsaSyncHistoryRun'
                  required:
                    - recentRunCount
                    - recentFailureCount
                    - consecutiveFailureCount
                    - latestFailureAt
                    - latestError
                  additionalProperties: false
                coverageSummary:
                  allOf:
                    - $ref: '#/components/schemas/EsaPricingCoverageSummary'
              required:
                - status
                - severity
                - lastSuccessAt
                - issue
                - lastRunAt
                - lastStartedAt
                - itemCount
                - error
                - history
              additionalProperties: false
          required:
            - inventory
          additionalProperties:
            type: object
            properties:
              status:
                type: string
              severity:
                default: ok
                anyOf:
                  - type: string
                    enum:
                      - ok
                      - warning
                      - critical
                  - type: string
              lastSuccessAt:
                default: null
                nullable: true
                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))$
              issue:
                default: null
                nullable: true
                type: object
                properties:
                  code:
                    type: string
                  category:
                    type: string
                  message:
                    type: string
                  retryable:
                    type: boolean
                  action:
                    nullable: true
                    type: string
                  capability:
                    nullable: true
                    type: string
                required:
                  - code
                  - category
                  - message
                  - retryable
                additionalProperties: false
              lastRunAt:
                default: null
                nullable: true
                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))$
              lastStartedAt:
                default: null
                nullable: true
                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))$
              itemCount:
                default: null
                nullable: true
                type: integer
                minimum: -9007199254740991
                maximum: 9007199254740991
              error:
                default: null
                nullable: true
                type: string
              history:
                default:
                  recentRunCount: 0
                  recentFailureCount: 0
                  consecutiveFailureCount: 0
                  latestFailureAt: null
                  latestError: null
                type: object
                properties:
                  recentRunCount:
                    default: 0
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  recentFailureCount:
                    default: 0
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  consecutiveFailureCount:
                    default: 0
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  latestFailureAt:
                    default: null
                    nullable: true
                    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))$
                  latestError:
                    default: null
                    nullable: true
                    type: string
                  recentRuns:
                    type: array
                    items:
                      $ref: '#/components/schemas/EsaSyncHistoryRun'
                required:
                  - recentRunCount
                  - recentFailureCount
                  - consecutiveFailureCount
                  - latestFailureAt
                  - latestError
                additionalProperties: false
            required:
              - status
              - severity
              - lastSuccessAt
              - issue
              - lastRunAt
              - lastStartedAt
              - itemCount
              - error
              - history
            additionalProperties: false
        workflows:
          type: object
          properties:
            openCount:
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            oldestOpenedAt:
              nullable: true
              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))$
            byKind:
              type: object
              additionalProperties:
                type: integer
                minimum: -9007199254740991
                maximum: 9007199254740991
          required:
            - openCount
            - oldestOpenedAt
            - byKind
          additionalProperties: false
        packages:
          type: object
          properties:
            activeCount:
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            pausedCount:
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            last24hImpressions:
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
          required:
            - activeCount
            - pausedCount
            - last24hImpressions
          additionalProperties: false
        creatives:
          type: object
          properties:
            activeCount:
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            pendingReviewCount:
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            rejectedLast24hCount:
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
          required:
            - activeCount
            - pendingReviewCount
            - rejectedLast24hCount
          additionalProperties: false
        products:
          description: >-
            Sellable wholesale-product rollup. Optional for backward
            compatibility with upstream builds before the rollup shipped.
          type: object
          properties:
            activeCount:
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            draftCount:
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            archivedCount:
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
          required:
            - activeCount
            - draftCount
            - archivedCount
          additionalProperties: false
        inventoryProfiles:
          description: >-
            Reusable inventory-profile ingredient rollup from the managed
            source. Separate from products, which counts sellable wholesale
            products.
          type: object
          properties:
            totalCount:
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            completeCount:
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            incompleteCount:
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            wholesaleOwnedCount:
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
          required:
            - totalCount
            - completeCount
            - incompleteCount
            - wholesaleOwnedCount
          additionalProperties: false
        webhooks:
          nullable: true
          type: object
          properties:
            last24h:
              type: object
              properties:
                delivered:
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                failed:
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                successRate:
                  type: number
              required:
                - delivered
                - failed
                - successRate
              additionalProperties: false
            lastFailureAt:
              nullable: true
              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))$
          required:
            - last24h
            - lastFailureAt
          additionalProperties: false
        catalog:
          description: >-
            Local view of whether managed-source product/signal catalog webhooks
            are landing and refreshing buyer discovery caches.
          type: object
          properties:
            sourceCount:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            sources:
              type: array
              items:
                type: object
                properties:
                  storefrontId:
                    type: string
                  storefrontPlatformId:
                    nullable: true
                    type: string
                  storefrontName:
                    nullable: true
                    type: string
                  sourceId:
                    type: string
                  sourceName:
                    nullable: true
                    type: string
                required:
                  - storefrontId
                  - storefrontPlatformId
                  - storefrontName
                  - sourceId
                  - sourceName
                additionalProperties: false
            products:
              description: >-
                Local storefront catalog cache and webhook freshness for one
                AdCP 3.1 catalog bucket.
              type: object
              properties:
                bucket:
                  type: string
                  enum:
                    - WHOLESALE_PRODUCTS
                    - SIGNALS
                status:
                  type: string
                  enum:
                    - ok
                    - error
                    - unsupported
                    - missing
                    - mixed
                    - no_source
                cachedItemCount:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                sourceCount:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                okSourceCount:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                errorSourceCount:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                unsupportedSourceCount:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                missingSourceCount:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                accountKeyCount:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                lastFetchedAt:
                  nullable: true
                  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))$
                lastWebhookAt:
                  nullable: true
                  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))$
                oldestFetchedAt:
                  nullable: true
                  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))$
                softExpired:
                  type: boolean
                hardExpired:
                  type: boolean
                errorCode:
                  nullable: true
                  type: string
                errorMessage:
                  nullable: true
                  type: string
                cacheScope:
                  nullable: true
                  type: string
                  enum:
                    - public
                    - account
                wholesaleFeedVersion:
                  nullable: true
                  type: string
                pricingVersion:
                  nullable: true
                  type: string
              required:
                - bucket
                - status
                - cachedItemCount
                - sourceCount
                - okSourceCount
                - errorSourceCount
                - unsupportedSourceCount
                - missingSourceCount
                - accountKeyCount
                - lastFetchedAt
                - lastWebhookAt
                - oldestFetchedAt
                - softExpired
                - hardExpired
                - errorCode
                - errorMessage
                - cacheScope
                - wholesaleFeedVersion
                - pricingVersion
              additionalProperties: false
            signals:
              description: >-
                Local storefront catalog cache and webhook freshness for one
                AdCP 3.1 catalog bucket.
              type: object
              properties:
                bucket:
                  type: string
                  enum:
                    - WHOLESALE_PRODUCTS
                    - SIGNALS
                status:
                  type: string
                  enum:
                    - ok
                    - error
                    - unsupported
                    - missing
                    - mixed
                    - no_source
                cachedItemCount:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                sourceCount:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                okSourceCount:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                errorSourceCount:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                unsupportedSourceCount:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                missingSourceCount:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                accountKeyCount:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                lastFetchedAt:
                  nullable: true
                  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))$
                lastWebhookAt:
                  nullable: true
                  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))$
                oldestFetchedAt:
                  nullable: true
                  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))$
                softExpired:
                  type: boolean
                hardExpired:
                  type: boolean
                errorCode:
                  nullable: true
                  type: string
                errorMessage:
                  nullable: true
                  type: string
                cacheScope:
                  nullable: true
                  type: string
                  enum:
                    - public
                    - account
                wholesaleFeedVersion:
                  nullable: true
                  type: string
                pricingVersion:
                  nullable: true
                  type: string
              required:
                - bucket
                - status
                - cachedItemCount
                - sourceCount
                - okSourceCount
                - errorSourceCount
                - unsupportedSourceCount
                - missingSourceCount
                - accountKeyCount
                - lastFetchedAt
                - lastWebhookAt
                - oldestFetchedAt
                - softExpired
                - hardExpired
                - errorCode
                - errorMessage
                - cacheScope
                - wholesaleFeedVersion
                - pricingVersion
              additionalProperties: false
          required:
            - sourceCount
            - sources
            - products
            - signals
          additionalProperties: false
        setupTasks:
          allOf:
            - $ref: '#/components/schemas/EsaSetupTasksBlock'
        capabilities:
          description: >-
            Durable state for separately provisioned ad-server capabilities. A
            capability awaiting vendor permission remains paused until
            explicitly re-checked.
          type: object
          properties:
            reporting:
              type: object
              properties:
                state:
                  type: string
                  enum:
                    - unknown
                    - available
                    - awaiting_vendor_permission
                checkedAt:
                  nullable: true
                  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))$
                issue:
                  nullable: true
                  type: object
                  properties:
                    code:
                      type: string
                    category:
                      type: string
                    message:
                      type: string
                    retryable:
                      type: boolean
                    action:
                      nullable: true
                      type: string
                    capability:
                      nullable: true
                      type: string
                  required:
                    - code
                    - category
                    - message
                    - retryable
                  additionalProperties: false
              required:
                - state
                - checkedAt
                - issue
              additionalProperties: false
            forecasting:
              type: object
              properties:
                state:
                  type: string
                  enum:
                    - unknown
                    - available
                    - awaiting_vendor_permission
                checkedAt:
                  nullable: true
                  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))$
                issue:
                  nullable: true
                  type: object
                  properties:
                    code:
                      type: string
                    category:
                      type: string
                    message:
                      type: string
                    retryable:
                      type: boolean
                    action:
                      nullable: true
                      type: string
                    capability:
                      nullable: true
                      type: string
                  required:
                    - code
                    - category
                    - message
                    - retryable
                  additionalProperties: false
              required:
                - state
                - checkedAt
                - issue
              additionalProperties: false
          additionalProperties:
            type: object
            properties:
              state:
                type: string
                enum:
                  - unknown
                  - available
                  - awaiting_vendor_permission
              checkedAt:
                nullable: true
                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))$
              issue:
                nullable: true
                type: object
                properties:
                  code:
                    type: string
                  category:
                    type: string
                  message:
                    type: string
                  retryable:
                    type: boolean
                  action:
                    nullable: true
                    type: string
                  capability:
                    nullable: true
                    type: string
                required:
                  - code
                  - category
                  - message
                  - retryable
                additionalProperties: false
            required:
              - state
              - checkedAt
              - issue
            additionalProperties: false
        diagnoses:
          description: >-
            Typed ad-server-scoped source-health diagnoses (sync + catalog
            failure modes), computed by the same rules as readiness `diagnoses`.
            Only `seller`-owned entries are tasks; `scope3`/`vendor`-owned
            entries are informational.
          type: array
          items:
            $ref: '#/components/schemas/SourceHealthDiagnosis'
        fetchedAt:
          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))$
      required:
        - operational
        - adapter
        - syncs
        - workflows
        - packages
        - creatives
        - webhooks
        - fetchedAt
      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
    EsaOperationalStatus:
      description: >-
        Derived private uptime-style state for a managed ad-server source. Local
        provisioning state is lifecycle bookkeeping; this status is computed
        from upstream status at read time.
      type: object
      properties:
        isLive:
          description: >-
            Whether this managed source has passed setup and has products
            available to buyers.
          type: boolean
        discoveryDegraded:
          description: >-
            Whether buyer discovery/proposal request flows appear degraded.
            False when the source is not live yet.
          type: boolean
        deliveryDegraded:
          description: >-
            Whether campaign execution/reporting flows appear degraded. Does not
            expose whether any campaigns are currently running.
          type: boolean
        summary:
          type: string
        issues:
          type: array
          items:
            $ref: '#/components/schemas/EsaOperationalIssue'
      required:
        - isLive
        - discoveryDegraded
        - deliveryDegraded
        - summary
        - issues
      additionalProperties: false
    EsaWholesalePricingMode:
      description: >-
        Legacy source-level pricing preference. Product-level coverage is
        authoritative: ad-server-priced products are preserved and manual
        uploads fill only unresolved products, so pricing can be mixed within
        one source.
      type: string
      enum:
        - ad_server_sync
        - manual_upload
    EsaSyncHistoryRun:
      description: One historical sync run from the managed ad-server source.
      type: object
      properties:
        syncId:
          type: string
        syncType:
          type: string
        startedAt:
          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))$
        completedAt:
          default: null
          nullable: true
          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))$
        status:
          type: string
        durationSeconds:
          default: null
          nullable: true
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        itemsProcessed:
          default: 0
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        itemsFailed:
          default: 0
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        errorSummary:
          default: null
          nullable: true
          type: string
        errorCategory:
          default: null
          nullable: true
          type: string
      required:
        - syncId
        - syncType
        - startedAt
        - completedAt
        - status
        - durationSeconds
        - itemsProcessed
        - itemsFailed
        - errorSummary
        - errorCategory
      additionalProperties: false
    EsaPricingCoverageSummary:
      description: >-
        Per-product wholesale pricing coverage. Ad-server and manual pricing may
        coexist; unresolved active products need manual fallback before they are
        buyer-visible.
      type: object
      properties:
        totalProducts:
          type: integer
          minimum: 0
          maximum: 9007199254740991
        activeProducts:
          type: integer
          minimum: 0
          maximum: 9007199254740991
        adServerPriced:
          type: integer
          minimum: 0
          maximum: 9007199254740991
        manuallyPriced:
          type: integer
          minimum: 0
          maximum: 9007199254740991
        unresolved:
          type: integer
          minimum: 0
          maximum: 9007199254740991
        draftIgnored:
          type: integer
          minimum: 0
          maximum: 9007199254740991
        byUnresolvedReason:
          type: object
          additionalProperties:
            type: integer
            minimum: 0
            maximum: 9007199254740991
      required:
        - totalProducts
        - activeProducts
        - adServerPriced
        - manuallyPriced
        - unresolved
        - draftIgnored
        - byUnresolvedReason
      additionalProperties: false
    EsaSetupTasksBlock:
      description: >-
        Configuration-completeness rollup from the upstream managed-source
        status. Storefront merges these with its own platform-managed task list.
      type: object
      properties:
        blockerCount:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        warningCount:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        items:
          type: array
          items:
            $ref: '#/components/schemas/EsaSetupTaskItem'
      required:
        - blockerCount
        - warningCount
        - items
      additionalProperties: false
    SourceHealthDiagnosis:
      description: >-
        One typed source-health diagnosis: what failed, who owns the fix, how
        much it matters to this storefront, and the inline action.
      type: object
      properties:
        diagnosisId:
          description: >-
            Stable within a storefront: "<sourceId or
            storefront>:<failureMode>".
          type: string
        sourceId:
          description: >-
            Inventory source this diagnosis is about; null for storefront-level
            problems (e.g. the ad server source connection).
          nullable: true
          type: string
        sourceName:
          type: string
        failureMode:
          description: Typed failure mode from the source-diagnosis catalog.
          type: string
          enum:
            - catalog_products_stale
            - catalog_products_empty
            - catalog_products_hidden
            - catalog_signals_stale
            - catalog_fetch_error
            - adapter_credentials_invalid
            - ad_server_sync_failed
            - reporting_access_missing
            - forecasting_access_missing
            - source_unreachable
            - source_degraded
            - agent_auth_missing
            - trafficking_error
            - wholesale_pricing_stale
            - media_buy_status_stale
        owner:
          description: >-
            Who owns the fix. Only `seller`-owned diagnoses may become a task, a
            blocker, or a notification; `scope3`/`vendor` diagnoses render as
            passive status lines and route internally.
          type: string
          enum:
            - seller
            - scope3
            - vendor
        severity:
          description: >-
            Impact on THIS storefront, never the failure mechanism: `blocking`
            stops selling/setup, `attention` degrades it, `advisory` will only
            matter later.
          type: string
          enum:
            - blocking
            - attention
            - advisory
        summary:
          description: >-
            Customer-safe, one sentence: what is wrong and why it matters to the
            seller.
          type: string
        detail:
          description: >-
            Customer-safe evidence: counts, ages, codes. Null when nothing
            useful.
          nullable: true
          type: string
        action:
          $ref: '#/components/schemas/DiagnosisAction'
        docsAnchor:
          description: mintlify troubleshooting anchor, when one exists.
          nullable: true
          type: string
        observedAt:
          type: string
      required:
        - diagnosisId
        - sourceId
        - sourceName
        - failureMode
        - owner
        - severity
        - summary
        - detail
        - action
        - docsAnchor
        - observedAt
      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
    EsaOperationalIssue:
      description: >-
        A derived private operational issue for the managed ad-server source.
        These issues are computed by Interchange from the upstream status feed
        and are intended for the storefront operator.
      type: object
      properties:
        code:
          type: string
        severity:
          type: string
          enum:
            - warning
            - critical
        message:
          type: string
        affects:
          type: array
          items:
            type: string
            enum:
              - discovery
              - delivery
              - setup
        configurePath:
          nullable: true
          type: string
      required:
        - code
        - severity
        - message
        - affects
      additionalProperties: false
    EsaSetupTaskItem:
      description: >-
        A single configuration-completeness item from the upstream
        managed-source status feed.
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        severity:
          type: string
          enum:
            - blocker
            - warning
            - info
        scope:
          type: string
          enum:
            - platform
            - publisher
        description:
          type: string
        isComplete:
          type: boolean
        configurePath:
          description: >-
            Managed-source-relative path that surfaces the configuration UI for
            this task (e.g. `/settings#aao`). Null when no UI exists.
          nullable: true
          type: string
      required:
        - id
        - name
        - severity
        - scope
        - description
        - isComplete
      additionalProperties: false
    DiagnosisAction:
      description: >-
        Typed inline action: `recheck` carries a portable named operation,
        `reconnect` opens the ad-server connect task, `open` opens a focused
        setup surface, `none` means nothing for the seller to do.
      anyOf:
        - $ref: '#/components/schemas/SourceRecheckAction'
        - type: object
          properties:
            kind:
              type: string
              enum:
                - reconnect
            label:
              type: string
          required:
            - kind
            - label
          additionalProperties: false
        - type: object
          properties:
            kind:
              type: string
              enum:
                - open
            label:
              type: string
          required:
            - kind
            - label
          additionalProperties: false
        - type: object
          properties:
            kind:
              type: string
              enum:
                - none
          required:
            - kind
          additionalProperties: false
    SourceRecheckAction:
      description: >-
        Portable named operation for re-running a source-health check. Hosts
        resolve method and path from the canonical operation registry;
        deprecated method/path fields remain as a derived compatibility
        projection.
      oneOf:
        - type: object
          properties:
            kind:
              type: string
              enum:
                - recheck
            label:
              type: string
            operation:
              type: string
              enum:
                - refresh_esa
            pathParams:
              type: object
              properties:
                esaId:
                  type: string
              required:
                - esaId
              additionalProperties: false
            method:
              description: >-
                Deprecated compatibility projection. Dispatch the named
                operation instead.
              deprecated: true
              type: string
              enum:
                - POST
            path:
              description: >-
                Deprecated compatibility projection derived from the operation
                registry. Dispatch the named operation instead.
              deprecated: true
              type: string
          required:
            - kind
            - label
            - operation
            - pathParams
            - method
            - path
          additionalProperties: false
        - type: object
          properties:
            kind:
              type: string
              enum:
                - recheck
            label:
              type: string
            operation:
              type: string
              enum:
                - recheck_esa_capability
            pathParams:
              type: object
              properties:
                esaId:
                  type: string
                capability:
                  type: string
                  enum:
                    - reporting
                    - forecasting
              required:
                - esaId
                - capability
              additionalProperties: false
            method:
              description: >-
                Deprecated compatibility projection. Dispatch the named
                operation instead.
              deprecated: true
              type: string
              enum:
                - POST
            path:
              description: >-
                Deprecated compatibility projection derived from the operation
                registry. Dispatch the named operation instead.
              deprecated: true
              type: string
          required:
            - kind
            - label
            - operation
            - pathParams
            - method
            - path
          additionalProperties: false
        - type: object
          properties:
            kind:
              type: string
              enum:
                - recheck
            label:
              type: string
            operation:
              type: string
              enum:
                - run_inventory_source_discovery_test
            pathParams:
              type: object
              properties:
                sourceId:
                  type: string
              required:
                - sourceId
              additionalProperties: false
            body:
              type: object
              properties: {}
              additionalProperties: false
            method:
              description: >-
                Deprecated compatibility projection. Dispatch the named
                operation instead.
              deprecated: true
              type: string
              enum:
                - POST
            path:
              description: >-
                Deprecated compatibility projection derived from the operation
                registry. Dispatch the named operation instead.
              deprecated: true
              type: string
          required:
            - kind
            - label
            - operation
            - pathParams
            - body
            - method
            - path
          additionalProperties: false
      type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key or access token

````