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:
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:
The format parameter determines the return type. The available options are: "json" and "csv".
Example JSON response:
Example CSV response:
We recommend the price API is called once per hour.
General Workflow
Set the 'price_mode' variable internally to your preferred mode: timeseries, fixed, or split.
Call https://api.aristander.ai/prices once per hour and update your internal AristanderAI list with the new prices and new model params
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).
Attach price_mode, pricelist_source, and model_params to all new events.
Last updated