Links
Comment on page

Create an Offer for a product collection

To create an Offer for a product collection, you'll need to call our Offers endpoint with information about the product collection's category and price range.
HTTP method: POST
Sandbox endpoint: https://api.hellohakuna.com/sandbox/offers
Production endpoint: https://api.hellohakuna.com/offers
As a response, you'll get an Offer with 1-3 protection plan options.

Example

Let's pretend that instead of creating an individual Offer for the iPhone 14 as shown in the previous example, you want to create an Offer for all products in the category 101 that cost between 1000 € and 2000 € (i.e., 1000 € ≥ product price ≤ 2000 €).
To create an Offer for that product collection, you just need to call our Offers endpoint with the above information:
Make sure to replace the sample sandbox publishable key with your actual key if you try out this example.
curl -X POST 'https://api.hellohakuna.com/sandbox/offers' \
-H 'Bearer: sk_test_4eC39HqLyjWDarjtT1zdp7dc' \
-H 'Content-Type: application/json' \
-d '{
"type": "protection_products_collection",
"products_collection": {
"category": 101,
"price_min": {
"amount": 100000,
"currency": "eur"
},
"price_max": {
"amount": 200000,
"currency": "eur"
}
}
}'
As a response, you should get an Offer like this:
{
"type": "protection_products_collection",
"country": "de",
"sales_channel": "e-commerce",
"products_collection": {
"category": 101,
"price_min": {
"amount": 100000,
"currency": "eur"
},
"price_max": {
"amount": 200000,
"currency": "eur"
}
},
"created_at": 1683807159311,
"expired_at": 1686399159311,
"id": "off-a5a048d0-b0ba-4dc8-9e05-d70625ebc4f6",
"product": null,
"marketing_content": {
"benefit_bullets": [
{
"en": "Yearly renewable",
"de": "Jährlich verlängerbar"
},
{
"en": "No hidden costs, only a 10% deductible",
"de": "Ohne versteckte Kosten, nur 10% Selbstbeteiligung"
},
{
"en": "Fast and easy online claims processing",
"de": "Einfache und schnelle Online-Schadenabwicklung"
},
{
"en": "Repair or replacement within 3 days",
"de": "Reparatur oder Ersatz innerhalb von 3 Tagen"
}
],
"benefit_heading": {
"en": "We’re here for you",
"de": "Wir sind für dich da"
},
"coverage_bullets": [
{
"en": "Protection against technical defects",
"de": "Schutz bei technischen Defekten"
},
{
"en": "Protection against accidental damage",
"de": "Schutz bei unbeabsichtigten Schäden"
},
{
"en": "Protection against vandalism, theft, and robbery",
"de": "Schutz bei Vandalismus, Diebstahl und Raub"
}
],
"coverage_heading": {
"en": "Full peace of mind",
"de": "Volle Sorgenfreiheit"
},
"general_description": {
"en": "Shop online worry-free and safeguard your purchases with Hakuna, the product protection with optimal coverage, straightforward terms and excellent claims handling.",
"de": "Kaufe sorglos online ein und sichere die Lebensdauer deiner Einkäufe mit Hakuna, dem Produktschutz mit optimalen Schutz, unkomplizierten Konditionen und ausgezeichneter Schadenabwicklung."
},
"general_heading": {
"en": "Hakuna product protection",
"de": "Hakuna Produktschutz"
},
"hakuna_logo_url": "https://hakuna-document.s3.eu-central-1.amazonaws.com/hakuna-protection-logo/hakuna-care.svg",
"hakuna_title": {
"en": "hakuna.care",
"de": "hakuna.care"
},
"insurance_details_url": "https://hakuna-document.s3.eu-central-1.amazonaws.com/hakuna-care-placeholder.pdf",
"recommended_plan_id": null
},
"plans": [
{
"id": "pl-caf5e239-1607-4c5d-8b80-363c84dd1226",
"sku": "AN-C12",
"title": {
"en": "1 year of all-round protection",
"de": "1 Jahr Rundum-Schutz"
},
"term_length": {
"length": 12,
"unit": "months"
},
"price": {
"amount": 11246,
"currency": "eur"
},
"post_purchase_availability_period": null
}
]
}