leave

Get Many Leaves

Get Many Leaves

Securitybearer
Request
query Parameters
select
Array of strings

Select Leave fields, comma-separated. (e.g. select=id,firstName,lastName,workEmail)

Items Enum: "id" "employeeId" "typeId" "status" "duration" "startDate" "endDate" "gradePercentage"
relations
Array of strings

Select related Leave resources, comma-separated. (e.g. relations=office,department)

Items Enum: "type" "employee"
object

Filters conditions per field. (e.g. filters[id][$eq]=507f1f77bcf86cd799439011)

limit
integer

Limit amount of received Leaves. (e.g. limit=20)

offset
integer

Offset amount of received Leaves. (e.g. offset=20)

object

Sort received Leaves by field. (e.g. sort[id]=asc)

Responses
200
400

Bad Request

401

Unauthorized

403

Forbidden

500

Internal server error

get/leave
Response samples
application/json
{
  • "status": "ok",
  • "data": [
    ],
  • "total": 500,
  • "count": 50,
  • "offset": 50,
  • "relations": {
    }
}

Create One Leave

Create One Leave

Securitybearer
Request
Request Body schema: application/json
required
employeeId
required
string
typeId
required
string
childId
string
duration
required
string
Enum: "minutes" "half_day" "one_day" "longer"
description
string
startDate
required
string <date-time>
endDate
required
string <date-time>
gradePercentage
number
coverageRate
number
Responses
201
400

Bad Request

401

Unauthorized

403

Forbidden

500

Internal server error

post/leave
Request samples
application/json
{
  • "employeeId": "507f1f77bcf86cd799439011",
  • "typeId": "507f1f77bcf86cd799439011",
  • "childId": "507f1f77bcf86cd799439011",
  • "duration": "minutes",
  • "description": "string",
  • "startDate": "2019-08-24T14:15:22Z",
  • "endDate": "2019-08-24T14:15:22Z",
  • "gradePercentage": 50,
  • "coverageRate": 50
}
Response samples
application/json
{
  • "status": "ok",
  • "data": {
    }
}

Get One Leave

Get One Leave

Securitybearer
Request
path Parameters
id
required
string

Resource Id

Example: 507f1f77bcf86cd799439011
query Parameters
select
Array of strings

Select Leave fields, comma-separated. (e.g. select=id,firstName,lastName,workEmail)

Items Enum: "id" "employeeId" "typeId" "status" "duration" "startDate" "endDate" "gradePercentage"
relations
Array of strings

Select related Leave resources, comma-separated. (e.g. relations=office,department)

Items Enum: "type" "employee"
Responses
200
400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal server error

get/leave/{id}
Response samples
application/json
{
  • "status": "ok",
  • "data": {
    },
  • "relations": {
    }
}

Update One Leave

Update One Leave

Securitybearer
Request
path Parameters
id
required
string

Resource Id

Example: 507f1f77bcf86cd799439011
Request Body schema: application/json
required
childId
string
duration
string
Enum: "minutes" "half_day" "one_day" "longer"
description
string
startDate
string <date-time>
endDate
string <date-time>
gradePercentage
number
coverageRate
number
status
string
approvalNote
string
Responses
200
400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal server error

patch/leave/{id}
Request samples
application/json
{
  • "childId": "507f1f77bcf86cd799439011",
  • "duration": "minutes",
  • "description": "Description",
  • "startDate": "2019-08-24T14:15:22Z",
  • "endDate": "2019-08-24T14:15:22Z",
  • "gradePercentage": 50,
  • "coverageRate": 50,
  • "status": "string",
  • "approvalNote": "string"
}
Response samples
application/json
{
  • "status": "ok",
  • "data": {
    }
}

Replace One Leave

Replace One Leave

Securitybearer
Request
path Parameters
id
required
string

Resource Id

Example: 507f1f77bcf86cd799439011
Request Body schema: application/json
required
childId
string
duration
string
Enum: "minutes" "half_day" "one_day" "longer"
description
string
startDate
string <date-time>
endDate
string <date-time>
gradePercentage
number
coverageRate
number
status
string
approvalNote
string
Responses
200
400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal server error

put/leave/{id}
Request samples
application/json
{
  • "childId": "507f1f77bcf86cd799439011",
  • "duration": "minutes",
  • "description": "Description",
  • "startDate": "2019-08-24T14:15:22Z",
  • "endDate": "2019-08-24T14:15:22Z",
  • "gradePercentage": 50,
  • "coverageRate": 50,
  • "status": "string",
  • "approvalNote": "string"
}
Response samples
application/json
{
  • "status": "ok",
  • "data": {
    }
}

Delete One Leave

Delete One Leave

Securitybearer
Request
path Parameters
id
required
string

Resource Id

Example: 507f1f77bcf86cd799439011
Responses
204
400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal server error

delete/leave/{id}
Response samples
application/json
{
  • "status": "ok",
  • "data": { }
}