AOP API/Documents & Invoices
/finance/documents/calculateStateless calculator — no DB write. Runs the same GST/discount logic as create() and returns totals, useful for a live preview before submitting.
https://api.w3builders.com/v1/finance/documents/calculate| Field | Type |
|---|---|
| line_items | value |
| subtotal | value |
| discount_amount | value |
| taxable_amount | value |
| cgst_amount | value |
| sgst_amount | value |
| igst_amount | value |
| other_tax_amount | value |
| total_tax | value |
| round_off | value |
| total | value |
curl -X POST https://api.w3builders.com/v1/finance/documents/calculate \-H "Authorization: Bearer $TOKEN"
{"shape": "{ line_items, subtotal, discount_amount, taxable_amount, cgst_amount, sgst_amount, igst_amount, other_tax_amount, total_tax, round_off, total }"}
curl -X POST https://api.w3builders.com/v1/finance/documents/calculate \-H "Authorization: Bearer $TOKEN"
{"shape": "{ line_items, subtotal, discount_amount, taxable_amount, cgst_amount, sgst_amount, igst_amount, other_tax_amount, total_tax, round_off, total }"}