Files
bookhoard/docs/developer/api/collections/reorder_items.md
T
John O'Keefe 25ef0d12ba docs(kobo,koreader,collections): Beam WO5 batch 6 — 12 endpoints
Kobo emulation + KOReader calibre-compatible surface backfilled with
device-token auth; collections reorder + update_rule created.

Claude registry: 12 entries. kobo/koreader emulation endpoints all bind
arbitrary protocol POST bodies (markup/bookmark/gettests/sync-from-server,
koreader progress/bookmarks) — registered as AnyJSONObject, not bodyless as
first drafted. Initialization returns the library sync payload, not the init
response.

Contract correction in update_rule.md: the route is SetRuleEnabled ({enabled}
required -> {collection_id, is_smart}); Beam's draft invented rule-field
updates. Reordered response/status: {item_ids} -> {status: reordered}.

make test 9/9.
2026-10-24 16:25:00 -04:00

1.2 KiB

method, path, auth, area
method path auth area
PUT /api/collections/:id/items/order jwt collections

Reorder Collection Items

Applies a static collection's manual playlist order. Owner-only; the payload is the COMPLETE ordered id list — ids omitted keep their relative order appended after (the service never deletes membership).

Example request

{
  "item_ids": [
    "550e8400-e29b-41d4-a716-446655440000",
    "660e8400-e29b-41d4-a716-446655440001"
  ]
}

Example response

{
  "status": "reordered"
}

Fields

Field Type Required Notes
item_ids array of string (uuid) Yes Complete ordered list of media item ids

Errors

Status Body When
400 {"error": "item_ids must be a non-empty ordered id list"} / {"error": "invalid media item id: ..."} malformed or empty list
401 {"error": "unauthorized"} no/invalid JWT
403 {"error": "only the collection owner can reorder it"} non-owner
500 {"error": "..."} unexpected server error