# Send sales invoices

`POST /api/erp/v1/invoices`

Sends sales and return invoices; the company card's open / paid, overdue and last-12-months revenue come from these. `customer` is the account's `ext_id` or code (with only `customer_name` it is matched by name). `remaining` = unpaid amount; without `status` it is derived from it (`open`, `partial`, `paid`, `cancelled`). `kind: return` is a return invoice (amounts count as negative). `po` is the customer's order number — used to match the CRM order. If no balances are sent, the overdue amount is computed from invoices.

## Body

| Field | Type | Description |
|---|---|---|
| `items` (required) | array | Invoices: `ext_id`, `no`, `customer`, `customer_name`, `date`, `due`, `currency`, `net`, `total`, `remaining`, `status`, `kind` (`sales` · `return`), `po`, `lines` (`code`, `name`, `qty`, `price`). |

## Response

```json 200
{
  "new": 3,
  "ok": true,
  "received": 3
}
```
