Business - Price List
The Admin interface handles web service calls from the Admin web gui. The base url for this is at:
/api/business-admin
A JSON file with OpenAPI data about all business-related admin APIs can be downloaded here
.
Get Price Lists
Get the price list for the specified currency (it’s a Paged List APIs, as explained in the introduction):
- GET /v1/price-lists/{type}
Retrieves the price list for the specified type
- Parameters
type (integer) – The filter types, accepted only Currency or Tokens
- Status Codes
200 OK – Success
The API accepts in the path a parameter type, that should map to the BalanceUnit enumeration. The only accepted values are Token and Currency. The API returns a list of the articles and tariffs payable with the specified currency type, in the following format:
{
[
{
ID: 1, // Int
EntityType: 0, // String
Name: "ART-01", // String
Labels: "{"en":"English name", ...}", // String (nullable)
Price: 1.5, // Decimal
TokenCost: 5, // Int (nullable)
BaseAmountPerKilometer: 0.5, // Decimal
BaseAmountPerMinute: 1, // Decimal
Communities: "Comm1, ...", // String (nullable)
UserGroups: "[ "{\"en\":\"a0001E\",\"it\":\"a0001I2\"}",... ]", // String (nullable)
Categories: "[ "{\"en\":\"a001CatE\",\"it\":\"a001CatI\"}",... ]", // String (nullable)
ResourceGroups: "Group1,..." // String (nullable)
},
{ ... }
]
}
Where the EntityType
value maps to the PriceListEntryType enumeration.
The Labels
, Price
and TokenCost
properties are valorised only for entries related to an articles, while the
BaseAmountPerKilometer
, BaseAmountPerMinute
, UserGroups
, Categories
and ResourceGroups
properties
are valorised only for entries related to tariffs.
Possible errors are:
err_InvalidBalanceUnit
The type parameter either is not recognized as mapping to the BalanceUnit enumeration or is not Currency nor Token