> ## Documentation Index
> Fetch the complete documentation index at: https://developers.quote.hapily.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set Product Prices

> Sets prices for multiple products in a price book. Accepts either a single price object or an array of price objects.



## OpenAPI

````yaml swagger.json put /pricebooks/{priceBookId}/prices
openapi: 3.0.0
info:
  title: quote•hapily API
  description: Developer APIs for the quote•hapily CPQ platform.
  version: 1.0.0
servers:
  - url: https://api.quote.hapily.com/v1
    description: Production API Server
security: []
paths:
  /pricebooks/{priceBookId}/prices:
    put:
      summary: Set Product Prices
      description: >-
        Sets prices for multiple products in a price book. Accepts either a
        single price object or an array of price objects.
      parameters:
        - name: priceBookId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/AllProductsPriceRequest'
                - type: array
                  items:
                    $ref: '#/components/schemas/SpecificProductPriceRequest'
      responses:
        '200':
          description: Prices set successfully
        '401':
          description: Unauthorized
        '404':
          description: Price book not found
        '500':
          description: Internal Server Error
      security:
        - ApiKeyAuth: []
components:
  schemas:
    AllProductsPriceRequest:
      $ref: '#/components/schemas/SpecificProductPriceRequest'
      properties:
        productId:
          type: string
          enum:
            - all
        adjustments:
          type: object
          additionalProperties:
            oneOf:
              - $ref: '#/components/schemas/PercentAdjustment'
              - type: 'null'
      required:
        - productId
        - adjustments
    SpecificProductPriceRequest:
      type: object
      properties:
        productId:
          type: string
        adjustments:
          type: object
          additionalProperties:
            oneOf:
              - $ref: '#/components/schemas/NullAdjustment'
              - $ref: '#/components/schemas/OverrideAdjustment'
              - $ref: '#/components/schemas/PercentAdjustment'
              - $ref: '#/components/schemas/TableEnumAdjustment'
              - $ref: '#/components/schemas/TableRangeAdjustment'
              - $ref: '#/components/schemas/VolumeAdjustment'
      required:
        - productId
    NullAdjustment:
      $ref: '#/components/schemas/PriceAdjustmentBase'
      properties:
        type:
          type: string
          enum:
            - 'null'
        amount:
          type: 'null'
      required:
        - type
        - amount
    OverrideAdjustment:
      allOf:
        - $ref: '#/components/schemas/PriceAdjustmentBase'
        - type: object
          properties:
            type:
              type: string
              enum:
                - override
            amount:
              type: number
          required:
            - amount
    PercentAdjustment:
      allOf:
        - $ref: '#/components/schemas/PriceAdjustmentBase'
        - type: object
          properties:
            type:
              type: string
              enum:
                - percent
            amount:
              type: number
          required:
            - amount
    TableEnumAdjustment:
      allOf:
        - $ref: '#/components/schemas/PriceAdjustmentBase'
        - type: object
          properties:
            type:
              type: string
              enum:
                - enum
            property:
              type: string
            values:
              type: array
              items:
                type: object
                properties:
                  value:
                    type: string
                  unitPrice:
                    type: number
                required:
                  - value
                  - unitPrice
          required:
            - property
            - values
    TableRangeAdjustment:
      allOf:
        - $ref: '#/components/schemas/PriceAdjustmentBase'
        - type: object
          properties:
            type:
              type: string
              enum:
                - range
            property:
              type: string
            values:
              type: array
              items:
                type: object
                properties:
                  firstUnit:
                    type: number
                  lastUnit:
                    type: number
                  unitPrice:
                    type: number
                required:
                  - firstUnit
                  - lastUnit
                  - unitPrice
          required:
            - property
            - values
    VolumeAdjustment:
      $ref: '#/components/schemas/PriceAdjustmentBase'
      properties:
        type:
          type: string
          enum:
            - volume
        tiers:
          type: array
          items:
            type: object
            properties:
              firstUnit:
                type: number
              lastUnit:
                type:
                  - number
                  - 'null'
              unitPrice:
                type: number
            required:
              - firstUnit
              - unitPrice
      required:
        - type
        - tiers
    PriceAdjustmentBase:
      type: object
      properties:
        type:
          type: string
      required:
        - type
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````