The TimeOff Object

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
Double Yes Date Time StartDate Of TimeOff 19

List All /TimeOff

Returns a list of your all /TimeOff in your TimeLive account.

GET /API//TimeOff

Example Request

curl "https://demo.livetecs.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.livetecs.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 No Guid Id of Timeoff Type 32
Date Yes Date Time StartDate Of TimeOff 19
Hours Yes Double StartDate Of TimeOff 19

Example Request

curl "https://demo.livetecs.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.livetecs.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 No Guid Id of Timeoff Type 32
Date Yes Date Time StartDate Of TimeOff 19
Days Yes Double StartDate Of TimeOff 11

Example Request

curl "https://demo.livetecs.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.livetecs.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 11
EndDate Yes Date Time Emd Date Of TimeOff 11

Example Request

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