# Create expense item Creates a new expense item for a user. Endpoint: POST /users/{user_id}/expense_items Version: v1 Security: AuthToken ## Path parameters: - `user_id` (integer, required) The ID of the user. ## Request fields (application/json): - `date` (string, required) The date the expense was reported. Example: "2015-04-09" - `amount` (number, required) The amount of the expense. Example: 10 - `project_id` (integer) The ID of the project. Example: 32 - `leave_type_id` (integer) The ID of the leave type. Example: 32 - `assignable_id` (integer) The ID of the assignable (project or leave type). Example: 32 - `category` (string,null) The category of the expense. - `notes` (string,null) Notes for the expense item. Example: "Testing exp" ## Response 201 fields (application/json): - `expense_item_id` (integer) Unique identifier for the expense item. Example: 1 - `assignable_id` (integer, required) ID of the item being assigned. Example: 32 - `assignable_type` (string) The type of the assignable item. Enum: "Project", "LeaveType", "Phase" - `user_id` (integer, required) ID of the user to whom the item is assigned. Example: 2 - `amount` (number, required) The assigned amount. Example: 10 - `date` (string, required) The date of the expense item. Example: "2015-04-09" - `category` (string,null) The category of the expense item. Can be null. - `notes` (string,null) Additional notes for the expense item. Example: "Testing exp" - `created_at` (string) Timestamp when the expense item was created. Example: "2015-04-09T21:54:13Z" - `updated_at` (string) Timestamp when the expense item was last updated. Example: "2015-04-09T21:54:13Z" ## Response 404 fields