> This page is for version v1 (default).
> For other versions, use one of these documentation indexes:
> - v1 (default): https://docs.truemed.com/v-1/llms.txt

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

# Retrieve Provision Request Eligibility

GET https://dev-api.truemed.com/api/v1/eligibility/provision_request/{provision_token_request_id}

Returns **customer eligibility** keyed on the provision request id that `create_payment_token` returned. It answers
the same question as Retrieve Eligibility by Payment Token: which items *this* customer can charge to their HSA/FSA
card.

Read eligibility by payment token wherever you hold a token. Use this read only while you hold a provision request id
and no token.

## When the token arrives before the decision

If your sales channel starts the Letter of Medical Necessity (LMN) review with the first order, Truemed mints the token
as soon as the customer enters both cards. For that customer, this read and the token read return the same response,
so read by token.

## When the token waits for the decision

Otherwise, Truemed mints the token only after a practitioner approves the LMN. Until then, Retrieve Provision Token
Request returns a `null` `payment_token`, and this read is the only eligibility read available.

- `pending` means the practitioner has not decided yet. `items` lists what the survey predicts the LMN will cover,
  plus items that need no LMN, and `lmn_expires_at` is null. Present these items as provisional. `items` is empty
  only while the survey is unfinished.
- After the decision, this read answers as the token read does: `approved`, `expired`, `rejected`, or
  `never_requested`, with a coverage date where one exists (inclusive, UTC).
- A rejected customer never gets a token, so this read tells a rejection apart from a pending review.

## Recovering a missed webhook

If a `payment_token.updated` delivery never reaches you, call Retrieve Provision Token Request with the same provision
request id to get the token. Then read eligibility by token.

Reference: https://docs.truemed.com/api-reference/eligibility/retrieve-provision-request-eligibility

## Authentication

- `x-truemed-api-key` header (required) — Sales channel API key for merchant server-to-server authentication

## Servers

- `https://dev-api.truemed.com` (Development server, default)
- `https://api.truemed.com` (Production server)

## Request

### Path parameters

- `provision_token_request_id` (string, required) — The ID of the ProvisionTokenRequest returned by create_payment_token

## Response

### 200

Successful response

- `items` (list of string, required) — The catalog items that can be charged to an HSA/FSA card, each identified exactly as it is in order_items when you charge.
- `eligibility_status` (enum, optional, nullable) — Where this customer's clinical eligibility stands. Named apart from the payment `status` on other Truemed payloads, which is a different vocabulary. Per-value meanings are listed on the enum. Null for catalog eligibility, which identifies no customer. One of: - `approved` — A verified, unexpired letter stands for this customer. - `pending` — A survey is with a clinician; the outcome is not decided yet. - `expired` — The letter that covered this customer has lapsed and not been renewed. - `rejected` — A clinician reviewed this customer's most recent survey and declined it. - `never_requested` — No letter has ever been requested for this customer here.
  - Allowed values: `approved`, `pending`, `expired`, `rejected`, `never_requested`
- `lmn_expires_at` (date, optional, nullable) — When the letter determining this customer's coverage expires (inclusive, UTC). Null for catalog eligibility, which identifies no customer.

## Errors

### 400 Bad Request Error

Bad Request

- `error` (enum, required)
  - Allowed values: `TotalAmountInvalid`, `ValidationError`
- `message` (string, required)

### 404 Not Found Error

Not Found

- `error` (enum, required)
  - Allowed values: `NotFound`
- `message` (string, required)

### 405 Method Not Allowed Error

Method Not Allowed

- `error` (enum, required)
  - Allowed values: `MethodNotAllowed`
- `message` (string, required)

### 429 Too Many Requests Error

Too Many Requests

- `error` (enum, required)
  - Allowed values: `TooManyRequests`
- `message` (string, required)
- `retry_after_ms` (integer, required) — Milliseconds until this same request would be admitted. Wait at least this long before retrying. Unlike the advisory `RateLimit-*` headers, it is measured at the refusal.
- `request_id` (string, optional, nullable) — The id Truemed logged this request under. Quote it when contacting support.

### 500 Internal Server Error

Internal Server Error

- `error` (enum, required)
  - Allowed values: `ServerError`
- `message` (string, required)

### 501 Not Implemented Error

Not Implemented

- `error` (enum, required)
  - Allowed values: `NotImplemented`
- `message` (string, required)

## Examples

**Response**

```json
{
  "items": [
    "string"
  ],
  "eligibility_status": "approved",
  "lmn_expires_at": "2023-01-15"
}
```

**SDK Code**

```python
import requests

url = "https://dev-api.truemed.com/api/v1/eligibility/provision_request/provision_token_request_id"

headers = {"x-truemed-api-key": "<apiKey>"}

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

print(response.json())
```

```javascript
const url = 'https://dev-api.truemed.com/api/v1/eligibility/provision_request/provision_token_request_id';
const options = {method: 'GET', headers: {'x-truemed-api-key': '<apiKey>'}};

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