> This page is for Developers.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://zuora.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://zuora.ferndocs.com/_mcp/server.

# List all items of an invoice

GET https://rest.test.zuora.com/v1/invoices/{invoiceKey}/items

Retrieves the information about all items of a specified invoice. 


Reference: https://zuora.ferndocs.com/developers/api-reference/zuora-api/billing-documents/invoices/get-invoice-items

## Authentication

- `Authorization` header (bearer token, required) — Use `Bearer {{token}}` in the `Authorization` header for authentication.

## Servers

- `https://rest.test.zuora.com` (US Developer & Central Sandbox (incl. Test Drive), default)
- `https://rest.sandbox.na.zuora.com` (US API Sandbox Cloud 1)
- `https://rest.apisandbox.zuora.com` (US API Sandbox Cloud 2)
- `https://rest.na.zuora.com` (US Production Cloud 1)
- `https://rest.zuora.com` (US Production Cloud 2)
- `https://rest.test.eu.zuora.com` (EU Developer & Central Sandbox)
- `https://rest.sandbox.eu.zuora.com` (EU API Sandbox)
- `https://rest.eu.zuora.com` (EU Production)
- `https://rest.test.ap.zuora.com` (APAC Developer & Central Sandbox)
- `https://rest.ap.zuora.com` (APAC Production)

## Request

### Path parameters

- `invoiceKey` (string, required) — The unique ID or number of an invoice. For example, 2c92c8955bd63cc1015bd7c151af02ab or INV00000001.

### Query parameters

- `pageSize` (integer, optional, default: 20) — The number of records returned per page in the response.
- `page` (integer, optional, default: 1) — The index number of the page that you want to retrieve. This parameter is dependent on `pageSize`. You must set `pageSize` before specifying `page`. For example, if you set `pageSize` to `20` and `page` to `2`, the 21st to 40th records are returned in the response.

### Headers

