API documentation
Method list
Test your request
Changelog


addInventoryPriceGroup
The method allows to create a price group in BaseLinker storage. Providing a price group ID will update the existing price group. Such price groups may be later assigned in addInventory method. Supports defining price calculation options including group type, source price group, multiplier, and price addition.


Input parameters
price_group_idintPrice group identifier. If provided and > 0, the existing price group will be updated. If 0 or omitted, a new price group is created.
namevarchar(100)Name of the price group
descriptiontextPrice group description
currencychar(3)3-letter currency symbol e.g. USD, EUR
price_group_typetextType of the price group. "standard" - prices are set manually per product, "dependent_on_price_group" - prices are calculated from a source price group, "dependent_on_average_cost" - prices are calculated from average purchase cost. Defaults to "standard".
source_price_group_idintID of the source price group from which prices are derived. Required when price_group_type is "dependent_on_price_group".
price_multiplierfloatMultiplier applied to the source price (e.g. 1.2 means +20%). Defaults to 1.
price_additionfloatFixed value added to the price after multiplier. Can be negative. Defaults to 0.
is_bundle_price_calculatedboolWhether bundle product prices should be automatically calculated from their component products.
bundle_price_multiplierfloatMultiplier applied to the calculated bundle price. Defaults to 1.
bundle_price_additionfloatFixed value added to the calculated bundle price. Defaults to 0.



Output data
The method returns the data in JSON format.
statusvarchar(30)SUCCESS - request executed correctly
ERROR - an error occurred during an API request. Error details will be described in 2 additional returned fields: error_message and error_code
price_group_idintThe ID number of added or updated price group.



Sample
Input data:
Output data:
A sample request in PHP: