AristanderAI
Search…
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:
1
https://api.aristander.ai/prices?source=original
2
https://api.aristander.ai/prices?source=aristander
Copied!
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:
1
curl --header "Content-Type: application/json"
2
-d '{
3
"format" : "csv"
4
}'
5
-u demo: https://api.aristander.ai/prices
Copied!
The format parameter determines the return type. The available options are: "json" and "csv".
Example JSON response:
1
"prices" : {
2
"product_id1" : 10.47,
3
"product_id2" : 10.30,
4
"product_id3" : 5.00,
5
"product_id4" : 1.00
6
}
Copied!
Example CSV response:
1
product_id,price
2
product_id1,10.47
3
product_id2,10.30
4
product_id3,5.00
5
product_id4,1.00
Copied!
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.
Last modified 2yr ago
Copy link