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

# List an invoice's items

GET https://test.api.kota.io/invoices/{invoice_id}/items

Returns an invoice's items in order: one per policy, with the provider's rows underneath.

**Beta:** available to selected customers. Contact your Kota account manager for access.

Reference: https://docs.kota.io/api-reference/invoices/list-invoice-items

## Authentication

- `Authorization` header (bearer token, required) — Authorization header using the Bearer scheme

## Servers

- `https://test.api.kota.io` (test, default)
- `https://api.kota.io` (production)

## Request

### Path parameters

- `invoice_id` (string, required)

### Query parameters

- `page` (integer, optional) — The page of results to return. Defaults to 1 if not provided.
- `page_size` (integer, optional) — The number of results to return per page. Defaults to 10 if not provided. Maximum value is 100.

### Headers

- `X-Platform-Id` (string, optional) — The target platform id. Required only when calling with a dashboard (WorkOS AuthKit) access token instead of a platform API key — the token carries no platform claim, so the caller must say which platform it means. Ignored for platform API key / embed session token callers.

## Response

### 200

OK

- `items` (list of InvoiceItem, required) — A paginated array containing the response elements
- `page` (integer, required) — The current page of the results
- `page_size` (integer, required) — The number of results on this page. This can be different from the requested page size if the total number of results is less than the requested page size
- `total_count` (integer, required) — The total number of elements available in the response. This is the total number of elements available across all pages, not just the current page.
- `has_next_page` (boolean, optional) — Whether there are more pages available after this page
- `has_previous_page` (boolean, optional) — Whether there are more pages available before this page

## Errors

### 400 Bad Request Error

Bad Request

- `type` (string, optional, nullable)
- `title` (string, optional, nullable)
- `status` (integer, optional, nullable)
- `detail` (string, optional, nullable)
- `instance` (string, optional, nullable)
- `errors` (map from string to list of string, optional)

### 404 Not Found Error

Not Found

- `type` (string, optional, nullable)
- `title` (string, optional, nullable)
- `status` (integer, optional, nullable)
- `detail` (string, optional, nullable)
- `instance` (string, optional, nullable)

## Types

### InvoiceItem

One policy's share of an invoice.

- `id` (string, required) — Unique identifier for the item. Prefixed with `invi_`.
- `invoice_id` (string, required) — The invoice the item is part of. Prefixed with `inv_`.
- `policy_number` (string, required) — The provider's policy number, as the invoice states it.
- `gross` (double, required) — What the provider billed for the policy, tax included.
- `tax` (double, required) — The part of `gross` the provider bills as tax.
- `attribution_status` (enum, required) — Whether Kota has attributed the item to an employee's policy.
  - Allowed values: `attributed`, `unattributed`
- `source_rows` (list of InvoiceItemSourceRow, required) — The provider's own rows behind this item, as received. Use them to check the item against the provider's document, or for provider-specific data the unified fields leave out. Labels and fields are the provider's: a field is null where the provider prints nothing, and nothing is filled in from Kota's records. Contains at least one row.
- `object` (string, optional) — The object type. Always `invoice_item`.
- `attribution` (InvoiceItemAttribution, optional) — The policy the item is attributed to. Present only when `attribution_status` is `attributed`; null otherwise.

### InvoiceItemSourceRow

One row of the provider's invoice, as printed.

- `person` (InvoiceItemPerson, required) — The person the row is for, as the provider states them.
- `cover_period` (InvoiceItemCoverPeriod, required) — The period the row bills for, with the dates the provider printed. Whether `to_date` is the last day billed or the day after follows the provider's convention: Allianz prints the day after.
- `amounts` (list of InvoiceItemAmount, required) — What the row bills. Empty on a row the provider printed without an amount, such as a dependant whose cost is billed on the policyholder's row.

### InvoiceItemAttribution

The policy an invoice item is attributed to, with the employee who holds it and the employer and group policy it belongs to.

- `employer_id` (string, required) — The employer. Prefixed with `er_`.
- `employee_id` (string, required) — The employee who holds the policy. Prefixed with `ee_`.
- `policy_id` (string, required) — The policy. Prefixed with `p_`.
- `group_policy_id` (string, required) — The group policy the policy is held under. Prefixed with `gp_`.

### InvoiceItemPerson

A person on an invoice row, as the provider states them.

