Pro plan only. AI endpoints are available exclusively to shops on the Pro plan. Requests from Free or Starter shops return
403 Forbidden. The same restriction applies inside the Mutasib dashboard: users on lower tiers cannot access AI features from either surface.Predict demand
Returns an AI-generated demand forecast for a single product, based on the shop’s historical sales.POST /api/v1/shops/{shop_id}/ai/predict
Request body
integer
required
ID of the product to forecast. Must belong to the shop identified in the path.
Response
integer
ID of the product this prediction applies to.
number
Forecasted units of this product expected to sell in the upcoming period.
number
Model confidence in the forecast, expressed as a value between
0 and 1.string
Human-readable explanation of how the forecast was derived (e.g. recent sales velocity, seasonality, trend direction).
Reorder suggestion
Returns an AI-powered reorder recommendation for a single product, including how much to order and how urgently.POST /api/v1/shops/{shop_id}/ai/reorder
Request body
integer
required
ID of the product to evaluate. Must belong to the shop identified in the path.
Response
integer
ID of the product this suggestion applies to.
integer
Recommended number of units to reorder from your supplier.
string
Urgency level of the reorder. One of
low, medium, or high.string
Human-readable explanation combining current stock, sales velocity, and low-stock threshold.
Plan gating
Some Mutasib features are limited to specific plans. When your token belongs to a shop that doesn’t include a feature, the API returns403 Forbidden with a detail message explaining the required plan. This mirrors the dashboard exactly: a user who can’t reach a feature in the dashboard also can’t reach it through the API.
Pro-only features include:
- AI demand prediction (
POST /api/v1/shops/{shop_id}/ai/predict) - AI reorder suggestions (
POST /api/v1/shops/{shop_id}/ai/reorder) - Supplier management (
/api/v1/shops/{shop_id}/suppliers) - Credit notes (
/api/v1/credit-notes/{shop_id}/)
plan_features object on the shop response to detect available capabilities at runtime instead of hard-coding plan names.