---
title: "Issued invoices, newest period first"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Billing API › Billing

`GET /v1/organizations/{orgId}/invoices`

## Authentication

Requires one of the following:

- `apiKey`, http, header `Authorization`
- `oauth`, http, header `Authorization`
- `sessionCookie`, apiKey, in cookie

## Path parameters

- `ListInvoices.path.orgId` (string, required)
  - format `uuid`

## Query parameters

- `ListInvoices.query.limit` (integer, optional)
  - min 1; max 100; default `20`
- `ListInvoices.query.cursor` (string, optional) — A previous page's nextCursor.

## Code samples

### cURL

```curl
curl --request GET \
  --url https://billing.ezghcloud.com/v1/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/invoices \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://billing.ezghcloud.com/v1/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/invoices';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://billing.ezghcloud.com/v1/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/invoices"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "invoices": [
    {
      "id": "string",
      "number": "string",
      "status": "string",
      "overdue": true,
      "carriedForward": true,
      "carriedIntoInvoiceId": "string",
      "periodStart": "2019-08-24T14:15:22Z",
      "periodEnd": "2019-08-24T14:15:22Z",
      "currency": "string",
      "collectionMethod": "string",
      "totalCents": "string",
      "startingBalanceCents": "string",
      "amountDueCents": "string",
      "amountPaidCents": "string",
      "amountRemainingCents": "string",
      "dueAt": "2019-08-24T14:15:22Z",
      "issuedAt": "2019-08-24T14:15:22Z",
      "finalizedAt": "2019-08-24T14:15:22Z",
      "paidAt": "2019-08-24T14:15:22Z"
    }
  ],
  "nextCursor": "string"
}
```

- `ListInvoices.response.200.invoices` (array<object>, required) — Newest period first.
  - `ListInvoices.response.200.invoices.id` (string, required)
  - `ListInvoices.response.200.invoices.number` (string | null, required) — Assigned when the invoice is issued.
  - `ListInvoices.response.200.invoices.status` (string, required) — open, paid, void or uncollectible. Treat other values as unknown.
  - `ListInvoices.response.200.invoices.overdue` (boolean, required) — Open, not carried forward, and past its due date.
  - `ListInvoices.response.200.invoices.carriedForward` (boolean, required) — Below the minimum charge: added to the next invoice instead.
  - `ListInvoices.response.200.invoices.carriedIntoInvoiceId` (string | null, required) — The invoice it was carried into, once there is one.
  - `ListInvoices.response.200.invoices.periodStart` (string, required)
    - format `date-time`
  - `ListInvoices.response.200.invoices.periodEnd` (string, required)
    - format `date-time`
  - `ListInvoices.response.200.invoices.currency` (string, required)
  - `ListInvoices.response.200.invoices.collectionMethod` (string | null, required) — charge_automatically (the default card) or send_invoice.
  - `ListInvoices.response.200.invoices.totalCents` (string, required) — Cents.
    - pattern `^-?[0-9]+(\.[0-9]+)?$`
  - `ListInvoices.response.200.invoices.startingBalanceCents` (string, required) — Carried from earlier invoices, in cents.
    - pattern `^-?[0-9]+(\.[0-9]+)?$`
  - `ListInvoices.response.200.invoices.amountDueCents` (string, required) — Cents.
    - pattern `^-?[0-9]+(\.[0-9]+)?$`
  - `ListInvoices.response.200.invoices.amountPaidCents` (string, required) — Cents.
    - pattern `^-?[0-9]+(\.[0-9]+)?$`
  - `ListInvoices.response.200.invoices.amountRemainingCents` (string, required) — Cents.
    - pattern `^-?[0-9]+(\.[0-9]+)?$`
  - `ListInvoices.response.200.invoices.dueAt` (string | null, required)
    - format `date-time`
  - `ListInvoices.response.200.invoices.issuedAt` (string | null, required) — When it was issued and numbered.
    - format `date-time`
  - `ListInvoices.response.200.invoices.finalizedAt` (string | null, required) — The same as issuedAt.
    - format `date-time`
  - `ListInvoices.response.200.invoices.paidAt` (string | null, required)
    - format `date-time`
- `ListInvoices.response.200.nextCursor` (string | null, required) — Pass as cursor for the next page; null on the last.

### 400

