Expense Claim Items

Get Expense Claim Item

HTTP GET v1/expenses/{EXPENSE_CLAIM_ID}/items/{EXPENSE_CLAIM_ITEM_ID}

Returns the Expense Claim Item for the Expense Claim ID specified by EXPENSE_CLAIM_ID and the Expense Claim Item ID specified by EXPENSE_CLAIM_ITEM_ID. To retrieve the list of BillingTypeID values for the billable field, make a GET request to v1/resources/expensebillingtypes Only one pair of projectId and projectName or internalCodeId and internalCodeName will be populated in the response. receiptImage is a base64 encoded string representing an encoded JPG image. To retrieve the BudgetExternalID make a GET request to v1/budgets/{PROJECT_ID}/externals.

Response

{
  "amount": 123.45,
  "billable": 1, /* nullable */
  "categoryId": 12345,
  "categoryName": "Transport",
  "claimId": 123456,
  "claimName": "Expense Claim - Dec 2022",
  "currencyId": 1,
  "currency": "GBP",
  "currencyName": "Great British Pounds",
  "date": "2022-12-01T00:00:00",
  "description": "Meal for the client",
  "exchangeRate": 1.0, /* nullable */
  "id": 1234567,
  "mileage": 123.45, /* nullable */
  "mileageRateId": 123, /* nullable */
  "mileageRate": "Standard",
  "internalCodeId": 12345,
  "internalCodeName": "Training & Development",
  "projectId": 123456, /* nullable */
  "projectName": "Sample Account, 8978 - New Website Project",
  "reimburse": true,
  "receiptImage": "ABCDEF1234560...",
  "vatRateId": 1,
  "vatrate": 20.0,
  "budgetExternalID": 1234567,
  "chargeable": false,
  "sageAccountCode": "SAGE1234"
}

Get Expense Claim Items

HTTP GET v1/expenses/{EXPENSE_CLAIM_ID}/items

Returns all the Expense Claim Items for a single Expense Claim. To retrieve the list of BillingTypeID values, make a GET request to v1/resources/expensebillingtypes. In the event that an Expense Claim Item is a mileage item, then categoryId will be 0, currencyId will be 0 and mileage and mileageRateId will have values. For all other Expense Claim Item types, the mileage and mileageRateId fields will be null and categoryId and currencyId will be non-zero. To retrieve the BudgetExternalID make a GET request to v1/budgets/{PROJECT_ID}/externals.

Response

[
  {
    "amount": 123.45,
    "billable": 1, /* nullable */
    "categoryId": 12345,
    "categoryName": "Transport",
    "claimId": 123456,
    "currencyId": 1,
    "currencyName": "GBP",
    "date": "2022-12-01T00:00:00",
    "description": "Meal for the client",
    "exchangeRate": 1.0, /* nullable */
    "id": 1234567,
    "mileage": 123.45, /* nullable */
    "mileageRateId": 123, /* nullable */
    "projectId": 123456, /* nullable */
    "projectName": "Sample Account, 8978 - New Website Project",
    "reimburse": true,
    "vatRateId": 1,
    "budgetExternalID": 1234567,
    "chargeable": false,
    "sageAccountCode": "SAGE1234"
  }
]

Get Expense Claim Items for Invoice

HTTP GET v1/expenses/ForInvoice/{INVOICE_ID}

Returns all related Expense Claim Items that are linked to the invoice specificed by INVOICE_ID.

Response

[
  {
    "amount": 123.45,
    "billable": 1, /* nullable */
    "categoryId": 12345,
    "categoryName": "Transport",
    "claimId": 123456,
    "currencyId": 1,
    "currencyName": "GBP",
    "date": "2022-12-01T00:00:00",
    "description": "Meal for the client",
    "exchangeRate": 1.0, /* nullable */
    "id": 1234567,
    "mileage": 123.45, /* nullable */
    "mileageRateId": 123, /* nullable */
    "projectId": 123456, /* nullable */
    "projectName": "Sample Account, 8978 - New Website Project",
    "reimburse": true,
    "vatRateId": 1,
    "budgetExternalID": 1234567,
    "chargeable": false,
    "sageAccountCode": "SAGE1234"
  }
]

Create Expense Claim Item

HTTP POST v1/expenses/{EXPENSE_CLAIM_ID}/items

Create a new Expense Claim Item, returning the newly created Expense Claim Item ID. To retrieve the list of BillingTypeID values, make a GET request to v1/resources/expensebillingtypes. To retrieve the BudgetExternalID make a GET request to v1/budgets/{PROJECT_ID}/externals. receiptImage is a base64 encoded string representing an encoded JPG image.

Request

