Skip to main content

Heimdall Checkout

Build & Deploy custom product recommedations in your checkout page to boost revenue.

File Specifications

In order to build a checkout object, you will need to first upload your customer checkout data. This data will need to be in a specific format in order to be ingested by the checkout upload process. Below is a high-level list of specifications for your data:

  • File type has to be .csv
  • File has only have two columns
  • First column represents the id associated with the checkout. This can be any combination of string or numerical characters.
  • Second column represents the actual checkout. This will be a comma separated list of items.
checkoutSample.csv
1, "MILK,BREAD,BISCUIT"
2, "BREAD,MILK,BISCUIT,CORNFLAKES"

API Specifications

Endpoint

POST https://predict.heimdallapp.org/checkout/

Request Headers

  • x-api-key - API key that is issued when the endpoint is configured.
  • x-username - Username associated with your account.
  • x-checkout-id - Unique identifier associated with the checkout boject.
tip

All request headers are required. Checkout ID can be found on the checkout details page.

Lost Key

API Keys are issued one time and cannot be retrieved. If you lose your API key, please disable the endpoint in the checkout details page and reconfigure to get a new API key.

Request Body

  • shopping_cart - Comma separated array list of strings which represent items in the shopping cart.

Response Object

  • product_id The item in the shopping cart the recomendations are associated with.
  • recommendations Array of comma separated strings which represent the list of recommendations associated with the product_id.
tip

product_id represents an item in the shopping cart. This is also the item you send in the shopping_cart request array.

Forecast response object
[
{
"product_id": "MILK",
"recommendations": [
"BREAD"
]
},
{
"product_id": "SUGAR",
"recommendations": [
"COFFEE",
"BREAD"
]
}
]
422 Unprocessable Entity

You will receieve a 422 error your request body structure is incorrect.

Sample Request

Use the below sample request in Python to get started. You can also use the code editor in the checkout details page to test your specific forecast endpoint.

warning

You need to fill in your specific header values.

Python Request
import requests

url = 'https://predict.heimdallapp.org/checkout/'
headers = {
'X-api-key': 'YOUR-API-KEY',
'X-username': 'YOUR-USERNAME',
'x-checkout-id': 'YOUR-FORECAST-ID'
}

data = {
"shopping_cart": ["MILK"]
}

response = requests.post(url, headers=headers, json=data)