Listmancer

Listmancer API

JSON over HTTPS at https://listmancer.com/api/v1. Reading is open; publishing needs a bearer token obtained with the player's ORK credentials.

Reading

GET /api/v1/lists

Search and browse. Query parameters: q (text), class (comma-separated class names), level, min_level, max_level, kind (caster | martial), ltp=1, nuntius=1, archetype, player (mundane id), kingdom (name), version=current, sort (newest, updated, popular, rated, viewed, name, level, class), page, per (max 100), exports=1 to include the mORK code and Tome text with every result.

curl 'https://listmancer.com/api/v1/lists?class=Wizard,Healer&level=6&sort=popular'

GET /api/v1/lists/{id}

One list with everything needed to import it:

{
  "ok": true,
  "list": {
    "id": 12, "name": "Fire Wiz", "class": "Wizard", "level": 6, "martial": false,
    "ltp": true, "nuntius": true, "archetype": "Warlock", "rulesVersion": "V8.08.260725",
    "outdated": false, "description": "…", "owner": {"mundaneId": 1234, "persona": "Kismet", "park": "…", "kingdom": "…"},
    "list": { "name": "…", "class": "Wizard", "level": 6, "ltp": true, "nuntius": true, "martial": false,
              "rulesVersion": "V8.08.260725",
              "purchases": [ {"name": "Fireball", "level": 4, "number": 2, "experienced": true}, … ] },
    "mork": "U2FsdGVkX1…",      // the string inside mORK's QR code: scan or import it as-is
    "tome": "|SeraSpellList|…", // Spellbound Tome share text (null for martial classes)
    "sappy": "https://mythronn.github.io/sappyspellbook/wizard/#…" // Spongey Spellbook share link (null for martial classes)
  }
}

Martial lists carry archetype and picks ({"1:1": ["Destruction Arrow", …], "ltp:0": [...]}, keyed like mORK's pick groups) instead of purchases. Fetching a list is never counted; an app reports a real import with the call below.

GET /api/v1/catalog

The rules version the server validates against, the class names and the sort keys.

Authentication

POST /api/v1/auth

Either ORK credentials or an existing ORK session token (as mORK holds). Send JSON or form fields. Client labels the session, e.g. mORK/1.2.0 (iOS).

POST /api/v1/auth
{"UserName": "kismet", "Password": "…", "Client": "mORK/1.2.0 (iOS)"}
→ {"ok": true, "token": "…listmancer bearer token…", "player": {"mundaneId": 1234, "persona": "Kismet", …}}

POST /api/v1/auth
{"OrkToken": "…the app's current ORK token…", "Client": "mORK/1.2.0 (iOS)"}
→ {"ok": true, "token": "…", "player": {…}}

Token form: Listmancer checks the token with the ORK's read-only Authorization/WhoAmI, which never rotates it, so the app keeps using its token unchanged. Listmancer only ever reads it again (the same WhoAmI check, about once an hour) and never destroys it. Older ORK deployments without WhoAmI make Listmancer fall back to Authorization/Authorize, which rotates the token; the response then carries an orkToken field with the new one, and the app must store it in place of the old token. Rule for apps: if orkToken is present, persist it; if absent, nothing changed.

The credential form instead uses one of the player's six ORK session slots, like any login, and Listmancer releases it again at logout.

The bearer token lives 30 days from last use. Send it as Authorization: Bearer …. GET /api/v1/me returns the player it belongs to.

Publishing

POST /api/v1/validate

Check a list without saving it. Body: one of mork (the QR string), tome (share text), sappy (a Spongey Spellbook share link) or list (a record in the shape above). Returns the normalized record plus warnings, or 422 with the reason.

POST /api/v1/lists (bearer token)

POST /api/v1/lists
Authorization: Bearer …
{"mork": "U2FsdGVkX1…", "name": "Fire Wiz", "description": "Burn things.", "visibility": "public"}
→ 201 {"ok": true, "warnings": [], "list": {"id": 12, "url": "https://listmancer.com/list/12", …}}

visibility is public or unlisted. The list is validated against the current rules; an illegal list is refused with 422 and the errors.

POST /api/v1/lists/{id}/imported

Tell Listmancer a list was imported into an app, once per successful import. No token. This is the only thing that counts as an app import; copies on the web site (copy buttons, text/JSON downloads) are counted separately, so an app that fetches and then reports is counted exactly once. The id is carried inside the QR payload as the L key, next to the sharing player's mundane id as M ({"I": "…", "S": […], "L": 12, "M": 43232}), so an app that scans a Listmancer QR code can report the import after a successful decode; mORK builds older than that simply ignore the key.

POST /api/v1/lists/{id}/vote (bearer token)

Body {"value": "up" | "down" | "none"}: one vote per player per list; sending the same value again withdraws it, the other value switches it, none clears it. Owners cannot vote on their own lists (403). Returns {"ok": true, "up": n, "down": n, "score": wilson, "mine": 1|-1|0}. Lists carry votes.up, votes.down and votes.score (a Wilson lower bound, which the rated sort uses).

DELETE /api/v1/lists/{id} (bearer token, owner only)

Also accepted as POST /api/v1/lists/{id}/delete for clients that cannot send DELETE.

Errors

Every response has ok. Failures carry error (text) and use 401 (no/invalid token or bad login), 403 (not the owner), 404, 422 (list not legal) or 502 (the ORK could not be reached).