API Reference
Build invoicing into your own systems with our REST API. All requests use JSON, authenticate with Bearer tokens, and return standard HTTP status codes.
https://your-domain.com/api/v1
Authentication
Include your API token as a Bearer token in the Authorization header. You must be on a plan that includes API access.
Getting a token
- 1. Sign in to your dashboard
- 2. Open Settings → API
- 3. Click Generate Token
curl -H "Authorization: Bearer <YOUR_TOKEN>" \
-H "Accept: application/json" \
https://your-domain.com/api/v1/invoices
Invoices
/invoices
Returns a paginated list of invoices.
Query parameters
| Param | Type | Description |
|---|---|---|
| status | string | draft, sent, paid, overdue, void |
| search | string | Search invoice number or customer |
| date_from | date | YYYY-MM-DD |
| date_to | date | YYYY-MM-DD |
| page | int | 20 per page |
Response
{
"data": [{
"id": 6,
"invoice_number": "INV-000001",
"status": "sent",
"issue_date": "2026-08-07",
"due_date": "2026-09-06",
"subtotal": "10000.00",
"tax_total": "1520.00",
"total": "11020.00",
"customer": {
"name": "Alice Muthoni",
"email": "alice@example.co.ke"
},
"items": [{
"description": "Web Design",
"qty": 2,
"rate": "5000.00",
"tax_rate": "16.00",
"amount": "11600.00"
}]
}],
"meta": { "current_page": 1, "total": 5 }
}/invoices
Create a new invoice. Totals are calculated automatically.
Request body
{
"customer_id": 2,
"issue_date": "2026-08-07",
"due_date": "2026-09-06",
"status": "draft",
"items": [
{
"description": "Website Design",
"qty": 1,
"rate": 45000,
"tax_rate": 16
}
]
}/invoices/{id}Retrieve a single invoice with customer and line items.
/invoices/{id}Update an existing invoice. Same body as create.
/invoices/{id}Delete an invoice. Returns 204 No Content.
/invoices/{id}/send
Mark a draft invoice as sent. Returns the updated status.
/invoices/{id}/submit-etims
Submit an invoice to KRA via the eTIMS system. Requires eTIMS enabled and a DigiTax API key configured.
Response (200)
{
"success": true,
"sale_id": "PFHol0bfkZ",
"qr_url": "https://receipt.dg.tax/r/biz_xxx/INV-000001",
"message": "Invoice queued for eTIMS submission."
}Customers
/customersList all customers. Supports ?search=.
/customersCreate a customer.
{
"name": "Jane Kamau",
"email": "jane@example.co.ke",
"phone": "+254 712 345 678",
"kra_pin": "A123456789X"
}Service Catalog
/itemsList active catalog items. Supports ?search=.
/items{
"name": "Web Design Package",
"description": "5-page responsive site",
"unit": "session",
"unit_price": 25000,
"default_tax_rate": 16
}Quotes
/quotesCreate a quote. Same structure as invoices but with expires_at instead of due_date.
/quotes/{id}/convert-to-invoiceConvert a quote to an invoice in one call. Marks the quote as accepted.
{
"message": "Quote QUO-000003 converted to invoice INV-000008",
"invoice_id": 8,
"invoice_number": "INV-000008"
}Errors
The API uses conventional HTTP status codes.
Validation error format
{
"message": "The customer_id field is required.",
"errors": {
"customer_id": ["The customer_id field is required."]
}
}Rate Limits
1,000
requests per hour
60
requests per minute
30s
request timeout
Need higher limits? Contact us about an enterprise plan.
API Sandbox
Test API calls against your own business data. Enter your token, pick an endpoint, and see real responses.