Upsert Crew Profile
Create or update a user’s crew profile (partial). All fields on the payload are optional; only those provided are written.
Authz: self OR staff (admin/office-admin/office-employee) in the same org.
Field authority: the Employment block (employee #, position, ship type,
contract group, payscale) is office-editable only. A self-PATCH that tries
to change those fields is rejected with 403 field_forbidden — the
frontend renders them read-only, so this only fires on a tampered or buggy
client.
curl --request PATCH \
--url https://api.example.com/api/v1/crew/users/{user_id}/profile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dateOfBirth": "2023-12-25",
"placeOfBirth": "<string>",
"nationality": "<string>",
"gender": "<string>",
"religion": "<string>",
"maritalStatus": "<string>",
"weddingDate": "2023-12-25",
"employeeId": "<string>",
"position": "<string>",
"shipType": "<string>",
"contractGroup": "<string>",
"payscale": "<string>",
"internationalAirport": "<string>",
"domesticAirport": "<string>",
"homeAddress": "<string>",
"phone": "<string>",
"linkedinUrl": "<string>",
"facebookUrl": "<string>",
"instagramUrl": "<string>",
"languages": [
"<string>"
],
"drivingLicense": "<string>"
}
'import requests
url = "https://api.example.com/api/v1/crew/users/{user_id}/profile"
payload = {
"dateOfBirth": "2023-12-25",
"placeOfBirth": "<string>",
"nationality": "<string>",
"gender": "<string>",
"religion": "<string>",
"maritalStatus": "<string>",
"weddingDate": "2023-12-25",
"employeeId": "<string>",
"position": "<string>",
"shipType": "<string>",
"contractGroup": "<string>",
"payscale": "<string>",
"internationalAirport": "<string>",
"domesticAirport": "<string>",
"homeAddress": "<string>",
"phone": "<string>",
"linkedinUrl": "<string>",
"facebookUrl": "<string>",
"instagramUrl": "<string>",
"languages": ["<string>"],
"drivingLicense": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dateOfBirth: '2023-12-25',
placeOfBirth: '<string>',
nationality: '<string>',
gender: '<string>',
religion: '<string>',
maritalStatus: '<string>',
weddingDate: '2023-12-25',
employeeId: '<string>',
position: '<string>',
shipType: '<string>',
contractGroup: '<string>',
payscale: '<string>',
internationalAirport: '<string>',
domesticAirport: '<string>',
homeAddress: '<string>',
phone: '<string>',
linkedinUrl: '<string>',
facebookUrl: '<string>',
instagramUrl: '<string>',
languages: ['<string>'],
drivingLicense: '<string>'
})
};
fetch('https://api.example.com/api/v1/crew/users/{user_id}/profile', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/crew/users/{user_id}/profile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'dateOfBirth' => '2023-12-25',
'placeOfBirth' => '<string>',
'nationality' => '<string>',
'gender' => '<string>',
'religion' => '<string>',
'maritalStatus' => '<string>',
'weddingDate' => '2023-12-25',
'employeeId' => '<string>',
'position' => '<string>',
'shipType' => '<string>',
'contractGroup' => '<string>',
'payscale' => '<string>',
'internationalAirport' => '<string>',
'domesticAirport' => '<string>',
'homeAddress' => '<string>',
'phone' => '<string>',
'linkedinUrl' => '<string>',
'facebookUrl' => '<string>',
'instagramUrl' => '<string>',
'languages' => [
'<string>'
],
'drivingLicense' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/crew/users/{user_id}/profile"
payload := strings.NewReader("{\n \"dateOfBirth\": \"2023-12-25\",\n \"placeOfBirth\": \"<string>\",\n \"nationality\": \"<string>\",\n \"gender\": \"<string>\",\n \"religion\": \"<string>\",\n \"maritalStatus\": \"<string>\",\n \"weddingDate\": \"2023-12-25\",\n \"employeeId\": \"<string>\",\n \"position\": \"<string>\",\n \"shipType\": \"<string>\",\n \"contractGroup\": \"<string>\",\n \"payscale\": \"<string>\",\n \"internationalAirport\": \"<string>\",\n \"domesticAirport\": \"<string>\",\n \"homeAddress\": \"<string>\",\n \"phone\": \"<string>\",\n \"linkedinUrl\": \"<string>\",\n \"facebookUrl\": \"<string>\",\n \"instagramUrl\": \"<string>\",\n \"languages\": [\n \"<string>\"\n ],\n \"drivingLicense\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.example.com/api/v1/crew/users/{user_id}/profile")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dateOfBirth\": \"2023-12-25\",\n \"placeOfBirth\": \"<string>\",\n \"nationality\": \"<string>\",\n \"gender\": \"<string>\",\n \"religion\": \"<string>\",\n \"maritalStatus\": \"<string>\",\n \"weddingDate\": \"2023-12-25\",\n \"employeeId\": \"<string>\",\n \"position\": \"<string>\",\n \"shipType\": \"<string>\",\n \"contractGroup\": \"<string>\",\n \"payscale\": \"<string>\",\n \"internationalAirport\": \"<string>\",\n \"domesticAirport\": \"<string>\",\n \"homeAddress\": \"<string>\",\n \"phone\": \"<string>\",\n \"linkedinUrl\": \"<string>\",\n \"facebookUrl\": \"<string>\",\n \"instagramUrl\": \"<string>\",\n \"languages\": [\n \"<string>\"\n ],\n \"drivingLicense\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/crew/users/{user_id}/profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dateOfBirth\": \"2023-12-25\",\n \"placeOfBirth\": \"<string>\",\n \"nationality\": \"<string>\",\n \"gender\": \"<string>\",\n \"religion\": \"<string>\",\n \"maritalStatus\": \"<string>\",\n \"weddingDate\": \"2023-12-25\",\n \"employeeId\": \"<string>\",\n \"position\": \"<string>\",\n \"shipType\": \"<string>\",\n \"contractGroup\": \"<string>\",\n \"payscale\": \"<string>\",\n \"internationalAirport\": \"<string>\",\n \"domesticAirport\": \"<string>\",\n \"homeAddress\": \"<string>\",\n \"phone\": \"<string>\",\n \"linkedinUrl\": \"<string>\",\n \"facebookUrl\": \"<string>\",\n \"instagramUrl\": \"<string>\",\n \"languages\": [\n \"<string>\"\n ],\n \"drivingLicense\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"dateOfBirth": "2023-12-25",
"placeOfBirth": "<string>",
"nationality": "<string>",
"gender": "<string>",
"religion": "<string>",
"maritalStatus": "<string>",
"weddingDate": "2023-12-25",
"employeeId": "<string>",
"position": "<string>",
"shipType": "<string>",
"contractGroup": "<string>",
"payscale": "<string>",
"internationalAirport": "<string>",
"domesticAirport": "<string>",
"homeAddress": "<string>",
"phone": "<string>",
"linkedinUrl": "<string>",
"facebookUrl": "<string>",
"instagramUrl": "<string>",
"languages": [],
"drivingLicense": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
Fields the API accepts for create-or-update. Lazy provisioning: the first PATCH for a user creates the row; subsequent PATCHes update in place. All fields are optional partial updates.
Response
Successful Response
API response shape (camelCase). Same fields as the DB DTO; the response form keeps the surface stable even if internal naming evolves.
Was this page helpful?
curl --request PATCH \
--url https://api.example.com/api/v1/crew/users/{user_id}/profile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dateOfBirth": "2023-12-25",
"placeOfBirth": "<string>",
"nationality": "<string>",
"gender": "<string>",
"religion": "<string>",
"maritalStatus": "<string>",
"weddingDate": "2023-12-25",
"employeeId": "<string>",
"position": "<string>",
"shipType": "<string>",
"contractGroup": "<string>",
"payscale": "<string>",
"internationalAirport": "<string>",
"domesticAirport": "<string>",
"homeAddress": "<string>",
"phone": "<string>",
"linkedinUrl": "<string>",
"facebookUrl": "<string>",
"instagramUrl": "<string>",
"languages": [
"<string>"
],
"drivingLicense": "<string>"
}
'import requests
url = "https://api.example.com/api/v1/crew/users/{user_id}/profile"
payload = {
"dateOfBirth": "2023-12-25",
"placeOfBirth": "<string>",
"nationality": "<string>",
"gender": "<string>",
"religion": "<string>",
"maritalStatus": "<string>",
"weddingDate": "2023-12-25",
"employeeId": "<string>",
"position": "<string>",
"shipType": "<string>",
"contractGroup": "<string>",
"payscale": "<string>",
"internationalAirport": "<string>",
"domesticAirport": "<string>",
"homeAddress": "<string>",
"phone": "<string>",
"linkedinUrl": "<string>",
"facebookUrl": "<string>",
"instagramUrl": "<string>",
"languages": ["<string>"],
"drivingLicense": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dateOfBirth: '2023-12-25',
placeOfBirth: '<string>',
nationality: '<string>',
gender: '<string>',
religion: '<string>',
maritalStatus: '<string>',
weddingDate: '2023-12-25',
employeeId: '<string>',
position: '<string>',
shipType: '<string>',
contractGroup: '<string>',
payscale: '<string>',
internationalAirport: '<string>',
domesticAirport: '<string>',
homeAddress: '<string>',
phone: '<string>',
linkedinUrl: '<string>',
facebookUrl: '<string>',
instagramUrl: '<string>',
languages: ['<string>'],
drivingLicense: '<string>'
})
};
fetch('https://api.example.com/api/v1/crew/users/{user_id}/profile', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/crew/users/{user_id}/profile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'dateOfBirth' => '2023-12-25',
'placeOfBirth' => '<string>',
'nationality' => '<string>',
'gender' => '<string>',
'religion' => '<string>',
'maritalStatus' => '<string>',
'weddingDate' => '2023-12-25',
'employeeId' => '<string>',
'position' => '<string>',
'shipType' => '<string>',
'contractGroup' => '<string>',
'payscale' => '<string>',
'internationalAirport' => '<string>',
'domesticAirport' => '<string>',
'homeAddress' => '<string>',
'phone' => '<string>',
'linkedinUrl' => '<string>',
'facebookUrl' => '<string>',
'instagramUrl' => '<string>',
'languages' => [
'<string>'
],
'drivingLicense' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/crew/users/{user_id}/profile"
payload := strings.NewReader("{\n \"dateOfBirth\": \"2023-12-25\",\n \"placeOfBirth\": \"<string>\",\n \"nationality\": \"<string>\",\n \"gender\": \"<string>\",\n \"religion\": \"<string>\",\n \"maritalStatus\": \"<string>\",\n \"weddingDate\": \"2023-12-25\",\n \"employeeId\": \"<string>\",\n \"position\": \"<string>\",\n \"shipType\": \"<string>\",\n \"contractGroup\": \"<string>\",\n \"payscale\": \"<string>\",\n \"internationalAirport\": \"<string>\",\n \"domesticAirport\": \"<string>\",\n \"homeAddress\": \"<string>\",\n \"phone\": \"<string>\",\n \"linkedinUrl\": \"<string>\",\n \"facebookUrl\": \"<string>\",\n \"instagramUrl\": \"<string>\",\n \"languages\": [\n \"<string>\"\n ],\n \"drivingLicense\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.example.com/api/v1/crew/users/{user_id}/profile")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dateOfBirth\": \"2023-12-25\",\n \"placeOfBirth\": \"<string>\",\n \"nationality\": \"<string>\",\n \"gender\": \"<string>\",\n \"religion\": \"<string>\",\n \"maritalStatus\": \"<string>\",\n \"weddingDate\": \"2023-12-25\",\n \"employeeId\": \"<string>\",\n \"position\": \"<string>\",\n \"shipType\": \"<string>\",\n \"contractGroup\": \"<string>\",\n \"payscale\": \"<string>\",\n \"internationalAirport\": \"<string>\",\n \"domesticAirport\": \"<string>\",\n \"homeAddress\": \"<string>\",\n \"phone\": \"<string>\",\n \"linkedinUrl\": \"<string>\",\n \"facebookUrl\": \"<string>\",\n \"instagramUrl\": \"<string>\",\n \"languages\": [\n \"<string>\"\n ],\n \"drivingLicense\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/crew/users/{user_id}/profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dateOfBirth\": \"2023-12-25\",\n \"placeOfBirth\": \"<string>\",\n \"nationality\": \"<string>\",\n \"gender\": \"<string>\",\n \"religion\": \"<string>\",\n \"maritalStatus\": \"<string>\",\n \"weddingDate\": \"2023-12-25\",\n \"employeeId\": \"<string>\",\n \"position\": \"<string>\",\n \"shipType\": \"<string>\",\n \"contractGroup\": \"<string>\",\n \"payscale\": \"<string>\",\n \"internationalAirport\": \"<string>\",\n \"domesticAirport\": \"<string>\",\n \"homeAddress\": \"<string>\",\n \"phone\": \"<string>\",\n \"linkedinUrl\": \"<string>\",\n \"facebookUrl\": \"<string>\",\n \"instagramUrl\": \"<string>\",\n \"languages\": [\n \"<string>\"\n ],\n \"drivingLicense\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"dateOfBirth": "2023-12-25",
"placeOfBirth": "<string>",
"nationality": "<string>",
"gender": "<string>",
"religion": "<string>",
"maritalStatus": "<string>",
"weddingDate": "2023-12-25",
"employeeId": "<string>",
"position": "<string>",
"shipType": "<string>",
"contractGroup": "<string>",
"payscale": "<string>",
"internationalAirport": "<string>",
"domesticAirport": "<string>",
"homeAddress": "<string>",
"phone": "<string>",
"linkedinUrl": "<string>",
"facebookUrl": "<string>",
"instagramUrl": "<string>",
"languages": [],
"drivingLicense": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}