| Field | Type | Details |
|---|---|---|
| id | string | Expense identifier. |
| name | string | Expense name or label. |
| amount | number | Total expense amount. |
| main_type | string | Primary expense category. |
| expense_type | string | Resolved type from company.expenseTypes when provided; otherwise uses payload.type. |
| sub_type | string | Secondary category (payload.other). |
| details | string | Optional description. |
| branch_data | object | Branch context (id, name) when available. |
| expense_line_ids | array | Itemized expense lines. |
| payments | array | Payments tied to the expense. |
expenseItems and expenseTypes are parsed from JSON strings when supplied;
empty arrays are used when no items are present.Expense line schema
| Field | Type | Details |
|---|---|---|
| price_unit | number | Unit price of the item. |
| name | string | Item name. |
| quantity | number | Item quantity. |
Expense payment schema
| Field | Type | Details |
|---|---|---|
| id | string | Payment identifier. |
| amount | number | Payment amount. |
| treasury_id | string | Treasury used for the payment. |