The expense Object

Object Property Required Object Type Description Max Character Length
AccountExpenseName Yes String Expense Name of expense 50
AccountExpenseTypeId Yes String Expense Type Id of expense 50
AccountExpenseId No Integer Expense Id of expense 32
DefaultExpenseRate No Boolean Default Expense Rate of expense 1
DisabledEditingOfRate No Boolean Disabled Editing Of Rate of expense 1
IsBillable No Boolean Billable Status of expense 2
IsDisabled No Boolean Disabled Status of expense 3

List All expenses

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

GET /API/expenses

Example Request

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

Example Response

[
    {
        "AccountExpenseId": 0001,
        "AccountExpenseName": "Air Travel",
        "ExpenseType": "Air Travel",
        "DefaultExpenseRate": null,
        "DisabledEditingOfRate": "No",
        "IsBillable": "Yes",
        "IsDisabled": "No"
    },
    {
        "AccountExpenseId": 0002,
        "AccountExpenseName": "Travel Amount",
        "ExpenseType": "Air Travel",
        "DefaultExpenseRate": null,
        "DisabledEditingOfRate": "No",
        "IsBillable": null,
        "IsDisabled": "No"
    }
]

Retrieve a expense

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

GET /API/expenses/{expense_ID}

Example Request

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

[
    {
        "AccountExpenseId": 0001,
        "AccountExpenseName": "Air Travel",
        "ExpenseType": "Air Travel",
        "DefaultExpenseRate": null,
        "DisabledEditingOfRate": "No",
        "IsBillable": "Yes",
        "IsDisabled": "No"
    }
]

Create a expense

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

POST /API/expenses
Object Property Required Object Type Description Max Character Length
AccountExpenseName Yes String Expense Name of expense 50
AccountExpenseTypeId Yes String Expense Type Id of expense 50

Example Request

curl "https://demo.livetecs.com/api/expenses" \
      -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 "{'AccountExpenseName': 'Demo','AccountExpenseTypeId': 0001}"

Example Response

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

Update a expense

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

POST /API/expenses/{expense_ID}

Example Request

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

Example Response

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

Delete a expense

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

DELETE /API/expense/{expense_ID}

Example Request

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