v1

latestOpenAPI 3.0.32026-08-0613775357.6 KB
expense items

Create expense item

Creates a new expense item for a user.

post/users/{user_id}/expense_items

Path parameters

user_idinteger required

The ID of the user.

Request body

OR
OR

Example request

{
  "date": "2015-04-09",
  "amount": 10,
  "project_id": 32,
  "leave_type_id": 32,
  "assignable_id": 32,
  "notes": "Testing exp"
}

Response

The expense item was created successfully.

expense_item_idinteger

Unique identifier for the expense item.

assignable_idinteger required

ID of the item being assigned.

assignable_type'Project' | 'LeaveType' | 'Phase'

The type of the assignable item.

user_idinteger required

ID of the user to whom the item is assigned.

amountnumber float required

The assigned amount.

datestring date required

The date of the expense item.

categorystring nullable

The category of the expense item. Can be null.

notesstring nullable

Additional notes for the expense item.

created_atstring date-time

Timestamp when the expense item was created.

updated_atstring date-time

Timestamp when the expense item was last updated.

Example response

{
  "expense_item_id": 1,
  "assignable_id": 32,
  "assignable_type": "Project",
  "user_id": 2,
  "amount": 10,
  "date": "2015-04-09",
  "notes": "Testing exp",
  "created_at": "2015-04-09T21:54:13Z",
  "updated_at": "2015-04-09T21:54:13Z"
}