API reference
/- List a client's unpaid invoices
List invoices
Search invoices
Get invoice by ID
List a client's unpaid in...
🔐 Required role:
INVC_RorAPI_ADMIN📖 Data dictionary: Invoice
Return the unpaid invoices of one client, resolved by client reference
The client is resolved by clientRef, the same identifier POST /api/v1/clients/v1/link/payment accepts, and the invoices returned are exactly the ones that endpoint accepts in invoiceIds or invoiceNumbers: active invoices whose amount is larger than what has been allocated to them so far. Fully paid, reversed, inactive and unposted (draft) invoices are not returned. Invoices are ordered by due date, then invoice number.
Amounts are decimal strings in the firm's currency. outstanding is amount - allocated.
The id of each invoice is the value to pass as invoiceIds when creating a payment link.
Security
(BearerAuth and CfAccessClientId and CfAccessClientSecret) or BearerAuth
- Sandbox (requires Cloudflare Access headers)https://api.sandbox.aiwyn.app/api/v1/invoices/unpaid
- Staging (requires Cloudflare Access headers)https://api.staging.aiwyn.app/api/v1/invoices/unpaid
- Production (your live firm data; no Cloudflare Access headers)https://api.aiwyn.ai/api/v1/invoices/unpaid
curl -i -X GET \
'https://api.sandbox.aiwyn.app/api/v1/invoices/unpaid?clientRef=ACME-001' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'CF-Access-Client-Id: YOUR_API_KEY_HERE' \
-H 'CF-Access-Client-Secret: YOUR_API_KEY_HERE'Response
{ "data": { "client": { … }, "invoices": [ … ] }, "error": null, "meta": { "success": true, "message": "Unpaid invoices retrieved successfully", "timestamp": "2026-09-02T14:03:11.412Z" } }