A ship’s crew

Add a pirate to a ship’s crew

Request - crew member details

POST /ship/ShpOWZxvR3mxMndyC2aJ3A/crew HTTP/1.1
Authorization: Bearer KiMwscRpnoSOQwTm
Content-Type: application/json
Accept: application/json

{
  "name": "Long John Silver",
  "rank": "Pirate captain",
  "born": {
    "town": "Bristol",
    "year": 1883
  },
  "familiar": {
    "type": "parrot",
    "name": "Captain Flint"
  }
}

Success response - crew member added

HTTP/1.1 201 Created
Location: /pirate/P3jJuhcUJoWLFsYdjLZ3Ww

Error response - ship not found

HTTP/1.1 404 Not Found
Content-Type: application/problem+json
Content-Language: en

{
  "title": "Ship not found",
  "detail": "No ship with ID ‘ShpOWZxvR3mxMndyC2aJ3A’",
  "ship_id": "ShpOWZxvR3mxMndyC2aJ3A"
}