---
title: Get Invoices
description: The Invoices API enables you to retrieve invoices. These capabilities are exposed through a single query.
---

> **Deprecated**
>
> This query is deprecated. Use the REST endpoint
> [`GET /invoices`](/api-reference/invoices/operations/list-invoices) instead. It returns the same invoices,
> with search, date filters, and pagination, and is the supported way to list invoices. The query continues to
> work while integrations move to REST.

## invoices()

```graphql
type Query {
  invoices(search: String, startDate: String, endDate: String, page: Int, pageSize: Int = 25): InvoicesSearchConnection!
    @deprecated(reason: "Use the REST endpoint GET https://api.sibipro.com/invoices instead.")
  ordering: OrderingQuery!
}
```

## Input

### `search`

`string | undefined` Optional search term to filter invoices by. Can find matches by PO Number, invoice number, date, etc.

### `startDate`

`string | undefined` Optional start date to filter invoices by. If provided, it will only return invoices with `invoiceDate` values after `startDate`

### `endDate`

`string | undefined` Optional start date to filter invoices by. If provided, it will only return invoices with `invoiceDate` values after `startDate`

### `page`

`integer | undefined` The zero-based index of the page to return. The first page is `0`, so `page: 1` returns the **second** page, not the first. Defaults to the first page (`0`) when not provided.

### `pageSize`

`integer | undefined` Optional number indicating how many results per-page to return. Defaults to 25.

## Response

## Invoice

### `accountNumber`

`string | null` - Identifier for the account being invoiced. These are assigned by the invoice issuer.

---

### `invoiceNumber`

`string` - Identifier assigned to the invoice by the invoice issuer.

---

### `createdAt`

`string` - Date the invoice was issued.

---

### `orderId`

`string` - Identifier assigned by Sibi to the order associated with the invoice.

---

### `totalCents`

`integer` - Total amount being invoiced. Given in pennies.

---

### `taxCents`

`integer` - Tax amount being invoiced. Given in pennies.

---

### `partner`

`string` - Slug of the organization issuing the invoices. (example: `ge`, `ppg`, `johnstone`)

---

### `partnerName`

`string` - Name of the organization issuing the invoices. (example: `GE Appliances`, `PPG Paints`)

---

### `partnerIconImageUrl`

`string` - URL to the logo of the organization issuing the invoices.

---

### `poNumber`

`string | null` - Purchase order number associated with the invoice. This value is defined by the organization that placed the order associated with the invoice.

---

### `propertyAddress`

[`FulfillmentAddress`](/graphql/fulfillment-address) - Snapshot of the property address associated with the invoice when the order was created.

### `property`

[`InvoiceProperty`](#invoiceproperty) - The property associated with the order.

---

### `lineItems`

[`InvoiceLineItem[]`](#invoicelineitem) - The line items from the order associated with the invoice.

---

### `fees`

[`InvoiceFee[]`](#invoicefee) - Fees applied to the order associated with the invoice. Empty for invoices issued before fees were captured.

---

### `discounts`

[`InvoiceDiscount[]`](#invoicediscount) - Discounts applied to the order associated with the invoice. Amounts are positive magnitudes. Empty for invoices issued before discounts were captured.

---

## `InvoiceLineItem`

### `description`

`string | null` - Description of the line item.

---

### `quantity`

`integer` - Quantity of the line item purchased.

---

### `unitPriceCents`

`integer` - Price of the line item. Given in pennies.

---

### `sku`

`string` - Stock keeping unit identifier for the line item.

---

### `serialNumber`

`string | null` - Serial number of the line item. Is not always present.

---

## `InvoiceFee`

### `name`

`string` - Human readable name of the fee.

---

### `amountCents`

`integer` - Amount of the fee. Given in pennies.

---

## `InvoiceDiscount`

### `name`

`string` - Human readable name of the discount.

---

### `amountCents`

`integer` - Amount of the discount, expressed as a positive magnitude. Given in pennies.

---

## `InvoiceProperty`

### `externalId`

`string | null` - Identifier assigned to the property by the property owner.
