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

# List Inventory Records

GET https://api.joincandidhealth.com/api/patient-ar/v1/inventory

Retrieve a list of inventory records based on the provided filters. Each inventory record provides the latest invoiceable status of the associated claim.
The response is paginated, and the `page_token` can be used to retrieve subsequent pages. Initial requests should not include `page_token`.

Reference: https://docs.joincandidhealth.com/api-reference/patient-collections/patient-ar/v-1/list-inventory

## Authentication

- OAuth2 — send the obtained token as `Authorization: Bearer <token>`

## Servers

- `https://api.joincandidhealth.com` (Production, default)
- `https://api-staging.joincandidhealth.com` (Staging)
- `https://sandbox-api.joincandidhealth.com` (CandidSandbox)
- `https://staging-api.joincandidhealth.com` (CandidStaging)
- `http://localhost:5050` (Local)

## Request

### Query parameters

- `since` (datetime, optional) — Timestamp to filter records since, inclusive
- `limit` (integer, optional, default: 100) — Maximum number of records to return, default is 100
- `page_token` (string, optional)

## Response

### 200

- `records` (list of InventoryRecord, required) — List of inventory records matching the filters
- `next_page_token` (string, optional) — Token for the next page of results, if available

## Errors

### 422 Invalid Filters Error

The provided filters are invalid or not supported.

- `errorName` ("InvalidFiltersError", required) — The provided filters are invalid or not supported.
- `content` (InvalidFiltersErrorType, required) — The provided filters are invalid or not supported.

### 403 Unauthorized Error

- `errorName` ("UnauthorizedError", required)
- `content` (UnauthorizedErrorMessage, required)

## Types

### InventoryRecord

- `claim_id` (UUID, required)
- `encounter_id` (UUID, required)
- `timestamp` (datetime, required)
- `patient_external_id` (string, required)
- `patient_ar_status` (enum, required)
  - Allowed values: `invoiceable`, `non_invoiceable`

### InvalidFiltersErrorType

- `message` (string, required)

### UnauthorizedErrorMessage

- `message` (string, optional)

## Examples

**Response**

```json
{
  "records": [
    {
      "claim_id": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
      "encounter_id": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
      "timestamp": "2024-01-15T09:30:00Z",
      "patient_external_id": "patient_external_id",
      "patient_ar_status": "invoiceable"
    },
    {
      "claim_id": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
      "encounter_id": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
      "timestamp": "2024-01-15T09:30:00Z",
      "patient_external_id": "patient_external_id",
      "patient_ar_status": "invoiceable"
    }
  ],
  "next_page_token": "next_page_token"
}
```

**SDK Code**

```python
import requests

url = "https://api.joincandidhealth.com/api/patient-ar/v1/inventory"

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

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

print(response.json())
```

```javascript
const url = 'https://api.joincandidhealth.com/api/patient-ar/v1/inventory';
const options = {method: 'GET', headers: {Authorization: '<token>.'}};

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

```go
package main

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

func main() {

	url := "https://api.joincandidhealth.com/api/patient-ar/v1/inventory"

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

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

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

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

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

}
```

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

url = URI("https://api.joincandidhealth.com/api/patient-ar/v1/inventory")

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

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

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

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

HttpResponse<String> response = Unirest.get("https://api.joincandidhealth.com/api/patient-ar/v1/inventory")
  .header("Authorization", "<token>.")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.joincandidhealth.com/api/patient-ar/v1/inventory', [
  'headers' => [
    'Authorization' => '<token>.',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.joincandidhealth.com/api/patient-ar/v1/inventory");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "<token>.");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.joincandidhealth.com/api/patient-ar/v1/inventory")! 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()
```