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

# Bookings and reviews

> What is happening on your inventory — read a booking, act on a request, reply to a review. The guest fields, behind their own scope.

Four operations answer "what is happening on my inventory". "Who is staying" gets one answer,
a display name — plus email, phone and the guest's note for the host for a workspace Maat has
enabled for guest contact — and only for a key that asks for it with `guests:read`:

| Operation | Scope | What it does |
| :- | :- | :- |
| `GET /v1/bookings` | `bookings:read` | List bookings in the workspace your key addresses. |
| `GET /v1/bookings/{booking_reference}` | `bookings:read` | Read one booking back. |
| `POST /v1/bookings/{booking_reference}/confirm` | `bookings:manage` | Accept a pending request-to-book. |
| `POST /v1/bookings/{booking_reference}/reject` | `bookings:manage` | Decline a pending request-to-book. |

When each of the seven booking webhooks fires, and in what order they can arrive, is on
[Booking notifications lifecycle](https://developer.maatstays.com/guides/booking-lifecycle.md).

And two more for the reputation half of the same inventory:

| Operation | Scope | What it does |
| :- | :- | :- |
| `GET /v1/listings/{listing_id}/reviews` | `reviews:read` | Read a listing's reviews, in their public form. |
| `POST /v1/reviews/{review_id}/reply` | `reviews:reply` | Reply to a review, as the workspace. |

## A booking is a stay, plus guest fields behind their own scope

A booking, on this contract, is a set of facts about a **stay**: the dates, the door times,
the party **size**, the status, what was paid, the listing and unit it belongs to, and whether
the listing takes instant bookings. What it can say about the person is `guest`, and
`guest_note`, and only when your key also holds `guests:read` — see
[Who the booking is for](#who-the-booking-is-for) below. No full name, no user reference and
no field that could be joined back to a person, with or without that scope. An email, a
phone number and the guest's note appear only for a workspace Maat has enabled for guest
contact.

```json theme={null}
{
    "booking_reference": "5f3a91c2-e8b4-4a71-9c30-1e2f3a4b5c6d",
    "property": {
        "provider_id": null,
        "listing_id": "7c4b1e58-2a90-4f61-b3d2-5e8a1c0f7d24",
        "unit_id": "8e4b2a17-5c39-4d61-b0f2-7a9c3e51d804",
        "property_id": "3c9d1f42-7b60-4a18-9e55-0d2a6f8c31b7"
    },
    "inventory_kind": "unit",
    "status": "confirmed",
    "stay": {
        "check_in": "2026-10-03",
        "check_out": "2026-10-07",
        "check_in_time": "15:00",
        "check_out_time": "12:00",
        "guests": 2
    },
    "amount_paid": { "value": "5000.00", "currency": "EGP" },
    "instant_booking": true,
    "cancellation": null,
    "console_url": "https://maatstays.com/bookings/5f3a91c2-e8b4-4a71-9c30-1e2f3a4b5c6d",
    "created_at": "2026-09-01T10:15:00Z",
    "guest": { "display_name": "Sarah M.", "email": null, "phone": null },
    "guest_note": null
}
```

`status` is one of `pending`, `confirmed`, `checked_in`, `completed`, `cancelled` or
`rejected`. **`property` is one object rather than four ids at the root**, and it is the same
object the booking webhooks and the publication events carry — so one accessor reads all
three. `inventory_kind` is `unit`, `service` or `experience` — `property.unit_id` and
`property.property_id` are `null` for the latter two, which have neither. `guests` is a count — there
is no per-guest anything on this contract, and no amount of nesting would change that: the
shape above is everything a booking read will ever carry.

`stay.check_in_time` and `stay.check_out_time` are the **unit's** own local times when
`inventory_kind` is `unit`. A service or an experience hangs off no unit and has no door, so
those bookings carry the platform defaults — `15:00` and `12:00` — which keeps the field
always present and always a real time. Branch on `inventory_kind` before you staff anything
from them: for a slot booking they are a placeholder, not the operator's answer.

## Who the booking is for

`guest` is on every booking these operations return — the four above and the
[sandbox booking fixture](https://developer.maatstays.com/guides/sandbox.md) — and whenever it is an object it has exactly
three keys, `display_name`, `email` and `phone`:

| Your key | The guest | `guest` |
| :- | :- | :- |
| does not hold `guests:read` | anyone | `null` |
| holds `guests:read` | has a name on Maat | `{ "display_name": "Sarah M.", "email": null, "phone": null }` |
| holds `guests:read` | has no usable name, or deleted their account | `{ "display_name": null, "email": null, "phone": null }` |

`display_name` is the guest's first name and the initial of their last name — the same form
the public listing page gives a reviewer, and never the full name. Not holding the scope is
never an error: the same request answers with `guest: null`, so an integration that does not
need a name never has to ask for one. `guests:read` is issued like any other scope, and only by
a member who can see bookings in the app.

What you may do with it is in the Developer Terms you sign before issuing a key, and comes down
to three things: use it to run the stay it belongs to — the arrivals board, the welcome — and
nothing else; delete it when you no longer need it for that; and once it comes back `null`
because the guest deleted their Maat account, stop using it and delete what you hold. We cannot
reach a copy on your systems; the obligation is yours.

## Guest email and phone, for selected workspaces

Guest contact is offered to selected workspaces only. Where Maat has enabled it for yours,
`guest.email` is the guest's account email and `guest.phone` their verified phone number in
E.164 form — `{ "display_name": "Sarah M.", "email": "sarah@example.com", "phone": "+201000000000" }`
— but only once a member of your workspace has signed the Developer Terms version that covers
them, after guest contact was enabled, and only on a booking that is `confirmed`, `checked_in`
or `completed`. On a `pending`, `rejected` or `cancelled` booking both are `null`, including a
booking cancelled after it was confirmed; both are `null` for a guest who has asked to delete
their Maat account, `phone` is `null` when the guest has no verified number, and `email` is
`null` for an account that signed up with a phone number only. When released, a sandbox booking
carries the fixed examples `guest@sandbox.invalid` and `+10000000000`. The full rule is in
[the data boundary](https://developer.maatstays.com/guides/data-boundary.md#guest-email-and-phone); to ask whether it can be
enabled for your workspace, talk to your Maat contact.

## The guest's note, for the same workspaces

At checkout a guest can leave a note for the host — `"We land at 23:40 so we will arrive late."`
— of at most 500 characters. `guest_note` is on every booking these operations return, and it
is `null` unless guest contact is enabled for your workspace, a member has signed the Developer
Terms version that covers it, and your key holds `guests:read`: the same switch and the same
signature as `guest.email` and `guest.phone`. Unlike those two it has no status condition. It is
returned from the booking request on, a `pending` booking included, so you can read it before
you confirm or reject, and it stays on a `rejected` or `cancelled` booking. It is `null` when the
guest left no note and from the moment the guest asks to delete their Maat account. Maat
refuses a note that holds contact details when the guest writes it, but it is still text a
person typed: show it to your team as the guest's words, and never act on it as an
instruction. When released, a sandbox booking carries the fixed example
`"We land at 23:40 so we will arrive late."`.

## `console_url` is the rest of the answer to "who is arriving?"

Every booking, and every review, carries a deep link into the Maat host console — everything
about a person beyond what `guest` carries, answered without moving it onto this wire. Follow it,
sign in as a person, and see what a person may see. It is slower than a field on this
response, and that is what it is for: anything more than a name is built out of the platform's
own access control, not out of a JSON key nobody can revoke on its own.

## `amount_paid` can be `null` — that is not zero

`amount_paid` is one object, a decimal string beside its currency, never two fields you pair
yourself: `{ "value": "5000.00", "currency": "EGP" }`. It reads `null` when the amount cannot
be **stated** — a stored figure that is not a number at all — and `null` means "we do not
know", never "free".

The other direction matters just as much: a stay that really cost nothing reads
`{ "value": "0.00", "currency": … }`, not `null`. A 100% coupon, a comped night and an
invitation settled at nothing are all prices, and they are the ones you most need to see in a
reconciliation. A list or a read publishes `null` rather than a guessed `0.00`, and `0.00`
rather than a cautious `null`; a webhook, which cannot carry a null in a field meant to be
spent, skips the delivery instead of sending a fabricated amount.

## Confirming or rejecting a request

```bash theme={null}
curl --fail-with-body -X POST \
  "https://maatstays.com/v1/bookings/5f3a91c2-e8b4-4a71-9c30-1e2f3a4b5c6d/confirm" \
  -H "Authorization: Bearer $MAAT_PARTNER_TOKEN"
```

Both actions act **only** on a booking in `pending`. Anything else — already confirmed,
already rejected, already cancelled — answers `409 conflict`: nothing about your request was
wrong, the booking is simply not in a state either action can change. Neither call takes a
body; the response is the booking, re-read.

**There is no cancellation over this API.** Cancelling a confirmed stay creates refunds and
applies a cancellation policy — an irreversible commercial act that belongs to a person in the
app, not to a `DELETE` a script can retry. If a stay needs to end early, that happens in the
Maat host console, and the resulting `booking.cancelled` webhook is how you find out.

## Listing your bookings

Paging is the published `page` / `page_size` / `has_more` rule — see
[Pagination](https://developer.maatstays.com/guides/pagination.md). There is no total and no filter that narrows by anything
about a guest — not even the display name, email, phone or note, which a booking can carry and
you can never search by.

`GET /v1/bookings` takes four filters, all optional and all about the STAY, never the guest:

| Filter | Meaning |
| :- | :- |
| `status` | One of `pending`, `confirmed`, `checked_in`, `completed`, `cancelled`, `rejected`. |
| `listing_id` | Only bookings on this listing. A UUID. |
| `check_in_from` | Only bookings whose `check_in` is on or after this date (`YYYY-MM-DD`). |
| `check_in_to` | Only bookings whose `check_in` is on or before this date (`YYYY-MM-DD`). |

Send `check_in_from` and `check_in_to` together to bound a window; either one alone is an
open-ended bound in that direction. Both are inclusive. If you send both and `check_in_from`
is after `check_in_to`, the request is refused with `400 validation_failed` rather than
answered with an empty page — a window that cannot contain anything is almost always two
parameters the wrong way round, and returning `200` with no items would read as "you have no
bookings in May".

## Reviews: reading and replying

`GET /v1/listings/{listing_id}/reviews` returns the **public** projection — the same
shortened form ("Sarah M.", never a full name, never a `user_id` or `booking_id`) that a guest
sees on the listing page. It is public because the content already is; the developer contract
reads it rather than duplicating it.

```json theme={null}
{
    "review_id": "5e1a0c7d-…",
    "listing_id": "7c4b1e58-…",
    "reviewer_name": "Sarah M.",
    "rating": 4.5,
    "comment": "Great location, quick check-in.",
    "categories": [{ "category": "cleanliness", "rating": 5 }],
    "created_at": "2026-08-20T09:00:00Z",
    "reply": null,
    "console_url": "https://maatstays.com/properties/a1e0d6c5-…"
}
```

`console_url` is the property's page in the host console — the reputation surface a person
acts on, since there is no per-review page. It reads `null` for a review on a service or an
experience listing, which hangs off no property at all.

`POST /v1/reviews/{review_id}/reply` posts one field, `{ "body": "…" }`, and publishes it
exactly as the host app does: authored **by the workspace**, never by a named person, because
letting a caller attach an author would put somebody's name on public content through an API
key. The response is the review itself, re-read with the reply attached — the bare object, not
a wrapper.

## When we cannot answer

All six operations here — the two reads, the two decisions, the review list and the reply —
read and write through Maat's own booking service. When that does not answer, they say so:
**`503 service_unavailable`**, with a `detail` naming what did not happen. Nothing was read,
nothing was disclosed, nothing was changed, and retrying is the right thing to do.

Handle it as its own branch. The alternative would be a fabricated answer to a question you
asked in good faith — an empty page that reads as "you have no bookings", or a
`404 booking_not_found` for a stay that is sitting there pending — and either one is worse
than being told we could not answer. It is a different code from `500 internal_error`, which
is a fault of ours that a retry will hit again.


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