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
- multipart/form-data
Path Parameters
-
shipId(required): number
Ship Id
Query Parameters
-
crewIdentifierType(required): string
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 IDAllowed Values:
[ "EXTERNAL ID", "INTERNAL ID", "RESERVATION ID" ]
Form Parameters
-
csvFile(required): file
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]
Response
Supported Media Types
- application/json
200 Response
Ok
Root Schema : crewSafetyAssignmentsFilePOSTObject
Type:
arrayImport 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:
Show Source
object-
crewIdentifier(required):
string
Unique identifier for the crew memberExample:
12345 -
crewLastName(required):
string
Crew member's last nameExample:
Miller -
crewOperationalGroup(required):
string
Operational group of the crewExample:
Deck -
crewSafetyNumber(required):
string
Safety number assigned to the crewExample:
SAFE98765 -
information(required):
string
Validation message or additional informationExample:
Safety number does not exist -
status(required):
string
Allowed Values:
[ "SUCCESS (Success)", "FAIL (Fail)" ]Result of validation will be either Fail or SuccessExample:Fail
400 Response
Bad Request
Root Schema : schema
Match All
Show Source
-
object
Error Response
Title:
Error ResponseError Response returned when encountered error
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:
objectTitle:
Error ResponseError Response returned when encountered error
Show Source
401 Response
Unauthorized
Root Schema : schema
Match All
Show Source
-
object
Error Response
Title:
Error ResponseError Response returned when encountered error
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:
objectTitle:
Error ResponseError Response returned when encountered error
Show Source
404 Response
Not Found
Root Schema : schema
Match All
Show Source
-
object
Error Response
Title:
Error ResponseError Response returned when encountered error
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:
objectTitle:
Error ResponseError Response returned when encountered error
Show Source
405 Response
Method Not Supported
Root Schema : schema
Match All
Show Source
-
object
Error Response
Title:
Error ResponseError Response returned when encountered error
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:
objectTitle:
Error ResponseError Response returned when encountered error
Show Source
406 Response
Not Acceptable
Root Schema : schema
Match All
Show Source
-
object
Error Response
Title:
Error ResponseError Response returned when encountered error
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:
objectTitle:
Error ResponseError Response returned when encountered error
Show Source
410 Response
Gone
Root Schema : schema
Match All
Show Source
-
object
Error Response
Title:
Error ResponseError Response returned when encountered error
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:
objectTitle:
Error ResponseError Response returned when encountered error
Show Source
413 Response
Request Entity Too Large
Root Schema : schema
Match All
Show Source
-
object
Error Response
Title:
Error ResponseError Response returned when encountered error
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:
objectTitle:
Error ResponseError Response returned when encountered error
Show Source
415 Response
Invalid content
Root Schema : schema
Match All
Show Source
-
object
Error Response
Title:
Error ResponseError Response returned when encountered error
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:
objectTitle:
Error ResponseError Response returned when encountered error
Show Source
500 Response
Internal Server Error
Root Schema : schema
Match All
Show Source
-
object
Error Response
Title:
Error ResponseError Response returned when encountered error
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:
objectTitle:
Error ResponseError Response returned when encountered error
Show Source
501 Response
Not Implemented
Root Schema : schema
Match All
Show Source
-
object
Error Response
Title:
Error ResponseError Response returned when encountered error
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:
objectTitle:
Error ResponseError Response returned when encountered error
Show Source
503 Response
Service Unavailable
Root Schema : schema
Match All
Show Source
-
object
Error Response
Title:
Error ResponseError Response returned when encountered error
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:
objectTitle:
Error ResponseError Response returned when encountered error
Show Source