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

# Data Exchange API

The Andel Data Exchange API exposes member purchase events to authorized plans and PBMs. It is the supported integration path for partners that need real-time visibility into purchases their members make through Andel.

Andel uses the term **purchases**, not "claims". This API is a purchase-data interchange, not a regulated-claims feed.

## What you can do

* **Read purchases.** Query `GET /purchases` to retrieve transactions for the plans you are authorized for.
* **Look up a purchase by id.**`GET /purchases/{id}` returns the full record.
* **(Future) Receive deductible feeds.** An inbound endpoint is on the roadmap to let plans/PBMs push member deductible amounts to Andel daily or weekly.

## Authentication

The API uses **OAuth 2.0 Client Credentials** issued by [Descope](https://www.descope.com/).

* Token URL: `https://api.descope.com/oauth2/v1/apps/token`
* Required scope: `purchases:read`
* Tokens carry a `plans` claim listing the `plan_id`s the bearer is authorized for. The API enforces per-plan authorization on every call.

To request sandbox credentials, contact your Andel partner manager.

## Schema highlights

Each purchase carries:

* `member_id`, `plan_id` (always present)
* `prescriber_spi`, `ndc`
* `member_purchase_amount`, `oop_amount`, `plan_contribution`
* `purchase_timestamp`

Field-level descriptions and the full schema are in the API Reference (left sidebar).

## Environments

| Environment    | Base URL                                                                 |
| -------------- | ------------------------------------------------------------------------ |
| Sandbox (mock) | `https://7403d846-765d-4d63-9e5c-b7f0ab21a354.mock.pstmn.io/exchange/v1` |
| Production     | `https://api.andel.org/exchange/v1` *(planned)*                          |

## HIPAA / BAA

Even though the term "claims" is avoided, the field set (member id + NDC + dollar amounts) is PHI. A BAA between Andel and the counterparty plan/PBM is required before production access is granted.