Add or Update an Expense
This service allows you to add or update expenses and expense items.
Within BigChange an 'Expense' record can have multiple 'Expense Item' records. An 'Expense Item' must be linked to an 'Expense'.
Depending on which entity(s) are being added or updated, different parameters are required.
Query String Parameters
Name | Type | Description | Required |
---|---|---|---|
Action | String | ExpenseSave | Required |
ExpenseId | Int | Unique Id of the expense. | 2, 3 |
Start | DateTime | Start date and time for expense record e.g. ‘2020-01-09 01:00:00.000’. | 1, 2, 5, 6 |
End | DateTime | End date and time for expense record e.g. ‘2020-01-09 23:00:00.000’. | 1, 2, 5, 6 |
ResourceId | Int | Unique Id of the resource. | Required |
ExpenseItemId | Int | Unique Id of the expense item. | 4, 5, 6 |
ExpenseItemDate | DateTime | Date of expense item e.g. ‘2020-01-09 23:00:00.000’. | 3, 4, 5, 6 |
ExpenseItemTypeId | Int | Unique Id of the expense item type. | 3, 4, 5, 6 |
ExpenseItemExclTax | Double | Expense item value prior to tax. These values are used, no calculation is undertaken. | 3, 4, 5, 6 |
ExpenseItemInclTax | Double | Expense item value prior after tax. These values are used, no calculation is undertaken. | 3, 4, 5, 6 |
ExpenseItemVAT | Double | Expense item tax amount. These values are used, no calculation is undertaken. | 2, 3, 4, 5 |
ExpenseItemCurrency | String | ISO 3 character currency identifier E.g.: "GBP" "USD" "EUR" . | Required |
ExpenseItemFuel | Double | Fuel Cost amount. | Optional |
ExpenseItemStatus | Int | The required expense item status value. | 3, 4, 5, 6 |
ExpenseItemComment | String | Expense Back Office Comment | Optional |
IsLocalTime | Bool | Set to true when local time is provided, as opposed to a UTC datetime. Default is false. | Optional. |
note
Required Key:
- 1: When adding a new expense
- 2: When updating an existing expense
- 3: When adding a new expense item
- 4: When updating an existing expense item
- 5: When updating both an expense and an expense item together
- 6: When adding both an expense and an expense item together
Response Codes
Example
- Request
- Response
Request URL
https://webservice.bigchange.com/v01/services.ashx?action=ExpenseSave&Start=2024-10-16 09:00:00&End=2024-10-16 17:30:00&ResourceId=78298&IsLocalTime=true
Response Data
{ "Code": 0, "Result": "{\"ActionType\":\"Valid : New Expense\",\"ExpenseItemId\":\"\",\"ExpenseId\":\"874548\",\"Error\":null}" }