API Documentation
WAZOBIA-Books uses JWT authentication for protected routes. This page lists core REST endpoints, a quick reference table, HTTP error semantics, and links to deeper product documentation.
Base URL
https://wazobia-books-backend.vercel.app/api/Send Authorization: Bearer <access_token> on authenticated requests. Obtain tokens via login; refresh when access tokens expire.
Authentication
Protected API routes expect a valid JWT. Typical flow:
- POST
/api/accounts/login/β request access and refresh tokens using email and password. - POST
/api/token/refresh/β exchange a refresh token for a new access token. - Include header:
Authorization: Bearer <access_token>
Core endpoints (quick reference)
Summary table (same paths as below, with method-level detail in the following sections).
| Module | Endpoint | Description |
|---|---|---|
| Invoicing | /api/invoicing/invoices/ | List and create invoices |
| Customers | /api/invoicing/customers/ | List and create customers |
| Expenses | /api/expenses/expenses/ | List and create expenses |
| Reports | /api/reports/profit-loss/ | Generate P&L report (use date_from, date_to query params) |
| Reports | /api/reports/balance-sheet/ | Generate balance sheet |
| Reports | /api/reports/vat-return/ | Generate VAT return |
Authentication
/api/accounts/login/Login with email and password to get JWT access and refresh tokens.
/api/token/refresh/Refresh an expired access token.
Invoicing
/api/invoicing/invoices/List invoices for the authenticated business.
/api/invoicing/invoices/Create a new invoice with line items.
/api/invoicing/invoices/{id}/record-payment/Record payment on an invoice.
Customers and Expenses
/api/invoicing/customers/List all customers.
/api/invoicing/customers/Create a customer.
/api/expenses/expenses/List expenses.
/api/expenses/expenses/Create an expense.
Reports
/api/reports/profit-loss/?date_from=YYYY-MM-DD&date_to=YYYY-MM-DDGenerate Profit and Loss report.
/api/reports/balance-sheet/Generate Balance Sheet report.
/api/reports/vat-return/Generate VAT return report.
Error handling
Standard HTTP response codes used by the API include:
- 200 / 201Successful request
- 400Validation error
- 401Unauthorized (token missing or invalid)
- 403Forbidden (permission issue)
- 404Resource not found
- 500Server error
API support: For integration questions or to report API issues, email admin@wazobia-books.ng.
Need a full walkthrough?
The user manual includes business workflows; this page focuses on HTTP endpoints and auth.