Skip to main content
Glama

MAQAMI Travel

post_rates_rebook

Overview

Step 2 of 2 in the hard amendment flow. Use a prebookId produced by POST /bookings/{bookingId}/alternative-prebooks to create the replacement booking. On success, the new booking is created and the original booking is automatically cancelled — you do not need to call the cancel endpoint.

When to Use

  • After alternative-prebooks — Once the guest has chosen one of the alternative prebooks returned by POST /bookings/{bookingId}/alternative-prebooks.

  • Date or occupancy changes — The guest needs different check-in/check-out dates or a different number of adults/children at the same hotel.

  • Hard amendments only — For simple guest-name updates use PUT /bookings/{bookingId}/amend instead.

How It Works

  1. The provided prebookId is validated against the booking referenced by existingBookingId (it must have been produced by an alternative-prebooks call for that booking).

  2. The new booking is created with the supplier using the alternative rate.

  3. The original booking is then automatically cancelled. If the cancellation fails after the new booking is confirmed, the error is logged but the new booking is still returned — contact support to reconcile.

Payment

  • No payment is collected on this endpoint. The payment.method value is ignored — the request body must still include a payment object to satisfy the schema, but the server forces the method to NONE internally. Any price delta between the original and new rate is settled out of band.

Refundable vs Non-refundable Originals

  • Refundable original — Returns 200 OK with the new booking, and the original is cancelled immediately.

  • Non-refundable original — Returns 202 Accepted with a booking amendment record. The request is queued for the Nuitee operations team to handle manually (the original booking may incur cancellation fees).

Required Information

  • prebookId — A prebook session returned by POST /bookings/{bookingId}/alternative-prebooks.

  • existingBookingId — The bookingId of the original confirmed booking being replaced. Must match the bookingId that produced the prebook.

  • holder and guests — Same structure as POST /rates/book. If holder fields are empty they are copied from the original booking.

Quick Start

  1. Call POST /bookings/{bookingId}/alternative-prebooks and pick one of the returned prebookId values.

  2. Call this endpoint with that prebookId, the original bookingId as existingBookingId, and guest information.

  3. On success, the new booking is confirmed and the original is cancelled — no further calls are needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
guestsYesList of guests for the new booking. There is a 1:1 mapping between guests and rooms (one guest entry per `occupancyNumber`).
holderYesInformation on the person responsible for the booking. Any field left empty is populated from the original booking's holder.
paymentYesRequired by the schema but ignored. The server forces the payment method to `NONE` for rebooks — no charge is taken on this endpoint. Send `{"method": "NONE"}` to be explicit.
timeoutNoOptional request timeout in seconds.
prebookIdYesA prebook session returned by `POST /bookings/{bookingId}/alternative-prebooks`. Must reference the same booking as `existingBookingId`.
customTagsNoOptional bag of up to 5 user-defined key/value labels persisted with the booking. Keys must match `^[A-Z0-9_-]+$` and values are strings up to 255 characters. See `POST /rates/book` for the full description.
trackingIdNoOptional tracking ID for analytics or partner attribution.
clientReferenceNoAn optional client-defined reference ID. Acts as an idempotency key to prevent duplicate rebooks. If a booking already exists with the same client reference, the API will return a 4005 error.
existingBookingIdYesThe `bookingId` of the confirmed booking being replaced. The original booking is cancelled automatically when the new booking is confirmed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description openly discloses that 'the original booking is automatically cancelled', that cancellation failures are logged while the new booking is still returned, and that non-refundable originals queue for manual handling. However, this directly contradicts the annotation destructiveHint=false, since cancelling a confirmed booking is a destructive side effect. Per the rules, a description that contradicts annotations scores 1.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with markdown headers and ordered sections; the critical side effect (auto-cancellation) is stated early in the Overview. It is longer than strictly necessary (the 'Quick Start' largely repeats the numbered flow), but the length is justified by the multi-step, multi-outcome nature of the operation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 9-parameter, nested-object, no-output-schema mutation tool, this covers everything an agent needs: required vs defaulted fields, the 200 vs 202 branch by refundability, partial-failure behavior, and payment semantics. Nothing material is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, so the baseline is 3, but the description adds real semantic value the schema lacks: payment.method is forced to NONE regardless of input, holder fields default from the original booking, clientReference acts as an idempotency key returning error 4005, and there is a 1:1 guest/occupancy mapping.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('create the replacement booking' via a `prebookId`), places it precisely as 'Step 2 of 2 in the hard amendment flow', and explicitly tells the agent it does NOT need to call cancel. It is unambiguously distinguishable from `put_bookings_bookingid_amend`, which it names.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'When to Use' section gives explicit triggers (after alternative-prebooks, date/occupancy changes) and an explicit exclusion with the alternative: 'For simple guest-name updates use PUT /bookings/{bookingId}/amend instead.' No inference required.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources