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 TimeLive account.

GET /API/AccountTimeOffTypes

Example Request

curl "https://demo.livetecs.com/api/AccountTimeOffTypes" \
      -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/AccountTimeOffTypes/{TimeOffTypes_ID}

Example Request

curl "https://demo.livetecs.com/api/AccountTimeOffTypes/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 TimeLive account and returns the Response Message.

POST /API/AccountTimeOffTypes
Object Property Required Object Type Description Max Character Length
AccountTimeOffType Yes String Type of Timeoff Type 10

Example Request

curl "https://demo.livetecs.com/api/AccountTimeOffTypes" \
      -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 TimeLive account and returns the Response Message.

POST /API/AccountTimeOffTypes/{AccountTimeOffType_ID}

Example Request

curl "https://demo.livetecs.com/api/AccountTimeOffTypes/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/AccountTimeOffTypes/{AccountTimeOffType_ID}

Example Request

curl "https://demo.livetecs.com/api/AccountTimeOffTypes/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"
    }
]