The Holiday Object

Object Property Required Object Type Description Max Character Length
AccountHolidayId Yes Guid Holiday Type Id of Holiday 32
HolidayName Yes String Holiday Name of Holiday 25
HolidayDate Yes DateTime Holiday Date of Holiday 19
AccountHolidayDetailId No Guid Holiday Type Detail Id of Holiday 32

List All Holidays

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

GET /API/Holidays

Example Request

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

Example Response

[
    {
        "AccountHolidayDetailId": "00000000-0000-0000-0000-000000000000",
        "AccountHolidayId": "00000000-0000-0000-0000-000000000000",
        "HolidayName": "Demo",
        "HolidayDate": "2018-01-01T00:00:00+00:00"
    },
    {
        "AccountHolidayDetailId": "00000000-0000-0000-0000-000000000000",
        "AccountHolidayId": "00000000-0000-0000-0000-000000000000",
        "HolidayName": "Demo 2",
        "HolidayDate": "2018-01-01T00:00:00+00:00"
    }
]

Retrieve a Holiday

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

GET /API/Holidays/{Holiday_ID}

Example Request

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

[
    {
        "AccountHolidayDetailId": "00000000-0000-0000-0000-000000000000",
        "AccountHolidayId": "00000000-0000-0000-0000-000000000000",
        "HolidayName": "Demo 2",
        "HolidayDate": "2018-01-01T00:00:00+00:00"
    }
]

Create a Holiday

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

POST /API/Holidays
Object Property Required Object Type Description Max Character Length
AccountHolidayId Yes Guid Holiday Type Id of Holiday 32
HolidayName Yes String Holiday Name of Holiday 25
HolidayDate Yes DateTime Holiday Date of Holiday 19

Example Request

curl "https://demo.livetecs.com/api/Holidays" \
      -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 "{'HolidayName': 'Sample','AccountHolidayId':'00000000-0000-0000-0000-0000000000000','HolidayDate','2018-01-01'}"

Example Response

[
    {
        "id": "00000000-0000-0000-0000-0000000000000",
        "message": "Holiday Added Successfully"
    }
]

Update a Holiday

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

POST /API/Holidays/{Holiday_ID}

Example Request

curl "https://demo.livetecs.com/api/Holidays/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 "{'HolidayDate','2018-01-01'}"

Example Response

[
    {
        "id": "00000000-0000-0000-0000-000000000000",
        "message": "Holiday Update Successfully"
    }
]

Delete a Holiday

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

DELETE /API/Holiday/{Holiday_ID}

Example Request

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