# Staff

## POST /staff

> Create a new staff member.

```json
{"openapi":"3.0.3","info":{"title":"Incident Tracker API","version":"1.0.0"},"servers":[{"url":"https://api.kitehouse.co.uk"}],"paths":{"/staff":{"post":{"tags":["Staff"],"description":"Create a new staff member.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["site","first_name","last_name","role_ids"],"properties":{"site":{"type":"string"},"email":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"job_title":{"type":"string"},"role_ids":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"},"site":{"type":"string"},"email":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"job_title":{"type":"string"},"role_ids":{"type":"array","items":{"type":"string"}},"roles":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"key":{"type":"string"},"requires_email":{"type":"boolean"}}}},"user_id":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"photo_url":{"type":"string"}},"required":["_id","site","first_name","last_name","created_at","updated_at","photo_url"]}}}}}}}}}
```

## DELETE /staff/{siteId}/{userId}

> Delete a staff member from a site.

```json
{"openapi":"3.0.3","info":{"title":"Incident Tracker API","version":"1.0.0"},"servers":[{"url":"https://api.kitehouse.co.uk"}],"paths":{"/staff/{siteId}/{userId}":{"delete":{"tags":["Staff"],"description":"Delete a staff member from a site.","parameters":[{"schema":{"type":"string"},"in":"path","name":"siteId","required":true},{"schema":{"type":"string"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}}}}}}}
```

## PATCH /staff/{siteId}/{userId}

> Update a staff member.

```json
{"openapi":"3.0.3","info":{"title":"Incident Tracker API","version":"1.0.0"},"servers":[{"url":"https://api.kitehouse.co.uk"}],"paths":{"/staff/{siteId}/{userId}":{"patch":{"tags":["Staff"],"description":"Update a staff member.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["first_name","last_name","role_ids"],"properties":{"email":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"job_title":{"type":"string"},"role_ids":{"type":"array","items":{"type":"string"}}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"siteId","required":true},{"schema":{"type":"string"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"},"site":{"type":"string"},"email":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"job_title":{"type":"string"},"role_ids":{"type":"array","items":{"type":"string"}},"roles":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"key":{"type":"string"},"requires_email":{"type":"boolean"}}}},"user_id":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"photo_url":{"type":"string"}},"required":["_id","site","first_name","last_name","created_at","updated_at","photo_url"]}}}}}}}}}
```

## GET /staff/{siteId}

> Retrieve a list of staff members for a site.

```json
{"openapi":"3.0.3","info":{"title":"Incident Tracker API","version":"1.0.0"},"servers":[{"url":"https://api.kitehouse.co.uk"}],"paths":{"/staff/{siteId}":{"get":{"tags":["Staff"],"description":"Retrieve a list of staff members for a site.","parameters":[{"schema":{"type":"string"},"in":"path","name":"siteId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"site":{"type":"string"},"email":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"job_title":{"type":"string"},"role_ids":{"type":"array","items":{"type":"string"}},"roles":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"key":{"type":"string"},"requires_email":{"type":"boolean"}}}},"user_id":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"photo_url":{"type":"string"}},"required":["_id","site","first_name","last_name","created_at","updated_at","photo_url"]}}}}}}}}}}
```
