Tibi APIs

Tibi exposes WordPress REST endpoints and consumes external NLB APIs for book metadata and service workflows.

Last modified: July 9, 2026

link Tibi REST Endpoints

Registered in packages/wordpress/plugins/tibi-core/inc/rest-api.php:

Method Path Purpose
GET /wp-json/tibi/v1/book-details/{book_number} Fetch external NLB metadata for a book/edition number.
GET /wp-json/tibi/v1/banner/{slug} Fetch banner/topic details by slug.
GET /wp-json/tibi/v1/book-recommendations List book recommendations, with optional platform/audience/pagination filters.
GET /wp-json/tibi/v1/book-recommendations/{id} Fetch one book recommendation.
GET /wp-json/tibi/v1/book-recommendation/{id} Legacy singular route for one recommendation.
GET /wp-json/tibi/v1/book-lists List thematic book lists, with optional platform/audience/pagination filters.
GET /wp-json/tibi/v1/book-content Combined book content endpoint for temasak, aktuell-bok, or both.
GET /wp-json/tibi/v1/book-lists/{id} Fetch one thematic book list.
GET /wp-json/tibi/v1/book-lists/{id}/books Fetch books inside one thematic list, with start and limit.
GET /wp-json/tibi/v1/settings/site-wide-notice Fetch site-wide notice settings.

Registered in packages/wordpress/plugins/tibi-block-library/src/help-search/api.php:

Method Path Purpose
GET /wp-json/tibi/v1/help-search Help autocomplete/search endpoint for tibi-help and tibi-faq; accepts q and per_page.

Registered in packages/wordpress/themes/tibi/inc/rest.php:

Method Path Purpose
POST /wp-json/tibi/v1/submit-order Brochure/material order submission; sends internal and user emails.

Most Tibi REST routes use __return_true permissions because they serve public frontend functionality. Validate input and output carefully when adding new public endpoints.

link NLB API

Tibi consumes NLB API endpoints for book metadata and enrollment-related form flows.

Environment API base
Production https://api.nlb.no
Non-production https://api.dev.nlb.no

The theme exposes this as window.tibiApiData.apiBaseUrl.

Custom form consumers:

Flow Endpoint
Adult signup /v1/enrollments/adult
Youth/child signup /v1/enrollments/child
Student signup /v1/enrollments/student
Institution signup /v1/enrollments/institution
Loan-right confirmation /v1/enrollments/verify

link Caching

Book metadata responses are cached with WordPress transients in the Tibi REST implementation. When changing metadata retrieval, document:

link API Documentation Checklist

For each endpoint, document: