AristanderAI
Search
⌃K

Prices

The pricing API can be accessed at https://api.aristander.ai/prices
An optional URL parameter can be attached to get either the stored original prices or only AristanderAI prices:
https://api.aristander.ai/prices?source=original
https://api.aristander.ai/prices?source=aristander
One parameter is required: 'format', however this value must be set to 'csv' for large numbers of products (greater than 10).
By default https://api.aristander.ai/prices returns the AristanderAI optimized prices
The API will return a gzipped, headered, UTF-8 encoded CSV containing two columns: product_id, price
Additionally, the API will return three header values:
  • price_mode - this value is to be set by your system to either 'split', 'timeseries', or 'fixed'
  • pricelist_source - will be set to 'original', or 'aristander' - indicates where the pricelist came from
  • model_params - a string that is used internally for tracking model performance
It is vital that the pricelist_source parameter is tied to the returned prices. For example, if you call the /prices API - as soon as you update your system to reflect the recommended prices, all pricelist_source parameters should be set to the newly returned one in new events.
If you are doing split testing, then each event should have the pricelist_source parameter match the pricelist that the user was assigned.
An example curl call demonstrating this:
curl --header "Content-Type: application/json"
-d '{
"format" : "csv"
}'
-u demo: https://api.aristander.ai/prices
The format parameter determines the return type. The available options are: "json" and "csv".
Example JSON response:
"prices" : {
"product_id1" : 10.47,
"product_id2" : 10.30,
"product_id3" : 5.00,
"product_id4" : 1.00
}
Example CSV response:
product_id,price
product_id1,10.47
product_id2,10.30
product_id3,5.00
product_id4,1.00
We recommend the price API is called once per hour.

General Workflow

  1. 1.
    Set the 'price_mode' variable internally to your preferred mode: timeseries, fixed, or split.
  2. 2.
    Call https://api.aristander.ai/prices once per hour and update your internal AristanderAI list with the new prices and new model params
  3. 3.
    If using timeseries: after getting the new pricelist, randomly select a pricelist: AristanderAI or original. For the next hour, assign all new sessions this pricelist. If using split: assign 50% of sessions the AristanderAI pricelist, and 50% the original pricelist (your own prices).
  4. 4.
    Attach price_mode, pricelist_source, and model_params to all new events.