Caregiver API Routes
Component Detail
Infrastructure
low complexity
backend
2
Dependencies
0
Dependents
1
Entities
0
Integrations
Description
Defines and registers the REST API endpoints for caregiver operations in the Next.js backend. Implements `/api/v1/contacts/:contactId/caregivers` for list and create, and `/api/v1/caregivers/:id` for read, update, and delete. Applies authentication middleware and role-based access guards to all routes.
caregiver-api-routes
Responsibilities
- Register caregiver REST API route handlers
- Apply JWT authentication middleware to all caregiver routes
- Enforce role-based access control for caregiver data access
- Delegate request handling to Caregiver Service
- Return standardized API response envelopes
Interfaces
GET /api/v1/contacts/:contactId/caregivers
POST /api/v1/contacts/:contactId/caregivers
GET /api/v1/caregivers/:id
PUT /api/v1/caregivers/:id
DELETE /api/v1/caregivers/:id
Relationships
Dependencies (2)
Components this component depends on