Skip to content

Update a staff member

Request

Update an existing staff member's profile and optionally replace their rate card assignment

All fields are optional — only the fields you include will be updated. Omitted fields retain their current values.

Rate card assignment replacement (rateCardAssignment): When provided, this operation atomically:

  1. Deactivates all active rate_card_staff_billing_rate and rate_card_staff_average_cost records currently linked to this staff member (across any rate card).
  2. Creates new records for the specified rateCardId.

Omitting rateCardAssignment entirely leaves existing rate card records untouched.

Pre-write validation ensures rateCardId and all rateTypeId values reference existing records — if any are invalid the entire request is rejected with HTTP 400 and no changes are written.

Real Example:

curl --location --request PUT 'https://{{host}}/api/v1/staff/312' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json' \
--data '{
  "jobTitle": "Manager",
  "rateCardAssignment": {
    "rateCardId": 6,
    "billingRates": [
      { "rateTypeId": 12, "hourlyBillingRate": 200.00 }
    ],
    "averageCost": 95.00
  }
}'
Security
BearerAuth
Path
staffIdinteger, (int64), >= 1required

Unique identifier of the staff member to update

Example:312
Bodyapplication/jsonrequired
firstNamestring or null

Updated first name

Example:"Jane"
lastNamestring or null

Updated last name

Example:"Doe"
emailstring or null, (email)

Updated primary email address

Example:"jane.doe@firm.com"
jobTitlestring or null

Updated job title (free-text)

Example:"Manager"
jobTitleIdinteger or null, (int64)

Updated job title lookup record ID

Example:8
departmentIdinteger or null, (int64)

Updated department ID

Example:3
officeIdinteger or null, (int64)

Updated office ID

Example:2
orgIdinteger or null, (int64)

Updated organization ID

Example:1
serviceLineIdinteger or null, (int64)

Updated service line ID

Example:4
staffTypeIdinteger or null, (int64)

Updated staff type ID (e.g. Partner, Manager, Associate)

Example:3
partnerStaffIdinteger or null, (int64)

Updated partner staff member ID

Example:50
managerStaffIdinteger or null, (int64)

Updated manager staff member ID

Example:31
supervisorStaffIdinteger or null, (int64)

Updated supervisor staff member ID

Example:null
prefixstring or null

Updated name prefix

Example:"Dr."
startDatestring or null, (date-time)

Updated employment start date

Example:"2023-06-01T00:00:00"
endDatestring or null, (date-time)

Updated employment end date

Example:null
activeboolean or null

Updated active status

Example:true
rateCardAssignmentobject or null

When provided, replaces the staff member's entire rate card assignment. All current active billing rate and average cost records are deactivated and new records are created for the specified rate card. Validated before any writes — invalid rateCardId or rateTypeId values return HTTP 400.

curl -i -X PUT \
  https://api.doc.aiwyn.ai/_mock/bundle/api/v1/staff/312 \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "jobTitle": "Manager",
    "departmentId": 4,
    "active": true
  }'

Responses

Staff member updated successfully

Bodyapplication/json
dataobject
metaobject
Response
{ "data": { "id": 312, "pmsRef": "EMP-1042", "ref": "doe-j", "firstName": "Jane", "lastName": "Doe", "fullName": "Jane Doe", "jobTitle": "Manager", "active": true, "version": 2, "updatedAt": "2024-06-01T09:00:00Z", "rateCardAssignment": null }, "meta": { "success": true, "message": "Staff member updated successfully", "timestamp": "2024-06-01T09:00:00Z", "version": "v1" } }