The ExpenseType Object

Object Property Required Object Type Description Max Character Length
ExpenseType Yes String Expense Type of expenseType 50
AccountExpenseTypeId No Integer Expense Type Id of expenseType 32
IsQuantityField No Boolean Quantity Field Status of expenseType 1
IsDisabled No Boolean Disabled Status of expenseType 1

List All expenseTypes

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

GET /API/expenseTypes

Example Request

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

Example Response

[
    {
        "AccountExpenseTypeId": 0001,
        "ExpenseType": "Demo Expense",
        "QuantityFieldCaption": null,
        "IsQuantityField": "No",
        "IsDisabled": "No"
    },
    {
        "AccountExpenseTypeId": 0002,
        "ExpenseType": "sample expense",
        "QuantityFieldCaption": null,
        "IsQuantityField": "No",
        "IsDisabled": "No"
    }
]

Retrieve a expenseType

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

GET /API/expenseTypes/{expenseType_ID}

Example Request

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

[
    {
        "AccountExpenseTypeId": 0001,
        "ExpenseType": "Demo Expense",
        "QuantityFieldCaption": null,
        "IsQuantityField": "No",
        "IsDisabled": "No"
    }
]

Create a expenseType

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

POST /API/expenseTypes
Object Property Required Object Type Description Max Character Length
ExpenseType Yes String Expense Type of expenseType 50

Example Request

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

Example Response

[
    {
        "id": "0",
        "message": "expense Type Added Successfully"
    }
]

Update a expenseType

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

POST /API/expenseTypes/{expenseType_ID}

Example Request

curl "https://demo.livetecs.com/api/expenseTypes/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 "{'AccountexpenseType': 'Sample'}"

Example Response

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

Delete a expenseType

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

DELETE /API/expenseType/{expenseType_ID}

Example Request

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