Test

Test REST APIs, their resources, and parameters before you implement REST calls. When you test, you need an application to interact with the REST API. You can also use cURL commands or REST clients to test REST APIs before you implement them in your application.

Testing with cURL

cURL is a command-line tool for transferring data using URL syntax. cURL options to test REST APIs are listed in the following table:

Option Description
-d

Sends the specified JSON request body to the server. If you begin the data with the @ sign, the rest of the request body should be a file name from which the data is read.

-H

Specifies an extra HTTP header in the request. To specify multiple headers, precede each header with the -H option.

-output {file}

Writes the output to a file.

-X

Specifies the request method to use when communicating with the HTTP server. The default method is GET.

The following table shows examples of GET, PUT, and POST operations using cURL:

Operation cURL Command

Use GET to retrieve guest manifests

curl -X GET -H "Authorization:Bearer {access-token}" https://{host}:{port}/spms/v2/ships/{ship-id}/borderControls/ees/guestManifestLists

Use PUT to update EES configuration

curl -X PUT -H "Authorization:Bearer {access-token}" -H "Content-Type: application/json" -d "{request payload}"" "https://server:port/spms/v2/ships/{shipId}/configurations/eesConfigurations"

Use POST to create EES Request file

curl -X POST -H "Authorization:Bearer {access-token}" -H "Content-Type: application/json" -d @example_request_payload.json https://your_organization.com:port/spms/v2/ships/{shipId}/borderControls/ees/manifests

Testing with REST Clients

You can test REST services using the Advanced REST Client.

The following table shows examples of GET, POST, and PUT operations using a REST client:

Operation Response/Payload

Get ship properties

https://your_organization.com:port/spms/v2

/userDetails/me/shipProperties

{
    "shipRecordID": 17,
    "shipReferenceID": "186-117",
    "shipType": 1,
    "shipEnabled": true,
    "shipName": "ORCL xSight",
    "shipID": 186000000117,
    "shipCode": "OXS117"
}

Create EES Request file

https://{host}:{port}/spms/v2/ships/{shipId}/borderControls/ees/manifests

Payload:

{
    "scheduleNo": "SN1001",
    "cruiseItineraryName": "Fjord Itinerary",
    "arrivalDate": "2025-04-19",
    "embarkationHarborId": 11,
    "departureDateTime": "2025-04-20 16:15",
    "guestManifestList": [
        {
        "pReqID": 1001,
        "surname": "LastName",
        "givenName": "FirstName",
        "stateroomNo": "1020",
        "dateOfBirth": "1999-xx-xx",
        "sex": "Female",
        "paxNationality": "USA",
        "travelDocType": "passport",
        "travelDocNbr": "A15xxxxx",
        "expiryDate": "2025-02-25",
        "issuingState": "USA",
        "inTransit": "NO",
        "eesEtiasOutOfScope": "NO"
        }
    ]
}

Response:

{
    "scheduleNo": "SN1001",
    "cruiseItineraryName": "Fjord Itinerary",
    "arrivalDate": "2025-19-04",
    "arrivalHarbor": {
        "code": 11,
        "description": "White Harbour",
        "countryCode": "USA",
        "countryDescription": "United States"
    },
    "departureDateTime": "2025-20-04 16:15",
    "disembarkationHarbor": "White Harbour",
    "doubleEntryRequired": "YES",
    "guestManifestList": [
        {
        "pReqID": 1001,
        "surname": "LastName",
        "givenName": "FirstName",
        "stateroomNo": "1020",
        "dateOfBirth": "1999-xx-xx",
        "sex": "Female",
        "paxNationality": {
            "code": "USA",
            "description": "United States"
        },
        "travelDocType": "passport",
        "travelDocNbr": "A15xxxxx",
        "expiryDate": "2025-25-02",
        "issuingState": {
            "code": "USA",
            "description": "United States"
        },
        "inTransit": "NO",
        "eesEtiasOutOfScope": "NO",
        "guestStatus": "Pending"
        }
    ],
    "createdDateTime": "2025-03-28 16:30:56",
    "requestFileStatus": "Pending"
}

Update EES Response file

https://{host}:{port}/spms/v2/ships/{shipId}/borderControls/ees/updateManifests

Payload: {EES Response File}

Response: OK