POST
/
staff
/
timeoff
/
{workspaceId}
/
{staffId}
curl --request POST \
  --url https://api.hyra.io/staff/timeoff/{workspaceId}/{staffId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "start": "2023-11-07T05:31:56Z",
  "end": "2023-11-07T05:31:56Z",
  "notes": "<string>",
  "type": "medical",
  "other": "<string>"
}'
{
  "start": "2023-11-07T05:31:56Z",
  "end": "2023-11-07T05:31:56Z",
  "notes": "<string>",
  "type": "medical",
  "status": "pending",
  "other": "<string>",
  "user": "<string>",
  "workspace": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "_id": "<string>",
  "state_changed_by": "<string>",
  "requested_by": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

workspaceId
string
required
staffId
string
required

Body

application/json
start
string
required
end
string
required
notes
string
required
type
enum<string>
required
Available options:
medical,
mental_health,
personal,
holiday,
moving_house,
education,
religious,
bereavement,
military,
other
other
string

Response

200 - application/json
Default Response
start
string
required
end
string
required
notes
string
required
type
enum<string>
required
Available options:
medical,
mental_health,
personal,
holiday,
moving_house,
education,
religious,
bereavement,
military,
other
status
enum<string>
required
Available options:
pending,
approved,
denied,
cancelled
user
string
required
workspace
string
required
createdAt
string
required
updatedAt
string
required
_id
string
required
other
string
state_changed_by
string
requested_by
string