openapi: 3.0.0
x-mint:
  mcp:
    enabled: true
info:
  title: Offers - Price Controls
  description: >-
    fabric Price controls let you create and manage more diversified prices for
    an item, such as Manufacturer Recommended Retail Price (MSRP), Minimum
    Advertised Price (MAP), floor price, ceiling price, and sale price. Price
    control works as a protection mechanism against any further creation of
    prices for the item.
  version: 3.0.0
  x-audience: external-public
  termsOfService: https://fabric.inc/terms-of-use
  contact:
    name: Offers support
    email: support@fabric.inc
  license:
    name: fabric API License
    url: https://fabric.inc/api-license
externalDocs:
  description: Find out more about Offers
  url: https://developer.fabric.inc/docs/offers-overview
servers:
  - url: https://api.fabric.inc/v3
    description: Production environment
paths:
  /price-controls:
    post:
      tags:
        - Price Controls
      summary: Create price control
      description: >-
        Create a price control record that contains various price types other
        than the elemental prices such as base price, sale price, and sale
        price.
      operationId: createPriceControls
      security:
        - AuthorizationToken: []
      parameters:
        - $ref: '#/components/parameters/xFabricTenantId'
        - $ref: '#/components/parameters/xFabricChannelId'
        - $ref: '#/components/parameters/xClientId'
        - $ref: '#/components/parameters/xFabricRequestId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/createPriceControlRequest'
      responses:
        '201':
          description: Created
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/createPriceControlResponse'
        '400':
          description: Bad request
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/priceControlsExist'
                  - $ref: '#/components/schemas/missingTenantHeader'
                  - $ref: '#/components/schemas/error400'
        '401':
          description: Unauthorized
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error401'
        '404':
          description: Not Found
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/priceListNotFound'
        '500':
          description: Internal server error
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error500'
    get:
      tags:
        - Price Controls
      summary: Get all price controls
      description: Get a paginated list of all the created price controls.
      operationId: getPriceControls
      security:
        - AuthorizationToken: []
      parameters:
        - $ref: '#/components/parameters/xFabricTenantId'
        - $ref: '#/components/parameters/xFabricChannelId'
        - $ref: '#/components/parameters/xClientId'
        - $ref: '#/components/parameters/xFabricRequestId'
        - $ref: '#/components/parameters/queryParameterSize'
        - $ref: '#/components/parameters/queryParameterOffset'
      responses:
        '200':
          description: OK
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getPriceControlsResponse'
        '400':
          description: Bad request
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/missingTenantHeader'
                  - $ref: '#/components/schemas/error400'
        '401':
          description: Unauthorized
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error401'
        '500':
          description: Internal server error
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error500'
  /price-controls/{itemId}:
    get:
      tags:
        - Price Controls
      summary: Get price controls by itemId
      description: >-
        Get price control records of an item by `itemId` and `priceListId`. If
        `priceListId` isn't specified, price controls of the item will be
        retrieved under the default price list.
      operationId: getPriceControlsByItemId
      security:
        - AuthorizationToken: []
      parameters:
        - $ref: '#/components/parameters/xFabricTenantId'
        - $ref: '#/components/parameters/xFabricChannelId'
        - $ref: '#/components/parameters/xClientId'
        - $ref: '#/components/parameters/xFabricRequestId'
        - $ref: '#/components/parameters/queryParameterOffset'
        - $ref: '#/components/parameters/queryParameterSize'
        - $ref: '#/components/parameters/queryParameterPriceListId'
        - name: itemId
          in: path
          required: true
          description: ID of the item whose price control records are to be retrieved
          schema:
            type: integer
            format: int32
            example: 10000001
      responses:
        '200':
          description: OK
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getPriceControlResponse'
        '400':
          description: Bad request
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/missingTenantHeader'
                  - $ref: '#/components/schemas/error400'
        '401':
          description: Unauthorized
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error401'
        '404':
          description: Not Found
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/priceControlsNotFound'
        '500':
          description: Internal server error
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error500'
    put:
      tags:
        - Price Controls
      summary: Update price controls by itemId
      description: >-
        Update price controls of a specific item by `itemId` and `piceListId`.
        If `priceListId` isn't specified, price controls of the item will be
        updated under the default price list.
      operationId: updatePriceControlsByItemId
      security:
        - AuthorizationToken: []
      parameters:
        - $ref: '#/components/parameters/xFabricTenantId'
        - $ref: '#/components/parameters/xFabricChannelId'
        - $ref: '#/components/parameters/xClientId'
        - $ref: '#/components/parameters/xFabricRequestId'
        - $ref: '#/components/parameters/queryParameterPriceListId'
        - name: itemId
          in: path
          required: true
          description: ID of the item whose price controls are to be updated
          schema:
            type: integer
            format: int32
            example: 10000001
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/updatePriceControlRequest'
      responses:
        '200':
          description: OK
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/updatePriceControlResponse'
        '400':
          description: Bad request
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/missingTenantHeader'
                  - $ref: '#/components/schemas/error400'
        '401':
          description: Unauthorized
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error401'
        '404':
          description: Not Found
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/priceControlsNotFound'
        '500':
          description: Internal server error
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error500'
    delete:
      tags:
        - Price Controls
      summary: Delete price controls by itemId
      description: Delete price controls of a specific item by `itemId`
      operationId: deletePriceControlsByItemId
      security:
        - AuthorizationToken: []
      parameters:
        - $ref: '#/components/parameters/xFabricTenantId'
        - $ref: '#/components/parameters/xFabricChannelId'
        - $ref: '#/components/parameters/xClientId'
        - $ref: '#/components/parameters/xFabricRequestId'
        - $ref: '#/components/parameters/queryParameterPriceListId'
        - name: itemId
          in: path
          required: true
          description: ID of the product whose price controls are to be deleted
          schema:
            type: integer
            format: int32
            example: 10000001
      responses:
        '200':
          description: OK
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/deletePriceControlResponse'
              example:
                priceListId: 100000
                itemId: 10000001
                itemSku: SKU0123456
                msrp: 299
                map: 199.99
                floor: 149
                ceiling: 149
                channelId: '12'
                isDeleted: true
                createdAt: '2019-08-20T14:15:22Z'
                updatedAt: '2019-08-20T14:15:22Z'
        '400':
          description: Bad request
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/missingTenantHeader'
                  - $ref: '#/components/schemas/error400'
        '401':
          description: Unauthorized
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error401'
        '404':
          description: Not Found
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/priceControlsNotFound'
        '500':
          description: Internal server error
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error500'
  /price-controls/sku:
    post:
      tags:
        - Price Controls
      summary: Create price control by SKU
      description: >-
        Create a price control record that contains various price types other
        than the elemental prices such as base price or sale price.
      operationId: createPriceControlBySku
      security:
        - AuthorizationToken: []
      parameters:
        - $ref: '#/components/parameters/xFabricTenantId'
        - $ref: '#/components/parameters/xFabricChannelId'
        - $ref: '#/components/parameters/xClientId'
        - $ref: '#/components/parameters/xFabricRequestId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/createPriceControlBySkuRequest'
      responses:
        '201':
          description: Created
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/createPriceControlBySkuResponse'
        '400':
          description: Bad request
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/priceControlsExist'
                  - $ref: '#/components/schemas/missingTenantHeader'
                  - $ref: '#/components/schemas/error400'
        '401':
          description: Unauthorized
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error401'
        '404':
          description: Not Found
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/priceListNotFound'
        '500':
          description: Internal server error
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error500'
  /price-controls/sku/{sku}:
    get:
      tags:
        - Price Controls
      summary: Get price controls by SKU
      description: Get price controls of a specific product by `sku`.
      operationId: getPriceControlsBySku
      security:
        - AuthorizationToken: []
      parameters:
        - $ref: '#/components/parameters/xFabricTenantId'
        - $ref: '#/components/parameters/xFabricChannelId'
        - $ref: '#/components/parameters/xClientId'
        - $ref: '#/components/parameters/xFabricRequestId'
        - $ref: '#/components/parameters/queryParameterOffset'
        - $ref: '#/components/parameters/queryParameterSize'
        - $ref: '#/components/parameters/queryParameterPriceListId'
        - name: sku
          in: path
          required: true
          description: Product SKU to get price controls for
          schema:
            type: string
            example: SKU0123456
      responses:
        '200':
          description: OK
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getPriceControlBySkuResponse'
        '400':
          description: Bad request
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/missingTenantHeader'
                  - $ref: '#/components/schemas/error400'
        '401':
          description: Unauthorized
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error401'
        '404':
          description: Not Found
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/priceControlsNotFound'
        '500':
          description: Internal server error
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error500'
    put:
      tags:
        - Price Controls
      summary: Update price controls by `sku`
      description: Update price controls by `sku`
      operationId: updatePriceControlsBySku
      security:
        - AuthorizationToken: []
      parameters:
        - $ref: '#/components/parameters/xFabricTenantId'
        - $ref: '#/components/parameters/xFabricRequiredChannelId'
        - $ref: '#/components/parameters/xClientId'
        - $ref: '#/components/parameters/xFabricRequestId'
        - $ref: '#/components/parameters/queryParameterPriceListId'
        - name: sku
          in: path
          required: true
          description: Product SKU to retrieve
          schema:
            type: string
            example: SKU0123456
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/updatePriceControlRequest'
      responses:
        '200':
          description: OK
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/updatePriceControlBySkuResponse'
        '400':
          description: Bad Request
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/missingTenantHeader'
                  - $ref: '#/components/schemas/error400'
        '401':
          description: Unauthorized
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error401'
        '404':
          description: Not Found
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/priceControlsNotFound'
        '500':
          description: Internal Server Error
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error500'
    delete:
      tags:
        - Price Controls
      summary: Delete price controls by `sku`
      description: Delete price controls
      operationId: deletePriceControlsBySku
      security:
        - AuthorizationToken: []
      parameters:
        - $ref: '#/components/parameters/xFabricTenantId'
        - $ref: '#/components/parameters/xFabricRequiredChannelId'
        - $ref: '#/components/parameters/xClientId'
        - $ref: '#/components/parameters/xFabricRequestId'
        - $ref: '#/components/parameters/queryParameterPriceListId'
        - name: sku
          in: path
          required: true
          description: Product SKU to retrieve
          schema:
            type: string
            example: SKU0123456
      responses:
        '200':
          description: OK
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/deletePriceControlBySkuResponse'
              example:
                priceListId: 100000
                itemId: 10000001
                itemSku: SKU0123456
                msrp: 299
                map: 199.99
                floor: 149
                ceiling: 149
                channelId: '12'
                isDeleted: true
                createdAt: '2019-08-20T14:15:22Z'
                updatedAt: '2019-08-20T14:15:22Z'
        '400':
          description: Bad Request
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/missingTenantHeader'
                  - $ref: '#/components/schemas/error400'
        '401':
          description: Unauthorized
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error401'
        '404':
          description: Not Found
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/priceControlsNotFound'
        '500':
          description: Internal Server Error
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error500'
components:
  securitySchemes:
    AuthorizationToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
  schemas:
    missingTenantHeader:
      type: object
      description: Tenant header is missing
      properties:
        type:
          description: The error code.
          type: string
          example: TENANT_HEADER_REQUIRED
        message:
          description: An error message corresponding to the `type`.
          type: string
          example: x-fabric-tenant-id header is required
    error400:
      type: object
      description: Bad request error
      properties:
        type:
          description: The error code.
          type: string
          example: BAD_REQUEST
        message:
          description: An error message corresponding to the `type`.
          type: string
          example: Bad request
    error401:
      type: object
      description: Unauthorized error
      properties:
        type:
          description: The error code.
          type: string
          example: UNAUTHORIZED
        message:
          description: An error message corresponding to the `type`.
          type: string
          example: Invalid credentials
    error500:
      type: object
      description: Internal server error
      properties:
        type:
          description: The error code.
          type: string
          example: INTERNAL_SERVER_ERROR
        message:
          description: An error message corresponding to the `type`.
          type: string
          example: Internal server error
    priceListNotFound:
      type: object
      description: Price list not found error
      properties:
        type:
          description: The error code.
          type: string
          example: PRICE_LIST_NOT_FOUND
        message:
          description: An error message corresponding to the `type`.
          type: string
          example: No price list found with this ID
    createdAt:
      type: string
      format: date-time
      description: Record's creation time
      example: 2019-08-20T14:15:22.000Z
    updatedAt:
      type: string
      format: date-time
      description: Record's last updated time
      example: 2019-08-20T14:15:22.000Z
    isDeleted:
      type: boolean
      description: 'true: Record is deleted<br>false: Record isn''t deleted'
      example: false
    offsetQuery:
      type: object
      description: Provides pagination data.
      properties:
        size:
          type: integer
          format: int32
          example: 10
          minimum: 1
          maximum: 100
          default: 10
          description: The maximum number of records per page.
        offset:
          type: integer
          format: int32
          example: 10
          minimum: 0
          default: 0
          description: >-
            The number of records to skip before returning records. For example,
            with an offset of 20 and limit of 10, you will get records from 21
            to 30.
        count:
          type: integer
          format: int32
          example: 50
          description: The total number of available records.
    priceControl:
      type: object
      description: The sample response for price control request.
      required:
        - priceListId
        - isDeleted
        - createdAt
        - updatedAt
      properties:
        priceListId:
          type: integer
          format: int32
          description: The price list ID for which the prices are created or updated.
          example: 100000
        itemId:
          type: integer
          format: int32
          example: 10000001
          description: The item ID for which the prices are created or updated.
        itemSku:
          type: string
          example: SKU0123456
          description: >-
            The Stock Keeping Unit (SKU) of the item for which prices are
            created or updated.
        msrp:
          description: >-
            The manufacturer-suggested retail price for the item. It's the price
            that the manufacturer suggests the retailer should sell the product
            for in order to make a reasonable profit.
          type: number
          nullable: true
          format: double
          example: 299
        map:
          description: >-
            The minimum price advertised for the item. It's the lowest price
            that a manufacturer or supplier allows its retailers or distributors
            to advertise a product for sale.
          type: number
          nullable: true
          format: double
          example: 199.99
        floor:
          description: >-
            The lowest price at which the product can be sold. Price created for
            the item ID or item SKU under the specified price list shouldn't be
            lower than the given floor price.
          type: number
          format: double
          example: 149
          nullable: true
        ceiling:
          description: >-
            The maximum price the seller is allowed to charge for the product.
            The price created for the item ID or item SKU under the specified
            price list shouldn't exceed the given ceiling price.
          type: number
          format: double
          example: 149
          nullable: true
        channelId:
          description: The sales channel ID for the created prices.
          type: string
          example: '12'
        isDeleted:
          $ref: '#/components/schemas/isDeleted'
        createdAt:
          $ref: '#/components/schemas/createdAt'
        updatedAt:
          $ref: '#/components/schemas/updatedAt'
    priceControlProperties:
      type: object
      description: The sample request for price control request.
      required:
        - priceListId
      properties:
        priceListId:
          type: integer
          format: int32
          description: The price list ID for which the prices are created or updated.
          example: 100000
        itemId:
          type: integer
          format: int32
          example: 10000001
          description: The item ID for which the prices are created or updated.
        itemSku:
          type: string
          example: SKU0123456
          description: >-
            The Stock Keeping Unit (SKU) of the item for which prices are
            created or updated.
        msrp:
          description: >-
            The manufacturer-suggested retail price for the item. It's the price
            that the manufacturer suggests the retailer should sell the product
            for in order to make a reasonable profit.
          type: number
          nullable: true
          format: double
          example: 299
        map:
          description: >-
            The minimum price advertised for the item. It's the lowest price
            that a manufacturer or supplier allows its retailers or distributors
            to advertise a product for sale.
          type: number
          nullable: true
          format: double
          example: 199.99
        floor:
          description: >-
            The lowest price at which the product can be sold. Price created for
            the item ID or item SKU under the specified price list shouldn't be
            lower than the given floor price.
          type: number
          format: double
          example: 149
          nullable: true
        ceiling:
          description: >-
            The maximum price the seller is allowed to charge for the product.
            The price created for the item ID or item SKU under the specified
            price list shouldn't exceed the given ceiling price.
          type: number
          format: double
          example: 149
          nullable: true
        channelId:
          description: The sales channel ID for the created prices.
          type: string
          example: '12'
    priceControlRequest:
      allOf:
        - $ref: '#/components/schemas/priceControlProperties'
      required:
        - itemId
    priceControlRequestBySku:
      allOf:
        - $ref: '#/components/schemas/priceControlProperties'
        - type: object
          required:
            - itemSku
    getPriceControlResponse:
      allOf:
        - $ref: '#/components/schemas/priceControl'
        - type: object
          required:
            - itemId
    getPriceControlBySkuResponse:
      allOf:
        - $ref: '#/components/schemas/priceControl'
        - type: object
          required:
            - itemSku
    getPriceControlsResponse:
      type: object
      properties:
        query:
          $ref: '#/components/schemas/offsetQuery'
        data:
          description: Price controls list
          type: array
          items:
            $ref: '#/components/schemas/priceControl'
    createPriceControlResponse:
      allOf:
        - $ref: '#/components/schemas/priceControl'
        - type: object
          required:
            - itemId
    createPriceControlBySkuResponse:
      allOf:
        - $ref: '#/components/schemas/priceControl'
        - type: object
          required:
            - itemSku
    updatePriceControlResponse:
      allOf:
        - $ref: '#/components/schemas/priceControl'
        - type: object
          required:
            - itemId
    updatePriceControlBySkuResponse:
      allOf:
        - $ref: '#/components/schemas/priceControl'
        - type: object
          required:
            - itemSku
    deletePriceControlResponse:
      allOf:
        - $ref: '#/components/schemas/priceControl'
        - type: object
          required:
            - itemId
    deletePriceControlBySkuResponse:
      allOf:
        - $ref: '#/components/schemas/priceControl'
        - type: object
          required:
            - itemSku
    createPriceControlRequest:
      $ref: '#/components/schemas/priceControlRequest'
    createPriceControlBySkuRequest:
      $ref: '#/components/schemas/priceControlRequestBySku'
    updatePriceControlRequest:
      type: object
      description: Price control details
      properties:
        msrp:
          description: >-
            Item's manufacturer suggested retail price. Represents the price
            that the manufacturer suggests the retailer should sell the product
            to make a reasonable profit.
          type: number
          format: double
          example: 299
          nullable: true
        map:
          description: >-
            Item's minimum advertised price. It's the lowest price that a
            manufacturer or supplier allows its retailers or distributors to
            advertise a product for sale.
          type: number
          format: double
          example: 199.99
          nullable: true
        floor:
          description: >-
            The lowest price at which the product can be sold. Price created for
            the item ID or item SKU under the specified price list shouldn't be
            lower than the specified floor price.
          type: number
          format: double
          example: 149
          nullable: true
        ceiling:
          description: >-
            The maximum price the seller is allowed to charge for the product.
            Price created for the item ID or item SKU under the specified price
            list shouldn't exceed the specified ceiling price.
          type: number
          format: double
          example: 149
          nullable: true
    priceControlsExist:
      type: object
      description: Duplicated price controls error
      properties:
        type:
          description: The error code.
          type: string
          example: PRICECONTROLS_ITEMID_PRICELISTID_EXISTS
        message:
          description: An error message corresponding to the `type`.
          type: string
          example: Price controls already exist
    priceControlsNotFound:
      type: object
      description: Price controls record not found.
      properties:
        type:
          description: The error code.
          type: string
          example: PRICECONTROLS_ITEMID_PRICELISTID_NOT_FOUND
        message:
          description: An error message corresponding to the `type`.
          type: string
          example: Price controls not found
  parameters:
    xFabricTenantId:
      in: header
      name: x-fabric-tenant-id
      schema:
        type: string
        minLength: 24
        maxLength: 24
      required: true
      example: 5f328bf0b5f328bf0b5f328b
      description: >-
        A header used by fabric to identify the tenant making the request. You
        must include tenant id in the authentication header for an API request
        to access any of fabric’s endpoints. You can retrieve the tenant id ,
        which is also called account id, from
        [Copilot](/v3/platform/settings/account-details/getting-the-account-id).
        This header is required.
    xFabricChannelId:
      in: header
      name: x-fabric-channel-id
      schema:
        type: string
        example: '12'
      description: >-
        x-fabric-channel-id identifies the sales channel where the API request
        is being made; primarily for multichannel use cases. The channel ids are
        12 corresponding to US and 13 corresponding to Canada. The default
        channel id is 12. This field is required.
    xFabricRequiredChannelId:
      in: header
      name: x-fabric-channel-id
      schema:
        type: string
        example: '12'
      description: >-
        x-fabric-channel-id identifies the sales channel where the API request
        is being made; primarily for multichannel use cases. The channel ids are
        12 corresponding to US and 13 corresponding to Canada. The default
        channel id is 12. This field is required.
      required: false
    xClientId:
      in: header
      name: x-client-id
      schema:
        type: string
      required: false
      example: copilot
      description: >-
        A unique identifier obtained from
        [Copilot](/v3/platform/settings/api-apps/getting-system-app-credentials)
        for the System app in the fabric ecosystem, essential for OpenID Connect
        authentication flows.
    xFabricRequestId:
      in: header
      name: x-fabric-request-id
      description: A unique request ID.
      required: false
      schema:
        type: string
        example: 263e731c-45c8-11ed-b878-0242ac120002
    queryParameterSize:
      name: size
      in: query
      description: The maximum number of records per page.
      required: false
      schema:
        type: integer
        format: int32
        minimum: 1
        default: 10
        maximum: 100
    queryParameterOffset:
      name: offset
      in: query
      description: >-
        The number of records to skip before returning records. For example,
        with an offset of 20 and limit of 10, you will get records from 21 to
        30.
      required: false
      schema:
        type: integer
        format: int32
        minimum: 0
        example: 0
        default: 0
    queryParameterPriceListId:
      name: priceListId
      in: query
      description: >-
        Price list ID to which the item belongs. If not sent, the default price
        list is considered.
      required: false
      schema:
        type: integer
        format: int32
        example: 100000
  headers:
    xFabricRequestIdResponse:
      description: Unique request ID
      schema:
        type: string
        example: 263e731c-45c8-11ed-b878-0242ac120002
