Purchases
Turning a usable quote into a policy.
/purchasesList purchases
The purchases this business has made, newest first.
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Responses
One page of purchases.
{
"items": [],
"pagination": null
}/api/v1/purchasesCode samples
curl -X GET '/api/v1/purchases'/purchasesBuy a quote
Turns a usable quote into a policy. Collect the premium yourself and describe the settled payment in payment; amountMinor must match the quote's total, or the request is 409 AMOUNT_MISMATCH. A quote that has expired or has already been bought is 409.
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Request body
application/json{
"providerId": null,
"quoteId": "",
"transactionId": "",
"customer": null,
"payment": null,
"beneficiaries": [],
"consents": [],
"startDate": "",
"context": null,
"country": null,
"currency": null,
"channel": null
}Responses
The purchase this Idempotency-Key already produced, replayed.
null/api/v1/purchasesRequest body
Code samples
curl -X POST '/api/v1/purchases' \
-H 'Content-Type: application/json' \
--data-raw '{
"providerId": null,
"quoteId": "",
"transactionId": "",
"customer": null,
"payment": null,
"beneficiaries": [],
"consents": [],
"startDate": "",
"context": null,
"country": null,
"currency": null,
"channel": null
}'/purchases/{providerId}/{purchaseId}Read one purchase
A purchase another business owns is the same 404 as one that does not exist.
Requires API key authentication. The API key issued to the business, sent as `<keyId>:<secret>`, for example `sk_test_0123456789abcdef0123456789abcdef:<secret>`. The key id prefix selects the environment: `sk_test_` keys read and write test data, `sk_live_` keys production data.
Parameters
purchaseIdpathstringrequireddefault: The insurer's purchase id.Responses
The stored purchase.
null/api/v1/purchases/{providerId}/{purchaseId}Path parameters
purchaseId*Code samples
curl -X GET '/api/v1/purchases/{providerId}/{purchaseId}'