Skip to content

Pricing Manager

Pricing Manager is a web micro-service for configure and evaluate the price and the cost of data.

The service APIs are logically divided into two subsets:

Pricing management:

This service allows you to calculate the price of some data on the basis of a preconfigured formula. You can manage the formula and customize parameters and constants.

Cost management:

This service can be used to calculate the fee of some data which depends on the price of the data and the percentage of the tariff.

Swagger documentation

The OAS documentation can be accessed here.

Endpoints

Price manager:

setformulawithdefaultconfiguration:

This service can be used for set a formula using default formula parameters and constant values.

Body parameter:

  • formula Example: formula=f(p1,p2,c1)=p1*p2+c1&contantslist=c1&parameterslist=p1,p2" The formula format is: f("parameters and constants list")=math formula

Return parameter:

  • String ("OK" value in case of operation success, "KO" value in case of error)

setformulaconstant:

This service can be used to put the value of a formula constant.
Body parameter:
- { "name":"string", "description":"string", "value":"string" }

Return parameter:
- String ("OK" value in case of operation success, "KO" value in case of error)

setformulaparameter:

This service can be used to put the value of a formula parameter.

Body parameter:
- { "name":"string", "description":"string", "required":"string", "defaultvalue":"string" }

Return parameter:
- String ("OK" value in case of operation success, "KO" value in case of error)

getformulajsonconfiguration:

This service can be used to retrieve the configured formula, parameters and constants. The service has been preconfigured with the formula defined and analyzed by AUEB.

Return parameter:
- The formula configuration in JSON format

setformulajsonconfiguration:

This service can be used to set formula, parameters and constants

Query parameter:

  • The input param is a string that represent the formula configuration in JSON format:

Example (The formula defined from AUEB in JSON format):

{
"formula":"f(B1,B2,B3,B4,B5,CostOfCollecting,EstimatedValue,DataCompleteness,DataAccuracy,UniqueEntries,Rarity)=(CostOfCollecting+EstimatedValue*B1)*(1-(1-DataCompleteness/5)* B2-(1-DataAccuracy/5)*B3-(1-UniqueEntries/5)*B4-(1-Rarity/5)*B5)",
   "formulaConstantConfiguration":[
      {
         "name":"B1",
         "description":"Final Parameter for data value",
         "value":"0.05"
      },
      {
         "name":"B2",
         "description":"Data Completeness",
         "value":"0.3"
      },
      {
         "name":"B3",
         "description":"Data Accuracy and Validity",
         "value":"0.3"
      },
      {
         "name":"B4",
         "description":"Unique entries-values",
         "value":"0.1"
      },
      {
         "name":"B5",
         "description":"Rarity-Scarceness",
         "value":"1"
      }
   ],
   "formulaParameterConfiguration":[
      {
         "name":"CostOfCollecting",
         "description":"Cost of collecting, storing and analysis (if relevant)",
         "required":"true",
         "defaultvalue":"0"
      },
      {
         "name":"EstimatedValue",
         "description":"Estimated  value for the consumer ",
         "required":"true",
         "defaultvalue":"0"
      },
      {
         "name":"DataCompleteness",
         "description":"Data Completeness: The data is complete",
         "required":"true",
         "defaultvalue":"0"
      },
      {
         "name":"DataAccuracy",
         "description":"Data Accuracy and Validity: The data is accurate",
         "required":"true",
         "defaultvalue":"0"
      },
      {
         "name":"UniqueEntries",
         "description":"Unique entries-values: The are no duplicates in the dataset",
         "required":"true",
         "defaultvalue":"0"
      },
      {
         "name":"Rarity",
         "description":"Rarity-Scarceness: The data is rare",
         "required":"true",
         "defaultvalue":"0"
      }
   ]
}
Return parameter:
- String ("OK" value in case of operation success, "KO" value in case of error)

getprice:

This service can be used to get the price of data:

Query parameter:

  • String that contains the characteristic parameters of the data in JSON format.
  • The characteristics params of the data are inserted as parameters in the formula, those used in the example below have already been included in the preconfigured formula within the service and are described in the slides provided by AUEB.

Example:

{
   "CostOfCollecting":"20",
   "EstimatedValue":"1000",
   "DataCompleteness":"5",
   "DataAccuracy":"5",
   "UniqueEntries":"5",
   "Rarity":"5"
}
Return parameter:

  • the calciulated price as a number

Cost manager:

setfee:

This service can be used to set the fee to evaluate the cost of data.

Query parameter:

  • The fee percentage Example: 10 (if wanted percentage is 10%)

Return parameter:
- String ("OK" value in case of operation success, "KO" value in case of error)

getcost:

This service can be used to get the fee of some data by price.

Query parameter: - The price of the data

Return parameter:
- The calculated fee


Last update: 2022-06-16
Created: 2022-05-26
Back to top