logo
Here we can set the bonus for the products.
πŸ’‘
We can set up to 3 levels of product bonuses

Table of contents

Glossary

Name
Explanation
skuId
identifier of product
bonuses
It is possible to define 3 bonus levels for a specific product. The name of the bonus levels can be anything

GET list bonuses

In order to get list of bonuses use GET /api/v1/pricehelper/integrations/auth-required/bonuses . The diagram below shows the dependence of communicating with the API:
Image without caption
πŸ’‘
We have 3 ways to ask the ONe platform about bonuses:
  1. without filling in the skuId and skuIds parameters, we will receive a list of bonuses for all products
  1. by filling in the skuId parameter, we will get the value of bonuses for a specific product
  1. by filling in the skuIds parameter, we can enter many skuIds and we will receive a list of bonuses for defined products
Example request:
json
curl -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 for selected products :
json
{ "items": [ { "skuId": "9", "bonuses": { "bonus1": 10, "bonus2": 15, "bonus3": 19 } }, { "skuId": "8", "bonuses": { "bonus1": 12, "bonus2": 18, "bonus3": 19 } } ], "totalItems": 2, "pageNumber": 1, "totalPages": 1, "pageSize": 100, "nextPage": null }

PUT - add bonuses

In order to add bonuses use PUT /api/v1/pricehelper/integrations/auth-required/bonuses. The sequence diagram below shows the process:
Image without caption
Example request:
json
curl -X PUT "https://api-preprod.one.unity.pl/api/v1/pricehelper/integrations/auth-required/bonuses" -H "accept: */*" -H "one-tenant: {tenant}" -H "ApiAuth: {apiKey}" -d "{ "bonuses": [ { "bonuses": { "bonus1": "10", "bonus2": "15", "bonus3": "19" }, "skuId": "9" }, { "bonuses": { "bonus1": "12", "bonus2": "18", "bonus3": "19" }, "skuId": "8" } ] }