Sales Data Model
TheSaleOut schema contains everything you need to understand a completed transaction.
Each object in the
items array contains:
Product name and price are snapshotted at the time of the sale. If you later change a product’s name or price, historical sales remain accurate.
Creating a Sale
To record a sale, send aPOST request with the shop ID in the path and a list of items in the body. The cashier is determined automatically from the authenticated token.
SaleOut object, including the receipt_token you can use to share a digital receipt with the customer.
Stock is decremented immediately and atomically when the sale is created. If any product in the sale has insufficient stock, the entire request is rejected — no partial sales are recorded.
Digital Receipts
Every sale automatically generates areceipt_token — a URL-safe string that acts as a shareable, public link to the receipt. No authentication is required to view it, making it easy to send to customers via WhatsApp, SMS, or email.
The public receipt endpoint is:
Inventory Tracking
Mutasib maintains a live inventory count for every product. Beyond the automatic stock decrement on sale, you have full visibility into the current state of your stock and every movement that has ever occurred.Stock Snapshot
Get the current stock level for all products in one request:Manual Stock Adjustment
Use this endpoint to record a delivery, write-off, or any correction that isn’t tied to a sale. Theadjustment field is a signed integer — positive values add stock, negative values remove it.
InventoryAdjustIn schema accepts the following fields:
integer
required
Signed integer representing the stock delta. Use a positive number to add stock and a negative number to remove it.
integer
Optionally update the low-stock alert threshold at the same time as the adjustment.
string
Reason for the adjustment. Defaults to
adjustment. Common values: delivery, write-off, correction, return.string
Free-text note for internal reference, such as a purchase order number.
Low-Stock Alerts
Retrieve all products whose stock is at or below theirlow_stock_threshold:
Movement Log
The movement log gives you a complete, chronological record of every stock change — sales, manual adjustments, returns, and more:Credit Notes
Credit notes let you track money customers owe your shop — or credit balances you owe them. This is a Pro plan feature designed for shops that extend informal credit to regular customers.Credit notes are available on the Pro plan only. Attempting to use these endpoints on Free or Starter will return a
403 Forbidden response.Creating a Credit Note
due_date field is optional. Omit it for open-ended credit with no fixed repayment date.