Librarika Hubfor developers Test environment
Menu

Using the API

Pagination

Collections are paged in one of two ways, and each operation's reference says which.

Cursor pages (for syncing)

GET /members, GET /loans and GET /holds use a cursor, because their data changes while you read it.

GET /lms/v1/members?updated_since=2026-11-01T00:00:00Z&limit=100 HTTP/1.1
Host: api.librarika.dev.raynux.com
Authorization: Bearer $LIBRARIKA_ACCESS_TOKEN
{"items": [{"id": 1001, "member_no": "A-0001", "status": "active", "updated_at": "2026-11-02T09:30:00Z"}], "next_cursor": "eyJ2IjoxfQ"}
  • limit is 1 to 100 (default 20).
  • Pass next_cursor back as cursor, with the same filters, until next_cursor is null.
  • Rows come in a stable order (updated_at, then id), so a sync never misses one. Start a sync with updated_since and keep the highest updated_at you saw for the next run.
  • A cursor is opaque, bound to your client and to its filters, and expires after 24 hours. A changed, expired or foreign cursor is 400 invalid_cursor: start again from your last updated_since.

GET /catalog/titles, GET /me/loans and GET /me/holds use page numbers:

{"items": [], "page": 1, "limit": 20, "total": 0, "page_count": 0}
  • page starts at 1; limit is 1 to 100 (default 20).
  • A search reaches the first 1,000 results only (page × limit ≤ 1,000); deeper is 400 page_too_deep. Narrow the search instead.

Small lists

GET /library/branches answers all branches as {"items": [...]}, without paging. GET /catalog/titles/availability?ids= takes 1 to 50 ids and answers {"items": [...]}; ids not in the library are left out.