Update Material Variations

Updates one or more variations of a single material, including their costs. This is how catalog costs are edited for a specific variation — costs live on the variation, not the material. Partial update: within each listed variation, omitted fields keep their current values. Variations you do not list are left untouched, and none are created or deleted. Each variation may appear only once, and every entry must belong to the material in the path. The request is applied atomically — if any entry is rejected, none are applied. Cost changes are recorded in price history exactly as an in-app edit. Requires scope: `materials:write`

Authentication

API_KEYstring
API Key authentication via header

Path parameters

materialIdUUIDRequired
Material ID.

Request

This endpoint expects an object.
variationslist of objectsRequired
Variations to update. At least one is required, each must belong to the material in the path, and each variation may appear only once. The whole request is applied atomically.

Response

This endpoint returns a list of objects.
idUUID
Unique identifier for this variation.
namestring
Display name for the variation.
activeboolean
Whether this variation is currently active.
createdAtdatetime
ISO 8601 timestamp when the variation was created.
updatedAtdatetime
ISO 8601 timestamp when the variation was last updated.
descriptionstringOptional
Description of this variation.
costForClientdoubleOptional

Client-facing cost price in USD.

costForBusinessdoubleOptional
Internal business cost price in USD.
defaultLowAmountintegerOptional

Low-stock alert threshold quantity.

defaultCriticalAmountintegerOptional

Critical-stock alert threshold quantity.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Rate Limit Error