Update Cabins (Voyage)
See Booking flow for the end-to-end lifecycle.
Endpoint: /bookings/create/voyage-only/{:sessionId}/cabins
METHOD: PUT
Sets the cabins on a held booking: moves a cabin to another cabin grade, books a specific cabin number in place of the guarantee cabin it was created with, or returns a cabin to a guarantee cabin.
Call List Available Cabin Numbers before choosing a new cabin number — one that has not been offered for that grade is rejected. Update cabins before confirming; once the booking is confirmed the cabins are fixed.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| sessionId | string (UUID) | Yes | Session returned by /search/voyages. Must be voyage-only and hold a booking. |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| user_key | string | Yes | Unique key associated with the calling agency. |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
cabins |
array of objects | Yes | One entry per cabin to update, each giving the state you want that cabin in. Cabins left out keep whatever they already hold. |
cabins[].id |
number | Yes | id of the cabin on the booking response. Each cabin can appear at most once. |
cabins[].code |
string | Yes | The cabin grade the cabin should hold. Send the grade it already holds (cabins[].code on the booking response) to keep it, or another grade offered for this sailing by /search/voyages to change it. Matched case-insensitively. |
cabins[].cabinNumber |
string | Yes | Cabin number from the available list for that cabin's grade, or null for a guarantee cabin. The field must be present; send null explicitly rather than leaving it out. Matched case-insensitively; surrounding whitespace is ignored. The same number cannot be requested for two cabins. An empty or blank string is rejected. |
Example
Request
curl --location --request PUT '{:apiBase}/bookings/create/voyage-only/{:sessionId}/cabins?user_key=abcdef' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer XXXXXXXX' \
--data '{
"cabins": [
{
"id": 1,
"code": "O3",
"cabinNumber": "313"
}
]
}'
Response
{
"vehicles": [],
"addons": [],
"excursions": [],
"supplementalTours": [],
"priceBreakdown": {
"totalPrice": 249.0,
"commissionTotal": 24.9,
"taxTotal": 26.68,
"cabins": [
{
"code": "O3",
"guests": [
{
"guestId": 1,
"price": 249.0,
"promotions": []
}
]
}
],
"addons": [],
"excursions": [],
"supplementalTours": [],
"vehicles": []
},
"sessionId": "f91c02b2-f22a-42c9-80b7-e3ef591ef0e0",
"market": "NO",
"currency": "NOK",
"departureDate": "2026-11-02T20:30:00",
"arrivalDate": "2026-11-08T09:00:00",
"departurePort": "BGO",
"arrivalPort": "KKN",
"shipCode": "NL",
"depositAmount": 49.8,
"depositDueDate": "2026-09-14T00:00:00",
"finalDueDate": "2026-10-03T00:00:00",
"embarkationNotification": null,
"guests": [
{
"id": 1,
"type": "ADULT",
"isLead": null,
"customerDetails": null
}
],
"cabins": [
{
"id": 1,
"code": "O3",
"cabinType": "Outside",
"cabinNumber": "313",
"guests": [
1
]
}
]
}
Fields
The response body is identical in shape to Create Voyage Booking — see its Fields table for the full field reference. cabins[].cabinNumber now carries the allocated cabin.
Errors
See Error model for response-body shapes across status codes.
| Status | Cause |
|---|---|
| 400 | user_key is missing; the body fails validation (see below); an id is not a cabin on the booking; a grade change is not allowed (see below); the available numbers for that cabin's grade have not been listed in this session; a cabinNumber was not among them; or the cabin's grade does not correspond to specific cabins. |
| 404 | The session does not exist or has expired. |
| 409 | The session is not voyage-only; no held booking exists in it yet; or a cabin number or cabin grade could not be secured. |
Validation rules. A 400 is returned when any of these are not met:
cabinsmust be non-empty.- Each
idmust address a cabin on the booking, and appear at most once. - Each
codemust be present. - Each
cabinNumbermust be present, and eithernullor a number in the available list for that cabin's grade. Blank strings are rejected, and no number may be requested for two cabins.
Changing the cabin grade. Send a different code with cabinNumber: null to move a cabin to that grade. The cabin becomes a guarantee cabin in the new grade, and the booking is repriced. A 400 is returned when the new grade was not offered for this sailing in the search that started the session, when it takes fewer guests than the cabin holds, when it would move the cabin between a cabin and deck space, or when a cabinNumber is sent with it. To choose a number in the new grade, list the available numbers for it and send a second PUT.
A grade change gives up the cabin's previous grade, so moving back later depends on availability at that time. Mandatory addons that came with the previous grade are removed for the cabin's guests, and those of the new grade apply. Optional addons you added are kept, unless the new grade includes the same addon. It is then part of the grade and charged once, and it is removed with the grade if the cabin later moves to one that does not include it, so add it again if the guests still want it. The addons, excursions and supplemental tours applicable to the booking may change, so list them again before adding more.
Returning to a guarantee cabin. Send null as the cabinNumber to give a chosen cabin back. A guarantee cabin is assigned before departure. No prior call to List Available Cabin Numbers is needed for this, and the response carries cabinNumber: null for that cabin. Changing directly from one cabin number to another needs no step in between; send the new number.
List before choosing a new number. The available numbers are recorded against the session when you call List Available Cabin Numbers, and are discarded whenever this call succeeds or is refused with 409. Each PUT that asks for a number the cabin does not already hold must therefore be preceded by a GET for that grade, in the same session. Choosing numbers across two grades in one PUT means calling the GET once per grade first, one at a time.
Retries are safe. An entry that matches what the cabin already holds is accepted without listing again and leaves that cabin as it is. Repeating a PUT whose first attempt succeeded therefore returns 200 with the same booking.
When a cabin cannot be secured. Availability is shared with every other booking, so a cabin listed a moment ago, or the last cabin in a grade, may already have been taken. That returns 409. When several cabins are updated in one call, some of them may have changed before the refusal. Read the booking back with Get Held Booking to see what each cabin now holds, then list the available numbers again, or search again for a grade, and choose another. Nothing is silently substituted. Whenever this call succeeds, cabins[].cabinNumber in the response is the cabin you hold.