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

# Update modular source module config

> Update non-secret configuration for one module on a modular inventory source. Nested config objects are deep-merged by default; pass merge=false to replace the module config.



## OpenAPI

````yaml /v2/storefront-api-v2.yaml patch /inventory-sources/{sourceId}/modular/modules/{moduleInstanceId}/config
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:
  /inventory-sources/{sourceId}/modular/modules/{moduleInstanceId}/config:
    patch:
      tags:
        - Storefront
      summary: Update modular source module config
      description: >-
        Update non-secret configuration for one module on a modular inventory
        source. Nested config objects are deep-merged by default; pass
        merge=false to replace the module config.
      operationId: updateModularInventorySourceModuleConfig
      parameters:
        - in: path
          name: sourceId
          schema:
            description: Inventory source ID
            type: string
            minLength: 1
          required: true
          description: Inventory source ID
        - in: path
          name: moduleInstanceId
          schema:
            description: Seller-local module instance id
            type: string
            minLength: 1
          required: true
          description: Seller-local module instance id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateModularSourceModuleConfigBody'
      responses:
        '200':
          description: Update modular source module config
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InventorySourceRuntimeProjection'
        '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:
    UpdateModularSourceModuleConfigBody:
      description: >-
        Update non-secret configuration for a module on a modular inventory
        source.
      type: object
      properties:
        config:
          description: >-
            Non-secret module configuration values to write. Nested objects are
            deep-merged by default.
          type: object
          additionalProperties: {}
        merge:
          description: >-
            When true, deep-merge config into the existing module config. When
            false, replace the module config.
          default: true
          type: boolean
        status:
          description: >-
            Optional manual module status update. ACTIVE is derived by
            execution/readiness workflows and cannot be set through this config
            endpoint. Omit to leave status unchanged.
          type: string
          enum:
            - CONFIGURING
            - DISABLED
            - ERROR
      required:
        - config
    InventorySourceRuntimeProjection:
      description: Operator-facing setup-state projection for a modular inventory source.
      type: object
      properties:
        inventorySource:
          type: object
          properties:
            id:
              type: string
            storefrontId:
              type: string
            sourceId:
              type: string
            name:
              type: string
            executionType:
              type: string
              enum:
                - MODULAR_SOURCE
            status:
              type: string
            healthStatus:
              type: string
            lastError:
              nullable: true
              type: string
            lastCheckedAt:
              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:
            - id
            - storefrontId
            - sourceId
            - name
            - executionType
            - status
            - healthStatus
            - lastError
            - lastCheckedAt
          additionalProperties: false
        modules:
          type: array
          items:
            $ref: '#/components/schemas/InventorySourceModuleRuntimeProjection'
        lifecycleSummary:
          type: array
          items:
            $ref: '#/components/schemas/InventorySourceLifecycleStageSummary'
        openWorkItemCount:
          type: integer
          minimum: 0
          maximum: 9007199254740991
        activeAvailCount:
          type: integer
          minimum: 0
          maximum: 9007199254740991
      required:
        - inventorySource
        - modules
        - lifecycleSummary
        - openWorkItemCount
        - activeAvailCount
      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
    InventorySourceModuleRuntimeProjection:
      description: Runtime setup state for one module on a modular inventory source.
      type: object
      properties:
        moduleRowId:
          type: string
        inventorySourceId:
          type: string
        moduleInstanceId:
          type: string
        kind:
          description: Role a module plays inside a modular inventory source.
          type: string
          enum:
            - INVENTORY_FEED
            - BOOKING_LEDGER
            - TRAFFICKING
            - STATUS_SYNC
            - REPORTING_IMPORT
        name:
          type: string
        provider:
          nullable: true
          type: string
        status:
          description: Operator-facing module lifecycle status.
          type: string
          enum:
            - CONFIGURING
            - ACTIVE
            - DISABLED
            - ERROR
        contractId:
          nullable: true
          type: string
        contractVersion:
          nullable: true
          type: string
        contract:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/InventorySourceModuleContractSummary'
        configuredFieldKeys:
          type: array
          items:
            type: string
        missingSetupFieldsBySource:
          type: array
          items:
            $ref: '#/components/schemas/InventorySourceContractFieldGroup'
        lifecycle:
          type: array
          items:
            $ref: '#/components/schemas/InventorySourceLifecycleProjection'
        openWorkItemCount:
          type: integer
          minimum: 0
          maximum: 9007199254740991
        openWorkItemCountsByKind:
          type: object
          additionalProperties:
            type: integer
            minimum: 0
            maximum: 9007199254740991
        lastError:
          nullable: true
          type: string
        lastCheckedAt:
          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))$
        issues:
          type: array
          items:
            type: string
      required:
        - moduleRowId
        - inventorySourceId
        - moduleInstanceId
        - kind
        - name
        - provider
        - status
        - contractId
        - contractVersion
        - contract
        - configuredFieldKeys
        - missingSetupFieldsBySource
        - lifecycle
        - openWorkItemCount
        - openWorkItemCountsByKind
        - lastError
        - lastCheckedAt
        - issues
      additionalProperties: false
    InventorySourceLifecycleStageSummary:
      description: >-
        Source-level lifecycle summary for a modular inventory source,
        aggregating setup gaps, runtime input requirements, HITL state, and
        module issues by stage.
      type: object
      properties:
        stage:
          description: Lifecycle stage a modular source module may implement.
          type: string
          enum:
            - INGEST_AVAILS
            - SYNC_INVENTORY
            - GET_PRODUCTS
            - RESERVE_AVAILS
            - FINALIZE_BOOKING
            - RELEASE_BOOKING
            - RECONCILE_DELIVERY
            - SYNC_CREATIVES
            - TRAFFIC_CAMPAIGN
            - UPDATE_CAMPAIGN
            - SYNC_STATUS
            - IMPORT_REPORTING
        supported:
          type: boolean
        status:
          description: Operator-facing readiness status for a source-level lifecycle stage.
          type: string
          enum:
            - UNSUPPORTED
            - MISSING_SETUP
            - RUNTIME_INPUTS_REQUIRED
            - HITL_PENDING
            - READY
            - BLOCKED
        modes:
          type: array
          items:
            description: >-
              How a modular source stage is fulfilled: automated,
              human-in-the-loop, or unsupported.
            type: string
            enum:
              - AUTOMATED
              - HITL
              - UNSUPPORTED
        moduleInstanceIds:
          type: array
          items:
            type: string
        moduleNames:
          type: array
          items:
            type: string
        setupConfigured:
          type: boolean
        runtimeInputsRequired:
          type: boolean
        hitlRequired:
          type: boolean
        openWorkItemCount:
          type: integer
          minimum: 0
          maximum: 9007199254740991
        requiredRuntimeFieldSources:
          type: array
          items:
            description: Where a module contract field is expected to come from.
            type: string
            enum:
              - MODULE_CONFIG
              - INVENTORY_FEED
              - PRODUCT_METADATA
              - MEDIA_BUY_INPUT
              - CREATIVE_INPUT
              - REPORTING_UPLOAD
              - SYSTEM
              - MODULE_RESULT
        missingSetupFieldsBySource:
          type: array
          items:
            $ref: '#/components/schemas/InventorySourceContractFieldGroup'
        issues:
          type: array
          items:
            type: string
      required:
        - stage
        - supported
        - status
        - modes
        - moduleInstanceIds
        - moduleNames
        - setupConfigured
        - runtimeInputsRequired
        - hitlRequired
        - openWorkItemCount
        - requiredRuntimeFieldSources
        - missingSetupFieldsBySource
        - issues
      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
    InventorySourceModuleContractSummary:
      description: Versioned contract summary used to interpret a modular source module.
      type: object
      properties:
        contractId:
          type: string
        version:
          type: string
        moduleType:
          type: string
        primaryKind:
          description: Role a module plays inside a modular inventory source.
          type: string
          enum:
            - INVENTORY_FEED
            - BOOKING_LEDGER
            - TRAFFICKING
            - STATUS_SYNC
            - REPORTING_IMPORT
        provider:
          type: string
        displayName:
          type: string
        description:
          type: string
        constraints:
          type: array
          items:
            type: string
      required:
        - contractId
        - version
        - moduleType
        - primaryKind
        - displayName
        - description
        - constraints
      additionalProperties: false
    InventorySourceContractFieldGroup:
      description: Contract fields grouped by source.
      type: object
      properties:
        source:
          description: Where a module contract field is expected to come from.
          type: string
          enum:
            - MODULE_CONFIG
            - INVENTORY_FEED
            - PRODUCT_METADATA
            - MEDIA_BUY_INPUT
            - CREATIVE_INPUT
            - REPORTING_UPLOAD
            - SYSTEM
            - MODULE_RESULT
        fields:
          type: array
          items:
            $ref: '#/components/schemas/InventorySourceContractField'
      required:
        - source
        - fields
      additionalProperties: false
    InventorySourceLifecycleProjection:
      description: >-
        Setup-state projection for one lifecycle stage of a modular source
        module. This is configuration completeness, not a guarantee that runtime
        inputs, HITL work, or upstream booking/trafficking have completed.
      type: object
      properties:
        stage:
          description: Lifecycle stage a modular source module may implement.
          type: string
          enum:
            - INGEST_AVAILS
            - SYNC_INVENTORY
            - GET_PRODUCTS
            - RESERVE_AVAILS
            - FINALIZE_BOOKING
            - RELEASE_BOOKING
            - RECONCILE_DELIVERY
            - SYNC_CREATIVES
            - TRAFFIC_CAMPAIGN
            - UPDATE_CAMPAIGN
            - SYNC_STATUS
            - IMPORT_REPORTING
        mode:
          description: >-
            How a modular source stage is fulfilled: automated,
            human-in-the-loop, or unsupported.
          type: string
          enum:
            - AUTOMATED
            - HITL
            - UNSUPPORTED
        description:
          type: string
        workItemKind:
          type: string
        outputKeys:
          type: array
          items:
            type: string
        taskContract:
          allOf:
            - $ref: '#/components/schemas/InventorySourceModuleTaskContract'
        requiredFieldsBySource:
          type: array
          items:
            $ref: '#/components/schemas/InventorySourceContractFieldGroup'
        missingSetupFieldsBySource:
          type: array
          items:
            $ref: '#/components/schemas/InventorySourceContractFieldGroup'
        moduleConfigReady:
          type: boolean
      required:
        - stage
        - mode
        - description
        - outputKeys
        - requiredFieldsBySource
        - missingSetupFieldsBySource
        - moduleConfigReady
      additionalProperties: false
    InventorySourceContractField:
      description: Field declared by a modular inventory source contract.
      type: object
      properties:
        key:
          type: string
        label:
          type: string
        description:
          type: string
        source:
          description: Where a module contract field is expected to come from.
          type: string
          enum:
            - MODULE_CONFIG
            - INVENTORY_FEED
            - PRODUCT_METADATA
            - MEDIA_BUY_INPUT
            - CREATIVE_INPUT
            - REPORTING_UPLOAD
            - SYSTEM
            - MODULE_RESULT
        valueType:
          type: string
          enum:
            - STRING
            - NUMBER
            - BOOLEAN
            - DATE
            - DATETIME
            - DURATION
            - ENUM
            - OBJECT
            - ARRAY
        required:
          type: boolean
        requiredFor:
          type: array
          items:
            description: Lifecycle stage a modular source module may implement.
            type: string
            enum:
              - INGEST_AVAILS
              - SYNC_INVENTORY
              - GET_PRODUCTS
              - RESERVE_AVAILS
              - FINALIZE_BOOKING
              - RELEASE_BOOKING
              - RECONCILE_DELIVERY
              - SYNC_CREATIVES
              - TRAFFIC_CAMPAIGN
              - UPDATE_CAMPAIGN
              - SYNC_STATUS
              - IMPORT_REPORTING
        mapsTo:
          type: string
        enumValues:
          type: array
          items:
            type: string
      required:
        - key
        - label
        - description
        - source
        - valueType
        - required
        - requiredFor
      additionalProperties: false
    InventorySourceModuleTaskContract:
      description: >-
        Runtime task contract emitted by a modular inventory source module for
        operator and Murph work queues.
      type: object
      properties:
        taskId:
          type: string
        stage:
          description: Lifecycle stage a modular source module may implement.
          type: string
          enum:
            - INGEST_AVAILS
            - SYNC_INVENTORY
            - GET_PRODUCTS
            - RESERVE_AVAILS
            - FINALIZE_BOOKING
            - RELEASE_BOOKING
            - RECONCILE_DELIVERY
            - SYNC_CREATIVES
            - TRAFFIC_CAMPAIGN
            - UPDATE_CAMPAIGN
            - SYNC_STATUS
            - IMPORT_REPORTING
        automationMode:
          description: >-
            How a module runtime task is expected to complete, including whether
            a human fallback can complete it.
          type: string
          enum:
            - AUTOMATED
            - HITL
            - AUTOMATED_WITH_HITL_FALLBACK
            - UNSUPPORTED
        completionPolicy:
          description: >-
            Who is allowed to complete the runtime task represented by this
            lifecycle stage.
          type: string
          enum:
            - NO_TASK
            - MODULE_COMPLETES
            - HUMAN_COMPLETES
            - MODULE_OR_HUMAN_COMPLETES
        defaultActor:
          description: Default actor expected to perform this runtime task.
          type: string
          enum:
            - system
            - module
            - operator
            - murph
        workItemKind:
          type: string
        fallbackWorkItemKind:
          type: string
        operatorAction:
          type: string
        requiredInputKeys:
          type: array
          items:
            type: string
        requiredResultKeys:
          type: array
          items:
            type: string
        outputKeys:
          type: array
          items:
            type: string
        idempotencyKeyFields:
          type: array
          items:
            type: string
        retryable:
          type: boolean
        blocksStage:
          type: boolean
      required:
        - taskId
        - stage
        - automationMode
        - completionPolicy
        - defaultActor
        - requiredInputKeys
        - requiredResultKeys
        - outputKeys
        - retryable
        - blocksStage
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key or access token

````