REST API¶
Custom REST API under namespace tinnitus/v1. Public read access (no authentication required).
Endpoints¶
articles¶
Post type: article
| Method | Endpoint | Description |
|---|---|---|
GET |
/tinnitus/v1/articles |
List articles (paginated) |
GET |
/tinnitus/v1/articles/{id} |
Get single by ID |
research¶
Post type: research
| Method | Endpoint | Description |
|---|---|---|
GET |
/tinnitus/v1/research |
List research (paginated) |
GET |
/tinnitus/v1/research/{id} |
Get single by ID |
Query Parameters¶
Apply to all list endpoints (GET /tinnitus/v1/{resource}).
| Parameter | Type | Default | Description |
|---|---|---|---|
page |
integer |
1 |
Min: 1 |
per_page |
integer |
10 |
Min: 1 Max: 100 |
cornerstone |
integer |
— |
Filter by cornerstone term ID. |
tinnitus_type |
integer |
— |
Filter by tinnitus type term ID. |
tinnitus_stage |
integer |
— |
Filter by tinnitus stage term ID. |
treatment_modality |
integer |
— |
Filter by treatment modality term ID. |
audience |
integer |
— |
Filter by audience term ID. |
orderby |
string |
date |
Values: date, title |
order |
string |
desc |
Values: asc, desc |
search |
string |
— |
Full-text search on title and content. |
featured |
boolean |
— |
Filter by app_featured ACF field. |
lang |
string |
— |
Filter by language (requires Polylang). Values: en, de |
Response Format¶
List Response¶
Item Fields¶
| Field | Type | Description |
|---|---|---|
id |
integer | Post ID |
slug |
string | URL slug |
title |
string | Post title |
summary |
string|null | Short description (ACF, max 280 chars) |
content |
string | Full HTML content |
excerpt |
string | Post excerpt |
featured_image |
object|null | {url, alt, width, height} |
reading_time |
integer|null | Estimated minutes |
app_featured |
boolean | Featured in app |
last_reviewed |
string|null | Review date (Y-m-d) |
cornerstone |
object|null | {id, name, slug} |
tinnitus_types |
array | [{id, name, slug}] |
tinnitus_stages |
array | [{id, name, slug}] |
treatment_modalities |
array | [{id, name, slug}] |
audiences |
array | [{id, name, slug}] |
sources |
array | Source citations |
published_at |
string | ISO 8601 datetime |
modified_at |
string | ISO 8601 datetime |
lang |
string|null | Language code (if Polylang active) |
translations |
object|null | Translation map (if Polylang active) |