Sales & COGS

Create Sales Day

Record daily sales for a branch and automatically:

  • Consume stock based on recipes (SALE_ISSUE moves from branch location)
  • Compute COGS and gross profit per item + per day

Assumptions:

  • Each sold item has a recipe in recipes/recipe_lines.
  • Branch (location_id) holds stock of the recipe components.
post/inventory/sales/days

Request body

location_idinteger required
sale_datestring nullable

ISO date (or datetime). Defaults to today if missing.

sourcestring nullable

e.g. 'POS', 'Delivery', 'Zomato', etc.

referencestring nullable

Optional POS batch reference / Z-report number

created_bystring nullable

Response

Successful Response

idinteger required
numberstring required
location_idinteger required
location_codestring required
location_namestring required
sale_datestring required
sourcestring nullable required
referencestring nullable required
total_net_revenuenumber required
total_cogsnumber required
gross_profitnumber required
created_bystring nullable required
created_atstring required

Changes

No recorded changes to this endpoint across all 1 revision of this API.