Import the crew safety assignments.

post

/spms/v2/ships/{shipId}/profiles/crewSafetyAssignmentsImport

This API is for bulk importing crew safety assignments. The process involves submitting a CSV file containing crew identifiers along with their corresponding safety numbers. Each record in the CSV file is systematically processed, and a consolidated response is generated, summarizing the outcome of all entries within the file.

Request

Supported Media Types
Path Parameters
Query Parameters
  • This is a required query parameter. It determines how crew members are identified in the file. Must be one of EXTERNAL ID, INTERNAL ID, or RESERVATION ID
    Allowed Values: [ "EXTERNAL ID", "INTERNAL ID", "RESERVATION ID" ]
Form Parameters
  • A CSV file containing crew safety assignment data. Each row represents a single crew member and their associated safety number separated by a comma. CSV File Format: [Crew Identifier], [Safety Number]
Back to Top

Response

Supported Media Types

200 Response

Ok
Body ()
Root Schema : crewSafetyAssignmentsFilePOSTObject
Type: array
Import Crew Safety Assignment POST Object
Show Source
Example:
[
    {
        "crewIdentifier":"9211348",
        "crewSafetyNumber":"SAFE102",
        "crewOperationalGroup":"null",
        "crewLastName":"null",
        "status":"Fail",
        "information":"Identifier does not exist or not for crew"
    },
    {
        "crewIdentifier":"9211349",
        "crewSafetyNumber":"SAFE103",
        "crewOperationalGroup":"null",
        "crewLastName":"null",
        "status":"Fail",
        "information":"Safety number does not exist"
    },
    {
        "crewIdentifier":"9211346",
        "crewSafetyNumber":"SAFE104",
        "crewOperationalGroup":"null",
        "crewLastName":"null",
        "status":"Fail",
        "information":"Multiple safety number assignments not allowed"
    },
    {
        "crewIdentifier":"9211344",
        "crewSafetyNumber":"SAFE105",
        "crewOperationalGroup":"null",
        "crewLastName":"null",
        "status":"Fail",
        "information":"Safety number assignment not allowed to expected crew"
    },
    {
        "crewIdentifier":"9211345",
        "crewSafetyNumber":"SAFE111",
        "crewOperationalGroup":"Deck",
        "crewLastName":"Smith",
        "status":"Success",
        "information":"Processed"
    }
]
Nested Schema : crewSafetyAssignmentValidationResult
Type: object
Show Source

400 Response

Bad Request
Body ()
Root Schema : schema
Match All
Show Source
Example:
{
    "type":"https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
    "title":"Bad Request",
    "detail":"Invalid parameter(s) passed in"
}
Nested Schema : Error Response
Type: object
Title: Error Response
Error Response returned when encountered error
Show Source

401 Response

Unauthorized
Body ()
Root Schema : schema
Match All
Show Source
Example:
{
    "type":"https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2",
    "title":"Unauthorized",
    "detail":"Valid token is required to access this resource"
}
Nested Schema : Error Response
Type: object
Title: Error Response
Error Response returned when encountered error
Show Source

404 Response

Not Found
Body ()
Root Schema : schema
Match All
Show Source
Example:
{
    "type":"https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5",
    "title":"Not Found",
    "detail":"Ship Id was not found"
}
Nested Schema : Error Response
Type: object
Title: Error Response
Error Response returned when encountered error
Show Source

405 Response

Method Not Supported
Body ()
Root Schema : schema
Match All
Show Source
Example:
{
    "type":"https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6",
    "title":"Method Not Supported",
    "detail":"HTTP method not supported for this resource"
}
Nested Schema : Error Response
Type: object
Title: Error Response
Error Response returned when encountered error
Show Source

406 Response

Not Acceptable
Body ()
Root Schema : schema
Match All
Show Source
Example:
{
    "type":"https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7",
    "title":"Not Acceptable",
    "detail":"Request a Mime type that is supported for this Resource"
}
Nested Schema : Error Response
Type: object
Title: Error Response
Error Response returned when encountered error
Show Source

410 Response

Gone
Body ()
Root Schema : schema
Match All
Show Source
Example:
{
    "type":"https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.11",
    "title":"Gone",
    "detail":"Requested Resource no longer exists"
}
Nested Schema : Error Response
Type: object
Title: Error Response
Error Response returned when encountered error
Show Source

413 Response

Request Entity Too Large
Body ()
Root Schema : schema
Match All
Show Source
Example:
{
    "type":"https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.14",
    "title":"Request Entity Too Large",
    "detail":"File size exceeds the limit allowed"
}
Nested Schema : Error Response
Type: object
Title: Error Response
Error Response returned when encountered error
Show Source

415 Response

Invalid content
Body ()
Root Schema : schema
Match All
Show Source
Example:
{
    "type":"https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.16",
    "title":"Invalid content",
    "detail":"Content type not supported"
}
Nested Schema : Error Response
Type: object
Title: Error Response
Error Response returned when encountered error
Show Source

500 Response

Internal Server Error
Body ()
Root Schema : schema
Match All
Show Source
Example:
{
    "type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1",
    "title":"Internal Server Error",
    "detail":"Issue fulfilling request. Please retry or contact support"
}
Nested Schema : Error Response
Type: object
Title: Error Response
Error Response returned when encountered error
Show Source

501 Response

Not Implemented
Body ()
Root Schema : schema
Match All
Show Source
Example:
{
    "type":"https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.2",
    "title":"Not implemented",
    "detail":"Resource is not implemented in this version of the API"
}
Nested Schema : Error Response
Type: object
Title: Error Response
Error Response returned when encountered error
Show Source

503 Response

Service Unavailable
Body ()
Root Schema : schema
Match All
Show Source
Example:
{
    "type":"https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.4",
    "title":"Service Unavailable",
    "detail":"Service not available"
}
Nested Schema : Error Response
Type: object
Title: Error Response
Error Response returned when encountered error
Show Source
Back to Top