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

# Update a price relay source rule



## OpenAPI

````yaml /swagger/management-api.json put /api/v1/{team_slug}/{app_slug}/price-relay-source-rules/{rule_id}
openapi: 3.0.0
info:
  contact:
    email: support@enad.io
    name: API support
    url: http://enad.io/support
  description: This is the documentation for Public API v1
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  termsOfService: http://enad.io/terms/
  title: Public API
  version: '1.0'
servers: []
security: []
tags:
  - name: Attribute Templates
    x-displayName: Attribute Templates
  - name: Attributes
    x-displayName: Attributes
  - name: Bulk
    x-displayName: Bulk
  - name: Attribute Template Fields
    x-displayName: Attribute Template Fields
  - name: Brands
    x-displayName: Brands
  - name: Product Bundle Groups
    x-displayName: Product Bundle Groups
  - name: Product Bundles
    x-displayName: Product Bundles
  - name: Bundle Rules
    x-displayName: Bundle Rules
  - name: Categories
    x-displayName: Categories
  - name: Channels
    x-displayName: Channels
  - name: ChannelContent
    x-displayName: ChannelContent
  - name: Variant Groups
    x-displayName: Variant Groups
  - name: Collections
    x-displayName: Collections
  - name: CustomRoles
    x-displayName: CustomRoles
  - name: CustomerGroups
    x-displayName: CustomerGroups
  - name: DAM
    x-displayName: DAM
  - name: Product Drafts
    x-displayName: Product Drafts
  - name: Files
    x-displayName: Files
  - name: Images
    x-displayName: Images
  - name: Logs
    x-displayName: Logs
  - name: Markets
    x-displayName: Markets
  - name: Merchant Users
    x-displayName: Merchant Users
  - name: Orders
    x-displayName: Orders
  - name: Organizations
    x-displayName: Organizations
  - name: Price Relay Rules
    x-displayName: Price Relay Rules
  - name: Products
    x-displayName: Products
  - name: Relations
    x-displayName: Relations
  - name: Variant Templates
    x-displayName: Variant Templates
  - name: Variants
    x-displayName: Variants
  - name: Tags
    x-displayName: Tags
  - name: Redirects
    x-displayName: Redirects
  - name: Scheduling
    x-displayName: Scheduling
  - name: Smart Listings
    x-displayName: Smart Listings
  - name: Static Listings
    x-displayName: Static Listings
  - name: StoreGroups
    x-displayName: StoreGroups
  - name: TaxGroups
    x-displayName: TaxGroups
  - name: Third Party Link
    x-displayName: Third Party Link
  - name: Translations
    x-displayName: Translations
  - name: Videos
    x-displayName: Videos
  - name: Warehouses
    x-displayName: Warehouses
  - name: v2 Collections
    x-displayName: v2 Collections
paths:
  /api/v1/{team_slug}/{app_slug}/price-relay-source-rules/{rule_id}:
    servers:
      - url: //api.enad.io
    put:
      tags:
        - Price Relay Rules
      summary: Update a price relay source rule
      parameters:
        - description: App slug
          in: path
          name: app_slug
          required: true
          schema:
            type: string
        - description: Team slug
          in: path
          name: team_slug
          required: true
          schema:
            type: string
        - description: Source rule ID
          in: path
          name: rule_id
          required: true
          schema:
            type: string
      requestBody:
        $ref: >-
          #/components/requestBodies/internal_pkg_webserver_v1.InputPriceRelaySourceRule
      responses:
        '200':
          description: source rule updated
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/internal_pkg_webserver_v1.OkResponsePriceRelaySourceRule
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/internal_pkg_webserver_v1.ErrorMessage'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/internal_pkg_webserver_v1.ErrorMessage'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/internal_pkg_webserver_v1.ErrorMessage'
      security:
        - BearerAuth: []