- `Accept-Encoding` (string, optional) — Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it.
- `Content-Encoding` (string, optional) — Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload.
- `Zuora-Track-Id` (string, optional) — A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`"`), and quote (`'`).
- `Zuora-Entity-Ids` (string, optional) — An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you should not set this header.
- `Zuora-Org-Ids` (string, optional) — Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. This header is important in Multi-Org (MO) setups because it defines the organization context under which the API should operate—mainly used for read access or data visibility filtering. If the header is not set, the operation is performed in scope of the user's accessible orgs.
- `Zuora-Version` (string, optional) — The minor API version. For a list of available minor versions, see [API upgrades](https://developer.zuora.com/v1-api-reference/api-upgrades/).

## Response

### 200

OK

- `invoiceItems` (list of InvoiceItem, optional) — Container for invoice items.
- `nextPage` (string, optional) — URL to retrieve the next page of the response if it exists; otherwise absent.
- `success` (boolean, optional) — Returns `true` if the request was processed successfully.

## Errors

### 500 Internal Server Error

Internal Server Error

- `reasons` (list of ErrorResponseReasonsItems, optional)

### 400 Client Request Error

Request Errors

- `processId` (string, optional) — The ID of the process that handles the operation.
- `reasons` (list of CommonResponseReasonsItems, optional) — The container of the error code and message. This field is available only if the `success` field is `false`.
- `requestId` (string, optional) — Unique identifier of the request.
- `success` (boolean, optional) — Indicates whether the call succeeded.

## Types

### InvoiceItem

Container for custom fields of an Invoice Item object.

- `accountingCode` (string, optional) — The accounting code associated with the invoice item.
- `adjustmentLiabilityAccountingCode` (string, optional) — The accounting code for adjustment liability. **Note**: This field is only available if you have the Billing - Revenue Integration feature enabled.
- `adjustmentRevenueAccountingCode` (string, optional) — The accounting code for adjustment revenue. **Note**: This field is only available if you have the Billing - Revenue Integration feature enabled.
- `appliedToItemId` (string, optional) — The unique ID of the invoice item that the discount charge is applied to.
- `availableToCreditAmount` (double, optional) — The amount of the invoice item that is available to credit.
- `balance` (string, optional) — The balance of the invoice item. **Note**: This field is only available if you have the Invoice Settlement feature enabled.
- `bookingReference` (string, optional) — The booking reference of the invoice item.
- `chargeAmount` (string, optional) — The amount of the charge. **Note**: This amount does not include taxes regardless if the charge's tax mode is inclusive or exclusive. This is the discount amount actually applied when the invoice item is a discount charge.
- `chargeDate` (string, optional) — The date when the invoice item is charged, in `yyyy-mm-dd hh:mm:ss` format.
- `chargeDescription` (string, optional) — The description of the charge.
- `chargeId` (string, optional) — The unique ID of the charge.
- `chargeName` (string, optional) — The name of the charge.
- `chargeType` (enum, optional) — The type of the charge.
  - Allowed values: `OneTime`, `Recurring`, `Usage`
- `commitmentId` (string, optional) — The ID of the commitment.
- `commitmentPeriodId` (string, optional) — The ID of the commitment period.
- `contractAssetAccountingCode` (string, optional) — The accounting code for contract asset. **Note**: This field is only available if you have the Billing - Revenue Integration feature enabled.
- `contractLiabilityAccountingCode` (string, optional) — The accounting code for contract liability. **Note**: This field is only available if you have the Billing - Revenue Integration feature enabled.
- `contractRecognizedRevenueAccountingCode` (string, optional) — The accounting code for contract recognized revenue. **Note**: This field is only available if you have the Billing - Revenue Integration feature enabled.
- `deferredRevenueAccountingCode` (string, optional) — The deferred revenue accounting code associated with the invoice item. **Note:** This field is only available if you have Zuora Finance enabled.
- `description` (string, optional) — The description of the invoice item.
- `excludeItemBillingFromRevenueAccounting` (boolean, optional) — The flag to exclude the invoice item from revenue accounting. **Note**: This field is only available if you have the Billing - Revenue Integration feature enabled.
- `fulfillmentId` (string, optional) — The reference ID of the fulfillment associated with the invoice item.
- `id` (string, optional) — Item ID.
- `invoiceScheduleId` (string, optional) — The ID of the invoice schedule item by which Invoice Schedule Item the invoice item is generated by when the Invoice Schedule Item is executed. **Note**: This field is available only if you have the Billing Schedule feature enabled.
- `invoiceScheduleItemId` (string, optional) — The ID of the invoice schedule item associated with the invoice item. **Note**: This field is available only if you have the Billing Schedule feature enabled.
- `itemType` (string, optional) — The type of the invoice item.
- `numberOfDeliveries` (double, optional) — The number of deliveries dedicated to the Delivery Pricing charges. **Note**: This field is available only if you have the Delivery Pricing feature enabled.
- `orderLineItemId` (string, optional) — The reference ID of the oder line item associated with the invoice item.
- `processingType` (enum, optional) — The kind of the charge for the invoice item.
  - Allowed values: `Charge`, `Discount`, `Prepayment`, `Tax`, `Rounding`
- `productName` (string, optional) — Name of the product associated with this item.
- `productRatePlanChargeId` (string, optional) — The ID of the product rate plan charge that the invoice item is created from.
- `purchaseOrderNumber` (string, optional) — The purchase order number associated with the invoice item.
- `quantity` (string, optional) — The quantity of this item, in the configured unit of measure for the charge.
- `reflectDiscountInNetAmount` (boolean, optional, default: false) — When you apply percentage discounts to either of the following charges, you need to set the `reflectDiscountInNetAmount` field on your discount charge to `true`, to enable calculating and displaying the net amount of the following charges in Zuora Revenue. * delivery pricing charge * prepayment charge * drawdown charge Note the following: * If you are an Order to Revenue customer, when you set the `reflectDiscountInNetAmount` field to `true`, you must also set both the `excludeItemBookingFromRevenueAccounting` and `ExcludeItemBillingFromRevenueAccounting` fields to `true`. * If you are a Billing - Revenue Integration customer, you must set the `reflectDiscountInNetAmount` field to `false`, otherwise an error will be returned. Billing - Revenue Integration does not support discounts on the preceding charges. * If you are a Zuora Billing customer who does not enable the Order to Revenue or Billing - Revenue Integration feature, when you apply percentage discounts to the preceding charges, you also need to set the `reflectDiscountInNetAmount` field to `true`.
- `recognizedRevenueAccountingCode` (string, optional) — The recognized revenue accounting code associated with the invoice item. **Note:** This field is only available if you have Zuora Finance enabled.
- `revRecCode` (string, optional) — The revenue recognition code.
- `revRecTriggerCondition` (enum, optional) — The date when revenue recognition is triggered.
  - Allowed values: `ContractEffectiveDate`, `ServiceActivationDate`, `CustomerAcceptanceDate`
- `revenueRecognitionRuleName` (string, optional) — The revenue recognition rule of the invoice item. **Note:** This field is only available if you have Zuora Finance enabled.
- `serviceEndDate` (date, optional) — The end date of the service period for this item, i.e., the last day of the service period, as _yyyy-mm-dd_.
- `serviceStartDate` (date, optional) — The start date of the service period for this item, as _yyyy-mm-dd_. For a one-time fee item, the date of the charge.
- `sku` (string, optional) — The SKU of the invoice item.
- `shipToContactId` (string, optional) — The ID of the ship-to contact associated with the invoice item.
- `soldToContactId` (string, optional) — The ID of the sold-to contact associated with the invoice item. **Note**: If you have the Flexible Billing Attributes feature disabled, the value of this field is `null`.
- `soldToContactSnapshotId` (string, optional) — The ID of the sold-to contact snapshot associated with the invoice item. **Note**: If you have the Flexible Billing Attributes feature disabled, the value of this field is `null`.
- `sourceItemType` (enum, optional) — The type of the source item.
  - Allowed values: `SubscriptionComponent`, `Rounding`, `ProductRatePlanCharge`, `None`, `OrderLineItem`
- `subscriptionId` (string, optional) — The ID of the subscription for this item.
- `subscriptionName` (string, optional) — The name of the subscription for this item.
- `taxAmount` (string, optional) — Tax applied to the charge.
- `taxCode` (string, optional) — The tax code of the invoice item. **Note** Only when taxation feature is enabled, this field can be presented.
- `taxMode` (string, optional) — The tax mode of the invoice item. **Note** Only when taxation feature is enabled, this field can be presented.
- `taxationItems` (InvoiceItemTaxationItems, optional) — Container for the taxation items of the invoice item.
- `unbilledReceivablesAccountingCode` (string, optional) — The accounting code for unbilled receivables. **Note**: This field is only available if you have the Billing - Revenue Integration feature enabled.
- `unitOfMeasure` (string, optional) — Unit used to measure consumption.
- `unitPrice` (double, optional) — The per-unit price of the invoice item. **Note**: For discount charges, this represents the discount percentage (for percentage-based discounts) or the discount amount (for fixed-amount discounts).
- `IntegrationId__NS` (string, optional) — ID of the corresponding object in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
- `IntegrationStatus__NS` (string, optional) — Status of the invoice item's synchronization with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
- `SyncDate__NS` (string, optional) — Date when the invoice item was synchronized with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).

