Katixo/API DocumentationBeta

Errors

The Katixo ERP API wraps every response in a standard ApiResponse<T> envelope. HTTP status codes in the 2xx range indicate success, 4xx indicate a client error, and 5xx indicate a server-side issue.

Response envelope

Every response — success or failure — follows the same ApiResponse<T> record shape:

{
  "success": boolean,
  "message": "Human-readable summary",
  "data":    T | null,
  "errors":  { "field": "message", ... } | null
}

Success example

// 200 OK
{
  "success": true,
  "message": "Invoice created",
  "data": {
    "id": "inv_8f3a...",
    "invoiceNumber": "INV-2026-0042",
    "status": "DRAFT"
  },
  "errors": null
}

Error examples

400 — Validation error

{
  "success": false,
  "message": "Validation failed",
  "data": null,
  "errors": {
    "invoiceDate": "invoice date is required",
    "customerName": "must not be blank"
  }
}

401 — Missing or expired JWT

{
  "success": false,
  "message": "JWT token is missing or expired",
  "data": null,
  "errors": null
}

403 — Insufficient role

{
  "success": false,
  "message": "Access denied — ACCOUNTANT role required",
  "data": null,
  "errors": null
}

Authentication

All API requests must include a valid JWT Bearer token in the Authorization header:

Authorization: Bearer <jwt-token>

The token encodes the user's role. The following roles are supported (most to least privileged):

RoleDescription
OWNERFull access including billing and org settings.
ADMINManage users, roles, and all operational data.
ACCOUNTANTCreate and manage invoices, expenses, and journal entries.
OPERATORDay-to-day data entry and limited edits.
VIEWERRead-only access to reports and dashboards.

HTTP status codes

CodeStatusMeaning
200OKRequest succeeded.
201CreatedResource created successfully.
400Bad RequestValidation failed. Field-level details are in the errors map.
401UnauthorizedMissing or expired JWT Bearer token.
403ForbiddenAuthenticated but insufficient role for this endpoint.
404Not FoundThe requested resource does not exist.
409ConflictDuplicate resource (e.g., invoice number already exists).
429Too Many RequestsRate limit exceeded. Retry after the interval in the Retry-After header.
500Internal ErrorSomething went wrong on our end. These are rare and automatically alerted.

Rate limits

API requests are rate-limited per authenticated user:

PlanRequests / minuteBurst limit
Free6010 concurrent
Pro30030 concurrent
EnterpriseCustomCustom

Rate limit headers are included in every response:

X-RateLimit-Limit: 300
X-RateLimit-Remaining: 287
X-RateLimit-Reset: 1718100120
Retry-After: 12

When rate-limited, wait for the number of seconds specified in Retry-After before retrying. Implement exponential backoff for production integrations.