Terminology Sync Service
API Contract
REST
/api/v1/terminology-sync
8 endpoints
GET
/api/v1/terminology-sync/api/v1/terminology-sync
List sync state records for all organizations
Auth Required
org_adminglobal_admin
Response Example
{
"data": [
{
"organization_id": "org_nhf_oslo",
"is_stale": false,
"last_sync_at": "2026-03-26T06:00:00.000Z",
"next_sync_due_at": "2026-03-26T18:00:00.000Z"
},
{
"organization_id": "org_hlf",
"is_stale": true,
"last_sync_at": "2026-03-24T12:00:00.000Z",
"next_sync_due_at": "2026-03-25T00:00:00.000Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 7
}
}
GET
/api/v1/terminology-sync/api/v1/terminology-sync/:organization_id
Get sync state for a specific organization including last sync timestamp
Auth Required
coordinatororg_adminglobal_admin
Response Example
{
"organization_id": "org_nhf_oslo",
"is_stale": false,
"last_sync_at": "2026-03-26T06:00:00.000Z",
"next_sync_due_at": "2026-03-26T18:00:00.000Z",
"ttl_seconds": 43200
}
POST
/api/v1/terminology-sync/api/v1/terminology-sync
Create a sync tracking record for a new organization
Auth Required
org_adminglobal_admin
Request Example
{
"organization_id": "org_nfb_bergen",
"ttl_seconds": 43200
}
Response Example
{
"organization_id": "org_nfb_bergen",
"is_stale": true,
"last_sync_at": null,
"created_at": "2026-03-26T09:40:00.000Z"
}
PUT
/api/v1/terminology-sync/api/v1/terminology-sync/:organization_id
Update sync TTL or reset sync timestamp for an organization
Auth Required
org_adminglobal_admin
Request Example
{
"ttl_seconds": 86400
}
Response Example
{
"organization_id": "org_nhf_oslo",
"ttl_seconds": 86400,
"updated_at": "2026-03-26T09:42:00.000Z"
}
DELETE
/api/v1/terminology-sync/api/v1/terminology-sync/:organization_id
Remove sync tracking record for an organization
Auth Required
global_admin
Response Example
{
"organization_id": "org_nhf_oslo",
"deleted": true
}
POST
/api/v1/terminology-sync/api/v1/terminology-sync/:organization_id/sync-if-stale
Trigger terminology sync only if the current data is stale (maps to syncIfStale())
Auth Required
coordinatororg_adminglobal_admin
Response Example
{
"organization_id": "org_hlf",
"was_stale": true,
"sync_triggered": true,
"synced_at": "2026-03-26T09:43:10.000Z"
}
POST
/api/v1/terminology-sync/api/v1/terminology-sync/:organization_id/force-sync
Force an immediate terminology sync regardless of staleness (maps to forcSync())
Auth Required
org_adminglobal_admin
Response Example
{
"organization_id": "org_nhf_oslo",
"synced_at": "2026-03-26T09:44:00.000Z",
"updated_keys": 18,
"duration_ms": 342
}
GET
/api/v1/terminology-sync/api/v1/terminology-sync/:organization_id/stale
Check whether terminology data for an organization is currently stale (maps to isStale())
Auth Required
coordinatororg_adminglobal_admin
Response Example
{
"organization_id": "org_hlf",
"is_stale": true,
"last_sync_at": "2026-03-24T12:00:00.000Z",
"stale_since": "2026-03-25T00:00:00.000Z"
}