> ## Documentation Index
> Fetch the complete documentation index at: https://developers.docistra.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Master record

> Which system owns doctors, branches and working hours.

`GET /me` tells you who owns the clinic's setup:

```json theme={null}
{ "data": { "external_master": true } }
```

## `external_master: true`

Your system is the master record. This is the case for organizations that use Docistra for bookings only (Docistra's AI Bookings). You can:

* create and change doctors (`POST /doctors`, `PATCH /doctors/{id}`), including turning one off with `is_active: false`
* create and change branches (`POST /branches`, `PATCH /branches/{id}`)
* replace a doctor's weekly hours (`PUT /doctors/{id}/hours`)
* book outside Docistra's working hours with `enforce_schedule: false` on `POST` / `PATCH /appointments` (a clash with another booking is still refused)

When the same patient is changed on both sides, your values win: every field you send overwrites Docistra's, and fields you leave out are kept.

## `external_master: false`

Docistra is the master record for doctors, branches and hours: the clinic manages them in Docistra. You can read them and set their `external_id`. Any other write returns:

```json theme={null}
{ "error": "docistra_is_master" }
```

with status `403`. Patients and appointments work the same for both.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.