Table of Contents

Apply Customer Details (Package)

See Booking flow for the end-to-end lifecycle.

Endpoint: /bookings/create/package/{:sessionId}/customer-details

METHOD: PUT

Attaches the passengers' customer details to the held booking. Confirm Package Booking then reserves the booking with the details attached here.

Each call replaces every passenger's details, so send the full set again to correct any of them. Details can be attached at any point while the booking is held, and stay on the booking through later changes such as addons, excursions and cabin numbers.

Path Parameters

Name Type Required Description
sessionId string (UUID) Yes Session returned by /search/packages. Must be a package 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
customerDetails array of objects Yes One entry per passenger on the booking. guestIds must be unique across the array.
customerDetails[].guestId number Yes Passenger ID assigned at create time (matches guests[].id from the create-booking response).
customerDetails[].isLead boolean No Marks the lead passenger, who must be booked as ADULT or SENIOR. At most one entry may set this to true. When none does, the first entry is the lead passenger.
customerDetails[].firstName string Yes Passenger's given name. At most 50 characters.
customerDetails[].lastName string Yes Passenger's family name. At most 50 characters.
customerDetails[].nationalityIataCode string Yes Passenger's nationality as an ISO 3166-1 alpha-2 country code.
customerDetails[].dateOfBirth string (date) Yes Passenger's date of birth as YYYY-MM-DD. Must be in the past and place the passenger inside the age bounds for their booked category (see below).
customerDetails[].gender string Yes One of Male, Female, NonBinary (case-insensitive).
customerDetails[].email string Conditional Required for passengers booked as ADULT or SENIOR; optional otherwise. Must be a valid email address of at most 80 characters when supplied.
customerDetails[].mobileNo string Conditional Required for passengers booked as ADULT or SENIOR; optional otherwise. Must be a valid phone number of at most 20 characters when supplied.
customerDetails[].city string Conditional Required for the lead passenger. At most 100 characters.
customerDetails[].postalCode string Conditional Required for the lead passenger. At most 20 characters.
customerDetails[].countryIataCode string Conditional Required for the lead passenger. ISO 3166-1 alpha-2 country code.

Example

Request

curl --location --request PUT '{:apiBase}/bookings/create/package/{:sessionId}/customer-details?user_key=abcdef' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer XXXXXXXX' \
--data '{
    "customerDetails": [
        {
            "guestId": 1,
            "isLead": true,
            "firstName": "John",
            "lastName": "Testerson",
            "nationalityIataCode": "NO",
            "dateOfBirth": "1980-03-25",
            "gender": "Male",
            "email": "[email protected]",
            "city": "TestCity",
            "postalCode": "12345",
            "countryIataCode": "NO",
            "mobileNo": "+12 345 67 890"
        }
    ]
}'

Response

The held booking, as in the Create Package Booking example, with the details attached. Its guests array:

{
    "guests": [
        {
            "id": 1,
            "type": "ADULT",
            "isLead": true,
            "customerDetails": {
                "firstName": "John",
                "lastName": "Testerson",
                "email": "[email protected]",
                "mobileNo": "+12 345 67 890",
                "nationalityIataCode": "NO",
                "dateOfBirth": "1980-03-25T00:00:00",
                "gender": "Male",
                "city": "TestCity",
                "postalCode": "12345",
                "countryIataCode": "NO"
            }
        }
    ]
}

Fields

The response body is identical in shape to Create Package Booking — see its Fields table for the full field reference. guests[].isLead and guests[].customerDetails now carry the attached details.

Errors

See Error model for response-body shapes across status codes.

Status Cause
400 user_key is missing; the body fails validation (rules below); a customerDetails[].guestId is not on the booking, or a passenger on the booking has no entry; an Adult or Senior is missing email or mobileNo; the lead passenger is not an Adult or Senior; a passenger's age at departure falls outside their booked category; or the details were rejected (see below).
404 The session does not exist or has expired.
409 The session is not a package; or no held booking exists in it yet (call /bookings/create/package/{:sessionId} first).

Validation rules. A 400 is returned when any of these rules are not met:

  • customerDetails must be non-empty, with one entry for every passenger on the booking.
  • At most one customerDetails[] entry may have isLead: true.
  • Every customerDetails[].guestId must be unique within the request and > 0.
  • firstName and lastName must be non-empty and at most 50 characters.
  • nationalityIataCode must be a 2-character ISO 3166-1 alpha-2 country code.
  • dateOfBirth must be in the past.
  • gender must be one of Male, Female, NonBinary (case-insensitive).
  • email, when supplied, must be a syntactically valid email address of at most 80 characters.
  • mobileNo and postalCode may be at most 20 characters, and city at most 100.
  • The lead passenger must be booked as ADULT or SENIOR.
  • The lead passenger needs city, postalCode and countryIataCode (2-character).

Rejected details. Details that pass these rules can still be rejected when the booking is updated. The 400's detail names the field to correct:

detail
A customer's nationality code is not a recognised country code.
A customer's country code is not a recognised country code.
A customer's email address is not valid.
A customer's mobile number is not valid.

Age bounds. Each passenger's age, computed from dateOfBirth as of the voyage's departure date, must fall inside the band for the passenger category they were booked under at search time. A mismatch returns a 400.

Category Age at departure
INFANT Up to and including 5 years (<=5)
CHILD Over 5 and up to and including 17 years (>5 && <=17)
ADULT Over 17 and up to and including 66 years (>17 && <=66)
SENIOR Over 66 years (>66)