Links
Comment on page

Create an Offer for an individual product

To create an Offer for an individual product, you'll need to call our Offers endpoint with that product's data.
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 you have an iPhone 14 in your ERP system, which is represented by the following JSON:
{
"id": "prd-iphone14",
"categories": [101, "phones"],
"name": "iPhone 14",
"brand": "Apple",
"variants": [
{
"sku": "AP-IPH-14gelb",
"price": 112900,
"currency": "EUR"
}
]
}
To create an Offer for the iPhone, you just need to call our Offers endpoint with the above product data:
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_product",
"product": {
"id": "prd-iphone14",
"category": 101,
"title": "iPhone 14",
"brand": "Apple",
"sku": "AP-IPH-14gelb",
"price": {
"amount": 112900,
"currency": "eur"
}
}
}'
As a response, you'll get an Offer like this:
{
"type": "protection_product",
"country": "de",
"sales_channel": "e-commerce",
"products_collection": null,
"created_at": 1683806751838,
"expired_at": 1686398751838,
"id": "off-eaf57888-8a68-4f23-8e68-137fc6dd48f4",
"product": {
"id": "prd-iphone14",
"price": {
"amount": 112900,
"currency": "eur"
},
"category": 101,
"title": "iPhone 14",
"brand": "Apple",
"sku": "AP-IPH-14gelb"
},
"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": "pl-90e8f25b-6d83-4d2e-89da-71d8385cdf72"
},
"plans": [
{
"id": "pl-90e8f25b-6d83-4d2e-89da-71d8385cdf72",
"sku": "AP-IPH-14GELB-AN-C12",
"title": {
"en": "1 year of all-round protection",
"de": "1 Jahr Rundum-Schutz"
},
"term_length": {
"length": 12,
"unit": "months"
},
"price": {
"amount": 8464,
"currency": "eur"
},
"post_purchase_availability_period": null
}
]
}