logo
⚠️
Here we manage connections between different price lists. For example, we can assign additional price lists to discount pricing, which will have different levels of discounts for specific products or product groups

Table of contents

Glossary

Name
Explanation
pricingId
Identifier of pricing
productGroupId
Identifier of products group
productId
Identifier of product
discount β†’ type discount β†’ value
Type of discount. Possible to choose PERCENT_MULTIPLICATIVE, PERCENT_ADDITIVE, FLAT_VALUE PERCENT_MULTIPLICATIVE - the multiplied percentage that reduce the sale price PERCENT_ADDITIVE - the added percentage that reduce the sale price FLAT_VALUE - numerical value that reduces the sale price

PUT - set discounts of multiple products and product groups. Either 'productId' or 'productGroupId' must be set.

In order to set discounts of products or product groups use PUT /api/v1/pricing/integrations/auth-required/discounts. The sequence diagram below shows the process:
Image without caption
Example request:
single product:
json
curl -X PUT "https://api-preprod.one.unity.pl/api/v1/pricing/integrations/auth-required/discounts" -H "accept: */*" -H "one-tenant: {tenant}" -H "ApiAuth: {apiKey}" -d "[ { "discount": { "type": "PERCENT_MULTIPLICATIVE", "value": 10 }, "pricingId": "f1626c3f-d559-4713-95d5-7890c94a0f1b", "productId": "10" } ]
product group:
json
curl -X PUT "https://api-preprod.one.unity.pl/api/v1/pricing/integrations/auth-required/discounts" -H "accept: */*" -H "one-tenant: {tenant}" -H "ApiAuth: {apiKey}" -d "[ { "discount": { "type": "PERCENT_MULTIPLICATIVE", "value": 10 }, "pricingId": "f1626c3f-d559-4713-95d5-7890c94a0f1b", "productGroupId": "bb80c22f-45c7-42ff-b54f-042305da3bcab" } ]

Powered by Notaku