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.

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

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.

EndpointWhat it does
GET /v1/meWho this key acts as, which company and shops it reaches, what it may do, and when it ends.
GET /v1/organisationThe company, the shops this key reaches, and its people where the key's maker may see them.
GET /v1/shopsThe shops this key reaches, one page at a time.
POST /v1/shopsOpen a new shop in the company.
GET /v1/shops/{id}One shop.
GET /v1/shops/{id}/categoriesThe categories of one shop, each with its newest report.
POST /v1/shops/{id}/reportsUpload 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-pointsPer product: the reorder point, what to order when it is reached, and the days of stock left.
GET /v1/categories/{id}/order-listWhat to order now: every product at or under its reorder point.
GET /v1/categories/{id}/stop-stockingThe products worth no longer stocking, most money tied up first.
POST /v1/categories/{id}/recomputeWork a category's summary figures out again and answer with them.
GET /v1/shops/{id}/suppliersWho delivers to one shop, and the days a delivery takes from each.
POST /v1/shops/{id}/suppliersAdd 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}/categoriesSet which categories of its shop a supplier delivers.
POST /v1/chatAsk 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}/streamFollow one run live, as server-sent events.
POST /v1/agent-sign-in-linksA 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.