20.03.13 Expense Type

The ExpenseType Object

Object PropertyRequiredObject TypeDescriptionMax Character Length
ExpenseTypeYesStringExpense Type of expenseType50
AccountExpenseTypeIdNoIntegerExpense Type Id of expenseType32
IsQuantityFieldNoBooleanQuantity Field Status of expenseType1
IsDisabledNoBooleanDisabled Status of expenseType1

List All expenseTypes

Returns a list of your all expenseTypes in your UNItekTIME account.
GET /API/expenseTypes

Example Request

curl "https://demo.unitektime.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.unitektime.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 UNItekTIME account and returns the Response Message.
POST /API/expenseTypes
Object PropertyRequiredObject TypeDescriptionMax Character Length
ExpenseTypeYesStringExpense Type of expenseType50

Example Request

curl "https://demo.unitektime.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 UNItekTIME account and returns the Response Message.
POST /API/expenseTypes/{expenseType_ID}

Example Request

curl "https://demo.unitektime.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.unitektime.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"
    }
]