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:
- Deactivates all active
rate_card_staff_billing_rateandrate_card_staff_average_costrecords currently linked to this staff member (across any rate card). - 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
}
}'Updated staff type ID (e.g. Partner, Manager, Associate)
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.
- Mock serverhttps://api.doc.aiwyn.ai/_mock/bundle/api/v1/staff/{staffId}
- Sandboxhttps://demo.api.aiwyn.ai/api/v1/staff/{staffId}
- Staginghttps://staging.api.aiwyn.app/api/v1/staff/{staffId}
- Update staff fields only (no rate card change)
- Replace rate card assignment
- Update fields and replace rate card in one request
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
}'- Fields updated, no rate card change
- Rate card assignment replaced
{ "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" } }