We can set a minimum price for products for certain minimum price levels.
Setting the minimum price is possible only on offers
We can set a maximum of 10 price levels.
Table of contents
Glossary
Name | Explanation |
default | Default purchase price of product |
perWarehouse | Purchase price per warehouse, used to calculate weighted average purchase price |
skuId | SKU of product |
minimalPrices :
levels |
Minimum price levels. They can take any name |
GET list minimal prices
In order to get list of minimal prices use GET
/api/v1/pricehelper/integrations/auth-required/minimal-prices
. The diagram below shows the dependence of communicating with the API:jsoncurl -X GET "https://api-preprod.one.unity.pl/api/v1/pricehelper/integrations/auth-required/minimal-prices?pageNumber=1&pageSize=100" -H "accept: */*" -H "one-tenant: {tenant}" -H "ApiAuth: {apiKey}"
In response you will receive list of minimal prices
Example response:
json{ "items": [ { "skuId": "9", "levels": { "level1": 100, "level2": 200, "level3": 300 } }, { "skuId": "8", "levels": { "level1": 100, "level2": 200, "level3": 300 } } ], "totalItems": 2, "pageNumber": 1, "totalPages": 1, "pageSize": 100, "nextPage": null }
PUT - add minimal prices
In order to add minimal prices use PUT
/api/v1/pricehelper/integrations/auth-required/minimal-prices
. The sequence diagram below shows the process:
Example request:
jsoncurl -X PUT "https://api-preprod.one.unity.pl/api/v1/pricehelper/integrations/auth-required/minimal-prices" -H "accept: */*" -H "one-tenant: {tenant}" -H "ApiAuth: {apiKey}" -d "{ "minimalPrices": [ { "levels": { "level1": "100", "level2": "200", "level3": "300" }, "skuId": "9" }, { "levels": { "level1": "100", "level2": "200", "level3": "300" }, "skuId": "8" } ] }
GET minimal prices by SKU
In order to get minimal prices by SKU use GET
/api/v1/pricehelper/integrations/auth-required/minimal-prices/{skuId}
using specific ID of product (skuId
). The diagram below shows the dependence of communicating with the API:Use the parameter in path below to get minimal price for product:
skuId
jsoncurl -X GET "https://api-preprod.one.unity.pl/api/v1/pricehelper/integrations/auth-required/minimal-prices/9" -H "accept: */*" -H "one-tenant: {tenant}" -H "ApiAuth: {apiKey}"
In response you will receive minimal prices
Example response:
json{ "skuId": "9", "levels": { "level1": 100, "level2": 200, "level3": 300 } }