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, where rest_server_url is the REST server to contact for your identity domain. See Send Requests.

To find the guardians of a minor:

  1. 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 Guest LASTNAME.

    {
     "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": "Guest",
            "lastName": "LASTNAME",
            "gender": "Female",
            "dateOfBirth": "2016-xx-xx",
            "reservationBookingNumber": "4095006",
            "boardCardNumber": "1111111111111111",
            "embarkCruiseId": 12503,
            "embarkDate": "2022-05-09",
            "reservationStatus": "Leaving Today",
            "cabinNum": "1014",
            ...
         },
         "links": [ ... ]
       },
       {
          "item": {
               "reservationId": 994533,
               "guestId": 1024763,
               "firstName": "Guest",
               "lastName": "LASTNAME",
               "gender": "Female",
               "dateOfBirth": "1980-xx-xx",
               "boardCardNumber": "1111111111111111",
               "reservationBookingNumber": "4083564",
               "embarkCruiseId": 10881,
               "embarkDate": "2022-05-09",
               "reservationStatus": "No Show",
               "cabinNum": "1110",
               ...
          },
           "links": [ ...  ]
       }
     ]
    }
  2. 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
     ]
    }
  3. 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": "Guest",
       "lastName": "LASTNAME",
       "gender": "Male",
       "dateOfBirth": "1982-xx-xx",
       "boardCardNumber": "1111111111111111",
       "embarkCruiseId": 12503,
       "reservationStatus": "Checked In",
       "cabinNum": "1014",
       "offboardStatus": false,
       "photo": "\/guest\/1084970\/photo?ticks=1654656102000",
       "contactNum": "+333333333333",
       "emailAddress": "email@email.com",
       "assemblyStationCode": "Z",
       "assemblyStationName": "Musterstation Z",
      ...
     },
     "links": [ ... ]
    }