# Accounting API

> List and create invoices, record payments and log expenses.

Canonical page: https://aozo.in/docs/api/accounting-api
Last updated: 2026-11-12
Product: Open API
Section: Reference

Accounting endpoints are under /api/accounting. They need the Authorization and X-Organization-Id headers.

## Invoices

| Method and path | What it does |
| --- | --- |
| GET /api/accounting/invoices | List invoices. Filter with companyId, customerId, partnerId, leadId or dealId |
| POST /api/accounting/invoices | Create an invoice |
| GET /api/accounting/invoices/:id | Get one invoice |
| GET /api/accounting/invoices/:id/pdf | Download the invoice as a PDF |
| PUT /api/accounting/invoices/:id | Update an invoice |
| PUT /api/accounting/invoices/:id/status | Change the status or payment status |
| POST /api/accounting/invoices/:id/payments | Record a payment |
| GET /api/accounting/invoices/:id/payments | List payments |
| DELETE /api/accounting/invoices/:id | Delete an invoice |

### Create an invoice

| Field | Type | Notes |
| --- | --- | --- |
| customerName | string | Required unless you send companyId or customerId |
| customerGstin, customerEmail, customerPhone, customerAddress | string | Customer details |
| companyId, customerId, leadId, dealId, quotationId | number | Link the invoice to other records |
| documentType | string | INVOICE by default |
| type | string | GST by default, or NON_GST |
| status | string | The invoice status |
| dueDate, notes, terms | string | Optional |
| advanceAmount, advancePercentage | number | For advance billing |
| currency, exchangeRate | string, number | For other currencies |
| items | array | The lines on the invoice |

| Item field | Type | Notes |
| --- | --- | --- |
| itemName | string | Name on the line. Defaults to Item |
| hsnCode | string | HSN or SAC code |
| quantity | number | Defaults to 1 |
| unitPrice | number | Price per unit in rupees |
| gstRate | number | GST percentage. Defaults to 18 for GST invoices and 0 for NON_GST |

**Request**

```bash
curl -X POST https://api.aozo.in/api/accounting/invoices \
  -H "Authorization: Bearer $TOKEN" \
  -H "X-Organization-Id: $ORG" \
  -H "Content-Type: application/json" \
  -d '{
    "customerName": "Sharma Traders",
    "customerGstin": "27ABCDE1234F1Z5",
    "dueDate": "2026-12-05",
    "items": [
      { "itemName": "Annual plan", "hsnCode": "998314", "quantity": 1, "unitPrice": 41101, "gstRate": 18 }
    ]
  }'
```

AOZO works out the subtotal, the tax and the total from your lines, and numbers the invoice using your invoice prefix.

### Record a payment

| Field | Type | Notes |
| --- | --- | --- |
| amount | number | Required, greater than 0 |
| paymentType | string | PARTIAL by default |
| paymentMode | string | BANK_TRANSFER by default |
| paymentDate | date string | Optional |
| referenceNo, notes | string | Optional |

**Body for POST /api/accounting/invoices/:id/payments**

```json
{ "amount": 20000, "paymentMode": "UPI", "referenceNo": "UPI-884213" }
```

## Expenses

| Method and path | What it does |
| --- | --- |
| GET /api/accounting/expenses | List expenses |
| POST /api/accounting/expenses | Record an expense with category, description, amount, date and paymentMode |

**Body for POST /api/accounting/expenses**

```json
{ "category": "Travel", "description": "Client visit, Pune", "amount": 3200, "date": "2026-11-10", "paymentMode": "UPI" }
```

Items, customers, quotations, pro-forma invoices, credit notes, sales orders, delivery challans and reports are also available under /api/accounting.

> **Heads up:** Please confirm GST rates and your invoice details with your accountant before you automate invoicing.
