PUT
/
matters
/
{matterId}
/
expenses
/
{id}
Update an expense
curl --request PUT \
  --url https://api.smokeball.com/matters/{matterId}/expenses/{id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json-patch+json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "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",
  "quantity": 3,
  "price": 350.32,
  "tax": 90,
  "outputTax": 85,
  "taxInclusive": false,
  "taxZeroRated": false,
  "taxOutOfScope": false,
  "taxExempt": false,
  "finalized": false,
  "isWrittenOff": false,
  "isBillable": false,
  "isInvoicedExternally": false,
  "assignToFirmOwner": true
}'
{
  "id": "<string>",
  "href": "<string>",
  "relation": "<string>",
  "method": "GET"
}

Authorizations

x-api-key
string
header
required
Authorization
string
header
required

Path Parameters

matterId
string
required
id
string
required

Body

updatedByUserId
string | null

Unique identifier of the user updating the expense.

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

Example:

"750eb5c5-ac0b-7d11-4997-e0ce9d8896c8"

staffId
string | null

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.

Example:

"47efff74-3e4b-45b3-bddf-affc6649db0b"

invoiceId
string | null

Unique identifier of the associated invoice.

Example:

"fdb766bc-eb20-4bc1-9417-08b51a7b2286"

expenseDate
string<date-time>

The date of the expense.

Example:

"2022-07-01"

activityCode
string | null

The activity code associated to the expense.

Example:

"PRT"

subject
string | null

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

Example:

"Review contract"

description
string | null

Optional detailed description of the expense.

Example:

"Print documents"

quantity
number

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

The expense amount will be calculated as Quantity * Price.

Example:

3

price
number

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

The expense amount will be calculated as Quantity * Price.

Example:

350.32

tax
number | null

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.

Example:

90

outputTax
number | null

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.

Example:

85

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.

Example:

false

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.

Example:

false

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.

Example:

false

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.

Example:

false

finalized
boolean

True if the expense has been finalized.

Example:

false

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.

Example:

false

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).

Example:

false

isInvoicedExternally
boolean

True if the expense is invoiced externally.

Example:

false

assignToFirmOwner
boolean

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

Note: It is not guaranteed that the same firm owner will be assigned everytime.

Response

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

id
string | null
href
string | null
relation
string | null
method
string | null
default:GET