W3builders
AOP API

AOP API/Expenses

Create Expense

POST/finance/expenses
JWT bearerPrimary write endpoint

Record an expense.

Endpoint

POSThttps://api.w3builders.com/v1/finance/expenses

Request body

  • title (required)
  • amount (required, > 0)
  • expense_date (required, YYYY-MM-DD)
  • category (default miscellaneous): infrastructure | salaries | freelancer | software | marketing | travel | office | professional_fees | miscellaneous | custom
  • custom_category (used when category = custom)
  • payment_method (default bank): bank | cash | upi | card | other
  • currency (default INR), project_id, vendor, reference, notes
  • Automatically posts a balanced journal entry (Dr expense account / Cr payment account) when both accounts exist in your chart of accounts.
  • If either account is missing, the expense still saves but no journal posts — check journal_posted in the response.

Response parameters

FieldType
successvalue
idvalue
journal_idvalue
journal_postedvalue
Create Expense
curl -X POST https://api.w3builders.com/v1/finance/expenses \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "AWS hosting — June",
"amount": 8250,
"expense_date": "2026-06-30",
"category": "infrastructure",
"payment_method": "bank"
}'
{
"success": true,
"id": 991,
"journal_id": 219,
"journal_posted": true
}
Was this page helpful?