Pricing API

You need to have a ClientID and ApplicationID before you can use this API.

Get a recommended price

To obtain a recommended price you should make the following call (including the appropriate GET parameters):

http://pricing.mauritskaptein.com/getPrice.php?
	cid=[clientID]
    	&aid=[applicationID]
    	&hash=[securityHash]
The server will respond with a json object which will look as follows:
{
    "error": false,
    "advice": {
        "id": "2b29f68c13bc518a220c25980fd241e8",
        "price": "23.95",
        "rowId": "10"
    }
}
You can get the recommended price using responseObject.advice.price. If any errors occur then responseObject.error will not be false and an informative error message can be obtained by displaying responseObject.error
This code assumes that you have parsed the JSON object to responseObject.

Logging the success of a call

If the product is purchased for the recommended price we need feedback to train the models. Hence, you should make a call to:

http://pricing.mauritskaptein.com/logSuccess.php?
	cid=[clientID]
    	&aid=[applicationID]
    	&hash=[securityHash]
      	
        &adviceId=responseObject.advice.id
        &rowId=responseObject.advice.rowId
        
This call should be made ONLY if the product is actually purchased for the recommended price. Keep in mind the additional parameters. The server will respond again with a json object:
This code assumes again that you have parsed the JSON object to responseObject.
{
    "error": false,
    "message: "Success logged"
}

Recommendations of usage:

Please keep the following in mind:

For an example of the calls see: an example.

To setup the prices see: setup.

This website / tool is part of a joined research project by Maurits Kaptein and Petri Parvinen (Aalto School of Economics, Helsinki & University of Tilburg, Tilburg. For contact email maurits [at] mauritskaptein [dot] com.