URL: {{base_url}}/modules/expenses/addExpense

Method: POST

Bearer Token: Replace this with an actual token in the request

Headers

Subscription: Replace this with the subscription value

Access_Token: Replace this with the actual access token value

Request Body

KeyValuesRequired
dateDateYes
expense_numberEnter the unique expense numberYes
category_idRefer to the Expense Categories endpoint to get the ID of the categoriesYes
amountEnter the amountYes
paymentEnter payment method. Value should either be cash, bank or creditYes
narrationEnter narration of the expenses but not more than 500 charactersYes

Response Codes

CodeDescription
201Successful
500Internal Server Error
400Invalid entry
401Unauthorized: Check error message

Example of a JSON request body:

{
    "date": "2024-01-02",
    "amount": 2000,
    "category_id": 35,
    "narration": "Maintenance of the cars",
    "expense_number": 3,
    "payment": "credit"
}

## Response Codes

| Code | Description                        |
| ---- | ---------------------------------- |
| 201  | Successful                         |
| 500  | Internal Server Error              |
| 400  | Invalid entry  |
| 401  | Unauthorized: Check error message  |