API Reference
Locations

Locations

The Locations API provides read-only access to practice locations (branch surgeries). Locations are referenced by appointments, clinician profiles, and availability slots.

Endpoints

MethodEndpointDescription
GET/locationsList locations
GET/locations/{id}Retrieve a location

The Location Object

{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "Main Surgery",
  "address_line_1": "10 Harley Street",
  "address_line_2": null,
  "address_line_3": null,
  "town_city": "London",
  "postcode": "W1G 9PF",
  "country": "United Kingdom",
  "phone": "+44 20 7946 0958",
  "email": "reception@example.nhs.uk",
  "lat": 51.5186,
  "lng": -0.1481,
  "timezone": "Europe/London",
  "opening_hours": {
    "monday": { "open": "08:00", "close": "18:30" },
    "tuesday": { "open": "08:00", "close": "18:30" },
    "wednesday": { "open": "08:00", "close": "18:30" },
    "thursday": { "open": "08:00", "close": "18:30" },
    "friday": { "open": "08:00", "close": "17:00" },
    "saturday": null,
    "sunday": null
  },
  "is_primary": true,
  "is_active": true,
  "created_at": "2024-01-10T09:00:00Z",
  "updated_at": "2024-06-15T11:30:00Z"
}

List Locations

GET /locations

Query Parameters

ParameterTypeDescription
limitintegerMax records to return (1–100, default 20)
offsetintegerRecords to skip (default 0)
is_activebooleanFilter by active status
searchstringFull-text search across name, postcode, and town

Example Request

curl -H "Authorization: Bearer pk_live_xxx" \
  "https://api.jumpehr.com/api-v1/locations?is_active=true"

Example Response

{
  "data": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "Main Surgery",
      "address_line_1": "10 Harley Street",
      "town_city": "London",
      "postcode": "W1G 9PF",
      "is_primary": true,
      "is_active": true,
      "..."
    }
  ],
  "meta": {
    "request_id": "req_abc123",
    "limit": 20,
    "has_more": false,
    "next_offset": null
  }
}

Retrieve a Location

GET /locations/{id}

Returns a single location by ID. Returns 404 if the location does not exist or belongs to a different organisation.