### ErrorResponseReasonsItems

- `code` (string, optional) — The error code of response.
- `message` (string, optional) — The detail information of the error response

### CommonResponseReasonsItems

- `code` (string, optional) — The error code of response.
- `message` (string, optional) — The detail information of the error response

### InvoiceItemTaxationItems

Container for the taxation items of the invoice item.

- `data` (list of GETInvoiceTaxItemType, optional) — List of taxation items.
- `nextPage` (string, optional) — URL to retrieve the next page of the response if it exists; otherwise absent.

### GETInvoiceTaxItemType

Container for custom fields of a Taxation Item object.

- `availableToCreditAmount` (double, optional) — The amount of the invoice taxation item that is available to credit.
- `applicableTaxUnRounded` (double, optional) — The unrounded amount of the tax.
- `country` (string, optional) — The field which contains country code.
- `balance` (double, optional) — The balance of the taxation item.
- `creditAmount` (double, optional) — The amount of credit memos applied to the taxation item.
- `exemptAmount` (double, optional) — The calculated tax amount excluded due to the exemption.
- `id` (string, optional) — The ID of the taxation item.
- `jurisdiction` (string, optional) — The jurisdiction that applies the tax or VAT. This value is typically a state, province, county, or city.
- `locationCode` (string, optional) — The identifier for the location based on the value of the `taxCode` field.
- `name` (string, optional) — The name of the taxation item.
- `paymentAmount` (double, optional) — The amount of payments applied to the taxation item.
- `taxAmount` (double, optional) — The amount of taxation.
- `taxCode` (string, optional) — The tax code identifies which tax rules and tax rates to apply to a specific invoice.
- `taxCodeDescription` (string, optional) — The description of the tax code.
- `taxDate` (date, optional) — The date that the tax is applied to the invoice, in `yyyy-mm-dd` format.
- `taxRate` (double, optional) — The tax rate applied to the invoice.
- `taxRateDescription` (string, optional) — The description of the tax rate.
- `taxRateType` (enum, optional) — The type of the tax rate.
  - Allowed values: `Percentage`, `FlatFee`

## Examples

**Response**

