Expenses - Update a Expense
PUT yourdomain.com/api/expenses
Header
json
Field | Type | Description |
---|---|---|
Authorization | String |
Basic Access Authentication token. |
Parameter
json
Field | Type | Description |
---|---|---|
expense_name (optional) | String |
Optional. Name |
note (optional) | String |
Optional. Note |
category | Number |
Mandatory. Expense Category |
amount | Decimal |
Mandatory. Expense Amount |
date | Date |
Mandatory. Expense Date |
clientid | Number |
Optional. Customer id |
currency | Number |
Mandatory. currency field |
tax | Number |
Optional. Tax 1 |
tax2 | Number |
Optional. Tax 2 |
paymentmode | Number |
Optional. Payment mode |
reference_no (optional) | String |
Optional. Reference # |
recurring (optional) | String |
Optional. recurring 1 to 12 or custom |
repeat_every_custom (optional) | Number |
Optional. if recurring is custom set number gap |
repeat_type_custom (optional) | String |
Optional. if recurring is custom set gap option day/week/month/year |
Success 200
json
Field | Type | Description |
---|---|---|
status | Boolean |
Request status. |
message | String |
Expense Updated Successfully |
Error 4xx
json
Name | Type | Description |
---|---|---|
status | Boolean |
Request status. |
message | String |
Expense Update Fail |
category | String |
The Expense Category is not found. |
date | String |
The Expense date field is required. |
amount | String |
The Amount field is required. |
HTTP/1.1 200 OK
{
"status": true,
"message": "Expense Updated Successfully"
}
HTTP/1.1 409 Conflict
{
"status": false,
"error": {
"amount":"The Amount field is required."
},
"message": "The Amount field is required."
}