Create Expense
The following macros are not currently supported in the header:
  • style

Create Expense

In Review

The following endpoint can be used to create new expenses. An expense is a bit like a receipt linked to an issue or job.

POST /expenses

Parameters

Table of allowed parameters. Required fields are underlined.

title

String

The title for the expense. For example, "Flights to Hawaii".

against_id

Integer

The id of the object the task exists against. This must point to a valid object.

against_type

String

"issue" or "job". The type of object the task exists against. If you supply an invalid linked object type, you will get an invalid request error with description like ""Engagement must be an issue or job"".

unit_cost

Float

The cost per unit of the expense. For example, "10.50". If you have a quantity of "3", you would then have a total expense cost of "31.50"

quantity

Integer

The number of units included in the expense. For example, "3". If you have a unit cost of "10.50", you would then have a total expense cost of "31.50"

type_id

Integer

The id of the expense type you wish the new expense to be a part of.

date_incurred

ISO8601 Date String

For example, "2016-01-20T11:13:04+11:00". This will default to now.

billable

Bit

1 is billable and 0 is non-billable. This defaults to 0, for non-billable.

reimbursable

Bit

1 is reimbursable and 0 is not reimbursable. This defaults to 0, for not reimbursable.

_fields

partial string

Allows you to specify optional fields and linked objects to include in the response. See get expense for more information.

file

data

Allows you to upload a file with the expense (i.e. a receipt in the form of an image or PDF). If this value is set then it must be POSTed with multipart/form-data

 

Handling the response

Please see the get expense for controlling the response.