Create Product
POST/api/products
Create a new product.
Authentication: Requires Bearer token.
Required fields: sku (unique), type Product types: standard, bundle, kit, matrix Weight units: kg, lb, oz, g Dimension units: cm, in, mm, ft
For bundle/kit products, components[] is required and must contain at least one component (each entry has id and quantity). Saving a bundle or kit with an empty components array (or without providing one when creating, or when changing type to bundle/kit) returns a 422 validation error on the components field.
For matrix products (parent), include variations[] with sku and attributes.
Returns 422 validation error if SKU already exists or other validation fails.
Note (pricing tiers): When sending suppliers[].pricing[] entries with operation: updateOrCreate (or omitted), price is required and must be a numeric value >= 0 and < 100000. To remove a tier, send operation: "delete". Sending price: null will return a 422 validation error on suppliers.{i}.pricing.{j}.price.
Lot tracking fields (optional):
is_lot_tracked(boolean, nullable) — enable batch/lot tracking for this product.lot_tracking_method(string, nullable) — required whenis_lot_trackedis true. Allowed values:fifo(First-In, First-Out),fefo(First-Expiry, First-Out).
Stock unit of measure (optional):
stock_uom_id(integer, nullable) — id of a row inunits_of_measure. When omitted, the product is auto-assignedEACHas its stock UoM on create. PickKG,L, etc. for bulk weight or volume products so quantities, purchase orders, sales orders, and stock takes use the correct unit from day one.
Request
Responses
- 200
Successful response