Base URL
All API endpoints are prefixed with/api/v1.
Interactive docs
Swagger UI is available at/api/documentation on any running instance. The underlying OpenAPI specification is served from that same path as JSON.
Request format
All requests and responses use JSON. SetContent-Type: application/json and Accept: application/json on every request.
Authentication
The API uses Laravel Sanctum bearer tokens. Pass your token in theAuthorization header:
Versioning
The current stable version is v1. The version prefix is part of every URL (/api/v1/...). Breaking changes will be released under a new version prefix.
Available endpoint groups
Auth
Register, OTP flow, social login, and current user.
Products
Public product catalog with tenant scoping and caching.
Orders
Create and manage tenant orders with status transitions.
Coupons & Checkout
Verify coupon codes, list discounts, and manage cart/inventory during checkout.
Analytics
Track page views, interactions, and conversion events.
AI
AI-powered business profile generation and optimization.
Notifications
List, count, and mark notifications; manage push subscriptions.
Reports
Generate and download sales, inventory, and kitchen reports.
Additional endpoints
The following endpoints are also available inapi/v1 but are documented inline rather than having dedicated pages:
Tenant settings
| Method | Path | Auth | Description |
|---|---|---|---|
GET | /api/v1/settings | auth:sanctum, tenant.ownership | Retrieve tenant branding and configuration |
POST | /api/v1/settings/update | auth:sanctum, tenant.ownership | Update tenant branding (name, logo, whatsapp, schedule) |
api.tenant.settings.update
The GET /api/v1/settings response is shaped by TenantSettingsResource and includes the tenant’s name, slug, logo URL, WhatsApp number, opening hours, and plan status. The POST endpoint accepts multipart form data when uploading a logo file.
Error format
All error responses follow a consistent JSON structure:| Status | Meaning |
|---|---|
200 | Success |
201 | Created |
202 | Accepted (async job dispatched) |
204 | No content |
400 | Bad request |
401 | Unauthenticated |
403 | Forbidden |
404 | Not found |
422 | Validation error |
429 | Rate limit exceeded |
500 | Server error |