# Update a Booking

`PATCH /v1/bookings/:id`

Reschedule, confirm, arrive, mark as did not attend, or update Booking details. To cancel a Booking, use `POST /v1/bookings/{booking_id}/cancellations`, which requires `bookings.cancel`.

**Required API scopes:** `bookings.update`

## Parameters

- `id` (path, `string`) (required)
- `Idempotency-Key` (header, `string`) (required) - Client-generated idempotency key. Required for every POST/PATCH write. Replay of the same key with the same body returns the stored response with an `Idempotency-Replayed: true` header. Same key + different body returns `422 idempotency_key_reused`. A duplicate that arrives while the first request is still in flight returns `409 idempotency_conflict` with `Retry-After: 1`.

## Request body (`application/json`)

- `object`
  - `clinician_id` (`string | null`) - format: `uuid`; The identifier of the clinician assigned to the booking, or null when no clinician is assigned.
  - `end_time` (`string | null`) - format: `date-time`; An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.
  - `information_for_patient` (`string | null`) - The information shown to the patient before the booking.
  - `information_for_staff_members` (`string | null`) - The internal information shown only to staff members.
  - `is_remote` (`boolean`) - Whether the Booking takes place remotely.
  - `location_id` (`string | null`) - format: `uuid`; The identifier of the location where the booking takes place, or null for a remote booking.
  - `patient_id` (`string`) - format: `uuid`; The identifier of the patient attending the booking.
  - `payor_id` (`string | null`) - format: `uuid`; The identifier of the payor responsible for the booking's charges, when different from the patient.
  - `remote_method` (`string | null`) - enum: `native_video`, `null`; The remote consultation method. `native_video` requires `is_remote` to be true.
  - `room_id` (`string | null`) - format: `uuid`; The identifier of the room assigned to the booking, when applicable.
  - `service_id` (`string`) - format: `uuid`; The identifier of the service being provided during the booking.
  - `service_variant_id` (`string`) - format: `uuid`; The identifier of the service variant selected for the booking.
  - `start_time` (`string`) - format: `date-time`; The ISO 8601 UTC time at which the booking starts.
  - `status` (`string | null`) - enum: `arrived`, `confirmed`, `did_not_attend`, `unconfirmed`, `null`; The status to assign to the Booking.

### Example

```json
{
  "status": "confirmed"
}
```

## Response `200`

The requested `Booking`.

