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

# Map external account to advertiser

> Map an external provider account discovered through an integration to a buyer advertiser.



## OpenAPI

````yaml /v2/buyer-api-v2.yaml post /storefront-connections/{connectionId}/accounts/{accountId}/advertiser
openapi: 3.0.0
info:
  title: Scope3 Buyer API
  version: 2.0.0
  description: |-
    REST API for advertisers to manage advertisers, campaigns, and reporting.

    ## Authentication

    All endpoints require a Bearer token in the Authorization header:
    ```
    Authorization: Bearer your-api-key
    ```

    ## Base URL

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

    ## For AI Agents

    AI agents can use the MCP endpoint at `/mcp/v2/buyer` 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/buyer
    description: Production server
security: []
tags:
  - name: Account
    description: Account management, service tokens, and preferences
  - name: Advertisers
    description: Manage advertisers
  - name: Product Discovery
    description: Discover and select products
  - name: Campaigns
    description: Manage advertising campaigns
  - name: Creatives
    description: Build, manage, and sync campaign creatives via AdCP Creative Protocol
  - name: Reporting
    description: Access performance metrics
  - name: Event Sources
    description: >-
      Manage event source configurations and log conversion/marketing events for
      attribution
  - name: Property Lists
    description: Validate property lists against AAO registry
  - name: Sales Agents
    description: View and connect sales agents
  - name: Measurement
    description: Measurement sources, records, context, and freshness
  - name: Syndication
    description: Syndicate resources to ADCP agents
  - name: Tasks
    description: Track async operation status
  - name: Planning Briefs
    description: >-
      Share prospective briefs with publishers and collect their
      fit/quote/clarify/decline/book responses (gated by the
      demand-supply-signals flag).
  - name: Buyer Billing
    description: >-
      Consolidated invoicing for buyers — invoices and pending invoice items
      issued by Scope3 across the buyer customer.
  - name: MCP
    description: Model Context Protocol endpoints for AI agents
paths:
  /storefront-connections/{connectionId}/accounts/{accountId}/advertiser:
    post:
      tags:
        - Storefronts
      summary: Map external account to advertiser
      description: >-
        Map an external provider account discovered through an integration to a
        buyer advertiser.
      operationId: mapStorefrontConnectionAccountToAdvertiser
      parameters:
        - in: path
          name: connectionId
          schema:
            description: Storefront connection ID
            type: integer
            format: int64
          required: true
          description: Storefront connection ID
        - in: path
          name: accountId
          schema:
            description: Storefront connection account ID
            type: integer
            format: int64
          required: true
          description: Storefront connection account ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                advertiserId:
                  description: Numeric advertiser ID to map this provider account to
                  type: string
                  pattern: ^\d+$
                sourceId:
                  description: >-
                    Optional adapter provider ID for compatibility. Official
                    adapter mappings derive the canonical provider ID from
                    connectionId; when supplied, use the canonical value
                    returned by the mappings list (for example, meta).
                    Historical adapter/platform aliases remain accepted.
                  type: string
                  minLength: 1
              required:
                - advertiserId
              additionalProperties: false
      responses:
        '201':
          description: Map external account to advertiser
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountOutput'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    AccountOutput:
      description: Linked account resource on a partner platform
      type: object
      properties:
        linkId:
          description: Unique identifier for the advertiser-account link
          example: '42'
          type: string
        accountId:
          description: Partner account identifier
          example: acc_acme_pinnacle
          type: string
        credentialId:
          description: >-
            Credential row that owns this linked account. Include this value
            when updating linked accounts so duplicate account IDs across mapped
            connections remain unambiguous.
          example: '42'
          nullable: true
          type: string
        name:
          description: Human-readable account name from the partner
          example: Acme c/o Pinnacle
          nullable: true
          type: string
        advertiser:
          description: Advertiser name as recorded by the partner platform
          example: Acme Corp
          nullable: true
          type: string
        billingProxy:
          description: Billing proxy entity (e.g. agency buying on behalf of advertiser)
          example: Pinnacle Media
          nullable: true
          type: string
        house:
          description: Domain or house identifier for the account
          example: acme-corp.com
          nullable: true
          type: string
        billing:
          description: Billing arrangement type
          example: advertiser
          nullable: true
          type: string
        sources:
          description: >-
            Storefront sources that surface this account to the buyer. A single
            linked account may be reachable through multiple sources when the
            underlying agent is shared across storefronts. Empty when the
            underlying agent is no longer linked to any active storefront
            source.
          type: array
          items:
            $ref: '#/components/schemas/BuyerCredentialSourceRef'
        advertiserId:
          description: Advertiser that owns this account link
          example: '12345'
          type: string
        status:
          description: Current account status
          type: string
          enum:
            - active
            - pending_approval
            - payment_required
            - suspended
            - closed
            - unreachable
        unreachableAt:
          description: >-
            When set, the mapping is preserved but its platform account is no
            longer reachable through any active connection — the connection that
            surfaced it was unlinked. Relink the provider (or re-map the
            account) to restore it. Unreachable mappings never resolve at buy
            time.
          example: '2025-01-22T09:00:00Z'
          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:
          description: When the account was created (ISO 8601)
          example: '2025-01-15T10:30:00Z'
          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:
          description: When the account was last updated (ISO 8601)
          example: '2025-01-20T14:45:00Z'
          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:
        - linkId
        - accountId
        - sources
        - advertiserId
        - status
        - createdAt
        - updatedAt
      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
    BuyerCredentialSourceRef:
      description: >-
        A storefront/source pair that a single credential row gives the buyer
        access to
      type: object
      properties:
        storefrontId:
          description: Storefront ID this credential covers
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        storefrontName:
          description: Storefront display name
          type: string
        sourceId:
          description: Inventory source ID within the storefront
          type: string
        sourceName:
          description: Inventory source display name
          type: string
      required:
        - storefrontId
        - storefrontName
        - sourceId
        - sourceName
      additionalProperties: false
    ApiError:
      description: Structured error object
      type: object
      properties:
        code:
          description: Machine-readable error code
          type: string
        message:
          description: Human-readable error message
          type: string
        field:
          description: Field path associated with the error
          type: string
        details:
          description: Additional error context
          type: object
          additionalProperties: {}
      required:
        - code
        - message
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key or access token

````