EVoShifts PL

Authentication and conventions

API keys, errors, rate limits, pagination, dates, time zones, money and the versioning policy of the EVoShifts API.

Base address

https://evoshift.app/api/v1

Only GET is accepted; any other method is answered 405 method_not_allowed with Allow: GET. The REST API never changes data, whatever the key's levels: write levels are only for AI assistants through the MCP server. Answers are JSON (application/json; charset=utf-8) and are never cached (Cache-Control: private, no-store). The API sends no CORS headers: call it from a server, an automation service or a script, never from a web page in a visitor's browser (the key would be visible to them).

API keys

A key looks like evs_ followed by 32 letters, digits, - or _, for example evs_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. The owner creates it in the app (how). Send it in a header with every request:

Authorization: Bearer evs_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

X-Api-Key: evs_... works too, for tools that cannot set Authorization. Never put the key in the address: addresses end up in logs.

export EVOSHIFTS_API_KEY="evs_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
curl -s https://evoshift.app/api/v1/me -H "Authorization: Bearer $EVOSHIFTS_API_KEY"

GET /v1/me tells you the key's name, levels, expiry and workplaces; GET /v1/workplaces lists the workplaces with their time zone and currency. Start with these two.

Check a key

Four requests show whether a key works and what it may do (about 4 of the minute's 60):

# 1. The key: name, levels, expiry; X-RateLimit-Remaining says what is left this minute
curl -si https://evoshift.app/api/v1/me -H "Authorization: Bearer $EVOSHIFTS_API_KEY"
# 2. Its workplaces, with time zone and currency
curl -s https://evoshift.app/api/v1/workplaces -H "Authorization: Bearer $EVOSHIFTS_API_KEY"
# 3. A workplace it does not have: 404 not_found
curl -s https://evoshift.app/api/v1/workplaces/nope/shifts -H "Authorization: Bearer $EVOSHIFTS_API_KEY"
# 4. With AI assistants (MCP) switched on: the MCP handshake (403 missing_scope without it)
curl -s https://evoshift.app/mcp -H "Authorization: Bearer $EVOSHIFTS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2025-06-18", "capabilities": {}, "clientInfo": {"name": "check", "version": "1"}}}'

Keep the key out of your shell history: read it with read -rs EVOSHIFTS_API_KEY and export EVOSHIFTS_API_KEY, and unset it afterwards. A short-lived key (7 days) is enough for a test.

Errors

Every error has the same shape. Branch on code, which is stable; message is for people and may change.

{"error": {"code": "missing_scope", "message": "This key needs read access to roster."}}
StatusCodeMeaningWhat to do
400invalid_rangefrom or to missing, not a real date, reversed, or more than 92 days apartFix the parameters
400invalid_monthmonth missing or not YYYY-MMFix the parameter
400invalid_limitlimit not a whole number from 1 to 500Fix the parameter
400invalid_cursorcursor not one the API gaveStart from the first page
401unauthenticatedNo key sentSend the Authorization header
401invalid_keyMalformed or unknown key, or one replaced by a regenerated secretAsk the owner for the current key
401revoked_keyThe owner revoked the keyAsk the owner for a new key
401expired_keyThe key's expiry date has passedAsk the owner to regenerate it
401key_outdatedA key without access levelsAsk the owner for a new key
402plan_inactiveA workplace of the key has no running trial or Premium planWait until the owner's plan is active; the key is kept
403missing_scopeThe key has no read access to any resource that opens this routeAsk the owner for the level
404not_foundUnknown route or version, or a workplace that is not the key's (or no longer its owner's)Check the path and GET /workplaces
405method_not_allowedNot a GETUse GET
429rate_limitedMore than 60 requests this minuteWait Retry-After seconds
500internalSomething went wrong on our sideRetry later with back-off

Do not retry 400, 401, 402, 403 and 404 unchanged: they will fail again. Retry 429 after Retry-After, and 500 and network errors with exponential back-off.

Rate limits

