# invoices.lastForParty

Get the most recent invoice for a customer and a starting template (lines, currency, notes, payment methods, terms, tax) for creating a similar invoice.

`GET | POST /api/v1/accounting/invoices.lastForParty`

Permissions: `accounting:read` · Roles: admin, finance

MCP tool: `accounting_invoices_last_for_party`

## Fields

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `partyId` | string (ID) | Yes | The ID of a customer or vendor account, from parties.list. |

## Example request

```bash
curl -G https://app.getoatmilk.com/api/v1/accounting/invoices.lastForParty \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  --data-urlencode 'partyId=7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10'
```

Reference page: https://app.getoatmilk.com/docs/api/invoices.lastForParty
