Integration API
Bill from your own systems
Connect a POS, e-commerce checkout, or custom app to Simple Bills. Create GST invoices, record payments, download PDFs, and keep books in sync — without retyping into the web UI.
https://api.simplebills.in/api ·
Auth: X-Api-Key: ensk_live_… on every integration request ·
Rate limit: 60 requests/minute per key (default)
What you can do
- Create sale invoices with customers, line items, extra charges, and inline payments
- Fetch, list, and download invoice PDFs
- Record and void payments on existing invoices
- Record refunds on credit notes (sale returns)
- List company bank accounts for bank-mode payments
Customers are matched by phone within your company. New customers and line-item products are created automatically when needed.
Quick start
1. Generate an API key
Sign in to Simple Bills as a company admin, then generate a key from the app (or call the key-management endpoint with your Sanctum token and X-Company-Id). Copy data.api_key immediately — it is shown only once.
2. Create an invoice
curl -X POST https://api.simplebills.in/api/integration/v1/invoices \
-H "X-Api-Key: ensk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"invoice_date": "2026-07-03",
"customer": { "name": "Rahul Sharma", "phone": "9876543210" },
"lines": [
{ "name": "Service fee", "quantity": 1, "unit_price": 1000, "gst_rate": 18 }
],
"payments": [
{ "paid_amount": 1180, "payment_date": "2026-07-03", "payment_mode": "cash" }
],
"external_reference": "order-9912"
}'
3. Fetch or download
# Get invoice JSON
curl https://api.simplebills.in/api/integration/v1/invoices/101 \
-H "X-Api-Key: ensk_live_YOUR_KEY"
# Download PDF
curl -o invoice-101.pdf \
https://api.simplebills.in/api/integration/v1/invoices/101/download \
-H "X-Api-Key: ensk_live_YOUR_KEY"
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /integration/v1/bank-accounts | List payable bank accounts |
| POST | /integration/v1/invoices | Create sale invoice |
| GET | /integration/v1/invoices/{id} | Fetch invoice |
| GET | /integration/v1/invoices/{id}/download | Download invoice PDF |
| GET | /integration/v1/invoices | List or search invoices |
| POST | /integration/v1/invoices/{id}/payments | Record payment |
| POST | /integration/v1/invoices/{id}/void | Void invoice |
| POST | /integration/v1/payments/{id}/void | Void payment |
| GET | /integration/v1/credit-notes/{id}/refunds | Refund summary |
| POST | /integration/v1/credit-notes/{id}/refunds | Record refund |
Company admins manage keys via /api/integration-key/generate, index, and revoke (Sanctum auth). See the interactive docs for request/response schemas.
Authentication
- Integration calls —
X-Api-Key: ensk_live_…orAuthorization: Bearer ensk_live_… - Key management — Sanctum user token +
X-Company-Idheader
No X-Financial-Year-Id header is required — the active financial year for your company is selected automatically.
Response format
All responses use a standard envelope:
{
"status": true,
"message": null,
"data": {},
"meta": null,
"errors": null,
"code": null
}
OpenAPI documentation
Full request/response schemas, examples, and error codes are available as OpenAPI 3.0:
- Swagger UI — try endpoints in the browser
- openapi.yaml — machine-readable spec for code generators
Interactive docs must be enabled on the API server (ENSO_OPENAPI_ENABLED=true in production).
Common error codes
INVALID_API_KEY(401) — missing, invalid, or revoked keyACCOUNTING_NOT_CONFIGURED(422) — company setup incompleteINSUFFICIENT_STOCK(422) — tracked product without stockINVOICE_NOT_FOUND/PAYMENT_NOT_FOUND(404)
Building an integration?
We can help you map fields from your POS or platform. Contact us or call +91 70961 20201.