Overview / Catalog / Create an addon

Create an addon

post https://api.flactrum.com/v1/addons
Required scope addons.write
Success status201
Returns One Addon object

Request body

FieldTypeDescription
group_id * string —
name * string —
price * number —
stock_item_id string|null —
quantity_per_use number|null Required when stock_item_id is set. In the base unit unless quantity_unit is given.
quantity_unit string|null Unit quantity_per_use is written in; converted to the base unit on save. Must match the stock item's family.
waste_percent number|null Trim percentage, 0-100. Defaults to 0.
is_active boolean —
sort_order integer —
translations object Language code → fields. Only languages configured for the brand are accepted; an empty value removes that translation. Translatable here: name.

Response fields

FieldTypeDescription
id string —
group_id string —
name string —
price number —
stock_item_id string|null Set when the addon consumes a raw material on sale.
quantity_per_use number|null Amount deducted per use, in the item's base unit.
quantity_unit string|null The stock item's own unit (kilogram, litre…).
entry_quantity_per_use number|null quantity_per_use expressed in quantity_unit.
waste_percent number Trim percentage added on top of quantity_per_use. It comes off stock AND goes into the cost: 30 ml at 10% deducts 33 ml and is costed at 33 ml.
gross_quantity_per_use number|null quantity_per_use with the trim added — what actually leaves stock.
is_active boolean —
sort_order integer —

Examples

No recorded example yet.