You and your company
GET/v1/me
Who this key acts as, which company and shops it reaches, what it may do, and when it ends.
What it does
The first call to make. It answers with the person who made the key, the company, the shops and categories the key reaches, the abilities it holds after the fence, and the moment it ends.
Who may call it
Any live key may call it. It reads only what the key's maker may already see about themselves.
Request
HTTP
GET https://panlytics.net/api/v1/meParameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
Authorization | header | string | Yes | Bearer, a space, then the key. |
Example request
curl https://panlytics.net/api/v1/me \
-H "Authorization: Bearer $PANLYTICS_KEY"import os
import requests
response = requests.get(
"https://panlytics.net/api/v1/me",
headers={"Authorization": f"Bearer {os.environ['PANLYTICS_KEY']}"},
timeout=60,
)
response.raise_for_status()
print(response.json())const response = await fetch("https://panlytics.net/api/v1/me", {
headers: {
Authorization: `Bearer ${process.env.PANLYTICS_KEY}`,
},
});
if (!response.ok) throw new Error(`Panlytics answered ${response.status}`);
console.log(await response.json());Response
200: The answer, as JSON.
| Field | Type | Always there | What it is |
|---|---|---|---|
user | object | Yes | The person who made the key. The key acts as them, inside the fence. |
user.id | number | Yes | The maker's id. |
user.username | string | Yes | The maker's username. |
user.name | string or null | Yes | The maker's full name, or null. |
user.email | string | Yes | The maker's email address. |
organization | object | Yes | The company the key works in. |
organization.id | number | Yes | The company's id. |
organization.name | string | No | The company's name. |
role | string or null | Yes | "CEO", or the name of the maker's role in that company. |
reach | object | Yes | Which shops and categories the key reaches. |
reach.allShops | boolean | Yes | True when the role covers every shop, including shops opened later. |
reach.shops[] | object[] | Yes | Every shop the key reaches. |
reach.shops[].id | number | Yes | The shop's id. |
reach.shops[].name | string | Yes | The shop's name. |
reach.categoryScoped | boolean | Yes | True when the role covers chosen categories of one shop rather than whole shops. |
reach.categories[] | number[] or null | Yes | The category ids a category-scoped role covers. Null otherwise. |
abilities[] | string[] | Yes | What the key may do after the fence, by id: figures, sheet, export, exceptions, agents, suppliers, brain, shops. |
fenced | boolean | Yes | Always true for a key: people, roles, the audit log and the developer settings stay out of its reach. |
key | object | Yes | The key itself. |
key.id | number | Yes | The key's own id, as the Developer pages and the audit log show it. |
key.endsAt | string (ISO 8601) | Yes | When the key stops working, in UTC. Shortening the company's period moves it sooner. |
Example response
200
{
"user": {
"id": 7,
"username": "anna",
"name": "Anna Virtanen",
"email": "anna@example.com"
},
"organization": {
"id": 3,
"name": "Example Oy"
},
"role": "Manager",
"reach": {
"allShops": false,
"shops": [
{
"id": 12,
"name": "Harbour"
}
],
"categoryScoped": false,
"categories": null
},
"abilities": [
"figures",
"sheet",
"export",
"agents"
],
"fenced": true,
"key": {
"id": 21,
"endsAt": "2026-10-25T15:00:00.000Z"
}
}Errors
A refusal is JSON with a code, a sentence in error, and a requestId when the fault is ours. Read the code, not the sentence. Every code is listed on Errors.
| Status | Code | When | What to do |
|---|---|---|---|
| 401 | api.key_missing | The call had no Authorization header. | Send the key in the Authorization header as Bearer, then call again. |
| 401 | api.key_refused | The key is wrong, revoked, past its end, or its maker or company no longer allows it (developer mode off, the maker removed or switched off, or the maker's role lost the developer ability). | Ask the person who gave you the key to make a new one. |
| 401 | api.wrong_key_kind | This key does not open these endpoints. | Use the key these endpoints were made for, or ask the person who gave you the key. |
| 403 | refused | The key's maker may not do this here: their role lacks the ability, or the shop or category is outside their reach. | Ask the CEO for a role that allows it, or call it for a shop or category the role reaches. |
| 403 | auth.not_fresh | This step needs you to prove it is you. | Confirm your password or passkey, then try again. |
| 429 | api.rate_limited | The key made more than 120 calls in this minute. Wait the seconds in Retry-After. | Wait the seconds in Retry-After, then call again. |
| 500 | server | Something failed on our side. The answer carries a requestId to quote. | Try again in a minute; if it keeps happening, report it. |
| 503 | developer.unavailable | API keys are not set up on this deployment yet. | Report it, and we will switch them on. |