curl -X PUT "https://vzguoukmiwxvqdnabfma.supabase.co/functions/v1/api/products/123e4567-e89b-12d3-a456-426614174000" \
-H "x-api-key: YOUR_API_KEY" \
-H "Accept-Version: 1.0" \
-H "Content-Type: application/json" \
-d '{
"publishing_status_id": "status-uuid",
"license_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"page_count": 275
}'
{
"success": true,
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"title": "New Book Title",
"publishing_status_id": "status-uuid",
"license_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"license_name": "Example License",
"license_badge_colour": "#7C3AED",
"page_count": 275,
"updated_at": "2024-01-02T00:00:00Z"
}
}
Products
Update a product
Partially update a product and sync nested prices, contributors, collections, and collateral.
PUT
/
api
/
products
/
{id}
curl -X PUT "https://vzguoukmiwxvqdnabfma.supabase.co/functions/v1/api/products/123e4567-e89b-12d3-a456-426614174000" \
-H "x-api-key: YOUR_API_KEY" \
-H "Accept-Version: 1.0" \
-H "Content-Type: application/json" \
-d '{
"publishing_status_id": "status-uuid",
"license_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"page_count": 275
}'
{
"success": true,
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"title": "New Book Title",
"publishing_status_id": "status-uuid",
"license_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"license_name": "Example License",
"license_badge_colour": "#7C3AED",
"page_count": 275,
"updated_at": "2024-01-02T00:00:00Z"
}
}
Updates an existing product. Send only the fields you want to change — omitted
core fields stay as they are. Pass
You can send only nested arrays with no core product fields.
null on nullable foreign keys (for example
license_id) to clear them.
There is no PATCH route for a single product; use PUT with a partial body.
Nested sync behaviour
When a nested key is present in the body:| Key | Behaviour |
|---|---|
product_prices | Entries with id update; without id create. [] deletes all prices. |
packing_configurations | Same merge-by-id pattern as prices. [] deletes all. |
product_collections | Syncs to the supplied set — extras are removed. |
contributors | Syncs to the supplied set — extras are removed. |
collateral | Rows with id update; without id create; omitted ids are deleted. |
custom_fields | Replaces/syncs custom field values. |
Headers
string
required
Organisation API key.
string
default:"1.0"
API version. Use
1.0.string
required
Must be
application/json.Path parameters
string
required
Product UUID.
Body
All create fields are optional on update (partial schema). Common fields:string
Product title.
string
Publishing status UUID, or
null to clear.string
Organisation license UUID, or
null to clear. Must belong to the authenticated
organisation.integer
Positive page count.
string
Format UUID.
object[]
Price sync array. Include
id to update an existing price.object[]
Collateral sync array. Include
id to update; omit an existing id to delete
that row.Response
Returns 200 with the enriched product indata.
boolean
required
true when the update succeeds.object
required
Updated product.
Errors
| Status | When |
|---|---|
400 | Validation failed, invalid license_id, or series not in attached collections |
401 | Missing or invalid API key |
500 | Database or unexpected server error |
curl -X PUT "https://vzguoukmiwxvqdnabfma.supabase.co/functions/v1/api/products/123e4567-e89b-12d3-a456-426614174000" \
-H "x-api-key: YOUR_API_KEY" \
-H "Accept-Version: 1.0" \
-H "Content-Type: application/json" \
-d '{
"publishing_status_id": "status-uuid",
"license_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"page_count": 275
}'
{
"success": true,
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"title": "New Book Title",
"publishing_status_id": "status-uuid",
"license_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"license_name": "Example License",
"license_badge_colour": "#7C3AED",
"page_count": 275,
"updated_at": "2024-01-02T00:00:00Z"
}
}
Last modified on July 22, 2026