---
title: Booking a visit
description: List specialists and services, read open times, then book, read and cancel visits for a connected patient.
section: Care
order: 3
---

# Booking a visit

You will find a specialist and a service, pick an open time, book it for a connected patient, and read or cancel the visit later.

Listing specialists, services and open times needs no patient and no BAA. Booking needs a patient whose connection is `active` and allows `care.bookings`. See [Connecting a patient](/docs/care/connecting-a-patient).

A visit charges nothing when it is booked. It, a late-cancellation fee and a no-show fee are charged later to the patient's default saved card. So a card must be on file first. The order of calls is: connect the patient, save a card, book. See [Saving a card](/docs/care/saving-a-card). Without a card, booking answers `409 payment_method_required` and books nothing.

## List specialists

`GET /care/v1/specialist/query/documents` returns a page of the specialists you can book, by name. All filters are optional.

| Parameter        | Meaning                                                                                                      |
| ---------------- | ------------------------------------------------------------------------------------------------------------ |
| `type`           | `Dietitian`, `Certified Nutrition Specialist` or `Physical Trainer`.                                         |
| `language`       | A language the specialist speaks, such as `Spanish`.                                                         |
| `specialization` | A specialization, such as `Weight Loss/Management`.                                                          |
| `state`          | Two capital letters, such as `ON`. The `specialist_locations` of each specialist then show only the matches. |
| `name`           | The start of the name, not case sensitive. One word matches the last name.                                   |
| `page`, `size`   | See [Pagination](/docs/concepts/pagination). `size` is at most 50.                                           |

```bash
curl "https://api.dev.nurishd.ca/care/v1/specialist/query/documents?type=Dietitian&state=ON" \
  -H "X-Partner-API-Key: $NURISHD_API_KEY"
```

```json
{
	"data": [
		{
			"specialist_id": "3b7d9a52-0000-4000-8000-0000000000a1",
			"specialist_type": "Dietitian",
			"specialist_first_name": "Maya",
			"specialist_last_name": "Okafor",
			"specialist_locations": ["ON:CA"],
			"specialist_specializations": ["Weight Loss/Management"],
			"specialist_languages": [
				{ "language": "Spanish", "proficiency": "Native" }
			]
		}
	],
	"total": 1,
	"total_pages": 1,
	"page": 1,
	"size": 10,
	"has_next": false,
	"has_previous": false
}
```

`specialist_locations` are places as `STATE:COUNTRY`. The list leaves out `specialist_long_introduction`. Read one specialist with `GET /care/v1/specialist/{specialist_id}/get/document` to get it. A specialist that does not exist, is not live, is hidden or was retired answers `404 not_found`.

## List a specialist's services

`GET /care/v1/specialist/{specialist_id}/service/query/documents` takes `page` and `size`.

```bash
curl https://api.dev.nurishd.ca/care/v1/specialist/3b7d9a52-0000-4000-8000-0000000000a1/service/query/documents \
  -H "X-Partner-API-Key: $NURISHD_API_KEY"
```

Each item in `data` looks like this. `service_price_in_cents` is in cents. `service_mode_of_delivery` is `Virtual` or `In Person`.

```json
{
	"service_id": "service-initial-consult",
	"specialist": "3b7d9a52-0000-4000-8000-0000000000a1",
	"service_name": "Initial consult",
	"service_price_in_cents": 15000,
	"service_currency": "CAD",
	"service_duration_in_minutes": 60,
	"service_mode_of_delivery": "Virtual",
	"is_insurance_accepted": false
}
```

Insurance cannot be used for a booking made through this API, whatever `is_insurance_accepted` says.

## Read open times

`GET /care/v1/specialist/{specialist_id}/service/{service_id}/availability/query/documents` returns the times a patient can still book, earliest first, in UTC. Both `from` and `to` are required and carry a UTC offset.

- The range must start before it ends and be at most 31 days long. Otherwise the answer is `422 invalid_time_range`.
- A `from` in the past is moved up to the present. The answer says the range that was searched.
- A service that cannot be booked online, such as one delivered in person, answers `409 service_not_bookable`.

```bash
curl "https://api.dev.nurishd.ca/care/v1/specialist/3b7d9a52-0000-4000-8000-0000000000a1/service/service-initial-consult/availability/query/documents?from=2026-06-01T00:00:00Z&to=2026-06-08T00:00:00Z" \
  -H "X-Partner-API-Key: $NURISHD_API_KEY"
```

