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

# Set a FreeWheel execution currency

> Declare an existing FreeWheel source's execution currency without replacing its write-only credentials. The currency must be one the storefront settles. ESA refuses an unread network or a declaration contradicted by existing insertion orders before changing the source.



## OpenAPI

````yaml /v2/storefront-api-v2.yaml put /esa/{esaId}/execution-currency
openapi: 3.0.0
info:
  title: Scope3 Storefront API
  version: 2.0.0
  description: >-
    REST API for partners to manage Seller Accounts, inventory sources, and
    billing.


    ## Authentication


    All endpoints require a Bearer token in the Authorization header:

    ```

    Authorization: Bearer your-api-key

    ```


    ## Base URL


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


    ## For AI Agents


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

    - `initialize`: Start an MCP session

    - `api_call`: Make REST API calls

    - `ask_about_capability`: Learn about API features
servers:
  - url: https://api.interchange.io/api/v2/storefront
    description: Production server
security: []
tags:
  - name: Account
    description: Account management, service tokens, and preferences
  - name: Asks
    description: >-
      What you are waiting on Scope3 for — support, product, and supply asks in
      one list
  - name: Storefront
    description: Manage storefront and inventory sources
  - name: Storefront Agents
    description: List and manage registered sales, signals, and outcomes agents
  - name: Storefront Activity
    description: Audit log of configuration and inventory changes on the storefront
  - name: Storefront Billing
    description: Payout bank details and billing configuration for Seller Accounts
  - name: AI Usage
    description: Seller Account AI token usage visibility by model
  - name: MCP
    description: Model Context Protocol endpoints
