curl -X PUT "https://yoursite.com/api/expenses" \
-H "authtoken: YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "category": "...", "amount": "...", "date": "...", "clientid": "...", "currency": "...", "tax": "...", "tax2": "...", "paymentmode": "..." }'
Success-Response:
HTTP/1.1 200 OK
{
"status": true,
"message": "Expense Updated Successfully"
}
Error-Response:
HTTP/1.1 404 Not Found
{
"status": false,
"message": "Expense Update Fail"
}
Error-Response:
HTTP/1.1 409 Conflict
{
"status": false,
"error": {
"category":"The Expense Category is not found"
},
"message": "The Expense Category is not found"
}
Error-Response:
HTTP/1.1 409 Conflict
{
"status": false,
"error": {
"date":"The Expense date field is required."
},
"message": "The Expense date field is required."
}
Error-Response:
HTTP/1.1 409 Conflict
{
"status": false,
"error": {
"amount":"The Amount field is required."
},
"message": "The Amount field is required."
}