- `object`
  - `canceled_at` (`string | null`) - format: `date-time`; An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.
  - `cancellation_information` (`string | null`) - Additional notes recorded with the cancellation.
  - `cancellation_reason` (`string | null`) - enum: `abusive_behavior`, `booked_in_error`, `childcare_issues`, `clinician_annual_leave`, `clinician_emergency`, `clinician_schedule_change`, `colleague_unavailable`, `double_booked`, `duplicate_booking`, `equipment_issue`, `facility_unavailable`, `failed_to_pay_in_advance`, `family_emergency_illness`, `fear_or_anxiety`, `financial_concerns`, `financial_requirements_not_met`, `forgot_to_attend`, `insurance_company_not_permitted`, `insurance_coverage_issues`, `insurance_verification_failed`, `language_barrier`, `medication_interference`, `no_longer_required`, `no_response_to_recall`, `other`, `patient_deceased`, `patient_not_permitted`, `personal_emergency_illness`, `pre_booking_steps_not_completed`, `professional_discretion`, `referral_not_provided`, `relocated`, `rescheduled`, `scheduling_conflict`, `staff_issue`, `switched_to_another_clinician`, `symptoms_resolved`, `too_unwell`, `transportation_issues`, `unable_failed_to_prepare_for_booking`, `unknown`, `weather_conditions`, `wrong_clinician`, `wrong_location`, `wrong_service_type`, `null`; The reason the Booking was canceled. Required by Organizations that enforce cancellation reasons.
  - `cancellation_source` (`string | null`) - enum: `api`, `app`, `automation`, `patient`, `staff_member`, `null`; Who canceled the Booking. API cancellations use `api`.
  - `clinician` (`any`) - The clinician assigned to the booking.
  - `created_at` (`string`) - format: `date-time`; An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.
  - `end_time` (`string | null`) - format: `date-time`; An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.
  - `id` (`string`) - format: `uuid`; The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.
  - `information_for_patient` (`string | null`) - The sanitized HTML shown to the patient.
  - `information_for_staff_members` (`string | null`) - The sanitized HTML shown only to staff members.
  - `is_remote` (`boolean`) - Whether the Booking takes place remotely.
  - `links` (`object`) - URLs to related resources.
    - `clinician` (`string | null`) - format: `uri`; The full URL of a related resource.
    - `invoices` (`string`) - format: `uri`; The full URL of a related resource.
    - `letters` (`string`) - format: `uri`; The full URL of a related resource.
    - `notes` (`string`) - format: `uri`; The full URL of a related resource.
    - `service` (`string | null`) - format: `uri`; The full URL of a related resource.
    - `test_results` (`string`) - format: `uri`; The full URL of a related resource.
  - `location` (`any`) - The location where the booking takes place, or null for a remote booking.
  - `object` (`any`) - Discriminator value emitted at `object`.
  - `patient` (`any`) - The patient attending the booking.
  - `payor` (`any`) - The payor responsible for the booking's charges.
  - `recall_due_date` (`string | null`) - format: `date`; The date the Patient is due to return, in ISO 8601 format (YYYY-MM-DD). Present on recall Bookings. Null on diary Bookings.
  - `remote_method` (`string | null`) - enum: `native_video`, `null`; The remote consultation method. `native_video` uses Carebit Video.
  - `service` (`any`) - The service being provided during the booking.
  - `service_variants` (`array`) - The service variants selected for the booking.
    - `items` (`object`)
      - `clinician_id` (`string | null`) - format: `uuid`; The identifier of the clinician assigned to this service variant, when the variant is clinician-specific.
      - `currency` (`string | null`) - The ISO 4217 currency code used for this service variant. Must be one of `chf`, `eur`, `gbp`, or `usd`.
      - `description` (`string | null`) - The description of this service variant.
      - `id` (`string`) - format: `uuid`; The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.
      - `links` (`object`) - URLs to related resources.
        - `clinician` (`string | null`) - format: `uri`; The full URL of a related resource.
        - `location` (`string | null`) - format: `uri`; The full URL of a related resource.
      - `location_id` (`string | null`) - format: `uuid`; The identifier of the location assigned to this service variant, when the variant is location-specific.
      - `net_price` (`integer | null`) - The net price of this service variant, before tax, in the currency's minor units.
      - `permits_remote_bookings` (`boolean`) - Whether this service variant can be used for remote bookings.
  - `start_time` (`string | null`) - format: `date-time`; An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.
  - `status` (`string | null`) - enum: `arrived`, `awaiting_payment`, `awaiting_recall`, `canceled`, `confirmed`, `did_not_attend`, `overdue_for_recall`, `prepared`, `recall_canceled`, `recall_expired`, `unconfirmed`, `null`; The Booking's current status. Null while Carebit is creating the record.
  - `updated_at` (`string`) - format: `date-time`; An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.

### Example

