Skip to content
Lunexa

Lunexa API

A complete business backend, ready to integrate.

Accounting, commerce and real estate services for your website, app or back office, with one sign-in model, documented errors and a real ledger underneath.

Sign in
POST /auth/loginClient-Id: <your client id>Client-Secret: <your client secret>User-Agent: your-app/1.0Content-Type: application/json{ "username": "user@example.com", "password": "********" }

How it works

  1. 1

    Get your API client

    We issue a Client-Id and Client-Secret for your application. Public methods need only these two headers.

  2. 2

    Sign in a user

    POST /auth/login returns an access token, bound to the User-Agent it was issued for.

    POST /auth/loginClient-Id: <your client id>Client-Secret: <your client secret>User-Agent: your-app/1.0Content-Type: application/json{ "username": "user@example.com", "password": "********" }
  3. 3

    Call the service

    Send the token as a Bearer header. The user's role decides which methods they can call.

    GET /vouchers?page=1&limit=20Authorization: Bearer <access token>User-Agent: your-app/1.0

The same rules in every service

Learn them once: every service answers the same way and lists the same way.

One response format

Every response is JSON with a success flag; data on success, an error code on failure.

An error code for each field

A validation error lists every field that failed, each with its own code. Decide by the code, not the message.

Lists, pages and filters

Every list takes page, limit, sort_by and sort_order plus its own filters, and returns a pagination object.

A request ID on every response

The X-Request-Id header names that one request, so support can find it in the logs.

Response format
{ "success": true, "data": { } }{ "success": false, "error": "SYS-100", "message": "Internal Server Error" }
A validation error
{  "success": false,  "error": "NET-111",  "message": "Validation error in parameters",  "errors": [ { "field": "name", "code": "IDT-141" } ]}

Included with every integration

Identity comes with every API: you don't build sign-in, users or permissions.

  • Sign-in with a password or a one-time code
  • Users, roles and permissions
  • API clients with secret rotation
  • Audit and usage logs
  • Error codes listed per method and per field
  • An OpenAPI 3.1 spec and a Postman collection

Documentation

Every method is documented with its parameters, validation rules, permissions and error codes, and shown in the API documentation page of your panel.

Build on Lunexa

Tell us what you are building and we'll set up an API client for your team.

Request API access