paths:
  /esa/{esaId}/execution-currency:
    put:
      tags:
        - Storefront
      summary: Set a FreeWheel execution currency
      description: >-
        Declare an existing FreeWheel source's execution currency without
        replacing its write-only credentials. The currency must be one the
        storefront settles. ESA refuses an unread network or a declaration
        contradicted by existing insertion orders before changing the source.
      operationId: setEsaExecutionCurrency
      parameters:
        - in: path
          name: esaId
          schema:
            type: integer
            minimum: 0
            exclusiveMinimum: true
            maximum: 9007199254740991
            description: >-
              Ad server source connection id. The wire field remains `esaId` for
              API compatibility.
            example: 123
          required: true
          description: >-
            Ad server source connection id. The wire field remains `esaId` for
            API compatibility.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                executionCurrency:
                  type: string
                  pattern: ^[A-Z]{3}$
                  description: Three-letter uppercase ISO 4217 execution currency.
                  example: USD
              required:
                - executionCurrency
      responses:
        '200':
          description: Set a FreeWheel execution currency
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EsaConnection'
        '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'
        '409':
          description: >-
            The source has another adapter configuration update awaiting
            reconciliation.
          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:
    EsaConnection:
      type: object
      properties:
        id:
          type: string
          description: >-
            Stable id for this managed ad-server source. Use this id to address
            per-source actions (provision, deactivate, save ad-server config,
            etc.). A customer can have multiple managed sources.
        name:
          nullable: true
          description: >-
            Seller-facing inventory-source name linked to this managed ad-server
            source. Null when there is no active linked inventory-source row.
          type: string
        customerId:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
          description: Owning customer/storefront id.
        tenantId:
          nullable: true
          description: >-
            Upstream managed-source id for the managed ad-server source. Null
            until provisioning succeeds.
          type: string
        mcpUrl:
          nullable: true
          description: >-
            MCP endpoint exposed by the provisioned managed ad-server source.
            May be a relative path (e.g. `/mcp/`) — the consumer composes the
            absolute URL using the upstream base URL.
          type: string
        a2aUrl:
          nullable: true
          description: >-
            A2A endpoint exposed by the provisioned managed ad-server source.
            May be a relative path (e.g. `/a2a`) — see `mcpUrl` for resolution.
          type: string
        adServer:
          nullable: true
          description: Publisher-supplied ad-server config. Null if not yet collected.
          allOf:
            - $ref: '#/components/schemas/AdServerConfigView'
        serviceAccountEmail:
          nullable: true
          description: >-
            Per-customer service-account email the publisher must grant access
            to in their ad server. Created when ad-server config is saved.
            Surfaced so the UI can show it during onboarding.
          type: string
          format: email
          pattern: >-
            ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
        lastError:
          nullable: true
          description: >-
            Failure reason from the most recent provisioning or test-connection
            attempt, or the current adapter-configuration reconciliation state.
          type: string
        lastErrorCode:
          nullable: true
          description: >-
            Machine-readable classification of the most recent provisioning
            failure or a configuration change awaiting reconciliation.
            `ADAPTER_NETWORK_NOT_FOUND`, `ADAPTER_PERMISSION_DENIED`,
            `ADAPTER_INVALID_CREDENTIALS`, `ADAPTER_INVALID_CONFIG`, and
            `ADAPTER_CONNECTION_FAILED` are adapter probe failures.
            `ADAPTER_CONFIG_*` and `EXECUTION_CURRENCY_*` describe configuration
            work that has not settled. `INTERNAL_ERROR` indicates an upstream or
            platform problem. Null when there has been no failure and no pending
            configuration work.
          type: string
        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))$
        provisionedAt:
          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))$
        deactivatedAt:
          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))$
        createdAt:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        updatedAt:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        inventorySync:
          nullable: true
          description: >-
            Cached inventory-sync state. Null when no signal has landed yet (no
            webhook delivered and no /status poll has run).
          allOf:
            - $ref: '#/components/schemas/EsaInventorySync'
      required:
        - id
        - name
        - customerId
        - tenantId
        - mcpUrl
        - a2aUrl
        - adServer
        - serviceAccountEmail
        - lastError
        - lastErrorCode
        - lastTestedAt
        - provisionedAt
        - deactivatedAt
        - createdAt
        - updatedAt
        - inventorySync
      additionalProperties: false
      description: >-
        Storefront → managed ad-server source connection. A storefront can have
        multiple connections, each addressed by `id`.
    ErrorResponse:
      type: object
      properties:
        data:
          type: string
          nullable: true
          enum:
            - null
        error:
          $ref: '#/components/schemas/ApiError'
      required:
        - data
        - error
      additionalProperties: false
      description: Standard error response
    AdServerConfigView:
      oneOf:
        - type: object
          properties:
            type:
              type: string
              enum:
                - google_ad_manager
            networkCode:
              type: string
              minLength: 1
              maxLength: 32
              pattern: ^[0-9]+$
              description: Google Ad Manager network code.
              example: '12345678'
          required:
            - type
            - networkCode
          additionalProperties: false
        - type: object
          properties:
            type:
              type: string
              enum:
                - freewheel
            clientId:
              nullable: true
              type: string
            username:
              nullable: true
              type: string
            environment:
              type: string
              enum:
                - production
                - staging
                - sandbox
            defaultAdvertiserId:
              nullable: true
              type: string
            executionCurrency:
              default: null
              nullable: true
              type: string
          required:
            - type
            - clientId
            - username
            - environment
            - defaultAdvertiserId
            - executionCurrency
          additionalProperties: false
        - type: object
          properties:
            type:
              type: string
              enum:
                - springserve
            email:
              nullable: true
              type: string
            environment:
              type: string
              enum:
                - production
            defaultDemandPartnerId:
              nullable: true
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            rateCurrency:
              default: null
              nullable: true
              type: string
          required:
            - type
            - email
            - environment
            - defaultDemandPartnerId
            - rateCurrency
          additionalProperties: false
        - type: object
          properties:
            type:
              type: string
              enum:
                - adswizz
            agencyId:
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            environment:
              type: string
              enum:
                - AUDIOSERVE
            baseUrl:
              type: string
            forecastingBaseUrl:
              type: string
            defaultCurrency:
              type: string
            cpmLimit:
              nullable: true
              type: number
            defaultAdvertiserId:
              nullable: true
              type: string
          required:
            - type
            - agencyId
            - environment
            - baseUrl
            - forecastingBaseUrl
            - defaultCurrency
            - cpmLimit
            - defaultAdvertiserId
          additionalProperties: false
      description: >-
        Non-secret view of the connection ad-server config. Returned by GET
        endpoints; never contains credentials.
      type: object
    EsaInventorySync:
      type: object
      properties:
        status:
          nullable: true
          type: string
          enum:
            - unknown
            - never_run
            - running
            - success
            - failed
          description: >-
            Last known inventory-sync state on the upstream managed source.
            `unknown` means we have no signal yet (row predates the sync
            tracking, no webhook or status poll has landed). Other values mirror
            the upstream managed-source vocabulary.
        lastRunAt:
          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))$
        completedAt:
          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:
          nullable: true
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        error:
          nullable: true
          type: string
        updatedAt:
          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:
        - status
        - lastRunAt
        - completedAt
        - itemCount
        - error
        - updatedAt
      additionalProperties: false
      description: >-
        Cached inventory-sync state for this managed ad-server source. Updated
        by the /webhooks/esa-sync receiver when the upstream service emits
        `sync_run.completed` / `sync_run.failed`, and by the /status polling
        fallback for missed deliveries.
    ApiError:
      type: object
      properties:
        code:
          type: string
          description: Machine-readable error code
        message:
          type: string
          description: Human-readable error message
        field:
          description: Field path associated with the error
          type: string
        details:
          description: Additional error context
          type: object
          additionalProperties: {}
      required:
        - code
        - message
      additionalProperties: false
      description: Structured error object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key or access token

````