Skip to main content
Every sale in Mutasib is a complete, auditable record: it captures which products were sold, who processed the transaction, at what unit price, and at what time. The moment a sale is created, Mutasib automatically decrements the stock of each product included in the transaction. You never have to update inventory manually after a sale.

Sales Data Model

The SaleOut 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 a POST 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.
A successful response returns the full 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 a receipt_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:
To download a print-ready PDF version of the same receipt:
Both endpoints are unauthenticated and safe to embed in QR codes or short links.
Display the receipt URL as a QR code on your POS screen so customers can scan and save their own receipt without you needing to collect contact details.

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. The adjustment field is a signed integer — positive values add stock, negative values remove it.
The 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 their low_stock_threshold:
Use this endpoint to build reorder workflows or trigger notifications when you’re running low on key items.

Movement Log

The movement log gives you a complete, chronological record of every stock change — sales, manual adjustments, returns, and more:
Each entry in the log records the product, the delta, the reason, the actor (cashier or owner), and the timestamp.

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

The due_date field is optional. Omit it for open-ended credit with no fixed repayment date.

Endpoint Summary