- `name` (string, optional, nullable) — The person's name.
- `role_label` (string, optional, nullable) — The person's role on the policy, exactly as the provider prints it.
- `date_of_birth` (date, optional, nullable) — The person's date of birth.
- `external_reference` (string, optional, nullable) — The reference the provider prints for the person, such as an employee number.

### InvoiceItemCoverPeriod

The period an invoice row bills for, as the provider printed it.

- `from_date` (date, required) — The first day billed.
- `to_date` (date, required) — The end date as printed. The last day billed, or the day after, depending on the provider's convention.

### InvoiceItemAmount

An amount billed on an invoice row.

- `value` (double, required) — The amount as printed.
- `label` (string, optional, nullable) — What the amount is for, exactly as the provider labels it.

## Examples

**Response**

```json
{
  "items": [
    {
      "id": "invi_b75505762a774b8c9626eeb89234c3b9",
      "invoice_id": "inv_ea4c9abd28cd496c98ecce467b6c46bc",
      "policy_number": "POL-0001",
      "gross": 125,
      "tax": 5,
      "attribution_status": "attributed",
      "source_rows": [
        {
          "person": {
            "name": "Jane Doe",
            "role_label": "Policyholder",
            "date_of_birth": "1990-01-01",
            "external_reference": "EMP-0001"
          },
          "cover_period": {
            "from_date": "2026-10-01",
            "to_date": "2026-11-01"
          },
          "amounts": [
            {
              "value": 125,
              "label": "Premium"
            }
          ]
        },
        {
          "person": {
            "name": "John Doe",
            "role_label": "Spouse",
            "date_of_birth": "1991-02-02",
            "external_reference": null
          },
          "cover_period": {
            "from_date": "2026-10-01",
            "to_date": "2026-11-01"
          },
          "amounts": []
        }
      ],
      "object": "invoice_item",
      "attribution": null
    },
    {
      "id": "invi_cfcf1a7a991f44059cac2f678172afcc",
      "invoice_id": "inv_ea4c9abd28cd496c98ecce467b6c46bc",
      "policy_number": "POL-0002",
      "gross": 125,
      "tax": 5,
      "attribution_status": "unattributed",
      "source_rows": [
        {
          "person": {
            "name": "Sam Sample",
            "role_label": "Policyholder",
            "date_of_birth": "1985-05-05",
            "external_reference": "EMP-0002"
          },
          "cover_period": {
            "from_date": "2026-10-01",
            "to_date": "2026-11-01"
          },
          "amounts": [
            {
              "value": 125,
              "label": "Premium"
            }
          ]
        }
      ],
      "object": "invoice_item"
    }
  ],
  "page": 1,
  "page_size": 20,
  "total_count": 2,
  "has_next_page": false,
  "has_previous_page": false
}
```

**SDK Code**

```python Attributed and unattributed items
import requests

url = "https://test.api.kota.io/invoices/inv_3b1333d87d9d4fd6ad83ba7f6b0e951a/items"

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

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

print(response.json())
```

```javascript Attributed and unattributed items
const url = 'https://test.api.kota.io/invoices/inv_3b1333d87d9d4fd6ad83ba7f6b0e951a/items';
const options = {method: 'GET', headers: {Authorization: 'Bearer <apiKey>'}};

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

```go Attributed and unattributed items
package main

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

func main() {

	url := "https://test.api.kota.io/invoices/inv_3b1333d87d9d4fd6ad83ba7f6b0e951a/items"

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

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

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

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

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

}
```

```ruby Attributed and unattributed items
require 'uri'
require 'net/http'

url = URI("https://test.api.kota.io/invoices/inv_3b1333d87d9d4fd6ad83ba7f6b0e951a/items")

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

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

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

```java Attributed and unattributed items
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://test.api.kota.io/invoices/inv_3b1333d87d9d4fd6ad83ba7f6b0e951a/items")
  .header("Authorization", "Bearer <apiKey>")
  .asString();
```

```php Attributed and unattributed items
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://test.api.kota.io/invoices/inv_3b1333d87d9d4fd6ad83ba7f6b0e951a/items', [
  'headers' => [
    'Authorization' => 'Bearer <apiKey>',
  ],
]);

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

```csharp Attributed and unattributed items
using RestSharp;

var client = new RestClient("https://test.api.kota.io/invoices/inv_3b1333d87d9d4fd6ad83ba7f6b0e951a/items");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Attributed and unattributed items
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://test.api.kota.io/invoices/inv_3b1333d87d9d4fd6ad83ba7f6b0e951a/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()
```