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>"
}'
{}
{
"errors": {
"code": "<ERROR_CODE>",
"message": "<ERROR_MESSAGE>"
}
}
Travel insurance API
Purchase Tracking
Track a travel insurance lead when a customer proceeds to checkout.
POST
https://sandbox-api.fletch.co
/
insurance
/
travel
/
v1
/
api
/
purchase-tracking
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>"
}'
{}
{
"errors": {
"code": "<ERROR_CODE>",
"message": "<ERROR_MESSAGE>"
}
}
This endpoint records and tracks lead information when a customer proceeds to a provider’s checkout for a generated quote.
Headers and parameters
Body
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 returns200 OK with an empty object.
{}
{
"errors": {
"code": "<ERROR_CODE>",
"message": "<ERROR_MESSAGE>"
}
}