Overview
Retrieves a paginated list of all clinics that the authenticated user has access to. Supports filtering by active status and full-text search.
Restrictions: Only accessible to clinic administrators with the admin:clinic permission. Results are ordered by creation date (newest first).
This endpoint uses Machine-to-Machine (M2M) authentication.
Standard Bearer token (e.g., Bearer <your_access_token>).
See the M2M Authentication guide for details.
Optional. Accept header to specify response media type (e.g.,
application/json).
Query Parameters
Page number for pagination.
Number of items to return per page.
Filter by active status (true for active, false for inactive).
Search term to filter by clinic name or email.
Filter by location state (e.g., “NY”, “CA”, “TX”).
Column to sort results by. Accepted values: name, createdAt, updatedAt.
Sort direction. Accepted values: asc, desc.
Response Parameters
The response returns a paginated list of clinics along with pagination metadata and status statistics.
The unique UUID of the clinic.
The legal registered name of the clinic.
The display name of the clinic.
Contact email for the clinic.
The unique identifier of the tenant.
Indicates if the clinic is currently active.
Creation timestamp (ISO 8601).
Last updated timestamp (ISO 8601).
List of physical locations associated with the clinic.
Total number of clinics matching the criteria.
Total number of pages available.
Aggregate statistics for the result set.
Count of inactive clinics.
Status Codes
| Status | Description |
|---|
200 | Success. List of clinics retrieved successfully. |
401 | Unauthorized. Invalid or missing authentication token. |
403 | Forbidden. Insufficient permissions. User must have the admin:clinic permission. |
curl -X 'GET' \
'http://localhost:5001/clinics?page=1&limit=20&isActive=true' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <your_access_token>'
{
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"legalName": "ABC Medical Center LLC",
"displayName": "ABC Medical Center",
"email": "contact@abcmedical.com",
"tenantId": "tenant-id-123",
"isActive": true,
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-01T00:00:00.000Z",
"locations": []
}
],
"pagination": {
"total": 50,
"page": 1,
"limit": 20,
"totalPages": 3
},
"stats": {
"total": 50,
"active": 45,
"inactive": 5
}
}