- An organization represents the top-level customer account.
- A practice represents a location and is the primary scope for calls, contacts, patients, appointments, subscriptions, and reporting data.
- A region is a named grouping of practices within an organization. A practice can belong to no regions, one region, or multiple regions.
GET /api/org-hierarchy/ after authentication to discover the resources available to your account. The response includes only resources your account can access.
If you have not obtained an access token yet, begin with Authentication. For an overview of how API resources connect after you establish access, see Resource relationships.
Authentication identifies your account. The hierarchy response identifies the organizations and practices that account can use. A valid access token does not grant access to every Peerlogic customer.
Resource identifiers
Most Peerlogic-owned resources are identified by short UUIDs. These are 22-character strings, such as9AxAFr4n63uputNXKo89x1, and appear throughout the API:
- In resource responses as
id - In request paths such as
/api/practices/{id}/ - In filters such as
organization_id,region_id,practice_id, andpractice_ids - In relationship fields such as
organization_idandcall_id
Response structure
The endpoint returns three flat arrays underdata:
The
organization property is an array even though its name is singular. Depending on your access scope, any array can be empty. For example, an account with direct access to one practice can receive that practice without receiving its parent organization or regions.
Build organization and region views
Organizations and practices form the primary hierarchy. Regions are overlapping groupings, not an intermediate parent level. If your integration needs organization and region views, build them from the returned identifiers:- Index organizations by
organization.id. - Group each practice under its organization using
practice.organization_id. - Index regions by
region.idand associate each region with its organization usingregion.organization_id. - Add a practice to every region listed in
practice.region_practices.
Permission indicators
Each hierarchy object includes permission indicators for the authenticated account:
These indicators describe access at that hierarchy level. They do not replace the authorization rules of another endpoint. An API request can still return
403 Forbidden when the account lacks permission for the requested operation.
Filter the response
You can request the complete accessible hierarchy or filter it using exactly one of these parameter families:
Do not combine
organization_id, region_ids, and practice_ids in the same request. The API returns 400 Bad Request when more than one filter family is supplied.
Use practice IDs
Most operational endpoints are practice-scoped. Preserve the returnedpractice.id values and use them wherever an endpoint accepts practice_id or practice_ids.
Common examples include:
- Retrieving calls and call insights for selected locations
- Looking up contacts, patients, and appointments
- Creating event subscriptions for a practice
- Aggregating reporting data across accessible practices
Entity endpoints
Use the hierarchy endpoint to discover access and region membership. Use the organization and practice endpoints when you need the full resource details:
These customer-facing endpoints are read-only. Peerlogic staff administration operations are intentionally excluded from the public API reference.