components:
  requestBodies:
    internal_pkg_webserver_v1.InputPriceRelaySourceRule:
      content:
        application/json:
          schema:
            $ref: >-
              #/components/schemas/internal_pkg_webserver_v1.InputPriceRelaySourceRule
      description: source rule details
      required: true
  schemas:
    internal_pkg_webserver_v1.OkResponsePriceRelaySourceRule:
      properties:
        data:
          $ref: >-
            #/components/schemas/github_com_enadhq_nabbit_internal_pkg_webserver_models.PriceRelaySourceRule
        details:
          description: >-
            Additional contextual information about the response. Used to
            provide supplementary details beyond the main data payload, such as
            validation warnings or processing notes
          items:
            type: string
          type: array
        success:
          type: boolean
      type: object
    internal_pkg_webserver_v1.ErrorMessage:
      properties:
        details:
          items:
            type: string
          type: array
        message:
          type: string
        success:
          type: boolean
      type: object
    internal_pkg_webserver_v1.InputPriceRelaySourceRule:
      properties:
        active:
          type: boolean
        filters:
          $ref: >-
            #/components/schemas/internal_pkg_webserver_v1.InputPriceRelayFilters
        force_on_sale:
          description: >-
            Overrides the target's on-sale flag with this value; when omitted
            the flag is left to relay_on_sale_store_group and the target's own
            state.
          type: boolean
        market_slug:
          type: string
        name:
          type: string
        percentage_of_source:
          type: integer
        percentage_of_source_decimals:
          type: integer
        relay_on_sale_store_group_slug:
          description: >-
            When set, the target inherits its on-sale flag and sale window from
            this store group's price; omit to leave the target's own. Must be
            one of store_groups.
          type: string
        relay_status_store_group_slug:
          description: >-
            The target inherits its status from this store group's price; falls
            back to the target's own status, or the source status when the
            target has no price yet. Must be one of store_groups.
          type: string
        rounding:
          $ref: >-
            #/components/schemas/internal_pkg_webserver_v1.InputPriceRelayRounding
        store_groups:
          description: The store groups whose prices are summed into the relayed price.
          items:
            $ref: >-
              #/components/schemas/internal_pkg_webserver_v1.InputPriceRelaySourceStoreGroup
          minItems: 1
          type: array
        tax_country_code:
          type: string
      required:
        - market_slug
        - name
        - relay_status_store_group_slug
        - store_groups
      type: object
    github_com_enadhq_nabbit_internal_pkg_webserver_models.PriceRelaySourceRule:
      properties:
        active:
          type: boolean
        app_id:
          type: string
        created_at:
          type: string
        filters:
          $ref: >-
            #/components/schemas/github_com_enadhq_nabbit_internal_pkg_webserver_models.PriceRelayFilters
        force_on_sale:
          description: >-
            Overrides the target's on-sale flag with this value; when omitted
            the flag is left to relay_on_sale_store_group and the target's own
            state.
          type: boolean
        id:
          type: string
        market:
          type: string
        market_slug:
          type: string
        name:
          type: string
        percentage_of_source:
          type: integer
        percentage_of_source_decimals:
          type: integer
        relay_on_sale_store_group:
          description: >-
            When set, the target inherits its on-sale flag and sale window from
            this store group's price; null leaves the target's own. Must be one
            of store_groups.
          type: string
        relay_status_store_group:
          description: >-
            The target inherits its status from this store group's price; falls
            back to the target's own status, or the source status when the
            target has no price yet. Must be one of store_groups.
          type: string
        rounding:
          $ref: >-
            #/components/schemas/github_com_enadhq_nabbit_internal_pkg_webserver_models.PriceRelayRounding
        store_groups:
          description: The store groups whose prices are summed into the relayed price.
          items:
            $ref: >-
              #/components/schemas/github_com_enadhq_nabbit_internal_pkg_webserver_models.PriceRelaySourceStoreGroup
          type: array
        tax_country_code:
          type: string
        updated_at:
          type: string
      type: object
    internal_pkg_webserver_v1.InputPriceRelayFilters:
      properties:
        brand_ids:
          items:
            type: string
          type: array
          uniqueItems: true
        category_ids:
          items:
            type: string
          type: array
          uniqueItems: true
        collection_ids:
          items:
            type: string
          type: array
          uniqueItems: true
        tag_ids:
          items:
            type: string
          type: array
          uniqueItems: true
      type: object
    internal_pkg_webserver_v1.InputPriceRelayRounding:
      properties:
        round_down:
          type: boolean
        round_up:
          type: boolean
        targets:
          items:
            type: string
          type: array
      type: object
    internal_pkg_webserver_v1.InputPriceRelaySourceStoreGroup:
      properties:
        amount_from:
          description: >-
            The source price field summed into the target's
            amount_cents_with_tax: 'amount' (the default), 'sale_price' or
            'reference_price'.
          type: string
        sale_price_from:
          description: >-
            The source price field summed into the target's sale_price_with_tax:
            'amount', 'sale_price' or 'reference_price'. Omit to contribute this
            store group's amount to the summed sale price.
          type: string
        store_group_slug:
          type: string
      required:
        - store_group_slug
      type: object
    github_com_enadhq_nabbit_internal_pkg_webserver_models.PriceRelayFilters:
      properties:
        brand_ids:
          items:
            type: string
          type: array
        category_ids:
          items:
            type: string
          type: array
        collection_ids:
          items:
            type: string
          type: array
        tag_ids:
          items:
            type: string
          type: array
      type: object
    github_com_enadhq_nabbit_internal_pkg_webserver_models.PriceRelayRounding:
      properties:
        round_down:
          type: boolean
        round_up:
          type: boolean
        targets:
          items:
            type: string
          type: array
      type: object
    github_com_enadhq_nabbit_internal_pkg_webserver_models.PriceRelaySourceStoreGroup:
      properties:
        amount_from:
          description: >-
            The source price field summed into the target's
            amount_cents_with_tax: 'amount' (the default), 'sale_price' or
            'reference_price'.
          type: string
        sale_price_from:
          description: >-
            The source price field that feeds the target's sale_price_with_tax:
            'amount', 'sale_price' or 'reference_price'. Null contributes this
            store group's amount to the summed sale price.
          type: string
        store_group:
          type: string
        store_group_slug:
          type: string
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: 'Management API token, sent as `Authorization: Bearer <token>`.'

````