Partially update a pricing header and its entries

PATCH /accounting/products/{id}/product-lines/{productLineId}/pricing/{pricingId}

Group: Accounting › Products › Product Lines · Operation ID: updateAccountingProductLinePricing

Patches one existing pricing header's own fields plus its entries and rate cards. Writes only the fields the request body carries; everything omitted is left unchanged.

priceBookEntriesToCreate adds new entries. priceBookEntriesToUpdate patches existing entries by entryId (and, within one, rateCardEntry patches the entry's existing rate card by rateCardEntryId). priceBookEntriesToDelete removes entries by id.

Every entry/rate-card id referenced must belong to this pricing header's own tree (an entry under a different header, or a rate card under a different entry, fails the same as an unknown id) — see UNKNOWN_PRICE_BOOK_ENTRY_IDS / UNKNOWN_RATE_CARD_ENTRY_IDS. id, productLineId and pricingId must resolve to an existing pricing header on that product line under that product or the call fails with NOT_FOUND. The call runs in a transaction: a failure writes nothing.

Open in the interactive reference

Parameters

Name In Type Required Description
Api-Version header "v1" yes The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version v1.
Idempotency-Key header string no An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with 400 IDEMPOTENCY_NOT_SUPPORTED rather than silently ignored.
id path string yes Id of the product the line belongs to (a UUID); bound from the :id path segment.
productLineId path string yes Id of the product line the pricing header belongs to (a UUID); bound from the :productLineId path segment.
pricingId path string yes Id of the pricing header to update (a UUID); bound from the :pricingId path segment.

Request body

Required, application/json: updateAccountingProductLinePricingInput.

Field Type Required Description
priceBookId string no New price book for this header (a UUID). Omit to leave unchanged.
currency string no New currency for this header. Omit to leave unchanged.
validFrom string (date) no New start of this header's effective range. Omit to leave unchanged.
validTo string (date) no New end of this header's effective range. Omit to leave unchanged.
priceBookEntriesToCreate array of object no New price-book entries to create under this header.
priceBookEntriesToCreate[].listPrice string (decimal) no List price as a decimal amount in the header currency.
priceBookEntriesToCreate[].fromQuantity string (decimal) no Inclusive lower bound of this tier's quantity range. Provide only on tiered entries.
priceBookEntriesToCreate[].toQuantity string (decimal) no Inclusive upper bound of this tier's quantity range. Omit on the top, open-ended tier.
priceBookEntriesToCreate[].priceModel string no How this tier prices quantity. Provide only on tiered entries. One of 'flat', 'perUnit'.
priceBookEntriesToCreate[].rateCardEntry object no Rate-card entry to attach. Provide only on rate-card-priced entries.
priceBookEntriesToCreate[].rateCardEntry.billableComponentId string no Id of the billable component this rate-card entry prices (a UUID).
priceBookEntriesToCreate[].rateCardEntry.unitOfMeasure string yes Unit of measure the rate is quoted in. One of 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'.
priceBookEntriesToCreate[].rateCardEntry.description string no Free-form qualifier distinguishing this rate-card entry from siblings on the same billable component.
priceBookEntriesToCreate[].rateCardEntry.usageType string no How usage is measured against this entry. One of 'consumption', 'overage', 'thresholdCounter'.
priceBookEntriesToCreate[].rateCardEntry.billableUnitOfMeasure string no Unit of measure used when billing this entry. One of 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'.
priceBookEntriesToCreate[].rateCardEntry.conversion string (decimal) no Multiplier applied to convert unitOfMeasure quantities into billableUnitOfMeasure quantities.
priceBookEntriesToCreate[].rateCardEntry.invoiceFrequency string no How often usage on this entry is invoiced. One of 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'.
priceBookEntriesToCreate[].rateCardEntry.priceModel string no How this rate-card entry computes a price (rate-card specific). One of 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'.
priceBookEntriesToUpdate array of object no Patches to existing price-book entries under this header, identified by entryId.
priceBookEntriesToUpdate[].entryId string yes Id of the existing price-book entry to patch (a UUID). Must belong to this header.
priceBookEntriesToUpdate[].listPrice string (decimal) no New list price as a decimal amount in the header currency. Omit to leave unchanged.
priceBookEntriesToUpdate[].fromQuantity string (decimal) no New lower bound of this tier's quantity range. Omit to leave unchanged.
priceBookEntriesToUpdate[].toQuantity string (decimal) no New upper bound of this tier's quantity range. Omit to leave unchanged.
priceBookEntriesToUpdate[].priceModel string no New tier pricing model. Omit to leave unchanged. One of 'flat', 'perUnit'.
priceBookEntriesToUpdate[].rateCardEntry object no Patch to this entry's existing rate card. Provide only on rate-card-priced entries.
priceBookEntriesToUpdate[].rateCardEntry.rateCardEntryId string yes Id of the existing rate-card entry to patch (a UUID). Must belong to this price-book entry.
priceBookEntriesToUpdate[].rateCardEntry.billableComponentId string no New billable component for this rate-card entry (a UUID). Omit to leave unchanged.
priceBookEntriesToUpdate[].rateCardEntry.unitOfMeasure string no New unit of measure. Omit to leave unchanged. One of 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'.
priceBookEntriesToUpdate[].rateCardEntry.description string no New free-form qualifier. Omit to leave unchanged.
priceBookEntriesToUpdate[].rateCardEntry.usageType string no New usage-measurement type. Omit to leave unchanged. One of 'consumption', 'overage', 'thresholdCounter'.
priceBookEntriesToUpdate[].rateCardEntry.billableUnitOfMeasure string no New billing unit of measure. Omit to leave unchanged. One of 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'.
priceBookEntriesToUpdate[].rateCardEntry.conversion string (decimal) no New conversion multiplier. Omit to leave unchanged.
priceBookEntriesToUpdate[].rateCardEntry.invoiceFrequency string no New invoice frequency. Omit to leave unchanged. One of 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'.
priceBookEntriesToUpdate[].rateCardEntry.priceModel string no New rate-card-specific price model. Omit to leave unchanged. One of 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'.
priceBookEntriesToDelete array of string no Ids of price-book entries under this header to delete (each a UUID). Cascades to each entry's rate-card entry, if any.

Example:

{
  "priceBookId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "currency": "<currency>",
  "validFrom": "2026-01-15",
  "validTo": "2026-01-15",
  "priceBookEntriesToCreate": [
    {
      "listPrice": "19.99",
      "fromQuantity": "19.99",
      "toQuantity": "19.99",
      "priceModel": "<priceModel>",
      "rateCardEntry": {
        "billableComponentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "unitOfMeasure": "<unitOfMeasure>",
        "description": "<description>",
        "usageType": "<usageType>",
        "billableUnitOfMeasure": "<billableUnitOfMeasure>",
        "conversion": "19.99",
        "invoiceFrequency": "<invoiceFrequency>",
        "priceModel": "<priceModel>"
      }
    }
  ],
  "priceBookEntriesToUpdate": [
    {
      "entryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "listPrice": "19.99",
      "fromQuantity": "19.99",
      "toQuantity": "19.99",
      "priceModel": "<priceModel>",
      "rateCardEntry": {
        "rateCardEntryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "billableComponentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "unitOfMeasure": "<unitOfMeasure>",
        "description": "<description>",
        "usageType": "<usageType>",
        "billableUnitOfMeasure": "<billableUnitOfMeasure>",
        "conversion": "19.99",
        "invoiceFrequency": "<invoiceFrequency>",
        "priceModel": "<priceModel>"
      }
    }
  ],
  "priceBookEntriesToDelete": [
    "<priceBookEntriesToDelete>"
  ]
}

Response

200 Success

Response headers

Errors

Code Status
INVALID_ID 400
NOT_FOUND 400
UNKNOWN_PRICE_BOOK_IDS 400
UNKNOWN_BILLABLE_COMPONENT_IDS 400
UNKNOWN_PRICE_BOOK_ENTRY_IDS 400
UNKNOWN_RATE_CARD_ENTRY_IDS 400
VALIDATION_FAILED 400
IDEMPOTENCY_KEY_CONFLICT 409
IDEMPOTENCY_PAYLOAD_MISMATCH 422

Statuses