# List Accounts Receivable Invoices

`GET https://api.suger.cloud/ai/org/{orgId}/revenue/invoice`

Returns this organization's accounts receivable invoices as a page, newest issue date first, with the total count alongside them. Each invoice carries its status, totalAmount, amountPaid, amountDue, collectableAmount, currency, dueDate and agingBucket, plus refund and dunning details when they exist. `source` says whether a row comes from an invoice or from a revenue record that has no invoice yet. `status=OPEN` returns the invoices that still have an amount due; `partner`, `buyerId`, `entitlementId`, `agingBucket` and the issue-date range `startDate` to `endDate` narrow the list, and `limit` and `offset` page through it.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `orgId` | path | string | yes | Organization ID |
| `partner` | query | string | no | Marketplace channel to include, for example AWS, AZURE, GCP or STRIPE. |
| `entitlementId` | query | string | no | Only invoices for this entitlement id. |
| `buyerId` | query | string | no | Only invoices for this buyer id. |
| `search` | query | string | no | Text matched, ignoring case, against the invoice fields and the buyer name. |
| `status` | query | string | no | OPEN returns invoices that still have an amount due. Any other value is matched against the statusKey of each invoice. |
| `agingBucket` | query | string | no | Only invoices in this aging bucket, as shown in the agingBucket field. |
| `startDate` | query | string | no | First issue date to include, as YYYY-MM-DD or an ISO 8601 timestamp. |
| `endDate` | query | string | no | Last issue date to include, as YYYY-MM-DD (the whole day, UTC) or an ISO 8601 timestamp. |
| `sortBy` | query | string | no | One of issueDate (the default), dueDate, collectableAmount or marketplaceFeeAmount. |
| `sortOrder` | query | string | no | asc or desc. The default is desc. |
| `limit` | query | string | no | Invoices per page. The default is 20 and the maximum is 500. |
| `offset` | query | string | no | Number of invoices to skip. The default is 0. |

## Responses

### 200 — Accounts receivable invoices

Content-Type: `application/json`

**`Response`** fields:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `invoices` | array<object> | yes |  |
| `total` | integer | yes |  |
| `limit` | integer | yes |  |
| `offset` | integer | yes |  |

### 400 — Invalid receivables query

Content-Type: `application/json`

**`Response`** fields:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `error` | string | yes |  |
| `detail` | string | no |  |

### 403 — Missing Revenue permission

Content-Type: `application/json`

**`Response`** fields:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `error` | string | yes |  |
| `detail` | string | no |  |

### 413 — Request body too large

Content-Type: `application/json` · Schema: `RevenuePayloadTooLargeResponse`

**`RevenuePayloadTooLargeResponse`** fields:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `error` | object | yes |  |

### 500 — Receivables query failed

Content-Type: `application/json`

**`Response`** fields:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `error` | string | yes |  |
| `detail` | string | no |  |

## Example

_Generated from this operation's schema. Values are placeholders — substitute your own ids, and set `SUGER_TOKEN` to a bearer token from the [OAuth client-credentials exchange](https://doc.fours.com/settings/oauth-app/)._

### Request

```bash
curl -X GET 'https://api.suger.cloud/ai/org/{orgId}/revenue/invoice' \
  -H "Authorization: Bearer $SUGER_TOKEN"
```

### Response — 200

```json
{
  "invoices": [
    {
      "crmOpportunities": [
        {
          "crmPartner": "SALESFORCE",
          "crmOpportunityId": "01H0000000000000000000"
        }
      ],
      "organizationID": "01H0000000000000000000",
      "partner": "string",
      "id": "01H0000000000000000000",
      "invoiceID": "01H0000000000000000000",
      "externalID": "01H0000000000000000000",
      "source": "invoice",
      "type": "string",
      "buyerID": "01H0000000000000000000",
      "productID": "01H0000000000000000000",
      "entitlementID": "01H0000000000000000000",
      "issueDate": "2026-01-31T12:00:00Z"
    }
  ],
  "total": 1,
  "limit": 1,
  "offset": 1
}
```

### Error — 400

```json
{
  "error": "string",
  "detail": "string"
}
```

---

API reference: https://doc.fours.com/api/
