Skip to main content
PATCH
/
providers
/
ehr
/
{ehr_id}
Update Provider by EMR ID
curl --request PATCH \
  --url https://api.usecobalt.com/v1/providers/ehr/{ehr_id} \
  --header 'Content-Type: application/json' \
  --header 'access_token: <api-key>' \
  --header 'client_id: <api-key>' \
  --header 'client_secret: <api-key>' \
  --data '
{
  "status": "active",
  "hours": [
    {
      "day": "Monday",
      "shifts": [
        {
          "start": "T08:00:00",
          "end": "T17:00:00",
          "facility_id": "<string>",
          "set_start_date": "2025-11-13T00:00:00",
          "set_end_date": "2026-11-13T00:00:00",
          "set_recur": {
            "rec_start_date": "2025-11-13T00:00:00",
            "rec_end_date": "2026-11-13T00:00:00",
            "recur_interval_type": "days",
            "recur_interval_amount": 1,
            "recur_interval_description": "Every 1 week."
          }
        }
      ]
    }
  ],
  "hide_in_availability": "true"
}
'
{
  "success": true,
  "message": "<string>",
  "provider_id": "<string>"
}

Example Request

curl -X PATCH https://api.usecobalt.com/v1/providers/ehr/12345 \
-H 'Content-Type: application/json' \
-H 'client_id: ci_live_198908HJDKJSH98789OHKJL' \
-H 'client_secret: cs_live_9827hofdsklOYYHJLJh' \
-H 'access_token: 493JKLHIU98789hLKH9HHJH' \
-d '{
    "status": "active",
    "hours": [
        {
            "day": "Monday",
            "shifts": [
                {
                    "start": "T09:00:00",
                    "end": "T18:00:00",
                    "facility_id": "095f8067-d3fc-4e13-b771-32f87cd0c3f2",
                    "set_start_date": "2025-11-13T00:00:00",
                    "set_end_date": "2026-11-13T00:00:00"
                }
            ]
        },
                {
            "day": "Tuesday",
            "shifts": [
                {
                    "start": "T08:00:00",
                    "end": "T17:00:00",
                    "facility_id": "095f8067-d3fc-4e13-b771-32f87cd0c3f2",
                    "set_start_date": "2025-11-13T00:00:00",
                    "set_end_date": "2026-11-13T00:00:00"
                }
            ]
        }
    ]
}'
Response:
{
    "success": true,
    "message": "Provider status and hours updated successfully.",
    "provider_id": "abc123def4567890abcdef1234567890"
}

Request Body Parameters

You can update one or more of the following fields:
  • status (string, optional): Provider’s sync status
    • "active": Schedule will be synced from EMR
    • "inactive": Schedule will not be synced from EMR
    • Status is case-insensitive (“active”, “Active”, “ACTIVE” are all accepted)
  • hide_in_availability (string, optional): Controls whether provider is hidden from availability results
    • "false": Provider appears in /v1/availability endpoint (default behavior)
    • "true": Provider is hidden from /v1/availability endpoint
    • Common use case: Set a provider to "status": "active" and "hide_in_availability": "true" to continue syncing their schedule (for reporting purposes) while hiding them from new appointment availability
  • hours (array, optional): Provider’s working schedule
    • The facility_id must exist in your organization’s locations
    • The facility_name will be automatically enriched from the database
    • Time format must be THH:MM:SS (e.g., T08:00:00)
    • Dates must be in ISO 8601 format (e.g., 2025-11-13T00:00:00)
    • Days must be capitalized day names (Monday, Tuesday, etc.)

Example: Hide Provider from Availability

curl -X PATCH https://api.usecobalt.com/v1/providers/ehr/12345 \
-H 'Content-Type: application/json' \
-H 'client_id: ci_live_198908HJDKJSH98789OHKJL' \
-H 'client_secret: cs_live_9827hofdsklOYYHJLJh' \
-H 'access_token: 493JKLHIU98789hLKH9HHJH' \
-d '{
    "status": "active",
    "hide_in_availability": "true"
}'
Response:
{
    "success": true,
    "message": "Provider status and hide_in_availability updated successfully.",
    "provider_id": "abc123def4567890abcdef1234567890"
}

Authorizations

client_id
string
header
required
client_secret
string
header
required
access_token
string
header
required

Path Parameters

ehr_id
string
required

The provider's EMR ID (ehr_id from GET /providers)

Body

application/json
status
enum<string>
Available options:
active,
inactive
hours
object[]
hide_in_availability
enum<string>

Controls whether provider is hidden from availability results. When "true", provider won't appear in /v1/availability endpoint.

Available options:
true,
false

Response

Successful response

success
boolean
message
string
provider_id
string