```json
{
  "id": "92a3b4c5-d6e7-4f01-8234-56789abcdef0",
  "object": "booking",
  "canceled_at": "2026-01-01T09:00:00Z",
  "cancellation_information": "The Patient asked to cancel by phone.",
  "cancellation_reason": "abusive_behavior",
  "cancellation_source": "api",
  "clinician": {
    "id": "2b3c4d5e-6f70-489a-9bcd-ef0123456789",
    "object": "clinician",
    "created_at": "2026-01-01T09:00:00Z",
    "display_name": "Dr Alex Morgan",
    "email": "alex.morgan@example.com",
    "first_name": "Alex",
    "last_name": "Morgan",
    "links": {
      "bookings": "https://api.carebit.co/v1/bookings?clinician_id=2b3c4d5e-6f70-489a-9bcd-ef0123456789"
    },
    "medical_specialty": "Cardiology",
    "title": "Dr",
    "updated_at": "2026-01-01T09:00:00Z"
  },
  "created_at": "2026-01-01T09:00:00Z",
  "end_time": "2026-01-01T10:00:00Z",
  "information_for_patient": "<p>Please arrive 10 minutes before your appointment.</p>",
  "information_for_staff_members": "<p>The Patient has requested step-free access.</p>",
  "is_remote": false,
  "links": {
    "clinician": "https://api.carebit.co/v1/clinicians/2b3c4d5e-6f70-489a-9bcd-ef0123456789",
    "invoices": "https://api.carebit.co/v1/invoices?booking_id=92a3b4c5-d6e7-4f01-8234-56789abcdef0",
    "letters": "https://api.carebit.co/v1/letters?booking_id=92a3b4c5-d6e7-4f01-8234-56789abcdef0",
    "notes": "https://api.carebit.co/v1/notes?booking_id=92a3b4c5-d6e7-4f01-8234-56789abcdef0",
    "service": "https://api.carebit.co/v1/services/5e6f7081-92a3-4bcd-8ef0-123456789abc",
    "test_results": "https://api.carebit.co/v1/test_results?booking_id=92a3b4c5-d6e7-4f01-8234-56789abcdef0"
  },
  "location": {
    "id": "3c4d5e6f-7081-49ab-acde-f0123456789a",
    "object": "location",
    "address_line_1": "10 Harley Street",
    "address_line_2": "Marylebone",
    "city": "London",
    "country_code": "GB",
    "county": "Greater London",
    "created_at": "2026-01-01T09:00:00Z",
    "formatted_address": "10 Harley Street, Marylebone, London, W1G 9PF",
    "name": "Harley Street Clinic",
    "postcode": "W1G 9PF",
    "updated_at": "2026-01-01T09:00:00Z"
  },
  "patient": {
    "id": "1a2b3c4d-5e6f-4789-8abc-def012345678",
    "object": "patient",
    "address_line_1": "10 Harley Street",
    "address_line_2": "Marylebone",
    "city": "London",
    "country_code": "GB",
    "county": "Greater London",
    "created_at": "2026-01-01T09:00:00Z",
    "creation_source": "api",
    "date_of_birth": "1990-01-01",
    "display_name": "Dr Alex Morgan",
    "email": "alex.morgan@example.com",
    "first_name": "Alex",
    "is_opted_out_of_sms": false,
    "last_name": "Morgan",
    "mobile": "7700900123",
    "mobile_country_dial_code": "GB",
    "nhs_number": "485 777 3456",
    "phone": "2071234567",
    "phone_country_dial_code": "GB",
    "phone_number": "+44 7700 900123",
    "postcode": "W1G 9PF",
    "sex": "female",
    "title": "Dr",
    "updated_at": "2026-01-01T09:00:00Z"
  },
  "payor": {
    "id": "708192a3-b4c5-4def-8012-3456789abcde",
    "object": "payor",
    "address_line_1": "10 Harley Street",
    "address_line_2": "Marylebone",
    "alternative_payor_id": null,
    "city": "London",
    "country_code": "GB",
    "county": "Greater London",
    "created_at": "2026-01-01T09:00:00Z",
    "first_name": "Alex",
    "formatted_name": "Dr Alex Morgan",
    "formatted_payor_name": "Bupa",
    "insurance_authorization_code": "AUTH123",
    "insurance_company_id": "855e25b0-b138-48da-86ea-15162ce81f14",
    "insurance_policy_end_date": "2026-12-31",
    "insurance_policy_number": "POLICY123",
    "insurance_policy_start_date": "2026-01-01",
    "last_name": "Morgan",
    "notes": "Please confirm the appointment by email.",
    "payor_type": "insurance_company",
    "postcode": "W1G 9PF",
    "title": "Dr",
    "updated_at": "2026-01-01T09:00:00Z"
  },
  "recall_due_date": "2026-01-01",
  "remote_method": null,
  "service": {
    "id": "5e6f7081-92a3-4bcd-8ef0-123456789abc",
    "object": "service",
    "created_at": "2026-01-01T09:00:00Z",
    "description": "An initial consultation at the Harley Street Clinic.",
    "duration_minutes": 30,
    "is_bookable_online": true,
    "name": "Initial consultation",
    "service_variants": [
      {
        "id": "6f708192-a3b4-4cde-9f01-23456789abcd",
        "clinician_id": "2b3c4d5e-6f70-489a-9bcd-ef0123456789",
        "currency": "GBP",
        "description": "An initial consultation at the Harley Street Clinic.",
        "links": {
          "clinician": "https://api.carebit.co/v1/clinicians/2b3c4d5e-6f70-489a-9bcd-ef0123456789",
          "location": "https://api.carebit.co/v1/locations/3c4d5e6f-7081-49ab-acde-f0123456789a"
        },
        "location_id": "3c4d5e6f-7081-49ab-acde-f0123456789a",
        "net_price": 1,
        "permits_remote_bookings": true
      }
    ],
    "tax_rate": {
      "id": "211b60c7-ec1b-41b4-8a29-e855209bc694",
      "description": "An initial consultation at the Harley Street Clinic.",
      "percentage": 20,
      "title": "VAT"
    },
    "updated_at": "2026-01-01T09:00:00Z"
  },
  "service_variants": [
    {
      "id": "6f708192-a3b4-4cde-9f01-23456789abcd",
      "clinician_id": "2b3c4d5e-6f70-489a-9bcd-ef0123456789",
      "currency": "GBP",
      "description": "An initial consultation at the Harley Street Clinic.",
      "links": {
        "clinician": "https://api.carebit.co/v1/clinicians/2b3c4d5e-6f70-489a-9bcd-ef0123456789",
        "location": "https://api.carebit.co/v1/locations/3c4d5e6f-7081-49ab-acde-f0123456789a"
      },
      "location_id": "3c4d5e6f-7081-49ab-acde-f0123456789a",
      "net_price": 1,
      "permits_remote_bookings": true
    }
  ],
  "start_time": "2026-01-01T09:00:00Z",
  "status": "arrived",
  "updated_at": "2026-01-01T09:00:00Z"
}
```

