---
title: "Patch an expense"
method: PATCH
path: "/matters/{matterId}/expenses/{id}"
tags: ["Expenses"]
---

# Patch an expense

`PATCH /matters/{matterId}/expenses/{id}`

Patches an expense for the specified matter.

## Path parameters

- `matterId` string, required
- `id` string, required

## Request body

- ExpenseDto
  - `updatedByUserId` string, nullable — Unique identifier of the user updating the expense. This field is reserved for server-to-server operations.
  - `staffId` string, 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.
  - `invoiceId` string, nullable — Unique identifier of the associated invoice.
  - `expenseDate` string, date-time — The date of the expense.
  - `activityCode` string, nullable — The activity code associated to the expense.
  - `subject` string, nullable — The subject - this should be a short description of the expense.
  - `description` string, nullable — Optional detailed description of the expense.
  - `costType` string — The cost type of the expense. * Hard - Direct cost such as travel, accommodation, or materials. * Soft - Indirect cost such as administrative fees or overhead.
  - `quantity` number, double — The quantity of the expense in units (if not applicable, use 1). The expense amount will be calculated as Quantity * Price.
  - `price` number, double — The price of the expense in dollars. Limited to 2 decimal places (cents). The expense amount will be calculated as Quantity * Price.
  - `tax` number, 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.
  - `outputTax` number, 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.
  - `taxInclusive` boolean — 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.
  - `taxZeroRated` boolean — 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.
  - `taxOutOfScope` boolean — 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.
  - `taxExempt` boolean — 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.
  - `finalized` boolean — True if the expense has been finalized.
  - `isWrittenOff` boolean — 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.
  - `isBillable` boolean — 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).
  - `isInvoicedExternally` boolean — True if the expense is invoiced externally.
  - `assignToFirmOwner` boolean — 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.

## Response `202`

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

- Link
  - `id` string, nullable
  - `href` string, nullable
  - `relation` string, nullable
  - `method` string, nullable

## Other responses

- `400` — When an unsupported request is made.
- `403` — When expense with specified id is not associated with authenticated client.
- `404` — When expense with specified id does not exist.

---

[API](https://skmtc.net/smokeball/apis/api.md) · [All operations](https://skmtc.net/smokeball/apis/api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/smokeball/api/versions/197984da9b42/schema)
