PUT
/
matters
/
{matterId}
/
expenses
/
{id}
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,
  "taxInclusive": 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

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

GST amount of the expense in dollars. Only applicable in AU.

Example:

90

taxInclusive
boolean

If true, the amount is GST inclusive, otherwise GST exclusive. Only applicable in AU.

GST inclusive means: Amount exc. GST = Amount - GST, Amount inc. GST = Amount.

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

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

202
application/json

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