Skip to main content
GET
/
locations
Get Locations
curl --request GET \
  --url https://api.usecobalt.com/v1/locations \
  --header 'access_token: <api-key>' \
  --header 'client_id: <api-key>' \
  --header 'client_secret: <api-key>'
{
  "success": true,
  "locations": [
    {
      "id": "<string>",
      "ehr_id": "<string>",
      "name": "<string>",
      "status": "active",
      "address": {
        "address1": "<string>",
        "address2": "<string>",
        "city": "<string>",
        "state": "<string>",
        "zip": "<string>"
      },
      "phone": "<string>",
      "fax": "<string>"
    }
  ]
}

Understanding Location IDs

Each location has two identifiers:
  • id: Cobalt’s internal identifier (32-character UUID without hyphens)
    • Use when updating location settings like status
    • Operations: PATCH /v1/locations/{id}
  • ehr_id: Your EMR system’s location identifier
    • Use when creating appointments or other EMR operations
    • Operations: POST /v1/appointments (location field)
Why two IDs? Different operations work in different contexts. Location management (updating status) modifies Cobalt’s cached configuration, while appointment creation communicates directly with your EMR. Cobalt uses its own IDs to manage location settings independently of EMR constraints, then maps to EMR IDs when interacting with your EMR system.
Quick Reference:
  • Updating location settings → Use id
  • Creating appointments → Use ehr_id

Example Request

curl -X GET https://api.usecobalt.com/v1/locations \
-H 'Content-Type: application/json' \
-H 'client_id: ci_live_198908HJDKJSH98789OHKJL' \
-H 'client_secret: cs_live_9827hofdsklOYYHJLJh' \
-H 'access_token: 493JKLHIU98789hLKH9HHJH'

Example Response

{
    "success": true,
    "locations": [
        {
            "id": "abc123def4567890abcdef1234567890",
            "ehr_id": "2452",
            "name": "Happy Clinic",
            "address": {
                "address1": "1234 Main St",
                "address2": "",
                "city": "Sunnyland",
                "state": "CA",
                "zip": "23423"
            },
            "phone": "2223334444",
            "fax": "5556667777",
            "status": "active"
        }
    ]
}

Authorizations

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

Response

200 - application/json

Successful response

success
boolean
locations
object[]