## Response `400`

The `Idempotency-Key` header is missing (`idempotency_key_required`) or exceeds 255 characters (`idempotency_key_too_long`).

- `object`
  - `error` (`object`) - The structured details that describe why the request failed.
    - `code` (`string`) - The machine-readable error code.
    - `errors` (`array | null`) - Additional errors from a failed validation.
      - `items` (`object`)
        - `code` (`string`) - The machine-readable code for this validation error.
        - `message` (`string`) - A message that explains this validation error.
        - `param` (`string | null`) - The name of the parameter that caused this validation error, when known.
    - `message` (`string`) - A message that explains the error and how to resolve it.
    - `param` (`string | null`) - The name of the parameter that caused the error, when known.
    - `type` (`string`) - enum: `authentication_error`, `permission_error`, `invalid_request_error`, `rate_limit_error`, `api_error`; The high-level category of the error.

### Example

```json
{
  "error": {
    "code": "resource_missing",
    "errors": [
      {
        "code": "resource_missing",
        "message": "The requested resource was not found.",
        "param": "patient_id"
      }
    ],
    "message": "The requested resource was not found.",
    "param": "patient_id",
    "type": "authentication_error"
  }
}
```

## Response `401`

The access token is missing, invalid, expired, or revoked.

- `object`
  - `error` (`object`) - The structured details that describe why the request failed.
    - `code` (`string`) - The machine-readable error code.
    - `errors` (`array | null`) - Additional errors from a failed validation.
      - `items` (`object`)
        - `code` (`string`) - The machine-readable code for this validation error.
        - `message` (`string`) - A message that explains this validation error.
        - `param` (`string | null`) - The name of the parameter that caused this validation error, when known.
    - `message` (`string`) - A message that explains the error and how to resolve it.
    - `param` (`string | null`) - The name of the parameter that caused the error, when known.
    - `type` (`string`) - enum: `authentication_error`, `permission_error`, `invalid_request_error`, `rate_limit_error`, `api_error`; The high-level category of the error.

### Example

