Skip to content

Remove staff from a project

Request

Remove staff from a project

Deactivates associations between staff members and a job:

  • staffJobAssignments: deactivates matching staff_job records
  • staffTaskAssignments: deactivates matching task_type_staff_job records

Returns the IDs of deactivated records. Items with no matching active record are silently skipped.

Real Example:

curl --location 'https://{{host}}/api/v1/projects/remove_staff' \
--header 'Authorization: bearer {{token}}' \
--header 'Content-Type: application/json' \
--data '{
  "jobId": 5001,
  "staffJobAssignments": [{"staffId": 103}, {"staffId": 104}],
  "staffTaskAssignments": [{"staffId": 103, "taskTypeId": 10}, {"staffId": 104, "taskTypeId": 11}]
}'
Security
BearerAuth
Bodyapplication/jsonrequired
jobIdinteger, (int64)required

Jobid

staffJobAssignmentsArray of objects

Staffjobassignments

staffTaskAssignmentsArray of objects

Stafftaskassignments

curl -i -X POST \
  https://api.doc.aiwyn.ai/_mock/bundle/api/v1/projects/remove_staff \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "jobId": 0,
    "staffJobAssignments": [
      {
        "staffId": 0
      }
    ],
    "staffTaskAssignments": [
      {
        "staffId": 0,
        "taskTypeId": 0
      }
    ]
  }'

Responses

Staff removed successfully

Bodyapplication/json
object
Response
{}