Time Off Requests

Types

The GetListResult object

Field Type Description
HasMoreResults bool indicates if there are more results
Offset int Number of results skipped. Will match the parameter passed into the endpoint.
ResultCount int Number of results returned.
Data array of TimeOffRequest objects Time Off Requests requested.

The TimeOffRequest Object

Field Type Description
Employee Employee Object Employee making the request.
StartDateTime datetime Start date of the request.
EndDateTime datetime End date of the request.
RequestedLeavePolicy string The name of the leave policy requested.
RequestedLeaveType string The name of the leave type requested.
ApprovedHours Array of ApprovedHours object Details for the hours approved.
RequestedDateTime datetime Date time the request was made.
Status string Status of the request.
ReviewedBy Employee Object Employee who reviewed the request.
ReviewedDateTime datetime Date time the request was reviewed.
RequestedHours decimal Number of hours requested.

The ApprovedHours object

Field Type Description
ApprovedLeavePolicy string The name of the approved policy.
ApprovedLeaveType string The name of the approved type.
ApprovedHours decimal The number of approved hours.

The Employee object

Field Type Description
NBSId int NBS Identifier.
First Name string the employee’s first name.
Last Name string the employee’s last name.
UniqueIdentifier string the employee’s unique identifier.
EmployeeNumber string The employee’s Number.

Endpoints

Get Time Off Request List

Gets a list of time off requests between two dates.

Authorization needed

Request
GET https://api.ninthbrain.com/TimeOffRequest/GetList?StartDateTime=2026-01-01&EndDateTime=2026-01-31&api-version=2.0

Query Parameters

Name Type Required Description
StartDateTime datetime required Specifes date range of time off request to return. Filters based on time off requests start date.
EndDateTime datetime required Specifes date range of time off requests to return. Filters based on time off requests end date.
NBSId int optional Only return time off requests for a single employee. Defaults to all.
EmployeeNumber string optional Only return time off requests for a single employee. Defaults to all.
UniqueNumber string optional Only return time off requests for a single employee. Defaults to all.
RequestStatus comma separated string optional any or all Pending,Approved,Denied,Canceled
Offset int optional Used for paging results. Number of records to skip. Defaults to 0.
Limit int optional Used for paging results. Max number of results to return, must be between 1-200. Defaults to 200.
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
{
    "Data": [
        {
            "Employee": {
                "EmployeeNumber": "abc123",
                "FirstName": "John",
                "LastName": "Doe",
                "NBSId": 123,
                "UniqueIdentifer": "idhere"
            },          
            "StartDateTime": "2021-12-01T08:00:00-05:00",
            "EndDateTime": "2021-12-01T17:00:00-05:00",
            "RequestedLeavePolicy": "PTO Policy",
            "RequestedLeaveType": "PTO",
            "ApprovedHours": [
                {
                    "ApprovedLeavePolicy": "PTO Policy",
                    "ApprovedLeaveType": "PTO",
                    "ApprovedHours": 5
                },
                {
                    "ApprovedLeavePolicy": "Unpaid",
                    "ApprovedLeaveType": "Unpaid",
                    "ApprovedHours": 4
                }
            ],
            "RequestedDateTime": "2021-20-01T17:00:00-05:00",
            "Status": "Pending",
            "ReviewedBy": {
                "EmployeeNumber": "abc123",
                "FirstName": "John",
                "LastName": "Doe",
                "NBSId": 123,
                "UniqueIdentifer": "idhere"
            }.
            "ReviewedDateTime": "2021-20-01T17:00:00-05:00",
            "RequestedHours": 9.0
        },
        {
			...
        }
    ],
    "HasMoreResults": false,
    "Offset": 0,
    "ResultCount": 1
}
Errors
  • bad_request (HTTP 400)
  • unauthorized (HTTP 401) - This APIKey is not valid for this service.
  • internal_error (HTTP 500)