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

# Update Price

> Update an existing price configuration

Updates an existing price with partial data (PATCH semantics). Only provided fields are updated. Creation-only fields cannot be modified.

## Authentication

<ParamField header="Authorization" type="string" required>
  Bearer token for authentication
</ParamField>

## Path Parameters

<ParamField path="id" type="uuid" required>
  The unique identifier of the price to update
</ParamField>

## Request Body

All fields are optional. Only include the fields you want to update.

<ParamField body="pricing_model" type="string">
  Pricing model: `flat`, `volume`, `graduated`, `percent`, `cost_based`, or
  `none`
</ParamField>

<ParamField body="amount" type="number">
  Fixed price amount (for flat pricing)
</ParamField>

<ParamField body="volume_tiers" type="array">
  Array of volume tier objects
</ParamField>

<ParamField body="is_volume_grid_displayed" type="boolean">
  Whether to display volume tiers to customers
</ParamField>

<ParamField body="graduated_tiers" type="array">
  Array of graduated tier objects
</ParamField>

<ParamField body="is_graduated_grid_displayed" type="boolean">
  Whether to display graduated tiers to customers
</ParamField>

<ParamField body="percent" type="number">
  Percentage value 0-100
</ParamField>

<ParamField body="price_percentage_type" type="string">
  Scope: `all`, `product_type`, or `product`
</ParamField>

<ParamField body="cost_multiplier" type="number">
  Multiplier for cost-based pricing
</ParamField>

<ParamField body="cost" type="number">
  Base cost price
</ParamField>

<ParamField body="floor_price" type="number">
  Minimum acceptable price
</ParamField>

<ParamField body="is_setup" type="boolean">
  Whether this is a setup fee
</ParamField>

<ParamField body="is_pay_as_you_go" type="boolean">
  Whether this uses pay-as-you-go billing
</ParamField>

<ParamField body="default_tax_id" type="uuid">
  ID of the default sales tax
</ParamField>

<ParamField body="billing_frequency_id" type="uuid">
  ID of billing frequency
</ParamField>

<ParamField body="engagement_type" type="string">
  `forever` or `fixed_period`
</ParamField>

<ParamField body="period_duration" type="number">
  Number of billing periods
</ParamField>

<ParamField body="parent_price_id" type="uuid">
  Parent price ID for dynamic pricebooks
</ParamField>

<ParamField body="identifiers[crm]" type="string">
  External CRM identifier
</ParamField>

<ParamField body="identifiers[erp]" type="string">
  External ERP identifier
</ParamField>

<ParamField body="identifiers[accounting]" type="string">
  External accounting identifier
</ParamField>

## Immutable Fields

The following fields cannot be modified after creation:

* `product_id`
* `pricebook_id`
* `currency_id`

## Response

<ResponseField name="success" type="boolean">
  Indicates if the request was successful
</ResponseField>

<ResponseField name="data" type="object">
  The updated price object with all fields and enriched data
</ResponseField>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "success": true,
    "data": {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "product_id": "660e8400-e29b-41d4-a716-446655440001",
      "product_variant_name": "Premium Widget",
      "pricebook_id": "880e8400-e29b-41d4-a716-446655440003",
      "pricebook_name": "Standard Pricebook",
      "pricebook_type": "fixed",
      "currency_id": "990e8400-e29b-41d4-a716-446655440004",
      "currency_name": "Euro",
      "currency_api_name": "EUR",
      "pricing_model": "flat",
      "amount": 129.99,
      "volume_tiers": null,
      "is_volume_grid_displayed": false,
      "graduated_tiers": null,
      "is_graduated_grid_displayed": false,
      "percent": null,
      "price_percentage_type": null,
      "cost_multiplier": null,
      "cost": 50.0,
      "floor_price": 99.99,
      "is_setup": false,
      "is_pay_as_you_go": false,
      "default_tax_id": "aa0e8400-e29b-41d4-a716-446655440005",
      "default_tax_name": "VAT 20%",
      "default_tax_rate": 20.0,
      "default_tax_amount": null,
      "default_tax_is_percentage": true,
      "billing_frequency_id": null,
      "billing_frequency_period": null,
      "billing_frequency_unit": null,
      "engagement_type": null,
      "period_duration": null,
      "parent_price_id": null,
      "identifiers": {
        "crm": "crm_price_updated",
        "erp": "erp_price_updated",
        "accounting": "acc_price_updated"
      },
      "workspace_id": "cc0e8400-e29b-41d4-a716-446655440007",
      "created_at": "2024-12-21T10:30:00Z",
      "updated_at": "2024-12-21T15:20:00Z"
    }
  }
  ```

  ```json Not Found Error theme={null}
  {
    "success": false,
    "error": "Price not found"
  }
  ```

  ```json Validation Error theme={null}
  {
    "success": false,
    "error": "Validation error",
    "details": ["Field 'amount' must be a positive number"]
  }
  ```
</ResponseExample>

<RequestExample>
  ```bash cURL theme={null}
  curl -X PATCH https://qwoty.app/api/prices/550e8400-e29b-41d4-a716-446655440000 \
    -H "Authorization: Bearer qwoty_your_token" \
    -H "Content-Type: application/json" \
    -d '{
      "amount": 129.99,
      "floor_price": 99.99,
      "identifiers[crm]": "crm_price_updated",
      "identifiers[erp]": "erp_price_updated",
      "identifiers[accounting]": "acc_price_updated"
    }'
  ```

  ```python Python theme={null}
  import requests

  price_id = '550e8400-e29b-41d4-a716-446655440000'

  response = requests.patch(
      f'https://qwoty.app/api/prices/{price_id}',
      headers={
          'Authorization': 'Bearer qwoty_your_token',
          'Content-Type': 'application/json'
      },
      json={
          'amount': 129.99,
          'floor_price': 99.99,
          'identifiers[crm]': 'crm_price_updated',
          'identifiers[erp]': 'erp_price_updated',
          'identifiers[accounting]': 'acc_price_updated'
      }
  )

  data = response.json()
  ```
</RequestExample>
