HLF Dynamics Sync Service
API Contract
REST
/api/v1/hlf-sync
8 endpoints
GET
/api/v1/hlf-sync/api/v1/hlf-sync
List sync status records for all mentors
Public
Response Example
{
"data": [
{
"id": "sync-mentor-42",
"mentor_id": "mentor-42",
"sync_status": "synced",
"last_event_type": "certification_renewed",
"synced_at": "2026-03-26T09:00:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 67
}
}
GET
/api/v1/hlf-sync/api/v1/hlf-sync/:mentorId
Get HLF Dynamics sync status for a specific mentor (maps to getSyncStatus)
Public
Response Example
{
"mentor_id": "mentor-42",
"sync_status": "synced",
"last_event_type": "certification_renewed",
"last_payload": {
"mentor_id": "mentor-42",
"cert_type": "peer_mentor_level_2",
"renewed_at": "2026-03-26T00:00:00Z"
},
"synced_at": "2026-03-26T09:00:00Z",
"error_message": null
}
POST
/api/v1/hlf-sync/api/v1/hlf-sync
Trigger a sync operation for a mentor
Public
Request Example
{
"mentor_id": "mentor-42",
"event_type": "certification_renewed"
}
Response Example
{
"id": "sync-mentor-42",
"mentor_id": "mentor-42",
"event_type": "certification_renewed",
"sync_status": "synced",
"synced_at": "2026-03-26T10:00:00Z"
}
PUT
/api/v1/hlf-sync/api/v1/hlf-sync/:mentorId
Update sync record or retry a failed sync
Public
Request Example
{
"sync_status": "pending",
"retry": true
}
Response Example
{
"mentor_id": "mentor-42",
"sync_status": "synced",
"retried_at": "2026-03-26T10:05:00Z",
"synced_at": "2026-03-26T10:05:00Z"
}
DELETE
/api/v1/hlf-sync/api/v1/hlf-sync/:mentorId
Remove sync record for a mentor
Public
Response Example
{
"deleted": true,
"mentor_id": "mentor-42"
}
POST
/api/v1/hlf-sync/api/v1/hlf-sync/:mentorId/expired
Notify HLF Dynamics that a mentor's certification has expired (maps to syncCertificationExpired)
Public
Request Example
{
"expired_at": "2026-03-26T00:00:00Z"
}
Response Example
{
"mentor_id": "mentor-42",
"event_type": "certification_expired",
"sync_status": "synced",
"synced_at": "2026-03-26T10:00:00Z"
}
POST
/api/v1/hlf-sync/api/v1/hlf-sync/:mentorId/renewed
Notify HLF Dynamics that a mentor's certification has been renewed (maps to syncCertificationRenewed)
Public
Request Example
{
"renewed_at": "2026-03-26T00:00:00Z",
"new_expiry": "2027-03-26T00:00:00Z"
}
Response Example
{
"mentor_id": "mentor-42",
"event_type": "certification_renewed",
"sync_status": "synced",
"synced_at": "2026-03-26T10:01:00Z"
}
POST
/api/v1/hlf-sync/api/v1/hlf-sync/webhooks
Send a webhook event to an external system (maps to sendWebhook)
Public
Request Example
{
"event_type": "certification_expired",
"payload": {
"mentor_id": "mentor-42",
"cert_type": "peer_mentor_level_2",
"expired_at": "2026-03-26T00:00:00Z"
},
"target_url": "https://dynamics.hlf.no/webhooks/eircodex"
}
Response Example
{
"webhook_id": "wh-0045",
"event_type": "certification_expired",
"status": "delivered",
"http_status": 200,
"sent_at": "2026-03-26T10:00:00Z"
}