The Worktype Object

Object Property Required Object Type Description Max Character Length
AccountWorkTypeCode Yes String Code of Worktype 10
AccountWorkType Yes String Name of Worktype 10
AccountWorkTypeId No Guid Id of Worktype 32
IsDisabled No Boolean Disabled Status of Worktype 1

List All Worktypes

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

GET /API/Worktypes

Example Request

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

Example Response

[
     {
        "AccountWorkTypeId": 0001,
        "AccountWorkTypeCode": "ST",
        "AccountWorkType": "Standard",
        "IsDisabled": "No"
    },
    {
        "AccountWorkTypeId": 0002,
        "AccountWorkTypeCode": "OT",
        "AccountWorkType": "Overtime",
        "IsDisabled": "No"
    }
]

Retrieve a Worktype

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

GET /API/Worktypes/{Worktype_ID}

Example Request

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

Example Response

[
     {
        "AccountWorkTypeId": 0001,
        "AccountWorkTypeCode": "ST",
        "AccountWorkType": "Standard",
        "IsDisabled": "No"
    }
]

Create a Worktype

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

POST /API/Worktypes
Object Property Required Object Type Description Max Character Length
AccountWorkTypeCode Yes String Code of Worktype 10
AccountWorkType Yes String Name of Worktype 10

Example Request

curl "https://demo.livetecs.com/api/Worktypes" \
      -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 "{'AccountWorkTypeCode': 'dm',''AccountWorkType': 'demo'}"

Example Response

[
    {
        "id": "0001",
        "message": "Work Type Added Successfully"
    }
]

Update a Worktype

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

POST /API/Worktypes/{Worktypes_ID}

Example Request

curl "https://demo.livetecs.com/api/Worktypes/0001" \
      -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": "0001",
        "message": "Work Type Updated Successfully"
    }
]

Delete a Worktype

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

DELETE /API/Worktypes/{Worktypes_ID}

Example Request

curl "https://demo.livetecs.com/api/Worktypes/0001" \
      -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": "0001",
        "message": "Work Type Deleted Successfully"
    }
]