Skip to content
First requestVisit website ↗
Navigation

Booked appointments nearest a contact's address

Returns up to limit appointments within radius_miles of the given contact, one row per neighbouring contact, ranked by straight-line distance. est_drive_minutes is an ESTIMATE derived from that straight line at an assumed 30mph — it is NOT a routed drive time and must be labelled as an estimate wherever it is displayed. Gated by the NEARBY_APPOINTMENTS workspace feature flag (404 when off).

GET
https://api.channelautomation.com/api/nearby-appointments

Query parameters

  • contact_id
    string
    required

    The contact to search around.

    format: uuid
  • workspace_id
    optional
    string

    Workspace ID. May also come from auth or the x-workspace-id header.

  • radius_miles
    optional
    number
    maximum: 500 · minimum: 1 · default: 50
  • limit
    optional
    integer
    maximum: 50 · minimum: 1 · default: 10

Returns

200

Nearby appointments, plus a state naming why the list may be empty: ok (rows returned), no_neighbors (contact geocoded, nothing in radius), not_geocoded (no coordinates yet), or no_address (contact has no usable address to geocode).

400

Missing workspace_id or contact_id.

404

Feature flag disabled, or contact not found in this workspace.

Type to search…

↑↓ navigate↵ selectEsc close