> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usecobalt.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Providers

> Returns a list of providers associated with a clinic.

### Understanding Provider IDs

Each provider has two identifiers:

* **`id`**: Cobalt's internal identifier (32-character UUID without hyphens)
  * Use when updating provider settings like status or hours
  * Operations: `PATCH /v1/providers/{id}`

* **`ehr_id`**: Your EMR system's provider identifier
  * Use when creating appointments or other EMR operations
  * Operations: `POST /v1/appointments` (`provider` field)

**Why two IDs?** Different operations work in different contexts. Provider management (updating status, hours) modifies Cobalt's cached configuration, while appointment creation communicates directly with your EMR. Cobalt uses its own IDs to manage provider settings independently of EMR constraints, then maps to EMR IDs when interacting with your EMR system.

<Note>
  **Quick Reference:**

  * Updating provider settings → Use `id`
  * Creating appointments → Use `ehr_id`
</Note>

### Example Request

```bash theme={null}
curl -X GET https://api.usecobalt.com/v1/providers \
-H 'Content-Type: application/json' \
-H 'client_id: ci_live_198908HJDKJSH98789OHKJL' \
-H 'client_secret: cs_live_9827hofdsklOYYHJLJh' \
-H 'access_token: 493JKLHIU98789hLKH9HHJH'
```

### Example Response

```json theme={null}
{
    "success": true,
    "providers": [
        {
            "id": "abc123def4567890abcdef1234567890",
            "ehr_id": "99999",
            "timezone": "America/Phoenix",
            "npi": "425345345",
            "specialty": "Family Medicine",
            "credentials": "MD",
            "name": "Doe, John",
            "status": "active",
            "hide_in_availability": false,
            "hours": [
                {
                    "day": "Monday",
                    "shifts": [
                        {
                            "end": "T12:00:00",
                            "start": "T08:00:00",
                            "set_start_date": "2024-11-20",
                            "set_end_date": "2025-11-20",
                            "facility_id": "2",
                            "facility_name": "Acme Clinic",
                            "recurrence": {
                                "rec_start_date": "2024-11-20",
                                "recur_interval_type": "weeks",
                                "recur_interval_amount": 1,
                                "recur_interval_description": "Every 1 week."
                            },
                            "visit_type_rules": [
                                {
                                    "end_time": "13:45:00",
                                    "start_time": "13:00:00",
                                    "total_visits": 1,
                                    "visit_type_id": "NP",
                                    "visit_type_desc": "New Patient"
                                },
                            ]
                        },
                        {
                            "end": "T16:30:00",
                            "start": "T13:00:00"
                        }
                    ]
                },
            ]
        }
    ]
}
```

### Response Parameters

#### Provider Fields

* **id**: Cobalt's internal provider identifier (used for updating provider settings)
* **ehr\_id**: EMR system's provider identifier (used for creating appointments)
* **timezone**: Provider's timezone
* **npi**: National Provider Identifier
* **name**: Provider's name
* **status**: Provider status (`active` or `inactive`)
  * `active`: Provider's schedule will be synced from the EMR
  * `inactive`: Provider's schedule will not be synced
* **hide\_in\_availability**: Whether provider is hidden from availability results (boolean, defaults to `false`)
  * `false`: Provider appears in `/v1/availability` endpoint results (default behavior)
  * `true`: Provider's schedule is synced but hidden from availability results
  * **Use case**: Set to `true` when you want to continue syncing a provider's schedule (for reporting/historical purposes) but don't want them to appear as available for new appointments
  * **Important**: For a provider to appear in availability, BOTH conditions must be true:
    1. `active` must be `true` (schedule is being synced)
    2. `hide_in_availability` must be `false` (not explicitly hidden)

#### Schedule Structure

* **Day**: Specifies which day of the week the schedule applies to
* **Shifts**: Array of work periods with:
  * Start/end times using 24-hour format. Times are in the clinic's eCW instance's timezone.
  * Facility information (name and ID)
  * Date range when the schedule is active (start date and optional end date. If there is no end date then the shift is active indefinitely).
* **Visit Type Rules** (optional):
  * Pre-allocated slots for specific appointment types
  * Each slot has its own start/end times
  * Includes description and total allowed appointments
* **Recurrence** (optional):
  * Defines repeating patterns (e.g., "every 2 weeks")
  * Contains start date and interval information
  * Allows for schedules that don't occur every week


## OpenAPI

````yaml GET /providers
openapi: 3.0.0
info:
  title: Cobalt API
  version: 1.0.1
  description: API for interacting with Cobalt's EHR integration services
servers:
  - url: https://api.usecobalt.com/v1
security:
  - ClientCredentials: []
    ClientSecret: []
    AccessToken: []
paths:
  /providers:
    get:
      summary: Get Providers
      description: Returns a list of providers associated with a clinic.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  providers:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: The unique identifier for the provider
                        ehr_id:
                          type: string
                        name:
                          type: string
                        timezone:
                          type: string
                        status:
                          type: string
                          enum:
                            - active
                            - inactive
                          description: The current status of the provider
                        hours:
                          type: array
                          items:
                            type: object
                            properties:
                              day:
                                type: string
                              shifts:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    start:
                                      type: string
                                    end:
                                      type: string
                                    facility_id:
                                      type: string
                                    recurrence:
                                      type: object
                                      properties:
                                        rec_start_date:
                                          type: string
                                        recur_interval_type:
                                          type: string
                                        recur_interval_amount:
                                          type: string
                                        recur_interval_description:
                                          type: string
                                    set_end_date:
                                      type: string
                                    facility_name:
                                      type: string
                                    set_start_date:
                                      type: string
                                    set_description:
                                      type: string
                                    visit_type_rules:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          end_time:
                                            type: string
                                          start_time:
                                            type: string
                                          total_visits:
                                            type: integer
                                          visit_type_id:
                                            type: string
                                          visit_type_desc:
                                            type: string
components:
  securitySchemes:
    ClientCredentials:
      type: apiKey
      in: header
      name: client_id
    ClientSecret:
      type: apiKey
      in: header
      name: client_secret
    AccessToken:
      type: apiKey
      in: header
      name: access_token

````