v2

latestOpenAPI 3.0.12026-07-262352981007.0 KB
Expenses

Patch an expense

Patches an expense for the specified matter.

patch/matters/{matterId}/expenses/{id}

Path parameters

matterIdstring required
idstring required

Request body

updatedByUserIdstring nullable

Unique identifier of the user updating the expense.

This field is reserved for server-to-server operations.

staffIdstring nullable

Unique identifier of the associated staff member.

When StaffId is not provided, the API will attempt to match your User Id to a Staff Id automatically.

invoiceIdstring nullable

Unique identifier of the associated invoice.

expenseDatestring date-time

The date of the expense.

activityCodestring nullable

The activity code associated to the expense.

subjectstring nullable

The subject - this should be a short description of the expense.

descriptionstring nullable

Optional detailed description of the expense.

costTypestring

The cost type of the expense.

  • Hard - Direct cost such as travel, accommodation, or materials.

  • Soft - Indirect cost such as administrative fees or overhead.

quantitynumber double

The quantity of the expense in units (if not applicable, use 1).

The expense amount will be calculated as Quantity * Price.

pricenumber double

The price of the expense in dollars. Limited to 2 decimal places (cents).

The expense amount will be calculated as Quantity * Price.

taxnumber double nullable

Tax amount of the expense in dollars. Only applicable in AU and UK regions.

When TaxOutOfScope or TaxExempt is true, this value must be 0. When TaxZeroRated is true, this value can be greater than 0.

outputTaxnumber double nullable

Output tax amount of the expense in dollars. Only applicable in AU and UK regions.

When TaxOutOfScope or TaxZeroRated is true, this value must be 0. When TaxExempt is true, this value can be greater than 0.

taxInclusiveboolean

If true, the amount is tax inclusive, otherwise tax exclusive. Only applicable in AU and UK regions.

Tax inclusive means: Amount exc. tax = Amount - Tax, Amount inc. tax = Amount.

Tax exclusive means: Amount exc. tax = Amount, Amount inc. tax = Amount + Tax. (Amount = Price * Quantity, Tax = value of the Tax field)

This field is mutually exclusive with TaxZeroRated, TaxOutOfScope and TaxExempt.

taxZeroRatedboolean

True if the expense is zero-rated for tax purposes. Only supported in UK regions.

This field is mutually exclusive with TaxInclusive, TaxOutOfScope and TaxExempt. When true, OutputTax must be 0.

taxOutOfScopeboolean

True if the expense is out of scope for tax purposes. Only supported in UK regions.

This field is mutually exclusive with TaxInclusive, TaxZeroRated and TaxExempt. When true, both Tax and OutputTax must be 0.

taxExemptboolean

True if the expense is exempt from tax.

This field is mutually exclusive with TaxInclusive, TaxZeroRated and TaxOutOfScope. When true, Tax must be 0 but OutputTax can be greater than 0.

finalizedboolean

True if the expense has been finalized.

isWrittenOffboolean

True if the expense is written off. True only allowed if IsBillable is true.

Written off expenses will show on an invoice with their amount, but will not be counted in the invoice total.

isBillableboolean

True if the expense is billable. Non-billable expense will, by default, not be shown on invoices (and, if shown, the amount will be 0).

isInvoicedExternallyboolean

True if the expense is invoiced externally.

assignToFirmOwnerboolean

Assigns expense to a firm owner if true. Ignored if a StaffId is provided.

Note: If there are multiple firm owners, it is not guaranteed that the same firm owner will be assigned everytime.

Example request

{
  "updatedByUserId": "750eb5c5-ac0b-7d11-4997-e0ce9d8896c8",
  "staffId": "47efff74-3e4b-45b3-bddf-affc6649db0b",
  "invoiceId": "fdb766bc-eb20-4bc1-9417-08b51a7b2286",
  "expenseDate": "2022-07-01",
  "activityCode": "PRT",
  "subject": "Review contract",
  "description": "Print documents",
  "costType": "Hard",
  "quantity": 3,
  "price": 350.32,
  "tax": 90,
  "outputTax": 85
}

Response

When request is accepted. Returns a hypermedia 'Link' object of the expense to be patched.

idstring nullable
hrefstring nullable
relationstring nullable
methodstring nullable