Overview

The Leaflet API enables anyone to develop their own applications with AI powered price optimization and personalization. Before you can use the API you need to connect your Shopify store and request a key.

Applications can interact with Leaflet in two ways: (i) request an ordered list of products, and (ii) request optimized/personalized prices for any product.

List Products

Retrieves a list of products personalized in assortment, length, & order

GET /products

Request

Headers

Name Type Default Description
access-token str required auth token

Parameters

Name Type Default Description
consumer_id str null id of the consumer to personalize for

Response

Parameters

Name Type Description
ids[] str List of unique product identifiers

Get Product Prices

Returns the relative-price of any product as well as probability of purchase at that price and expected profit.

GET /products/<product-id>

Request

Headers

Name Type Default Description
access-token str required auth token

Parameters

Name Type Default Description
consumer_id str null id of the consumer to personalize for
max_price float 0.0 The maximum relative price to be offered to the user
min_price float 0.0 The minimum relative price to be offered to the user
show_exp_profit bool true Flag indicating if to retrieve the expected profit
show_msrp bool true Flag indicating if to retrieve the list price
show_pbuy bool true Flag indicating if to retrieve the pbuy
show_wtp bool true Flag indicating if to retrieve the wtp

Response

Parameters

Name Type Description
variants[].exp_profit float The expected profit at the designated price
id str Unique product identifier
variants[].msrp float The original list price of the variant
variants[].pbuy float The probability the variant will be purchased at the recommended price
variants[].wtp float The price the user(s) is/are willing to pay
 

Here are some examples of applications that can be built with the Leaflet API:

  • Custom e-commerce experiences

  • Popup promotions

  • Abandoned cart recovery

  • Personalized advertising

  • SMS marketing applications

  • Email marketing

  • FB chat bots

  • Live chat applications

 
Heart+line (1).png
 

We reserve the right to make changes to either of these APIs at any time. As changes are planned, you will be notified by email at the address you used when signing up.