Links

Order feed

The Hakuna Order feed is the easiest way for you to create and manage Orders (and the protection products within them) on our platform.
The only thing you'll need to do is share your Order data with us whenever an Order is created or updated. From there, we'll manage the Orders and connected protection plans for you.
You can either provide us with all of your Orders, including ones that do not contain any protection products, or just the Orders that contain protection products.

Requirements

To ensure that we can manage your Orders and contained protection plans properly, you'll need to do the following:
Order ID - give each of your Orders a unique ID so that we can keep track of updates
Order status - indicate the status of the Order:
  • placed: the transaction is pending or fulfilled, not cancelled
  • cancelled: the transaction will not be fulfilled, either because you decided not to (e.g., failed payment) or because the customer cancelled it
Line item fulfillments and refunds - indicate the quantities of fulfillments and refunds for each line item
Connection between products and protection - products and protection products (i.e., plans) will be transmitted separately as line items, you'll need to link them by adding a reference to a protection product line item within each protected product line item

Using the Order feed

To create or update an Order, all you need to do is call our endpoint
POST https://api.hellohakuna.com/feeds/order and pass us your Order data.
Here's an example of a new Order for an iPhone 12 with "1 year of Hakuna Care":
curl --request POST 'https://api.hellohakuna.com/feeds/order' \
--header 'Bearer: sk_test_4eC39HqLyjWDarjtT1zdp7dc' \
--header 'Content-Type: application/json' \
--data-raw '[
{
"id": "order-123",
"status": "placed",
"placed_at": 1669377053593,
"cancelled_at": null,
"customer": {
"first_name": "Max",
"last_name": "Mustermann",
"email": "[email protected]",
"phone": "+491601234567"
},
"customer_billing_address": {
"address_line_1": "Musterstrasse",
"address_line_2": "1",
"city": "Musterstadt",
"country": "de",
"zip": "123456"
},
"line_items": [
{
"id": "apple-iphone-12",
"quantity": 1,
"product_data": {
"id": "apple-iphone-12",
"price": {
"amount": 90000,
"currency": "eur"
},
"brand": "Apple",
"title": "iPhone 12"
},
"custom_properties": {
"protection_line_item_id": "hak-car-12"
},
"fulfillments": [],
"refunds": []
},
{
"id": "hak-car-12",
"quantity": 1,
"product_data": {
"id": "hak-car-12",
"price": {
"amount": 10000,
"currency": "eur"
},
"brand": "Hakuna",
"title": "1 year of Hakuna Care"
},
"custom_properties": {},
"fulfillments": [],
"refunds": []
}
]
}
]'
As a response, you'll receive an HTTP Status code 202 with an empty body.
Please keep in mind that some of the fields in the example may vary slightly depending on the version of our API used. These minor differences have no impact on the general functionality of the Order feed. If you decide to use the Order feed, please get in touch with us so we can share the latest reference version.
Example of what the request would look like if the Order was cancelled
Example of what the request would look like if the iPhone 12 was shipped
Example of what the request would look like if the iPhone 12 was returned