Each key may make 60 requests per minute (fixed one-minute windows that start with the window's first request). The MCP server counts against the same limit when an assistant uses the key. Every answer after the key was checked carries the limit and what is left of it, refusals (400, 402, 403, 404) included:

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 57

Over the limit you get 429 rate_limited with Retry-After: 60 and X-RateLimit-Remaining: 0. Answers given before the key is checked have no such headers and do not count: 401, 405 and an unknown API version (404). The MCP server answers without these headers. To stay well within it, fetch the largest pages you need (limit=500), sync on a schedule (once an hour is plenty for most reports) and use webhooks to learn when something changed instead of polling.

Pagination

Lists answer:

{"data": [ ... ], "nextCursor": "eyJkIjoiMjAyNi0wMy0wMiIsImlkIjoic2hpZnRfMTI0In0"}

limit is 1 to 500 items per page (default 100). When nextCursor is not null, ask again with the same parameters plus cursor=<nextCursor>; on the last page it is null. Cursors are opaque: do not build or change them. GET /workplaces is not paged.

JavaScript (Node.js 18 or newer):

const BASE = "https://evoshift.app/api/v1";
const headers = { Authorization: `Bearer ${process.env.EVOSHIFTS_API_KEY}` };

async function getAll(path, params) {
  const items = [];
  let cursor = null;
  do {
    const query = new URLSearchParams({ ...params, limit: "500", ...(cursor ? { cursor } : {}) });
    const res = await fetch(`${BASE}${path}?${query}`, { headers });
    if (res.status === 429) {
      await new Promise((r) => setTimeout(r, Number(res.headers.get("Retry-After") || 60) * 1000));
      continue;
    }
    const body = await res.json();
    if (!res.ok) throw new Error(`${res.status} ${body.error.code}: ${body.error.message}`);
    items.push(...body.data);
    cursor = body.nextCursor;
  } while (cursor);
  return items;
}

const shifts = await getAll("/workplaces/wp_gdansk/shifts", { from: "2026-03-01", to: "2026-03-31" });

Python (with requests):

import os, time, requests

BASE = "https://evoshift.app/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['EVOSHIFTS_API_KEY']}"}

def get_all(path, **params):
    items, cursor = [], None
    while True:
        query = {**params, "limit": 500, **({"cursor": cursor} if cursor else {})}
        res = requests.get(BASE + path, headers=HEADERS, params=query, timeout=30)
        if res.status_code == 429:
            time.sleep(int(res.headers.get("Retry-After", "60")))
            continue
        body = res.json()
        if not res.ok:
            raise RuntimeError(f"{res.status_code} {body['error']['code']}: {body['error']['message']}")
        items += body["data"]
        cursor = body["nextCursor"]
        if not cursor:
            return items

shifts = get_all("/workplaces/wp_gdansk/shifts", **{"from": "2026-03-01", "to": "2026-03-31"})

Dates and time zones

  • from and to are calendar days, YYYY-MM-DD, both included, at most 92 days in one request (for a longer period, ask for it in parts). month is YYYY-MM.
  • Days are the workplace's own calendar days.
  • Shift times are local wall times of the workplace, without an offset: "2026-03-02T08:00:00". Read the workplace's timezone (an IANA name such as Europe/Warsaw) from GET /workplaces to turn them into instants. A shift belongs to its date and may end the next day.
  • Worked-time spans are HH:mm with endsNextDay; partial-day absences have startTime and endTime as HH:mm.
  • Other timestamps, such as a key's expiresAt and a webhook's createdAt, are UTC, ISO 8601 (2026-12-31T23:59:59.999Z).

Money

Amounts are JSON numbers in the workplace's currency (currency in GET /workplaces, an ISO 4217 code such as PLN or EUR). Amounts are not rounded for you: round to the currency's minor unit when you show or book them, and use a decimal type rather than binary floating point when you add many of them up. Never add amounts of workplaces with different currencies. A missing value is null (no takings entered yet), not 0. Labour % is a percentage (9.5 means 9.5%).

IDs

Ids (wp_gdansk, user_123, shift_123) are opaque strings: store them as they are, compare them exactly and do not parse them. The same person has the same id at every workplace and in every endpoint, so join people, shifts, worked time and absences on it. rosterId names a workplace's month and is only for grouping.

Versioning and stability

The version is in the path (/v1). Within v1 we only make additive changes: new endpoints, new optional parameters, new fields in answers and webhook payloads, new webhook events (sent only to endpoints that subscribe to them), new error codes for new situations and new values of documented lists (source, permission). Write clients that ignore fields they do not know.

A change that could break a client (removing or renaming a field, changing a type or a meaning) is announced in the Changelog and to the owners of the businesses that use keys or webhooks before it goes live. The machine-readable description of v1 is openapi.yaml (OpenAPI 3.0).

Questions about the API? Write to us with the endpoint, the time and the error code; never the key itself.

Contact us