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
Free10 req/min20 invoices
Starter60 req/min500 invoices
Business120 req/min5,000 invoices

Endpoints

GET /api/me

Get your profile and usage stats.

curl https://invoiskita.com/api/me -u "USER_SECRET:SECRET_KEY"
GET /api/invoices

List all invoices (paginated). Use ?per_page=50 to control page size.

GET /api/invoices/{id}

Get invoice details with line items.

POST /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).

POST /api/invoices/{id}/submit

Submit a Draft invoice to LHDN for validation.

POST /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

GET /api/customers

List all saved customers.

POST /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"
  }'
GET /api/customers/{id}

Get customer details.

PUT /api/customers/{id}

Update customer fields.

DELETE /api/customers/{id}

Delete a customer.

Error Responses

Code Meaning
400Bad request — missing or invalid fields
401Unauthorized — invalid or missing token
403Forbidden — no tenant / no LHDN connection
404Resource not found
429Invoice limit or rate limit exceeded