Developers
Panlytics developers
Give a program or an AI agent a key, and let it read your shops and work out what to order, as you and never more than you.
- QuickstartSwitch developer mode on, make a key and make your first call in five minutes.
- Connect an AI agentPaste one prompt into Claude Code, Claude, ChatGPT or Cursor.
- API referenceEvery endpoint, its request, its answer and its errors.
- Keys and rotationHow a key acts as you, how long it lives and what ends it.
- What an AI can never doThe fence around every key, whatever its maker may do.
- How Panlytics is organisedCompanies, shops, categories, products and suppliers.
What the API is for
Panlytics reads the sales report your shop already exports and tells you what to order, how many and when. The API lets a program or an AI agent do the same work on your behalf. It acts as the person who made its key, inside that person's role, and it can never do the things that belong to people: it cannot manage people or roles, read the audit log, or touch billing and security.
Keys are short lived on purpose. A key ends 1 to 5 hours after it is made, and the company's CEO chooses how long. When a key ends, you make a new one in a few seconds.
Start here
- Introduction: what a key is, what it can reach, and what is live today.
- Quickstart: switch developer mode on, make a key and make your first call in five minutes.
- Connect an AI agent: paste one prompt into Claude Code, Claude, ChatGPT or Cursor.
- What an AI can never do: the fence around every key.
What answers today
The keys, the Developer settings pages and every endpoint below answer now: shops, categories, reports, reorder points (the level that triggers a new order), suppliers, chat, and the link that lets an AI sign in to the app itself when the CEO switches it on.
| Endpoint | What it does |
|---|---|
GET /v1/me | Who this key acts as, which company and shops it reaches, what it may do, and when it ends. |
GET /v1/organisation | The company, the shops this key reaches, and its people where the key's maker may see them. |
GET /v1/shops | The shops this key reaches, one page at a time. |
POST /v1/shops | Open a new shop in the company. |
GET /v1/shops/{id} | One shop. |
GET /v1/shops/{id}/categories | The categories of one shop, each with its newest report. |
POST /v1/shops/{id}/reports | Upload a report: the first of a new category, or the next report of one. |
GET /v1/categories/{id} | One category, with the settings its figures are worked out with. |
PATCH /v1/categories/{id} | Rename a category, change the settings its figures use, or both. |
GET /v1/categories/{id}/reorder-points | Per product: the reorder point, what to order when it is reached, and the days of stock left. |
GET /v1/categories/{id}/order-list | What to order now: every product at or under its reorder point. |
GET /v1/categories/{id}/stop-stocking | The products worth no longer stocking, most money tied up first. |
POST /v1/categories/{id}/recompute | Work a category's summary figures out again and answer with them. |
GET /v1/shops/{id}/suppliers | Who delivers to one shop, and the days a delivery takes from each. |
POST /v1/shops/{id}/suppliers | Add a supplier to one shop. |
PATCH /v1/suppliers/{id} | Rename a supplier or change the days a delivery takes from it. |
DELETE /v1/suppliers/{id} | Remove a supplier from its shop. |
PUT /v1/suppliers/{id}/categories | Set which categories of its shop a supplier delivers. |
POST /v1/chat | Ask Panlytics a question about a shop. The answer comes back as a run. |
GET /v1/runs/{id} | One run: its state, its answer, and the proposals that wait for a person. |
GET /v1/runs/{id}/stream | Follow one run live, as server-sent events. |
POST /v1/agent-sign-in-links | A one-time link that signs you in to the app as the person who made the key, in a browser profile nobody else is signed in to. |
For programs and agents
Every page has a markdown twin at the same address with .md on the end. The whole set is listed at /developers/llms.txt, every page is in one file at /developers/llms-full.txt, and the API is described as OpenAPI 3.1 at /developers/openapi.json.