ERP API Reference
The ZAAGOB ERP API allows you to programmatically manage production, inventory, and sales. All endpoints are REST-based, accept JSON-encoded request bodies, and return JSON-encoded responses.
Base URL
https://erp.zaagob.com/apiThe API enforces strict origin whitelisting. Server-to-server integrations are recommended for security.
Authentication
ZAAGOB ERP uses Supabase Authentication. Every request must include a Bearer token in the Authorization header.
Authorization: Bearer <supabase_id_token>
Roles & Permissions
Access to specific endpoints is governed by user roles. If a user attempts to access an endpoint outside their scope, a 403 Forbidden error is returned.
| Role | Scope |
|---|---|
| SuperAdmin | Full system access (Configuration, Users, Finance) |
| ProductionManager | Production, Inventory, and Recipe management |
| SalesOfficer | Sales, Invoicing, and Customer management |
Production API
/api/productionRecords a standard production batch. Deducts materials and adds finished goods.
Request Body
{
"productId": "uuid",
"batches": 2,
"wasteUnits": 5,
"productionDate": "2026-05-04"
}/api/production/daily-resetRuns the carry-over logic. Non-carryover products are marked as spoilage at EOD.
AI Intelligence
Proprietary Gemini-powered endpoints for business intelligence.
/api/ai/demand-forecastReturns 7-day demand predictions based on 90 days of production history.
/api/ai/business-planGenerates a bank-ready 9-section financial audit and 12-month growth projection.
