Comment on page
Each Offer has a defined insurance coverage area (country) and a set of available languages. The protection can only be sold within that country and in those languages, so you need to make sure that you have a solution in place to display the right Offers in the right countries.
To create an Offer for a specific country, you'll just need to input the applicable country code as a lowercase two-character ISO 3166-1 alpha-2 code in your Offer request. The response will include the country code of the country the Offer was created for. If you don't specify the country in your request, the Offer will be created for Germany by default.
curl -X POST 'https://api.hellohakuna.com/sandbox/offers' \
-H 'Bearer: sk_test_4eC39HqLyjWDarjtT1zdp7dc' \
-H 'Content-Type: application/json' \
"title": "iPhone 14",
For price data, amount and currency are split into two separate fields. For currency, we accept (in requests) and deliver (in responses) a lowercase three-character ISO 4217 alpha-3 currency code (e.g., "
eur" for Euros and "
usd" for United States Dollars).
We will only accept the local currency of a country, so make sure that all price data in Offer and Order requests is consistent and in the currency of the applicable country. For example, if you're creating an Offer for the UK, all price data within the Offer creation request should be in Pound sterling. Or if you're placing an Order for a protection plan that was created for Sweden (and whose price is in Kronor), you'll need to provide the product and protection price data in Kronor too.
Please keep in mind that all price data needs to be provided in full cent price values.
Each piece of marketing content within the JSON response is an object that contains a key-value pair for each supported language. Currently, we support German and English.
Here's an example of what the title within an Offer response could look like:
en: "Warranty Extension by Hakuna";
de: "Gewährleistungsverlängerung von Hakuna";