```json
{
	"specialist_id": "3b7d9a52-0000-4000-8000-0000000000a1",
	"service_id": "service-initial-consult",
	"duration_in_minutes": 60,
	"start_time": "2026-06-01T00:00:00Z",
	"end_time": "2026-06-08T00:00:00Z",
	"slots": [
		{
			"start_time": "2026-06-02T14:00:00Z",
			"end_time": "2026-06-02T15:00:00Z"
		},
		{
			"start_time": "2026-06-02T15:00:00Z",
			"end_time": "2026-06-02T16:00:00Z"
		}
	]
}
```

The top-level `start_time` and `end_time` are the range that was searched. Pass the `start_time` of one slot as the `start_time` of a booking.

## Book a visit

`POST /care/v1/booking/create/document` books one open time for a patient.

| Field           | Required | Notes                                                                                                               |
| --------------- | -------- | ------------------------------------------------------------------------------------------------------------------- |
| `user`          | Yes      | The patient id from [Connecting a patient](/docs/care/connecting-a-patient).                                        |
| `specialist_id` | Yes      | The specialist id.                                                                                                  |
| `service_id`    | Yes      | The service id.                                                                                                     |
| `start_time`    | Yes      | The `start_time` of an open time, with a UTC offset.                                                                |
| `timezone`      | Yes      | The patient's IANA timezone, such as `America/Toronto`.                                                             |
| `client_note`   | No       | A note for the specialist, at most 2000 characters. No `$`, `{` or `}`: one of them answers `422 validation_error`. |

```bash
curl -X POST https://api.dev.nurishd.ca/care/v1/booking/create/document \
  -H "X-Partner-API-Key: $NURISHD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "user": "6f1c0d2e-0000-4000-8000-000000000101",
    "specialist_id": "3b7d9a52-0000-4000-8000-0000000000a1",
    "service_id": "service-initial-consult",
    "start_time": "2026-06-02T14:00:00Z",
    "timezone": "America/Toronto",
    "client_note": "I would like to talk about meal planning for the week."
  }'
```

```javascript
const res = await fetch(
	'https://api.dev.nurishd.ca/care/v1/booking/create/document',
	{
		method: 'POST',
		headers: {
			'X-Partner-API-Key': process.env.NURISHD_API_KEY,
			'Content-Type': 'application/json',
		},
		body: JSON.stringify({
			user: '6f1c0d2e-0000-4000-8000-000000000101',
			specialist_id: '3b7d9a52-0000-4000-8000-0000000000a1',
			service_id: 'service-initial-consult',
			start_time: '2026-06-02T14:00:00Z',
			timezone: 'America/Toronto',
			client_note:
				'I would like to talk about meal planning for the week.',
		}),
	},
);
const booking = await res.json();
```

```python
import os
import requests

res = requests.post(
    "https://api.dev.nurishd.ca/care/v1/booking/create/document",
    headers={"X-Partner-API-Key": os.environ["NURISHD_API_KEY"]},
    json={
        "user": "6f1c0d2e-0000-4000-8000-000000000101",
        "specialist_id": "3b7d9a52-0000-4000-8000-0000000000a1",
        "service_id": "service-initial-consult",
        "start_time": "2026-06-02T14:00:00Z",
        "timezone": "America/Toronto",
        "client_note": "I would like to talk about meal planning for the week.",
    },
)
booking = res.json()
```

```json
{
	"booking_id": "booking-0001",
	"booking_name": "Initial consult with Maya Okafor",
	"user": "6f1c0d2e-0000-4000-8000-000000000101",
	"specialist": "3b7d9a52-0000-4000-8000-0000000000a1",
	"specialist_snapshot": {
		"specialist_id": "3b7d9a52-0000-4000-8000-0000000000a1",
		"first_name": "Maya",
		"last_name": "Okafor",
		"specialist_type": "Dietitian"
	},
	"service_snapshot": {
		"service_id": "service-initial-consult",
		"service_name": "Initial consult",
		"service_price_in_cents": 15000,
		"service_currency": "CAD",
		"service_duration_in_minutes": 60,
		"service_mode_of_delivery": "Virtual",
		"is_insurance_accepted": false
	},
	"start_date": "2026-06-02T14:00:00Z",
	"end_date": "2026-06-02T15:00:00Z",
	"timezone": "America/Toronto",
	"status": "booked",
	"client_note": "I would like to talk about meal planning for the week.",
	"is_insurance_selected": false,
	"has_report": false,
	"created_at": "2026-05-20T15:04:05Z",
	"updated_at": "2026-05-20T15:04:05Z"
}
```

