Admin Providers API
Administrative endpoints for managing healthcare providers across the system.
List All Providers
Get a comprehensive list of all providers in the system.
Endpoint: GET /v1/admin/clinic/providers
Authentication: Required (Admin role)
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | No | Page number for pagination |
page_size | integer | No | Number of items per page |
sort_by | string | No | Field to sort by |
sort_dir | string | No | Sort direction (“ASC” or “DESC”) |
search | string | No | Search term |
Example Request
GET /v1/admin/clinic/providers?page=1&page_size=100 HTTP/1.1
Content-Type: application/json
X-User-Token: your_admin_token_hereFilter Providers
Filter providers with advanced administrative criteria.
Endpoint: POST /v1/admin/clinic/providers/filter_providers
Authentication: Required (Admin role)
Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
search | string | No | Search term |
sort_by | string | No | Field to sort by |
sort_dir | string | No | Sort direction |
filters | object | No | No specific filters implemented (only search query supported) |
page_size | integer | No | Number of items per page |
Example Request
POST /v1/admin/clinic/providers/filter_providers HTTP/1.1
Content-Type: application/json
X-User-Token: your_admin_token_here
{
"search": "Dr. Smith",
"filters": {
"specialty": "psychiatry",
"active": true
},
"page_size": 50
}Get Provider Details
Endpoint: GET /v1/admin/clinic/providers/{id}
Authentication: Required (Admin role)
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Provider ID |
Example Request
GET /v1/admin/clinic/providers/928 HTTP/1.1
Content-Type: application/json
X-User-Token: your_admin_token_hereUpdate Provider
Endpoint: PUT /v1/admin/clinic/providers/{id}
Authentication: Required (Admin role)
Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
provider | object | Yes | Provider data object |
provider.roles | array | No | Array of provider roles |
provider.has_supervisor | boolean | No | Whether provider has a supervisor |
provider.supervisor_id | integer | No | ID of the supervisor |
provider.specialty | string | No | Provider’s specialty |
provider.license_number | string | No | Professional license number |
provider.active | boolean | No | Whether provider is active |
Example Request
PUT /v1/admin/clinic/providers/928 HTTP/1.1
Content-Type: application/json
X-User-Token: your_admin_token_here
{
"provider": {
"roles": ["supervisor"],
"has_supervisor": true,
"supervisor_id": 171,
"specialty": "child_psychiatry",
"active": true
}
}Provider Appointments
List Provider Appointments
Endpoint: GET /v1/admin/clinic/providers/{provider_id}/appointments
Authentication: Required (Admin role)
Get Provider Appointment Details
Endpoint: GET /v1/admin/clinic/providers/{provider_id}/appointments/{id}
Authentication: Required (Admin role)
Provider Invites
Create Provider Invite
Endpoint: POST /v1/admin/clinic/providers/invites
Authentication: Required (Admin role)
Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
invite | object | Yes | Invite data object |
invite.email | string | Yes | Provider’s email address |
invite.first_name | string | Yes | Provider’s first name |
invite.last_name | string | Yes | Provider’s last name |
invite.role | string | Yes | Provider’s role |
invite.supervisor_id | integer | No | ID of assigned supervisor |
Validate Provider Invite
Endpoint: GET /v1/admin/clinic/providers/invites/validate
Authentication: Required (Admin role)
Accept Provider Invite
Endpoint: POST /v1/admin/clinic/providers/invites/accept
Authentication: Required (Admin role)
Response Format
Provider Response
{
"id": 928,
"user_id": 456,
"first_name": "Dr. Jane",
"last_name": "Smith",
"email": "[email protected]",
"roles": ["supervisor", "provider"],
"specialty": "child_psychiatry",
"license_number": "PSY12345",
"has_supervisor": true,
"supervisor_id": 171,
"active": true,
"created_at": "2023-10-20T10:00:00.000Z",
"updated_at": "2023-10-20T15:30:00.000Z"
}Provider Roles
Common provider roles include:
provider- Standard healthcare providersupervisor- Supervisory provideradmin- Administrative providertrainee- Provider in trainingconsultant- Consulting provider
Error Responses
403 Forbidden
{
"errors": "Admin access required"
}422 Unprocessable Entity
{
"errors": {
"email": ["can't be blank", "has already been taken"],
"supervisor_id": ["must exist"]
}
}404 Not Found
{
"errors": "Provider not found"
}Notes
- All admin provider endpoints require administrative privileges
- Provider roles determine access levels and capabilities within the system
- Supervisors can oversee multiple providers and review their work
- License numbers are required for clinical providers
- Provider invites allow secure onboarding of new staff members