The AccountTimeOffType Object
Object Property | Required | Object Type | Description | Max Character Length |
---|
AccountTimeOffType | Yes | String | Name of Timeoff Type | 10 |
AccountTimeOffTypeId | No | Guid | Id of Timeoff Type | 32 |
IsTimeOffRequestRequired | No | Boolean | Request Required Status of Timeoff Type | 1 |
IsDisabled | No | Boolean | Disabled Status of Timeoff Type | 1 |
List All AccountTimeOffTypes
Returns a list of your all AccountTimeOffTypes in your UNItekTIME account.
GET /API/TimeOffTypes
Example Request
curl "https://demo.unitektime.com/api/TimeOffTypes" \
-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": "Holiday",
"IsTimeOffRequestRequired": "No",
"IsDisabled": "No"
},
{
"AccountTimeOffTypeId": "00000000-0000-0000-0000-000000000000",
"AccountTimeOffType": "Other",
"IsTimeOffRequestRequired": "Yes",
"IsDisabled": "No"
}
]
Retrieve a AccountTimeOffType
Retrieves the AccountTimeOffType with the given ID. Returns a AccountTimeOffType object and a 200 OK response code if a valid identifier was provided.
GET /API/TimeOffTypes/{TimeOffTypes_ID}
Example Request
curl "https://demo.unitektime.com/api/TimeOffTypes/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": "Holiday",
"IsTimeOffRequestRequired": "No",
"IsDisabled": "No"
}
]
Create a AccountTimeOffType
Creates a AccountTimeOffType in your UNItekTIME account and returns the Response Message.
POST /API/TimeOffTypes
Object Property | Required | Object Type | Description | Max Character Length |
---|
AccountTimeOffType | Yes | String | Type of Timeoff Type | 10 |
Example Request
curl "https://demo.unitektime.com/api/TimeOffTypes" \
-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 "{'AccountTimeOffType': 'demo'}"
Example Response
[
{
"id": "00000000-0000-0000-0000-000000000000",
"message": "Time Off Type Added Successfully"
}
]
Update a AccountTimeOffType
Update an AccountTimeOffType in your UNItekTIME account and returns the Response Message.
POST /API/TimeOffTypes/{AccountTimeOffType_ID}
Example Request
curl "https://demo.unitektime.com/api/TimeOffTypes/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 "{'IsDisabled': true}"
Example Response
[
{
"id": "00000000-0000-0000-0000-000000000000",
"message": "Time Off Type Updated Successfully"
}
]
Delete a AccountTimeOffType
Delete a AccountTimeOffType. Returns a 200 OK response code if the call succeeded.
DELETE /API/TimeOffTypes/{AccountTimeOffType_ID}
Example Request
curl "https://demo.unitektime.com/api/TimeOffTypes/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": "Time Off Type Deleted Successfully"
}
]