invalid_request: the request is malformed (with issues), or invalid_cursor.

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "issues": [
      {
        "path": "string",
        "message": "string"
      }
    ]
  }
}
```

- `ListInvoices.response.400.error` (object, required)
  - `ListInvoices.response.400.error.code` (string, required) — What went wrong, for programs: branch on this, never on message.
  - `ListInvoices.response.400.error.message` (string, required) — What went wrong, for people.
  - `ListInvoices.response.400.error.issues` (array<object>, optional) — With invalid_request: each invalid field.
    - `ListInvoices.response.400.error.issues.path` (string, required)
    - `ListInvoices.response.400.error.issues.message` (string, required)

### 401

unauthenticated: no valid credential.

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "issues": [
      {
        "path": "string",
        "message": "string"
      }
    ]
  }
}
```

- `ListInvoices.response.401.error` (object, required)
  - `ListInvoices.response.401.error.code` (string, required) — What went wrong, for programs: branch on this, never on message.
  - `ListInvoices.response.401.error.message` (string, required) — What went wrong, for people.
  - `ListInvoices.response.401.error.issues` (array<object>, optional) — With invalid_request: each invalid field.
    - `ListInvoices.response.401.error.issues.path` (string, required)
    - `ListInvoices.response.401.error.issues.message` (string, required)

### 403

access_denied: the caller isn't allowed to (the message names the action); forbidden_origin: a cookie-authenticated write from another site.

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "issues": [
      {
        "path": "string",
        "message": "string"
      }
    ]
  }
}
```

- `ListInvoices.response.403.error` (object, required)
  - `ListInvoices.response.403.error.code` (string, required) — What went wrong, for programs: branch on this, never on message.
  - `ListInvoices.response.403.error.message` (string, required) — What went wrong, for people.
  - `ListInvoices.response.403.error.issues` (array<object>, optional) — With invalid_request: each invalid field.
    - `ListInvoices.response.403.error.issues.path` (string, required)
    - `ListInvoices.response.403.error.issues.message` (string, required)

### 404

not_found: the organization (or one the caller doesn't belong to), or the resource, doesn't exist.

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "issues": [
      {
        "path": "string",
        "message": "string"
      }
    ]
  }
}
```

- `ListInvoices.response.404.error` (object, required)
  - `ListInvoices.response.404.error.code` (string, required) — What went wrong, for programs: branch on this, never on message.
  - `ListInvoices.response.404.error.message` (string, required) — What went wrong, for people.
  - `ListInvoices.response.404.error.issues` (array<object>, optional) — With invalid_request: each invalid field.
    - `ListInvoices.response.404.error.issues.path` (string, required)
    - `ListInvoices.response.404.error.issues.message` (string, required)

### 429

too_many_requests: slow down.

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "issues": [
      {
        "path": "string",
        "message": "string"
      }
    ]
  }
}
```

- `ListInvoices.response.429.error` (object, required)
  - `ListInvoices.response.429.error.code` (string, required) — What went wrong, for programs: branch on this, never on message.
  - `ListInvoices.response.429.error.message` (string, required) — What went wrong, for people.
  - `ListInvoices.response.429.error.issues` (array<object>, optional) — With invalid_request: each invalid field.
    - `ListInvoices.response.429.error.issues.path` (string, required)
    - `ListInvoices.response.429.error.issues.message` (string, required)

### 500

internal_error: a bug; the details are in the logs, under the request ID.

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "issues": [
      {
        "path": "string",
        "message": "string"
      }
    ]
  }
}
```

- `ListInvoices.response.500.error` (object, required)
  - `ListInvoices.response.500.error.code` (string, required) — What went wrong, for programs: branch on this, never on message.
  - `ListInvoices.response.500.error.message` (string, required) — What went wrong, for people.
  - `ListInvoices.response.500.error.issues` (array<object>, optional) — With invalid_request: each invalid field.
    - `ListInvoices.response.500.error.issues.path` (string, required)
    - `ListInvoices.response.500.error.issues.message` (string, required)

### 503

unavailable, ledger_unavailable or payments_unavailable: retry later.

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "issues": [
      {
        "path": "string",
        "message": "string"
      }
    ]
  }
}
```

- `ListInvoices.response.503.error` (object, required)
  - `ListInvoices.response.503.error.code` (string, required) — What went wrong, for programs: branch on this, never on message.
  - `ListInvoices.response.503.error.message` (string, required) — What went wrong, for people.
  - `ListInvoices.response.503.error.issues` (array<object>, optional) — With invalid_request: each invalid field.
    - `ListInvoices.response.503.error.issues.path` (string, required)
    - `ListInvoices.response.503.error.issues.message` (string, required)


Source: https://docs.ezghcloud.com/billing-api/Billing/ListInvoices/index.md
