InvoicePro. API Reference
Back to App

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. 1. Sign in to your dashboard
  2. 2. Open Settings → API
  3. 3. Click Generate Token
curl -H "Authorization: Bearer <YOUR_TOKEN>" \
     -H "Accept: application/json" \
     https://your-domain.com/api/v1/invoices

Invoices

GET /invoices

Returns a paginated list of invoices.

Query parameters

ParamTypeDescription
statusstringdraft, sent, paid, overdue, void
searchstringSearch invoice number or customer
date_fromdateYYYY-MM-DD
date_todateYYYY-MM-DD
pageint20 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 }
}
POST /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
    }
  ]
}
Required: customer_id, items (min 1). Tax rates: 0 or 16. Status: draft (default) or sent.
GET/invoices/{id}

Retrieve a single invoice with customer and line items.

PUT/invoices/{id}

Update an existing invoice. Same body as create.

DEL/invoices/{id}

Delete an invoice. Returns 204 No Content.

POST /invoices/{id}/send

Mark a draft invoice as sent. Returns the updated status.

POST /invoices/{id}/submit-etims

Submit an invoice to KRA via the eTIMS system. Requires eTIMS enabled and a DigiTax API key configured.

Your customer must have a KRA PIN. Items should be pre-registered with eTIMS.

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

GET/customers

List all customers. Supports ?search=.

POST/customers

Create a customer.

{
  "name": "Jane Kamau",
  "email": "jane@example.co.ke",
  "phone": "+254 712 345 678",
  "kra_pin": "A123456789X"
}

Service Catalog

GET/items

List active catalog items. Supports ?search=.

POST/items
{
  "name": "Web Design Package",
  "description": "5-page responsive site",
  "unit": "session",
  "unit_price": 25000,
  "default_tax_rate": 16
}

Quotes

POST/quotes

Create a quote. Same structure as invoices but with expires_at instead of due_date.

POST/quotes/{id}/convert-to-invoice

Convert 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.

200OK — request succeeded
201Created — resource saved
401Unauthorized — bad/missing token
403Forbidden — no API access on plan
404Not Found — doesn't exist
422Unprocessable — validation failed
429Rate Limited — slow down
500Server Error — try again later

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.

/api/v1/
Presets: