- REST API for <Oracle Cruise Shipboard Property Management System>Oracle Hospitality Cruise REST API
- Use Cases
- Find Guardian of a Minor
Find Guardian of a Minor
You can find parents/guardians of a minor using the REST API.
Note:
-
The cURL command examples use the URL structure
https://rest_server_url/resource-path
, whererest_server_url
is the REST server to contact for your identity domain. See Send Requests.
To find the guardians of a minor:
- Find all reservations matching the guest name or state room, in this case it will be the name of the minor
curl -i -X GET -H "Authorization:Bearer <access-token>" https://rest_server_url/spms/v1/reservations?searchValue=Anna&profileType=P
Specify the following options on the cURL command line:
-
-i
option to include the HTTP header in the output. This option is optional. -
-X
option to indicate the type of request (GET
). -
-H
to include access token
The following shows an example of the response body.
Look for the guest you want to view. In this example, the guest name is
Anna Cardinale
.{ "offset": 0, "count": 2, "hasMore": false, "link": { "method": "get", "rel": "self", "operationId": "nextPage", "href": "https:\/\/rest_server_url\/spms\/v1\/reservations?searchValue=Anna&profileType=P" }, "limit": 10, "items": [ { "item": { "reservationId": 1043703, "guestId": 1084973, "firstName": "Anna", "lastName": "Cardinale", "gender": "Female", "dateOfBirth": "2016-01-01", "reservationBookingNumber": "4095006", "boardCardNumber": "9842000104370300", "embarkCruiseId": 12503, "embarkDate": "2022-05-09", "reservationStatus": "Leaving Today", "cabinNum": "1014", ... }, "links": [ ... ] }, { "item": { "reservationId": 994533, "guestId": 1024763, "firstName": "ANNALISA", "lastName": "ANTONINO", "gender": "Female", "dateOfBirth": "1980-08-05", "boardCardNumber": "980000000099453300", "reservationBookingNumber": "4083564", "embarkCruiseId": 10881, "embarkDate": "2022-05-09", "reservationStatus": "No Show", "cabinNum": "1110", ... }, "links": [ ... ] } ] }
-
- Identify the guardians of
1084973
, which is Anna's ID.curl -i -X GET -H "Authorization:Bearer <access-token>" https://rest_server_url/spms/v1/guardians/child/1084973
Specify the following options on the cURL command line:
-
-i
option to include the HTTP header in the output. This option is optional. -
-X
option to indicate the type of request (GET
). -
-H
to include access token
The following shows an example of the response body.
{ "guardianIds": [ 1084970, 1085008 ] }
-
- Retrieve guardian data and take action, as required.
curl -i -X GET -H "Authorization:Bearer <access-token>" https://rest_server_url/spms/v1/guest/1084970
The following shows an example of the response body.
{ "item": { "reservationId": 1043700, "guestId": 1084970, "firstName": "Francesco", "lastName": "Cardinale", "gender": "Male", "dateOfBirth": "1982-12-13", "boardCardNumber": "9842000104370000", "embarkCruiseId": 12503, "reservationStatus": "Checked In", "cabinNum": "1014", "offboardStatus": false, "photo": "\/guest\/1084970\/photo?ticks=1654656102000", "contactNum": "+390933823555", "emailAddress": "franc.c@anymail.com", "assemblyStationCode": "Z", "assemblyStationName": "Musterstation Z", ... }, "links": [ ... ] }