// Non-Mileage Expense Claim Item
{
	"ExpenseClaimID": 123456,
	"ExpenseCategoryID": 12345,
	"ContractID": 12345, /* only used when the Expense Claim is for a Contract */
	"ProjectID": 12345, /* only used when the Expense Claim is for a Project */
	"InternalCodeID": 12345, /* only used when the Expense Claim is for an Internal Code */
	"ClaimDate": "2022-12-01",
	"Value": 123.45,
	"CurrencyID": 1,
	"Description": "Description of the Expense Claim Item",
	"ExchangeRate": 1,
	"Reimburse": true,
	"Receipt": true,
	"VATRateID": 1,
	"AccountID": 12345,
	"BillingTypeID": 1,
	"BudgetExternalID": 1234567,
	"ReceiptImage": "ABCDEF1234560...",
	"InvoiceID": 123456,
	"VatAmount": 20.0,
	"ExpenseClaimStatusID": 1
}

Request

// Mileage Expense Claim Item
{
	"ExpenseClaimID": 123456,
	"ExpenseCategoryID": 0,
	"ContractID": 12345, /* only used when the Expense Claim is for a Contract */
	"ProjectID": 12345, /* only used when the Expense Claim is for a Project */
	"InternalCodeID": 12345, /* only used when the Expense Claim is for an Internal Code */
	"ClaimDate": "2022-12-01",
	"Mileage": 123.45,
	"MileageRateID": 12345,
	"CurrencyID": 1,
	"Description": "Description of the Expense Claim Item",
	"ExchangeRate": 1,
	"Reimburse": true,
	"Receipt": true,
	"VATRateID": 1,
	"AccountID": 12345,
	"BillingTypeID": 1,
	"BudgetExternalID": 1234567,
	"ReceiptImage": "ABCDEF1234560...",
	"InvoiceID": 123456,
	"VatAmount": 20.0,
	"ExpenseClaimStatusID": 1
}

Response

{
  "id" : 1234
}

Update Expense Claim Item

HTTP PUT v1/expenses/{EXPENSE_CLAIM_ID}/items/{EXPENSE_CLAIM_ITEM_ID}

Updates an Expense Claim Item. To retrieve the list of BillingTypeID values, make a GET request to v1/resources/expensebillingtypes. To retrieve the BudgetExternalID make a GET request to v1/budgets/{PROJECT_ID}/externals. receiptImage is a base64 encoded string representing an encoded JPG image.

Request

// Non-Mileage Expense Claim Item
{
	"ExpenseClaimID": 123456,
	"ExpenseCategoryID": 12345,
	"ContractID": 12345, /* only used when the Expense Claim is for a Contract */
	"ProjectID": 12345, /* only used when the Expense Claim is for a Project */
	"InternalCodeID": 12345, /* only used when the Expense Claim is for an Internal Code */
	"ClaimDate": "2022-12-01",
	"Value": 123.45,
	"CurrencyID": 1,
	"Description": "Description of the Expense Claim Item",
	"ExchangeRate": 1,
	"Reimburse": true,
	"Receipt": true,
	"VATRateID": 1,
	"AccountID": 12345,
	"BillingTypeID": 1,
	"BudgetExternalID": 1234567,
	"ReceiptImage": "ABCDEF1234560...",
	"InvoiceID": 123456,
	"VatAmount": 20.0,
	"ExpenseClaimStatusID": 1
}

Request

// Mileage Expense Claim Item
{
	"ExpenseClaimID": 123456,
	"ExpenseCategoryID": 0,
	"ContractID": 12345, /* only used when the Expense Claim is for a Contract */
	"ProjectID": 12345, /* only used when the Expense Claim is for a Project */
	"InternalCodeID": 12345, /* only used when the Expense Claim is for an Internal Code */
	"ClaimDate": "2022-12-01",
	"Mileage": 123.45,
	"MileageRateID": 12345,
	"CurrencyID": 1,
	"Description": "Description of the Expense Claim Item",
	"ExchangeRate": 1,
	"Reimburse": true,
	"Receipt": true,
	"VATRateID": 1,
	"AccountID": 12345,
	"BillingTypeID": 1,
	"BudgetExternalID": 1234567,
	"ReceiptImage": "ABCDEF1234560...",
	"InvoiceID": 123456,
	"VatAmount": 20.0,
	"ExpenseClaimStatusID": 1
}

Response

{
  "id" : 1234
}

Delete Expense Claim Item

HTTP DELETE v1/expenses/5/items/1

Deletes an expense claim item. Returns a true or false indicating a successful deletion and a notification message.

Response

{
    "result": {
        "success": true,
        "notification": "Item Deleted"
    }
}