> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fletch.co/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Fletch makes insurance products discoverable to and purchasable by AI agents, while the carrier keeps control of product rules, disclosures, consent, and payments. Fletch provides agentic commerce and agentic distribution for insurance, including APIs, an MCP server, a Web SDK, and journeys in assistants such as ChatGPT. Company overview: https://fletch.co/llms.txt. Agentic commerce: https://fletch.co/ai/. Contact: info@fletch.co.

# Purchase Tracking

> Track a travel insurance lead when a customer proceeds to checkout.

This endpoint records and tracks lead information when a customer proceeds to a provider's checkout for a generated quote.

## Headers and parameters

**X-API-Key** `string` *required*

X-API-Key

**X-API-VERSION** `string` *required*

X-API-VERSION

## Body

**quote\_id** `string` *required*

This field contains the quote ID that the generate quote endpoint returned.

**provider\_id** `string` *required*

Identifier of the provider the customer selected.

**checkout\_url** `string`

Provider checkout url the customer was sent to.

```bash cURL theme={"dark"}
curl --request POST \
  --url https://sandbox-api.fletch.co/insurance/travel/v1/api/purchase-tracking \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --header 'X-API-Key: YOUR_API_KEY' \
  --header 'X-API-VERSION: YOUR_API_VERSION' \
  --data '{
  "quote_id": "e265f87c-21ea-4ba5-86e8-159cdadcad9c",
  "provider_id": "8c0413e3-f541-45b5-8f38-7574f7f386aa",
  "checkout_url": "<checkout_url>"
}'
```

## Responses

After the endpoint tracks the lead, a successful request returns `200 OK` with an empty object.

```json 200 theme={"dark"}
{}
```

```json 401 theme={"dark"}
{
  "errors": {
    "code": "<ERROR_CODE>",
    "message": "<ERROR_MESSAGE>"
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.