The absence Object

Object Property Required Object Type Description Max Character Length
AbsenceDescription Yes String Description of Absence 25
AccountAbsenceTypeId No Integer AbsenceTypeId of Absence 10
IsDisabled No Boolean Disabled of Absence 1

List All absences

Returns a list of your all absences in your TimeLive account.

GET /API/absences

Example Request

curl "https://demo.livetecs.com/api/absences" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "Content-Type: application/json" \
      -H "User-Agent: MyApp (yourname@example.com)"

Example Response

[
    {
        "AccountAbsenceTypeId": 00001,
        "AbsenceDescription": "Sick Leave"
    },
    {
        "AccountAbsenceTypeId": 00002,
        "AbsenceDescription": "Holiday"
    }
]

Retrieve a absence

Retrieves the absence with the given ID. Returns a absence object and a 200 OK response code if a valid identifier was provided.

GET /API/absences/{absence_ID}

Example Request

curl "https://demo.livetecs.com/api/absences/00002" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "Content-Type: application/json" \
      -H "User-Agent: MyApp (yourname@example.com)"

Example Response

[
    {
        "AccountAbsenceTypeId": 00002,
        "AbsenceDescription": "Holiday"
    }
]

Create a absence

Creates a absence in your TimeLive account and returns the Response Message.

POST /API/absences
Object Property Required Object Type Description Max Character Length
AbsenceDescription Yes String Description of Absence 25

Example Request

curl "https://demo.livetecs.com/api/absences" \
      -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 "{'AbsenceDescription':'Demo absence'}"

Example Response

[			
    {			
        "id": "00000",			
        "message": "Absence Type Added Successfully"			
    }			
]

Update a absence

Update an absence in your TimeLive account and returns the Response Message.

POST /API/absences/{absence_ID}

Example Request

curl "https://demo.livetecs.com/api/absences/00002" \
      -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 "{'AbsenceDescription':'Sample absence'}"

Example Response

[			
    {			
        "id": "00002",			
        "message": "Absence Type Update Successfully"			
    }			
]

Delete a absence

Delete a absence. Returns a 200 OK response code if the call succeeded.

DELETE /API/absence/{absence_ID}

Example Request

curl "https://demo.livetecs.com/api/absences/00002" \
      -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": "00002",
    "message": "Absence Type Delete Succeed"
  }
]