The Time Off Object
Object Property | Required | Object Type | Description | Max Character Length |
---|
AccountEmployeeTimeOffRequestId | No | Guid | Id of Timeoff Request | 32 |
AccountTimeOffType | No | String | Id of Timeoff Request | 50 |
RequestSubmitDate | No | DateTime | Submit Date of Timeoff Request | 25 |
StartDate | No | DateTime | Start Date of Timeoff Request | 25 |
EndDate | No | DateTime | End Date of Timeoff Request | 25 |
HoursOff | No | Integer | Hours of Timeoff Request | 10 |
DayOff | No | Integer | Days of Timeoff Request | 10 |
ApprovalStatus | No | String | Status of Timeoff Request | 20 |
AccountProjectId | Integer | Guid | Project Id of Timeoff Request | 10 |
Approved | No | Boolean | Id of Timeoff Request | 1 |
Rejected | No | Boolean | Id of Timeoff Request | 1 |
List All TimeOff
Returns a list of your all TimeOff in your UNItekTIME account.
GET /API//TimeOff
Example Request
curl "https://demo.unitektime.com/api/TimeOff" \
-H "APIKey: {Your API Key}" \
-H "AuthToken: {Your Authentication Token}" \
-H "Content-Type: application/json" \
-H "User-Agent: MyApp (yourname@example.com)"
Example Response
[
{
"AccountEmployeeTimeOffRequestId": "00000000-0000-0000-0000-000000000000",
"AccountTimeOffType": "Holiday",
"RequestSubmitDate": "2019-01-01T00:00:00+00:00",
"StartDate": "2019-01-01T00:00:00+00:00",
"EndDate": "2019-01-01T00:00:00+00:00",
"HoursOff": 8,
"DayOff": 1,
"ApprovalStatus": "Submitted",
"AccountProjectId": null,
"Approved": "No",
"Rejected": "No"
}
]
Retrieve a TimeOff
Retrieves the TimeOff with the given ID. Returns a TimeOff object and a 200 OK response code if a valid identifier was provided.
GET /API/TimeOff/{TimeOff_ID}
Example Request
curl "https://demo.unitektime.com/api/TimeOff/00000000-0000-0000-0000-000000000000" \
-H "APIKey: {Your API Key}" \
-H "AuthToken: {Your Authentication Token}" \
-H "Content-Type: application/json" \
-H "User-Agent: MyApp (yourname@example.com)"
Example Response
[
{
"AccountEmployeeTimeOffRequestId": "00000000-0000-0000-0000-000000000000",
"AccountTimeOffType": "Holiday",
"RequestSubmitDate": "2019-01-01T00:00:00+00:00",
"StartDate": "2019-01-01T00:00:00+00:00",
"EndDate": "2019-01-01T00:00:00+00:00",
"HoursOff": 8,
"DayOff": 1,
"ApprovalStatus": "Submitted",
"AccountProjectId": null,
"Approved": "No",
"Rejected": "No"
}
]
Create a TimeOff from Hours
Creates a new TimeOff. Returns Response message and a 201 Created response code if the call succeeded.
POST /API/TimeOff
Object Property | Required | Object Type | Description | Max Character Length |
---|
AccountTimeOffTypeId | Yes | Guid | Id of Timeoff Type | 32 |
Date | Yes | Date Time | StartDate Of TimeOff | 19 |
Hours | Yes | Double | TimeOff Hours | 11 |
Example Request
curl "https://demo.unitektime.com/api/TimeOff" \
-H "APIKey: {Your API Key}" \
-H "AuthToken: {Your Authentication Token}" \
-H "User-Agent: MyApp (yourname@example.com)" \
-X POST \
-H "Content-Type: application/json" \
-d "{'AccountTimeOffTypeId':00000000-0000-0000-0000-000000000000','Date':'2018-12-31','Hours':8}"
Example Response
[
{
"id": "00000000-0000-0000-0000-000000000000",
"message": "TimeOff Added Successfully"
}
]
Update a TimeOff from Hours
Updates the specific TimeOff by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Returns Response message and a 200 OK response code if the call succeeded.
POST /API/TimeOff/{TimeOff_id}
Example Request
curl "https://demo.unitektime.com/api/TimeOff/00000000-0000-0000-0000-000000000000" \
-H "APIKey: {Your API Key}" \
-H "AuthToken: {Your Authentication Token}" \
-H "User-Agent: MyApp (yourname@example.com)" \
-X POST \
-H "Content-Type: application/json" \
-d "{'AccountTimeOffTypeId':'00000000-0000-0000-0000-000000000000','Date':'2018-12-31','Hours':16}"
Example Response
[
{
"id": "00000000-0000-0000-0000-000000000000",
"message": "TimeOff Updated Successfully"
}
]
Create a TimeOff from Days
Creates a new TimeOff. Returns Response message and a 201 Created response code if the call succeeded.
POST /API//TimeOff
Object Property | Required | Object Type | Description | Max Character Length |
---|
AccountTimeOffTypeId | Yes | Guid | Id of Timeoff Type | 32 |
Date | Yes | Date Time | StartDate Of TimeOff | 19 |
Days | Yes | Double | Days Of TimeOff | 11 |
Example Request
curl "https://demo.unitektime.com/api/TimeOff/RequestByDays" \
-H "APIKey: {Your API Key}" \
-H "AuthToken: {Your Authentication Token}" \
-H "User-Agent: MyApp (yourname@example.com)" \
-X POST \
-H "Content-Type: application/json" \
-d "{'AccountTimeOffTypeId':00000000-0000-0000-0000-000000000000','Date':'2018-12-31','Days':1.5}"
Example Response
[
{
"id": "00000000-0000-0000-0000-000000000000",
"message": "TimeOff Added Successfully"
}
]
Update a TimeOff from Days
Updates the specific TimeOff by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Returns Response message and a 200 OK response code if the call succeeded.
POST /API/TimeOff/RequestByDays/{TimeOff_id}
Example Request
curl "https://demo.unitektime.com/api/TimeOff/RequestByDays/00000000-0000-0000-0000-000000000000" \
-H "APIKey: {Your API Key}" \
-H "AuthToken: {Your Authentication Token}" \
-H "User-Agent: MyApp (yourname@example.com)" \
-X POST \
-H "Content-Type: application/json" \
-d "{'AccountTimeOffTypeId':'00000000-0000-0000-0000-000000000000','Date':'2018-12-31','Days':2}"
Example Response
[
{
"id": "00000000-0000-0000-0000-000000000000",
"message": "TimeOff Updated Successfully"
}
]
Create a TimeOff from Dates
Creates a new TimeOff. Returns Response message and a 201 Created response code if the call succeeded.
POST /API/TimeOff/RequestByDates
Object Property | Required | Object Type | Description | Max Character Length |
---|
AccountTimeOffTypeId | Yes | Guid | Id of Timeoff Type | 32 |
StartDate | Yes | Date Time | StartDate Of TimeOff | 19 |
EndDate | Yes | Date Time | Emd Date Of TimeOff | 19 |
Example Request
curl "https://demo.unitektime.com/api/TimeOff/RequestByDates" \
-H "APIKey: {Your API Key}" \
-H "AuthToken: {Your Authentication Token}" \
-H "User-Agent: MyApp (yourname@example.com)" \
-X POST \
-H "Content-Type: application/json" \
-d "{'AccountTimeOffTypeId':00000000-0000-0000-0000-000000000000','StartDate':'2018-12-31','EndDate':'2019-01-01'}"
Example Response
[
{
"id": "00000000-0000-0000-0000-000000000000",
"message": "TimeOff Added Successfully"
}
]
Update a TimeOff from Days
Updates the specific TimeOff by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Returns Response message and a 200 OK response code if the call succeeded.
POST /API/TimeOff/RequestByDates/{TimeOff_id}
Example Request
curl "https://demo.unitektime.com/api/TimeOff/RequestByDays/00000000-0000-0000-0000-000000000000" \
-H "APIKey: {Your API Key}" \
-H "AuthToken: {Your Authentication Token}" \
-H "User-Agent: MyApp (yourname@example.com)" \
-X POST \
-H "Content-Type: application/json" \
-d "{'AccountTimeOffTypeId':00000000-0000-0000-0000-000000000000','StartDate':'2018-12-31','EndDate':'2019-01-01'}"
Example Response
[
{
"id": "00000000-0000-0000-0000-000000000000",
"message": "TimeOff Updated Successfully"
}
]
Delete a TimeOff
Delete a TimeOff. Returns a 200 OK response code if the call succeeded.
DELETE /API/TimeOff/{TimeOff_ID}
Example Request
curl "https://demo.unitektime.com/api/TimeOff/00000000-0000-0000-0000-000000000000" \
-H "APIKey: {Your API Key}" \
-H "AuthToken: {Your Authentication Token}" \
-H "User-Agent: MyApp (yourname@example.com)" \
-X DELETE \
-H "Content-Type: application/json"
Example Response
[
{
"id": "00000000-0000-0000-0000-000000000000",
"message": "TimeOff Deleted Successfully"
}
]
Retrieve a TimeOff Detail of Employee
Retrieves the TimeOff Detail with the given ID. Returns a TimeOff Detail object and a 200 OK response code if a valid values provided.
GET /API/TimeOff/Details/{AccountEmployee_ID}
Example Request
curl "https://demo.unitektime.com/api/TimeOff/details/001" \
-H "APIKey: {Your API Key}" \
-H "AuthToken: {Your Authentication Token}" \
-H "Content-Type: application/json" \
-H "User-Agent: MyApp (yourname@example.com)"
Example Response
[
{
"AccountTimeOffTypeId": "00000000-0000-0000-0000-000000000000",
"AccountTimeOffType": "Sick Leave",
"Earned": 40.0,
"EarnedDay": 5.0,
"Consume": 0.0,
"ConsumeDay": 0.0,
"Available": 40.0,
"AvailableDay": 5.0,
"CarryForward": 0.0,
"CarryForwardDay": 0.0,
"LastEarnedDate": "2019-09-24T00:00:00+00:00",
"AccountTimeOffPolicyId": "00000000-0000-0000-0000-000000000000",
"AccountTimeOffPolicy": "Standard",
"IsTimeOffRequestRequired": "No"
},
{
"AccountTimeOffTypeId": "00000000-0000-0000-0000-000000000000",
"AccountTimeOffType": "Paid Leaves",
"Earned": 32.0,
"EarnedDay": 4.0,
"Consume": 0.0,
"ConsumeDay": 0.0,
"Available": 16.0,
"AvailableDay": 2.0,
"CarryForward": 0.0,
"CarryForwardDay": 0.0,
"LastEarnedDate": "2019-09-24T00:00:00+00:00",
"AccountTimeOffPolicyId": "00000000-0000-0000-0000-000000000000",
"AccountTimeOffPolicy": "Standard",
"IsTimeOffRequestRequired": "No"
}
]
Retrieve a TimeOff Detail of Employee and TimeOff Type
Retrieves the TimeOff Detail with the given ID. Returns a TimeOff Detail object and a 200 OK response code if a valid values provided.
GET /API/TimeOff/Details/{AccountEmployee_ID}/{AccountTimeOffType_ID}
Example Request
curl "https://demo.unitektime.com/api/TimeOff/details/001/00000000-0000-0000-0000-000000000000" \
-H "APIKey: {Your API Key}" \
-H "AuthToken: {Your Authentication Token}" \
-H "Content-Type: application/json" \
-H "User-Agent: MyApp (yourname@example.com)"
Example Response
[
{
"AccountTimeOffTypeId": "00000000-0000-0000-0000-000000000000",
"AccountTimeOffType": "Sick Leave",
"Earned": 40.0,
"EarnedDay": 5.0,
"Consume": 0.0,
"ConsumeDay": 0.0,
"Available": 40.0,
"AvailableDay": 5.0,
"CarryForward": 0.0,
"CarryForwardDay": 0.0,
"LastEarnedDate": "2019-09-24T00:00:00+00:00",
"AccountTimeOffPolicyId": "00000000-0000-0000-0000-000000000000",
"AccountTimeOffPolicy": "Standard",
"IsTimeOffRequestRequired": "No"
}
]
Get All TimeOff Entries by Date Range
Display TimeOff Entries within Date Range. Returns a 200 OK response code if the call succeeded.
GET /API/TimeOff/GetAllTimeOffByDateRange/{Start_Date}/{End_Date}
Example Request
curl "https://demo.unitektime.com/api/TimeOff/GetAllTimeOffByDateRange/2020-01-01/2020-12-31" \
-H "APIKey: {Your API Key}" \
-H "AuthToken: {Your Authentication Token}" \
-H "User-Agent: MyApp (yourname@example.com)" \
-X GET \
-H "Content-Type: application/json"
Example Response
[
{
"AccountEmployeeTimeOffRequestId": "00000000-0000-0000-0000-000000000000",
"AccountEmployeeId": 1,
"AccountTimeOffType": "Sick Leave",
"RequestSubmitDate": "2020-05-18T00:00:00+00:00",
"StartDate": "2020-06-08T00:00:00+00:00",
"EndDate": "2020-06-08T00:00:00+00:00",
"HoursOff": 8.0,
"DayOff": 1.0,
"ApprovalStatus": "Approved",
"AccountProjectId": null,
"Approved": "Yes",
"Rejected": "No"
},
{
"AccountEmployeeTimeOffRequestId": "00000000-0000-0000-0000-000000000000",
"AccountEmployeeId": 2,
"AccountTimeOffType": "Sick Leave",
"RequestSubmitDate": "2020-05-18T00:00:00+00:00",
"StartDate": "2020-05-18T00:00:00+00:00",
"EndDate": "2020-05-18T00:00:00+00:00",
"HoursOff": 8.0,
"DayOff": 1.0,
"ApprovalStatus": "Approved",
"AccountProjectId": null,
"Approved": "Yes",
"Rejected": "No"
}
]