Skip to main content
POST
/
v1
/
contract-pricing
/
products
/
update
Update a product
curl --request POST \
  --url https://api.metronome.com/v1/contract-pricing/products/update \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "product_id": "d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc",
  "name": "My Updated Product",
  "starting_at": "2020-01-01T00:00:00.000Z"
}'
{
  "data": {
    "id": "d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Updates a product's configuration while maintaining billing continuity for active customers. Use this endpoint to modify product names, metrics, pricing rules, and composite settings without disrupting ongoing billing cycles. Changes are scheduled using the starting_at timestamp, which must be on an hour boundary–set future dates to schedule updates ahead of time, or past dates for retroactive changes. Returns the updated product ID upon success.

Usage guidance: Product type cannot be changed after creation. For incorrect product types, create a new product and archive the original instead.

product_id
string<uuid>
required

ID of the product to update

starting_at
string<date-time>
required

Timestamp representing when the update should go into effect. It must be on an hour boundary (e.g. 1:00, not 1:30).

name
string

displayed on invoices. If not provided, defaults to product's current name.

exclude_free_usage
boolean

Beta feature only available for composite products. If true, products with $0 will not be included when computing composite usage. Defaults to false

billable_metric_id
string<uuid>

Available for USAGE products only. If not provided, defaults to product's current billable metric.

composite_product_ids
string<uuid>[]

Available for COMPOSITE products only. If not provided, defaults to product's current composite_product_ids.

quantity_conversion
object | null

Optional. Only valid for USAGE products. If provided, the quantity will be converted using the provided conversion factor and operation. For example, if the operation is "multiply" and the conversion factor is 100, then the quantity will be multiplied by 100. This can be used in cases where data is sent in one unit and priced in another. For example, data could be sent in MB and priced in GB. In this case, the conversion factor would be 1024 and the operation would be "divide".

quantity_rounding
object | null

Optional. Only valid for USAGE products. If provided, the quantity will be rounded using the provided rounding method and decimal places. For example, if the method is "round up" and the decimal places is 0, then the quantity will be rounded up to the nearest integer.

tags
string[]

If not provided, defaults to product's current tags

composite_tags
string[]

Available for COMPOSITE products only. If not provided, defaults to product's current composite_tags.

pricing_group_key
string[]

For USAGE products only. If set, pricing for this product will be determined for each pricing_group_key value, as opposed to the product as a whole. The superset of values in the pricing group key and presentation group key must be set as one compound group key on the billable metric.

presentation_group_key
string[]

For USAGE products only. Groups usage line items on invoices. The superset of values in the pricing group key and presentation group key must be set as one compound group key on the billable metric.

Response

Success

data
object
required