v2.1 StableLast updated: May 2026

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/api

The 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>
Security Warning: Never expose your service role keys or tokens in client-side code. Tokens expire every hour and must be refreshed via the Supabase client.

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.

RoleScope
SuperAdminFull system access (Configuration, Users, Finance)
ProductionManagerProduction, Inventory, and Recipe management
SalesOfficerSales, Invoicing, and Customer management

Production API

POST/api/production
Batches

Records a standard production batch. Deducts materials and adds finished goods.

Request Body

{
  "productId": "uuid",
  "batches": 2,
  "wasteUnits": 5,
  "productionDate": "2026-05-04"
}
POST/api/production/daily-reset
Operations

Runs the carry-over logic. Non-carryover products are marked as spoilage at EOD.

AI Intelligence

Proprietary Gemini-powered endpoints for business intelligence.

GET/api/ai/demand-forecast
Forecast

Returns 7-day demand predictions based on 90 days of production history.

GET/api/ai/business-plan
Financials

Generates a bank-ready 9-section financial audit and 12-month growth projection.

ZAAGOB ERP API Reference v2.1 • Optimized for AEO • © 2026 ZAAGOB Digital