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

# Create a price relay source rule

> Create a reusable source side of a price relay.



## OpenAPI

````yaml /swagger/management-api.json post /api/v1/{team_slug}/{app_slug}/price-relay-source-rules
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:
  - url: //api.enad.io
security: []
paths:
  /api/v1/{team_slug}/{app_slug}/price-relay-source-rules:
    post:
      tags:
        - PriceRelayRules
      summary: Create a price relay source rule
      description: Create a reusable source side of a price relay.
      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
      requestBody:
        $ref: >-
          #/components/requestBodies/internal_pkg_webserver_v1.InputPriceRelaySourceRule
      responses:
        '200':
          description: source rule created
          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: Store group or market 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
        market_slug:
          type: string
        name:
          type: string
        percentage_of_source:
          type: integer
        percentage_of_source_decimals:
          type: integer
        relay_sale_price:
          type: boolean
        rounding:
          $ref: >-
            #/components/schemas/internal_pkg_webserver_v1.InputPriceRelayRounding
        store_group_slug:
          type: string
        tax_country_code:
          type: string
      required:
        - market_slug
        - name
        - store_group_slug
      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
        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_sale_price:
          type: boolean
        rounding:
          $ref: >-
            #/components/schemas/github_com_enadhq_nabbit_internal_pkg_webserver_models.PriceRelayRounding
        store_group:
          type: string
        store_group_slug:
          type: string
        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
    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

````