Skip to main content
PATCH
/
providers
/
{id}
Update Provider
curl --request PATCH \
  --url https://api.usecobalt.com/v1/providers/{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."
          }
        }
      ]
    }
  ]
}'
{
  "success": true,
  "message": "<string>",
  "provider_id": "<string>"
}

Example Request

curl -X PATCH https://api.usecobalt.com/v1/providers/abc123def4567890abcdef1234567890 \
-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"
}

Notes

  • Status Updates: Status is case-insensitive (“active”, “Active”, “ACTIVE” are all accepted)
  • Hours Validation:
    • 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.)
  • At Least One Field: You must provide either status, hours, or both
  • Error Handling: Invalid provider IDs return a 404 error, validation errors return 400

Authorizations

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

Path Parameters

id
string
required

The provider's ID

Body

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

Response

200 - application/json

Successful response

success
boolean
message
string
provider_id
string