v1

Swagger 2.02026-07-13107162315.5 KB
Expense

Creates a new expense entry. Requires at minimum an expense date, amount, and expense category (by ID or name).

post/api/Expense

Request body

ExpenseDatestring date-time

The date of the expense entry (Required)

UserIDFKinteger

UserID for a Timesheet/Expense user in Avaza. If not provided, UserEmail field must be provided

UserEmailstring

The email address of a Timesheet/Expense user in Avaza. If not provided, UserIDFK field must be provided.

ExpenseCategoryIDFKinteger

The expense category to link the Expense to. If not provided, ExpenseCategoryName must be provided

ExpenseCategoryNamestring

Must match an existing expense category name otherwise a new category will be created. If left blank Expense Category ID must be provided.

isChargeableboolean

aka Billable. Defaults to false if not provided. If set to true, a CustomerIDFK or CustomerName must be provided.

isReimbursableboolean

Defaults to false if not provided.

Quantitynumber double

Conditional - available for expenses that are assigned a unit priced based expense category. e.g Mileage

CustomerIDFKinteger

The Avaza Customer ID to associate the Expense with. Either this field or CustomerName can be provided.

CustomerNamestring

The name of an existing customer in Avaza. Must be an exact (case insensitive) match.

ProjectIDFKinteger

The Avaza project ID to associate the Expense with.

ProjectNamestring

Can work for matching an expense to a project, but only if it's an exact match for a single project under the customer.

TaskIDFKinteger

(optional) TaskID of a Task to link the new Expense to. A Customer and Project must be provided also.

CurrencyCodestring

A 3-letter ISO CurrencyCode for the expense currency. (e.g. USD). If not provided, defaults to the Account base currency.

ExchangeRatenumber double

Optional (Only relevant if the expense currency is different to your account currency. If not provided we will look up the market exchange rate for you based on the expense date.) Exchange Rate = Expense Currency Amount / Base Currency Amount (e.g. if Expense currency is in AUD, and Base Currency is in USD, Exchange Rate = AUD $140 / USD $100 = 1.4)

Amountnumber double

Expense Amount (Required). Must be >= 0

TaxIDFKinteger

Avaza Tax ID the expense belongs to. If left blank then Tax Name must be provided.

TaxNamestring

Must exactly match an existing Tax Name that you have configured in Avaza Tax settings. If left blank then Tax ID must be provided.

TransactionTaxConfigCodestring

Optional - Enter "INC" if the tax amount is included in the expense amount otherwise enter "EX" when the amount exlcudes the tax. Defaults to "Ex". The tax amount on the expense will be autocalculated.

GroupTripNamestring

Links the expense to a Grouping/Trip report. If no matching name found, creates a new Group/Trip Report name.

ExpensePaymentMethodIDFKinteger

(Optional) ID of Expense Payment Method.

Merchantstring

The name of the merchant.

MerchantTaxNumberstring

A Tax number identifier for the merchant.

Notesstring

Expense Notes

VerifyAndSaveboolean

Pass false if creating a draft expense. True otherwise.

FileAttachmentIDsinteger[]

Array of File Attachment IDs to associate with this expense. The files need to have already been uploaded. Currently only accepts a single file.

SendWebhooksboolean

If true, fires the expense_created webhook event to any subscribed endpoints. Defaults to false to preserve existing integration behaviour.

Response

Returns the created expense with assigned Expense ID.

ExpenseIDinteger

Unique identifier for the expense entry.

UserIDFKinteger

The user ID who created/owns this expense.

Firstnamestring

First name of the expense user.

Lastnamestring

Last name of the expense user.

Emailstring

Email address of the expense user.

CustomerIDFKinteger

The customer/company ID the expense is associated with.

CustomerNamestring

Name of the associated customer/company.

ProjectIDFKinteger

The project ID the expense is linked to.

ProjectTitlestring

Title of the associated project.

ProjectCodestring

Short code of the associated project.

TaskIDFKinteger

The task ID the expense is linked to.

TaskTitlestring

Title of the associated task.

ExpenseCategoryIDFKinteger

The expense category ID.

ExpenseCategoryNamestring

Name of the expense category.

ExpenseCategoryHasUnitPriceboolean

Whether the expense category has a predefined unit price (e.g. mileage rate).

ExpenseCategoryUnitPricenumber double

The unit price for the expense category, if applicable.

ExpenseCategoryUnitNamestring

The unit label (e.g. 'miles', 'km') for unit-priced categories.

CurrencyCodestring

ISO 3-character currency code for the expense.

ExchangeRatenumber double

Exchange rate from expense currency to account base currency.

Quantitynumber double

Quantity for unit-priced expenses (e.g. number of miles).

Amountnumber double

The expense amount in the expense currency.

TaxAmountnumber double

Calculated tax amount on the expense.

TaxIDFKinteger

The tax rate ID applied to this expense.

TaxNamestring

Name of the applied tax rate.

TransactionTaxConfigCodestring

Tax configuration: 'EX' (exclusive) or 'INC' (inclusive).

TransactionTaxConfigNamestring

Display name for the tax configuration.

isOfficialExchangeRateboolean

Whether the exchange rate is from an official/market source.

ExpenseApprovalStatusCodestring

Approval status. Values: Draft, Pending, Approved, AutoApproved, Rejected, Verified.

ExpensePaymentMethodIDFKinteger

The payment method ID used for this expense.

ExpensePaymentMethodNamestring

Name of the payment method.

isChargeableboolean

Whether the expense is billable to the customer.

ChargeableStatusCodestring

Detailed chargeable status code.

isReimbursableboolean

Whether the expense is reimbursable to the employee.

ExpenseReimbursementStatusCodestring

Reimbursement processing status.

ExpenseReimbursementIDFKinteger

The reimbursement batch ID this expense belongs to, if reimbursed.

ExpenseDatestring date-time

The date the expense was incurred.

FileAttachmentIDFKinteger

ID of the receipt/file attachment, if any.

AttachmentURLstring

Public URL of the expense receipt attachment.

AttachmentPreviewURLstring

URL for a preview/thumbnail of the expense attachment.

Merchantstring

Name of the merchant/vendor.

MerchantTaxNumberstring

Tax registration number of the merchant.

Notesstring

Additional notes on the expense.

ExpenseReportIDFKinteger

ID of the expense report/group this expense belongs to.

ExpenseReportNamestring

Name of the expense report/group.

DateCreatedstring date-time

Date and time the expense record was created.

DateUpdatedstring date-time

Date and time the expense record was last updated.

ViewExpenseURLstring

Url to view the Expense in Avaza