```json
{
  "error": {
    "code": "resource_missing",
    "errors": [
      {
        "code": "resource_missing",
        "message": "The requested resource was not found.",
        "param": "patient_id"
      }
    ],
    "message": "The requested resource was not found.",
    "param": "patient_id",
    "type": "authentication_error"
  }
}
```

## Response `403`

The access token lacks the required scope, or the project is disabled.

- `object`
  - `error` (`object`) - The structured details that describe why the request failed.
    - `code` (`string`) - The machine-readable error code.
    - `errors` (`array | null`) - Additional errors from a failed validation.
      - `items` (`object`)
        - `code` (`string`) - The machine-readable code for this validation error.
        - `message` (`string`) - A message that explains this validation error.
        - `param` (`string | null`) - The name of the parameter that caused this validation error, when known.
    - `message` (`string`) - A message that explains the error and how to resolve it.
    - `param` (`string | null`) - The name of the parameter that caused the error, when known.
    - `type` (`string`) - enum: `authentication_error`, `permission_error`, `invalid_request_error`, `rate_limit_error`, `api_error`; The high-level category of the error.

### Example

```json
{
  "error": {
    "code": "resource_missing",
    "errors": [
      {
        "code": "resource_missing",
        "message": "The requested resource was not found.",
        "param": "patient_id"
      }
    ],
    "message": "The requested resource was not found.",
    "param": "patient_id",
    "type": "authentication_error"
  }
}
```

## Response `404`

Error response.

- `object`
  - `error` (`object`) - The structured details that describe why the request failed.
    - `code` (`string`) - The machine-readable error code.
    - `errors` (`array | null`) - Additional errors from a failed validation.
      - `items` (`object`)
        - `code` (`string`) - The machine-readable code for this validation error.
        - `message` (`string`) - A message that explains this validation error.
        - `param` (`string | null`) - The name of the parameter that caused this validation error, when known.
    - `message` (`string`) - A message that explains the error and how to resolve it.
    - `param` (`string | null`) - The name of the parameter that caused the error, when known.
    - `type` (`string`) - enum: `authentication_error`, `permission_error`, `invalid_request_error`, `rate_limit_error`, `api_error`; The high-level category of the error.

### Example

```json
{
  "error": {
    "code": "resource_missing",
    "errors": [
      {
        "code": "resource_missing",
        "message": "The requested resource was not found.",
        "param": "patient_id"
      }
    ],
    "message": "The requested resource was not found.",
    "param": "patient_id",
    "type": "authentication_error"
  }
}
```

## Response `409`

A concurrent request holds the idempotency lease (`idempotency_conflict`). Retry after the delay indicated by `Retry-After`.

- `object`
  - `error` (`object`) - The structured details that describe why the request failed.
    - `code` (`string`) - The machine-readable error code.
    - `errors` (`array | null`) - Additional errors from a failed validation.
      - `items` (`object`)
        - `code` (`string`) - The machine-readable code for this validation error.
        - `message` (`string`) - A message that explains this validation error.
        - `param` (`string | null`) - The name of the parameter that caused this validation error, when known.
    - `message` (`string`) - A message that explains the error and how to resolve it.
    - `param` (`string | null`) - The name of the parameter that caused the error, when known.
    - `type` (`string`) - enum: `authentication_error`, `permission_error`, `invalid_request_error`, `rate_limit_error`, `api_error`; The high-level category of the error.

### Example

```json
{
  "error": {
    "code": "resource_missing",
    "errors": [
      {
        "code": "resource_missing",
        "message": "The requested resource was not found.",
        "param": "patient_id"
      }
    ],
    "message": "The requested resource was not found.",
    "param": "patient_id",
    "type": "authentication_error"
  }
}
```

## Response `422`

The `Idempotency-Key` was previously used with a different request body (`idempotency_key_reused`), or the request body failed validation.

- `object`
  - `error` (`object`) - The structured details that describe why the request failed.
    - `code` (`string`) - The machine-readable error code.
    - `errors` (`array | null`) - Additional errors from a failed validation.
      - `items` (`object`)
        - `code` (`string`) - The machine-readable code for this validation error.
        - `message` (`string`) - A message that explains this validation error.
        - `param` (`string | null`) - The name of the parameter that caused this validation error, when known.
    - `message` (`string`) - A message that explains the error and how to resolve it.
    - `param` (`string | null`) - The name of the parameter that caused the error, when known.
    - `type` (`string`) - enum: `authentication_error`, `permission_error`, `invalid_request_error`, `rate_limit_error`, `api_error`; The high-level category of the error.

