Developer
API Reference
Every route on the v1 surface, generated from the same contracts the API validates with.
Base URL: https://api.trabalance.com/api/v1 · OpenAPI 3.1: https://api.trabalance.com/api/v1/openapi.json
ℹ️The document is the reference
These tables are a reading aid. The OpenAPI document is generated from the request contracts the boundary enforces, so it can never describe a body the API would reject. Import it into Postman, Insomnia, or your generator of choice.
Customers — scope sales_customers
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /customers | List (page, page_size, search) |
| POST | /customers | Create — name required; 409 if the email already belongs to a customer |
| GET | /customers/{id} | Detail |
| GET | /customers/{id}/statement | Statement of account (startDate, endDate) |
Vendors — scope purchases_vendors
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /vendors | List (page, page_size, search) |
| POST | /vendors | Create — name required |
| GET | /vendors/{id} | Detail |
| GET | /vendors/{id}/statement | Statement of account |
Invoices — scope sales_invoices
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /invoices | List (page, page_size, search, from, to, derived_status) |
| POST | /invoices | Create — receiver, date, items[] required; posts through the same producer as the app |
| GET | /invoices/{id} | Detail |
| GET | /invoices/{id}/pdf | The customer-facing PDF (application/pdf) |
Items — scope ops_products
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /items | List (type, status) |
| POST | /items | Create — name required; sku unique |
| GET | /items/{id} | Detail |
| PATCH | /items/{id} | Update |
| GET | /items/{id}/stock | Stock on hand by location — from the inventory producer, never recomputed |
| GET | /items/{id}/pricing | Pricing (PATCH to update) |
Receipts — scope sales_receipts
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /receipts | List (page, page_size, search, from, to) |
| POST | /receipts | Record money received against open invoices |
| GET | /receipts/{id} | Detail |
Payments — scope purchases_payments
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /payments | List (page, page_size, search, from, to) |
| POST | /payments | Record money paid against open bills |
| GET | /payments/{id} | Detail |
Bank feeds — scope finance_banking
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /bank-feeds/accounts | The business's bank and cash accounts — the ids /receipts, /payments and the line push need |
| POST | /bank-feeds/{accountId}/lines | Push statement lines for reconciliation (up to 5,000 per call) |
Webhooks — the Webhooks key option, not a data scope
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /webhooks/events | The event catalogue |
| GET | /webhooks/endpoints | This business's endpoints (the secret is never returned) |
| POST | /webhooks/endpoints | Subscribe — { url, events[] }; the signing secret is returned once |
| DELETE | /webhooks/endpoints/{id} | Unsubscribe |
| POST | /webhooks/endpoints/{id}/test | Queue a ping event |
API keys only — an OAuth token cannot reach these.
Discovery
| Method | Endpoint | Purpose |
|---|---|---|
| GET | / | Resources, scopes, limits, webhook events (no auth) |
| GET | /openapi.json | OpenAPI 3.1 (no auth) |
| GET | /llms.txt | The API described for an agent (no auth) |