Add New Expense
POST/api/expenses
Headers
| Field | Type | Description |
|---|---|---|
| authtoken | String | Authentication token, generated from admin area |
Parameters
| Field | Type | Description |
|---|---|---|
| expense_date | string | Mandatory Expense date (Y-m-d) |
| category_id | number | Mandatory Category ID |
| title | string | Mandatory Expense title |
| amount | number | Mandatory Expense amount |
| description | string | optional Optional Expense description |
| project_id | number | optional Optional Project ID |
| user_id | number | optional Optional User ID |
| client_id | number | optional Optional Client ID |
| tax_id | number | optional Optional Tax ID |
| tax_id2 | number | optional Optional Second tax ID |
| created_by | number | optional Optional RISE user ID. Default: 1. Use for proper attribution. |
curl -X POST "https://yoursite.com/api/expenses" \
-H "authtoken: YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "expense_date": "...", "category_id": "...", "title": "...", "amount": "..." }' Success-Response:
HTTP/1.1 200 OK
{
"status": true,
"message": "Expense add successful."
}