### Example

```json
{
  "error": {
    "code": "resource_missing",
    "errors": [
      {
        "code": "resource_missing",
        "message": "The requested resource was not found.",
        "param": "patient_id"
      }
    ],
    "message": "The requested resource was not found.",
    "param": "patient_id",
    "type": "authentication_error"
  }
}
```

## Response `429`

Too many requests. Retry after the delay indicated by `Retry-After`.

- `object`
  - `error` (`object`) - The structured details that describe why the request failed.
    - `code` (`string`) - The machine-readable error code.
    - `errors` (`array | null`) - Additional errors from a failed validation.
      - `items` (`object`)
        - `code` (`string`) - The machine-readable code for this validation error.
        - `message` (`string`) - A message that explains this validation error.
        - `param` (`string | null`) - The name of the parameter that caused this validation error, when known.
    - `message` (`string`) - A message that explains the error and how to resolve it.
    - `param` (`string | null`) - The name of the parameter that caused the error, when known.
    - `type` (`string`) - enum: `authentication_error`, `permission_error`, `invalid_request_error`, `rate_limit_error`, `api_error`; The high-level category of the error.

### Example

```json
{
  "error": {
    "code": "resource_missing",
    "errors": [
      {
        "code": "resource_missing",
        "message": "The requested resource was not found.",
        "param": "patient_id"
      }
    ],
    "message": "The requested resource was not found.",
    "param": "patient_id",
    "type": "authentication_error"
  }
}
```

## Code samples

```bash
curl -X PATCH "https://api.carebit.co/v1/bookings/8f14e45f-ea7d-4b6f-9c2a-1d3e5f7a9b0c" \
  -H "Authorization: Bearer $CAREBIT_ACCESS_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "status": "confirmed"
}'
```

```javascript
const response = await fetch("https://api.carebit.co/v1/bookings/8f14e45f-ea7d-4b6f-9c2a-1d3e5f7a9b0c", {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${process.env.CAREBIT_ACCESS_TOKEN}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({
  "status": "confirmed"
}),
});

if (!response.ok) {
  throw new Error(`Carebit API error: ${response.status}`);
}

const data = await response.json();
```

```python
import os
import requests
import uuid

response = requests.patch(
    "https://api.carebit.co/v1/bookings/8f14e45f-ea7d-4b6f-9c2a-1d3e5f7a9b0c",
    headers={
        "Authorization": f"Bearer {os.environ['CAREBIT_ACCESS_TOKEN']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "status": "confirmed"
    }
)
response.raise_for_status()
data = response.json()
```

```ruby
require "httparty"
require "json"
require "securerandom"

response = HTTParty.patch(
  "https://api.carebit.co/v1/bookings/8f14e45f-ea7d-4b6f-9c2a-1d3e5f7a9b0c",
  headers: {
    "Authorization" => "Bearer #{ENV.fetch("CAREBIT_ACCESS_TOKEN")}",
    "Idempotency-Key" => SecureRandom.uuid,
    "Content-Type" => "application/json"
  },
  body: {
    "status" => "confirmed"
  }.to_json
)
raise "Carebit API error: #{response.code}" unless response.success?
data = response.parsed_response
```

```php
<?php

$client = new GuzzleHttp\Client();

$response = $client->patch("https://api.carebit.co/v1/bookings/8f14e45f-ea7d-4b6f-9c2a-1d3e5f7a9b0c", [
    "headers" => [
      "Authorization" => "Bearer " . getenv("CAREBIT_ACCESS_TOKEN"),
      "Idempotency-Key" => bin2hex(random_bytes(16)),
    ],
    "json" => [
      "status" => "confirmed"
    ]
]);
$data = json_decode((string) $response->getBody(), true, flags: JSON_THROW_ON_ERROR);
```