If the patient has no default card, this answers `409 payment_method_required` and books nothing. Save a card first with [Saving a card](/docs/care/saving-a-card), then book again.

`specialist_snapshot` and `service_snapshot` hold the specialist and the service as they were when the visit was booked. The `specialist` field is the specialist id. `is_insurance_selected` is always `false`. Booking the same patient, specialist and start again returns the first booking, so a retry after a timeout is safe. A new booking raises one `booking.created` event. A repeat raises none.

## Errors a booking can raise

See [Errors](/docs/concepts/errors) for the shape. Do not retry a `409` unchanged.

| Status and code                    | What it means for you                                                                                                          |
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `404 not_found`                    | The patient has no care connection with your company.                                                                          |
| `403 connection_scope_not_granted` | The patient did not allow bookings. Create the patient again with a key that holds `booking:write`, and send a new link.       |
| `409 connection_not_active`        | The connection is `pending` or was revoked. Read the connection and wait for approval, or connect again.                       |
| `409 payment_method_required`      | The patient has no card saved. Nothing is booked. Save a card with [Saving a card](/docs/care/saving-a-card), then book again. |
| `409 agreements_not_signed`        | The patient has not signed the agreements a visit needs. Send them to a fresh `connect_url`.                                   |
| `409 service_not_bookable`         | The service cannot be booked online, or the specialist or the service does not exist. Offer another service.                   |
| `409 not_licensed_here`            | The specialist cannot serve this booking yet. Offer another specialist. Check that the patient has an address.                 |
| `409 slot_taken`                   | The time is no longer open. Read the open times again and offer another.                                                       |
| `422 invalid_time_range`           | On open times only: the range is empty, backwards or longer than 31 days.                                                      |

## List and read bookings

`GET /care/v1/booking/query/documents` returns the visits your company booked, newest visit first. It leaves out visits the patient booked themselves, visits booked by another company, and visits of patients whose connection is no longer active. The list has no `client_note`: it reads as `null` there.

| Parameter      | Meaning                                                                                 |
| -------------- | --------------------------------------------------------------------------------------- |
| `patient`      | Keep only the visits of this patient.                                                   |
| `status`       | `booked`, `meeting_rescheduled`, `meeting_completed`, `meeting_cancelled` or `no_show`. |
| `from`, `to`   | Keep visits that start at or after, or at or before, this time. UTC offset.             |
| `page`, `size` | See [Pagination](/docs/concepts/pagination).                                            |

The `status` filter works on the status last seen for each booking, and a booking is refreshed when you read it. A visit that changed outside this API can show under its old status until you read it. The status of each booking in the answer is current.

```bash
curl "https://api.dev.nurishd.ca/care/v1/booking/query/documents?patient=6f1c0d2e-0000-4000-8000-000000000101&status=booked" \
  -H "X-Partner-API-Key: $NURISHD_API_KEY"
```

`GET /care/v1/booking/{booking_id}/get/document` returns one booking with its `client_note`. A visit the patient or another company booked answers `404`. If the patient's connection was revoked, it answers `409 connection_not_active`: the visit stays booked, but you can no longer read or change it. If the patient or the specialist canceled, the answer says so and a `booking.canceled` event is raised once.

## Cancel a booking

> **Warning.** A visit canceled less than 24 hours before it starts may be charged Nurish'd's late-cancellation fee, billed to the patient. Tell the patient before you cancel.

`PUT /care/v1/booking/{booking_id}/cancel/document` cancels a visit your company booked. The body is optional. `reason` is at most 1000 characters.

```bash
curl -X PUT https://api.dev.nurishd.ca/care/v1/booking/booking-0001/cancel/document \
  -H "X-Partner-API-Key: $NURISHD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reason": "The patient asked to cancel."}'
```

The answer is the booking with `status` set to `meeting_cancelled`. A cancellation raises one `booking.canceled` event. A booking that is already canceled, completed or past answers `409 booking_not_cancelable`. A revoked connection answers `409 connection_not_active`.

## What the Sandbox simulates

Open times are generated on weekdays from 9 to 5. They are not real calendars, no video link works, no email is delivered and patients are fake. See [Environments](/docs/get-started/environments).

## Next

- [Connecting a patient](/docs/care/connecting-a-patient): connect before you book.
- [Saving a card](/docs/care/saving-a-card): save a card before you book.
- [Events](/docs/events/events): `booking.created` and `booking.canceled`.
