Update a product
patch
https://api.flactrum.com/v1/products/{product}
Partial update. addon_group_ids and branch_ids replace the whole set when sent; omit them to leave the links untouched.
| Required scope | products.write |
| Success status | 200 |
| Returns | One Product object |
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| product * | path | string | ULID of the record. |
Request body
| Field | Type | Description |
|---|---|---|
| name * | string | — |
| price * | number | — |
| description | string|null | — |
| sku | string|null | — |
| category_id | string|null | — |
| tax_rate | number|null | — |
| is_active | boolean | — |
| sort_order | integer | — |
| loyalty_mode | string|null | — |
| loyalty_value | number|null | Required when loyalty_mode is set. |
| addon_group_ids | array | Replaces the product's addon group links. |
| branch_ids | array | Branches that sell this product. Omit entirely to keep it on sale everywhere. |
| image | string | Product photo: jpg, png or webp, max 4 MB. Send as multipart/form-data; on update use POST with _method=PATCH. |
| remove_image | boolean | Removes the current photo. |
| allergens | array | Allergen keys, e.g. milk, gluten. |
| image_channels | array | Where the image may be shown. Empty or every channel means everywhere. |
| translations | object | Language code → fields. Only languages configured for the brand are accepted; an empty value removes that translation. Translatable here: name, description. |
Response fields
| Field | Type | Description |
|---|---|---|
| id | string | — |
| name | string | Follows ?lang. |
| description | string|null | — |
| slug | string|null | — |
| sku | string|null | — |
| category_id | string|null | — |
| category | object | — |
| price | number | Brand list price, tax inclusive. |
| tax_rate | number|null | — |
| image_url | string|null | Null for a kiosk or POS device when the image is switched off for that channel. |
| image_channels | array|null | Where the image may be shown. Null means everywhere. |
| allergens | array | The 14 regulated food allergens. |
| is_active | boolean | — |
| sort_order | integer | — |
| loyalty | object|null | How many points this product earns. |
| translations | object | — |
| branch_ids | array | Branches the product is sold in. Empty means every branch. |
| addon_group_ids | array | — |
| branch_price | number | Only when ?branch is given. List price with the branch override applied. |
| campaign_price | number | Only when ?branch is given. The price actually charged after campaigns. |
| campaign | object|null | The single campaign applied. Campaigns never stack. |
| created_at | string | — |
| updated_at | string | — |
Examples
No recorded example yet.