Using the REST API (as well as the web interface), you can retrieve an individual price list for a given company, for a given price list group, or for all of them in a single request.
Building the URL
The individual price list is a subordinate resource of a specific record. To retrieve it for a company with the code FIRMA, use:
GET https://demo.flexibee.eu/c/demo/adresar/code:FIRMA/individualni-cenik.xml
As usual, this will redirect to the record's numeric ID — if company FIRMA has the internal ID 400, the resulting URL is /c/demo/adresar/400/individualni-cenik. You can also use the level of detail and filtering options.
Address | What it returns |
| The individual price list for the company with ID 400. |
| The individual price list for the price list group with ID 2. |
| A complete price overview — all variants for all companies and price list groups. |
Parameters
Parameter | Meaning | Default state |
| The date to export the price list for, in the format | The current date. |
| The currency code to export the price list in. | The domestic currency. |
| The code of the cost center to export the price list for. | The best prices regardless of cost center. |
GET .../individualni-cenik.xml?date=2011-12-01
GET .../individualni-cenik.xml?currency=EUR
GET .../individualni-cenik.xml?centre=C
⚠️ An invalid date will cause 400 to return an error with the message Unparseable date, but the service does not report an unknown currency or cost center code — it will silently use the domestic currency or the best prices, respectively. Therefore, be sure to verify the codes in the mena and stredisko records.
Finding a general price for a customer
The complete price overview returns, for each row, a composite identifier idString, the price list item (cenik), the price (cenaZakl), and, depending on what the price relates to, also the company (firma), the price list group (skupCen), or the price level (cenHlad). If you have downloaded the entire table and are looking for a price in it, proceed in this order:
Look for a price for the specific company and item.
Look for a price for the price level and item — the price level can be found for the company in the address book.
Use the standard price of the item from the price list.
Apply the company's percentage discount, as set in the address book, to the resulting price.
Recalculating the sales price
If you change a price list or item group parameter that affects the resulting price, and the recalculation does not happen automatically, you can trigger it manually — by calling PUT or POST on /{filtr}/prepocti-prodejni-cenu for the cenik or skupina-zbozi record. This is described in detail in the article Recalculating sales prices.
The same can also be triggered as an import action. For the price list:
<winstrom version="1.0">
<cenik filter="kod='CENIK'" action="prepocti-prodejni-cenu"/>
</winstrom>
And for the item group:
<winstrom version="1.0">
<skupina-zbozi filter="kod='SKUPINA 2'" action="prepocti-prodejni-cenu"/>
</winstrom>