```json
{
  "invoiceItems": [
    {
      "appliedToItemId": null,
      "balance": "21.1",
      "chargeAmount": "21.1",
      "chargeDate": "2015-11-20 19:53:00",
      "chargeDescription": "",
      "chargeId": "2c92c0f9511f56b2015126814af832d2",
      "chargeName": "Annual Fee",
      "chargeType": "Recurring",
      "commitmentId": "4028819f9a4dfdf1019a4e04acfb7e63",
      "commitmentPeriodId": "4028819f9a4dfdf1019a4e06f04a402c",
      "description": "",
      "excludeItemBillingFromRevenueAccounting": true,
      "id": "2c92c095511f5b4401512682dd017989",
      "invoiceScheduleId": "402881e522cf4f9b0122cf5d82860005",
      "invoiceScheduleItemId": "402881e522cf4f9b0122cf5d82860006",
      "numberOfDeliveries": 1,
      "processingType": "Charge",
      "productName": "TeamCollab Enterprise",
      "quantity": "1",
      "serviceEndDate": "2015-11-30",
      "serviceStartDate": "2015-11-20",
      "soldToContactId": "2c92c0f9511f56b2015126814ad532cd",
      "soldToContactSnapshotId": "2c92c0f9511f56b2015126814ad532cd",
      "sourceItemType": "SubscriptionComponent",
      "subscriptionId": "2c92c0f9511f56b2015126814ad532cc",
      "subscriptionName": "A-S00000004",
      "taxAmount": "0",
      "taxationItems": {
        "data": [
          {
            "balance": 2.11,
            "creditAmount": 0,
            "exemptAmount": 0,
            "id": "2c98901a68ff26800168ffce6eeb0ffe",
            "jurisdiction": "County",
            "locationCode": "000-1",
            "name": "taxName",
            "paymentAmount": 0,
            "taxAmount": 2.11,
            "taxCode": "TAXCODE-1",
            "taxCodeDescription": null,
            "taxDate": "2015-11-20",
            "taxRate": 0.1,
            "taxRateDescription": "",
            "taxRateType": "Percentage"
          }
        ]
      },
      "unitOfMeasure": "",
      "unitPrice": 21.1
    },
    {
      "appliedToItemId": "2c92c095511f5b4401512682dd017989",
      "chargeAmount": "-2.1",
      "chargeDate": "2015-11-20 19:53:00",
      "chargeDescription": "",
      "chargeId": "1b3dede652fa47db833a83be55d850a5",
      "chargeName": "Discount",
      "chargeType": "OneTime",
      "commitmentId": "4028819f9a4dfdf1019a4e04acfb7e63",
      "commitmentPeriodId": "4028819f9a4dfdf1019a4e06f04a402c",
      "description": "",
      "excludeItemBillingFromRevenueAccounting": true,
      "id": "3e28d61d442f433797e268e2b7c11eeb",
      "invoiceScheduleId": "402881e522cf4f9b0122cf5d82860005",
      "invoiceScheduleItemId": "402881e522cf4f9b0122cf5d82860006",
      "numberOfDeliveries": 1,
      "processingType": "Discount",
      "productName": "TeamCollab Enterprise",
      "quantity": "0",
      "serviceEndDate": "2015-11-30",
      "serviceStartDate": "2015-11-20",
      "soldToContactId": "2c92c0f9511f56b2015126814ad532cd",
      "soldToContactSnapshotId": "2c92c0f9511f56b2015126814ad532cd",
      "sourceItemType": "SubscriptionComponent",
      "subscriptionId": "c2d9a5768db440cbbf2709a55c614bed",
      "subscriptionName": "A-S00000004",
      "taxAmount": "0",
      "taxationItems": {
        "data": [
          {
            "balance": 0.21,
            "creditAmount": 0,
            "exemptAmount": 0,
            "id": "2c98901a68ff26800168ffce6eeb0ffe",
            "jurisdiction": "County",
            "locationCode": "000-1",
            "name": "taxName",
            "paymentAmount": 0,
            "taxAmount": 0.21,
            "taxCode": "TAXCODE-1",
            "taxCodeDescription": null,
            "taxDate": "2015-11-20",
            "taxRate": 0.1,
            "taxRateDescription": "",
            "taxRateType": "Percentage"
          }
        ]
      },
      "unitOfMeasure": "",
      "unitPrice": 10
    }
  ],
  "success": true
}
```

**SDK Code**

```python response
import requests

url = "https://rest.test.zuora.com/v1/invoices/invoiceKey/items"

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

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

print(response.json())
```

```javascript response
const url = 'https://rest.test.zuora.com/v1/invoices/invoiceKey/items';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go response
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://rest.test.zuora.com/v1/invoices/invoiceKey/items"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby response
require 'uri'
require 'net/http'

url = URI("https://rest.test.zuora.com/v1/invoices/invoiceKey/items")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java response
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://rest.test.zuora.com/v1/invoices/invoiceKey/items")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php response
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://rest.test.zuora.com/v1/invoices/invoiceKey/items', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp response
using RestSharp;

var client = new RestClient("https://rest.test.zuora.com/v1/invoices/invoiceKey/items");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift response
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://rest.test.zuora.com/v1/invoices/invoiceKey/items")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```