Certification Expiry Repository
API Contract
REST
/api/v1/certifications
5 endpoints
GET
/api/v1/certifications/api/v1/certifications
List all certification records. Use within_days to filter upcoming expirations.
Public
Response Example
{
"data": [
{
"mentor_id": "mentor_sarah_chen",
"certification_type": "first_aid_level_2",
"expiry_date": "2026-04-15T00:00:00Z",
"days_until_expiry": 20,
"status": "expiring_soon",
"created_at": "2025-04-15T09:00:00Z",
"updated_at": "2026-03-01T10:00:00Z"
},
{
"mentor_id": "mentor_james_okafor",
"certification_type": "cpr_defibrillator",
"expiry_date": "2026-04-01T00:00:00Z",
"days_until_expiry": 6,
"status": "expiring_soon",
"created_at": "2025-04-01T09:00:00Z",
"updated_at": "2026-03-15T09:30:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 2
}
}
GET
/api/v1/certifications/api/v1/certifications/:mentor_id
Get the certification expiry record for a specific mentor.
Public
Response Example
{
"mentor_id": "mentor_sarah_chen",
"certification_type": "first_aid_level_2",
"expiry_date": "2026-04-15T00:00:00Z",
"days_until_expiry": 20,
"status": "expiring_soon",
"created_at": "2025-04-15T09:00:00Z",
"updated_at": "2026-03-01T10:00:00Z"
}
POST
/api/v1/certifications/api/v1/certifications
Create a new certification expiry record for a mentor.
Public
Request Example
{
"mentor_id": "mentor_priya_sharma",
"certification_type": "safeguarding_children",
"expiry_date": "2026-09-30T00:00:00Z"
}
Response Example
{
"mentor_id": "mentor_priya_sharma",
"certification_type": "safeguarding_children",
"expiry_date": "2026-09-30T00:00:00Z",
"days_until_expiry": 188,
"status": "active",
"created_at": "2026-03-26T11:00:00Z",
"updated_at": "2026-03-26T11:00:00Z"
}
PUT
/api/v1/certifications/api/v1/certifications/:mentor_id
Update the certification expiry date after renewal.
Public
Request Example
{
"certification_type": "first_aid_level_2",
"expiry_date": "2027-04-15T00:00:00Z"
}
Response Example
{
"mentor_id": "mentor_sarah_chen",
"certification_type": "first_aid_level_2",
"expiry_date": "2027-04-15T00:00:00Z",
"days_until_expiry": 385,
"status": "active",
"created_at": "2025-04-15T09:00:00Z",
"updated_at": "2026-03-26T11:15:00Z"
}
DELETE
/api/v1/certifications/api/v1/certifications/:mentor_id
Delete a certification record for a mentor.
Public
Response Example
{
"deleted": true,
"mentor_id": "mentor_sarah_chen"
}