canonical: https://jentic.com/apis/lakpura.com/lakpura

# Lakpura® API

The Lakpura® API backs the Lakpura staff mobile app on Android and iOS, letting signed-in staff look up customers, list the jobs attached to them, and move each job through its open, in_progress, completed, or cancelled status. Staff read their own notifications, while administrators create staff accounts, see the total user count, and broadcast a notification with a subject and message to every active user. Sessions use a JWT bearer token from the login endpoint that expires after an hour with no refresh token.

## For AI agents

Look up Lakpura customers and their jobs, update a job's status, read staff notifications, and, with an admin account, create staff users or broadcast a notification.

## Scope

Does not handle payments, bookings checkout, product catalogs, or creating new jobs. Use for staff lookups of Lakpura customers and jobs, job status updates, and staff notifications only.

## Capabilities

- Search customers by name or phone through the search query parameter and read a customer's name, phone, email, and address
- List jobs, optionally filtered by customer_id, and read a job's title, status, scheduled_date, and notes
- Move a job to open, in_progress, completed, or cancelled with a single status update
- Read the signed-in staff member's notifications with subject, message, and sent_at
- Broadcast a notification with a subject and message to all active users (admin only)
- Create a staff account with email, password, full_name, and an optional is_admin flag (admin only)

## Use cases

### Job Status Updates from the Field

Staff handling customer jobs keep their status current without opening the app. The agent finds the customer with the search filter, lists that customer's jobs by customer_id, reads the job's scheduled_date and notes, and moves the job to in_progress or completed with the status update. The status field accepts open, in_progress, completed, or cancelled.

Example prompt: Call GET /customers with search 'Nimal Silva', then GET /jobs with that customer_id, then PATCH `/jobs/{id}` with status 'completed' for the job scheduled today

### Customer Lookup Before a Call

Before contacting a customer, an assistant agent pulls the customer record with phone, email, and address and lists the jobs linked to that customer, so the staff member sees every open job and its notes in one summary.

Example prompt: Call GET `/customers/{id}` for customer '123', then GET /jobs with customer_id '123' and summarise the open jobs and their notes

### Staff Broadcasts and Onboarding

An administrator account can broadcast a notification with a subject and message to every active user, and create new staff accounts because self-registration is disabled. The user count endpoint gives administrators the total number of registered users.

Example prompt: With an admin token, call POST `/users/create` with email 'new.staff@lakpura.com', password, and full_name 'Kamal Perera', then POST `/notifications/send` with subject 'Welcome' and a message to all active users

### AI Agent Staff Assistant via Jentic

An AI assistant works the Lakpura API through Jentic without holding a staff password or JWT in its context. It searches by intent, receives the job or customer operation with its input schema, and executes with the bearer token injected at run time, so updating a job becomes one step in a larger operations routine.

Example prompt: Search Jentic for 'update a Lakpura job status', load the PATCH `/jobs/{id}` schema, and execute it with the job id and status 'in_progress'

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/auth/login` | Log in and obtain a JWT |
| GET | `/customers` | List customers |
| GET | `/customers/{id}` | Get a customer |
| GET | `/jobs` | List jobs |
| PATCH | `/jobs/{id}` | Update a job's status |
| GET | `/notifications` | List your notifications |
| POST | `/notifications/send` | Broadcast a notification |

## Key resources

- **Jobs** — List jobs by customer, read a job, and update its status
- **Customers** — Search customers and read a customer's contact details
- **Notifications** — Read your notifications and, as an admin, broadcast one to all active users
- **Users** — Create staff accounts and read the total user count (admin only)
- **Auth** — Log in for a JWT and log out

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 46 / 100
- **Maturity:** Foundational
- **Dimensions:**
  - Foundational Compliance: 71 / 100
  - Developer Experience & Jentic Compatibility: 70 / 100
  - AI-Readiness & Agent Experience: 21 / 100
  - Agent Usability: 94 / 100
  - Security: 75 / 100
  - AI Discoverability: 61 / 100
- **View full report:** https://jentic.com/apis/lakpura.com/lakpura/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring Lakpura by hand means logging in with a staff email and password, holding a short-lived JWT with no refresh token, and logging in again on every 401. Through Jentic you install once, import Lakpura from the API Directory, store the credential once, and your agent calls it.
- **Permission scoping:** Lakpura puts the job id in the URL path (`/jobs/{id}`), so a rule can pin your agent to one job and the operations you pick. You choose that set, so admin operations like creating users or broadcasting notifications are not included unless you add them.
- **Credential handling:** Your Lakpura credential is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'update a job status' or 'find a customer', and Jentic returns the matching Lakpura operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **GestionDiag Field Service API** — Field-service back office for clients, appointments, and technicians
- **OneSignal API** — Push notifications, email, and in-app messaging
- **Intercom API** — Customer messaging and support conversations

## FAQ

### What authentication does the Lakpura® API use?

Per its OpenAPI spec, the Lakpura® API uses the bearerAuth scheme: a JWT sent as Authorization: Bearer with protected requests. You get the token from POST `/auth/login` with email and password. Tokens are stateless and expire after an hour with no refresh token, so log in again on a 401. The login and register endpoints need no token. Through Jentic the credential is stored encrypted by your own Jentic One instance and injected at execution time.

### Can I update a job's status with the Lakpura® API?

Yes. PATCH `/jobs/{id}` takes a status of open, in_progress, completed, or cancelled. To find the job, list jobs with GET /jobs, optionally filtered by customer_id, or read one with GET `/jobs/{id}` to see its title, scheduled_date, and notes.

### What are the rate limits for the Lakpura® API?

The OpenAPI spec does not specify rate limits. Check https://api.lakpura.com/openapi.yaml for the current definition or ask Lakpura for the limits on your account.

### Can I register a new account with the Lakpura® API?

No. Self-registration is disabled and POST `/auth/register` always returns 403. Accounts are staff accounts, and an administrator creates them with POST `/users/create` using email, password, and full_name, with is_admin to grant admin rights.

### How do I mark a job completed through Jentic with the Lakpura® API?

Search Jentic for 'update a Lakpura job status' and it returns the job update operation with its input schema. Execute PATCH `/jobs/{id}` with status 'completed', and the token is injected at run time. To run it on your own infrastructure, install Jentic One from its GitHub repo.

### Is there a Lakpura MCP server?

You don't need an MCP server to give your agent the Lakpura® API. Jentic connects it directly from the API Directory: import it, store your credential once, and your agent calls it. Operations are discovered by intent on demand, so no extra tool definitions are loaded into the agent's context.

### Can I limit what my agent is allowed to do with the Lakpura® API?

Yes. Allow only the customer and job reads plus PATCH on jobs, and the agent can look up customers and move jobs along while it cannot broadcast notifications or create users. For a narrower task, allow GET and PATCH on one job id only, and every call it makes is logged by your own instance.
