Record an actual expense
POST/expenses/actual
Goes through the plugin's own save, after field-level checks. 201 with the new
expense; 200 with the existing one when uuid already names an actual expense the
caller can see. See the Classification notes on ActualExpenseWrite.
Field-level details on 422: date, amount, quantity, unit_cost, unit_price,
total_price (required / invalid); expense_type (invalid / unsupported /
required); paid_by_id (invalid / required); currency_id, is_billable,
expense_id, task_id, product_rate_id (invalid); member_ids (invalid /
required / folder_not_allowed / task_project_mismatch / budget_mismatch /
<dimension code>_required); task_id: task_without_project; uuid: conflict;
_: rejected for what EVX Software's save refuses.
Request
Responses
- 200
- 201
- 401
- 403
- 404
- 409
- 422
uuid already named an actual expense the caller can see.
Created
Missing, invalid or expired token, or no contact matches it.
Authenticated, but not allowed.
Unknown route, or the resource is missing or in the trash; message names what was
looked for (task, note, payment_receipt, expense…). On an expenses route,
message: "expenses" means the plugin is not active.
The request conflicts with the current state. code says how:
idempotency_key_reuse / request_in_progress (the Idempotency-Key header),
invoiced (an expense or time entry on an invoice cannot change), already_paused,
not_paused, not_running (the timer), deleted.
Invalid input. details maps each field to a reason the client can switch on
(required, invalid, not_found, conflict, unsupported, …; see each operation);
_: rejected is a refusal by EVX Software's own save, with its message.