API Documentation
Integrate your systems with our e-invoice API.
Authentication
All API requests require a Bearer token. Generate one from Settings → API Access or via the login endpoint.
All API requests use HTTP Basic Auth with your credential pair from Settings → API Access.
# Replace USER_SECRET and SECRET_KEY with your values
curl https://invoiskita.com/api/me \ -u "USER_SECRET:SECRET_KEY"
# Or use Bearer token (just the Secret Key)
curl https://invoiskita.com/api/me \ -H "Authorization: Bearer SECRET_KEY"
Rate Limits & Plan Restrictions
| Plan | Rate Limit | Invoice Limit |
|---|---|---|
| Free | 10 req/min | 20 invoices |
| Starter | 60 req/min | 500 invoices |
| Business | 120 req/min | 5,000 invoices |
Endpoints
/api/me
Get your profile and usage stats.
curl https://invoiskita.com/api/me -u "USER_SECRET:SECRET_KEY"
/api/invoices
List all invoices (paginated). Use ?per_page=50 to control page size.
/api/invoices/{id}
Get invoice details with line items.
/api/invoices
Create a single invoice and submit to LHDN.
curl -X POST https://invoiskita.com/api/invoices \
-u "USER_SECRET:SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"internal_receipt_number": "INV-001",
"buyer_name": "Acme Sdn Bhd",
"buyer_tin": "C1234567890",
"items": [
{"description": "Consulting", "quantity": 1, "unit_price": 500}
]
}'
TIN can be blank or EI00000000010 for individuals (auto-sets NRIC).
/api/invoices/{id}/submit
Submit a Draft invoice to LHDN for validation.
/api/invoices/upload
Bulk upload invoices via CSV file.
curl -X POST https://invoiskita.com/api/invoices/upload \ -u "USER_SECRET:SECRET_KEY" \ -F "file=@invoices.csv"
CSV columns: internal_receipt_number,buyer_name,buyer_tin,total_amount
/api/customers
List all saved customers.
/api/customers
Create or update a customer (matched by TIN).
curl -X POST https://invoiskita.com/api/customers \
-u "USER_SECRET:SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Sdn Bhd",
"tin": "C1234567890",
"customer_type": "BRN",
"email": "billing@acme.com"
}'
/api/customers/{id}
Get customer details.
/api/customers/{id}
Update customer fields.
/api/customers/{id}
Delete a customer.
Error Responses
| Code | Meaning |
|---|---|
| 400 | Bad request — missing or invalid fields |
| 401 | Unauthorized — invalid or missing token |
| 403 | Forbidden — no tenant / no LHDN connection |
| 404 | Resource not found |
| 429 | Invoice limit or rate limit exceeded |