Skip to content

List a client's unpaid invoices

Request

🔐 Required role: INVC_R or API_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
Query
clientRefstringrequired

Client reference of the client whose unpaid invoices are requested.

Example:clientRef=ACME-001
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'

Responses

Client resolved and its unpaid invoices returned

Bodyapplication/json
dataobject
errorobject or null
metaobject
Response
{ "data": { "client": { … }, "invoices": [ … ] }, "error": null, "meta": { "success": true, "message": "Unpaid invoices retrieved successfully", "timestamp": "2026-09-02T14:03:11.412Z" } }