Auth
Public — Registration, login (email code or Google), OTP verification, and token refresh.
POST /auth/registerPOST /auth/loginPOST /auth/googlePOST /auth/google/linkPOST /auth/otp/sendPOST /auth/otp/verifyPOST /auth/refreshAll endpoints are relative to the base URL https://app.sabibooks.app/api/v1/. Unless marked as public, every endpoint requires a valid Bearer token in the Authorization header.
Auth
Public — Registration, login (email code or Google), OTP verification, and token refresh.
POST /auth/registerPOST /auth/loginPOST /auth/googlePOST /auth/google/linkPOST /auth/otp/sendPOST /auth/otp/verifyPOST /auth/refreshBusiness
Manage business profile, branches, staff members, and subscription details.
GET /businesses/mePUT /businesses/mePOST /businesses/branchesGET /businesses/staffProducts
Full inventory management — create, update, search products, manage categories, and track stock levels.
GET /productsPOST /productsPUT /products/{id}GET /products/categoriesPOST /products/stock-adjustmentSales
Point-of-sale operations — create sales, process payments, generate receipts, and view sales history.
POST /salesGET /salesGET /sales/{id}GET /sales/{id}/receiptPOST /sales/{id}/voidCustomers
Customer database management — create and search customers, view purchase history.
GET /customersPOST /customersPUT /customers/{id}GET /customers/{id}/transactionsCredit
Credit account management — track credit sales, record payments, and view aging reports.
GET /customers/{id}/creditPOST /customers/{id}/credit/paymentGET /credit/aging-reportExpenses
Expense recording — log business expenses, categorise them, and track spending.
GET /expensesPOST /expensesGET /expenses/categoriesGET /expenses/summaryReports
Business analytics — dashboard metrics, profit/loss, inventory valuation, exports, the Top Services breakdown (Business/Pro plans), and the Loan Readiness Pack.
GET /reports/dashboardGET /reports/profit-lossGET /reports/inventoryGET /reports/sales/exportGET /reports/profit-loss/exportGET /reports/inventory/exportGET /reports/cash-flow/exportGET /reports/dashboard/top-servicesGET /reports/loan-packPOST /reports/loan-packPOST /reports/loan-pack/{reference}/checkoutPOST /reports/loan-pack/payment/verifyGET /reports/loan-pack/{reference}/downloadPartner
Partner integration endpoints — merchant management, aggregated analytics, and white-label configuration. Requires partner API key.
GET /partner/merchantsGET /partner/merchants/{id}GET /partner/analyticsPUT /partner/brandingNotifications
Notification delivery (SMS and WhatsApp) and the business owner’s preferences for email, SMS and WhatsApp notifications. The preferences endpoints are owner only; push is coming soon.
POST /notifications/smsPOST /notifications/whatsappGET /notifications/preferencesPUT /notifications/preferences| Group | Auth Required | Notes |
|---|---|---|
| Auth | No | Public endpoints for registration and login |
| Business | Yes | Bearer JWT — scoped to authenticated user’s business |
| Products | Yes | Bearer JWT — scoped to authenticated user’s business |
| Sales | Yes | Bearer JWT — scoped to authenticated user’s business |
| Customers | Yes | Bearer JWT — scoped to authenticated user’s business |
| Credit | Yes | Bearer JWT — scoped to authenticated user’s business |
| Expenses | Yes | Bearer JWT — scoped to authenticated user’s business |
| Reports | Yes | Bearer JWT — scoped to authenticated user’s business |
| Partner | Yes | Partner API key — scoped to partner’s merchant network |
| Notifications | Yes | Bearer JWT — scoped to authenticated user’s business |
Some endpoints and actions depend on the business’s subscription plan. When a caller’s plan does not include a feature or has reached a limit, the API responds with 402 Payment Required (rather than 403), carrying a machine-readable error code that identifies the specific gate. Branch on the error code, not just the status:
| Endpoint / action | Error code | Gate |
|---|---|---|
GET /reports/dashboard/top-services | FEATURE_NOT_AVAILABLE | Business and Pro plans only |
GET /reports/loan-pack/{reference}/download | LOAN_PACK_PAYMENT_REQUIRED | On Free/Starter, requires a completed one-time payment for that pack |
POST /sales | PLAN_LIMIT_EXCEEDED | Free plan is capped at 50 sales per month |
POST /products, PUT /products/{id} with wholesale_price or clear_wholesale_price | FEATURE_NOT_AVAILABLE | Wholesale prices are on Starter, Business and Pro. The response names the feature as wholesale_pricing |
Clients should treat a 402 as a prompt to upgrade the plan (or complete a one-time purchase), not as an authentication failure. See Plans and Billing for the merchant-facing view.
A product can carry an optional wholesale_price beside its selling_price.
wholesale_price holds an amount only when the business’s plan includes wholesale prices and the product has one. Otherwise it is null.wholesale_price must be greater than 0, have at most two decimal places, and be lower than the selling price. To remove one, send "clear_wholesale_price": true on PUT /products/{id}: a missing wholesale_price means “leave it as it is”, as it does for every other field. Sending both in one request is a 400.price_kind: RETAIL, WHOLESALE or OTHER. The server works it out from the unit_price you send when the sale is recorded, so there is nothing to send. It is null for a custom line, for a sale converted from an invoice, and for every sale recorded before the field existed. Each sale in GET /sales carries has_wholesale_line.Most list endpoints support these parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
cursor | string | — | Pagination cursor from previous response |
limit | integer | 20 | Items per page (max 100) |
search | string | — | Full-text search across relevant fields |
sort_by | string | created_at | Field to sort by |
sort_dir | string | desc | Sort direction (asc or desc) |
start_date | string | — | First day to include, YYYY-MM-DD, an Africa/Lagos calendar day |
end_date | string | — | Last day to include, YYYY-MM-DD, inclusive, same calendar |
List products with search and pagination:
curl -X GET "https://app.sabibooks.app/api/v1/products?search=milk&limit=10" \ -H "Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..." \ -H "Content-Type: application/json"{ "success": true, "message": "Products retrieved successfully", "data": { "content": [ { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "name": "Peak Milk 400g", "sku": "PMK-400", "price": 1250.00, "quantity": 48, "category": "Provisions" } ], "cursor": "eyJpZCI6ImE1YjZjN2Q4In0=", "has_next": false, "limit": 10 }, "timestamp": "2026-02-20T14:22:08Z"}