api price_rules combinesWith

api price_rules combinesWith

Shopify Partner
4 0 0

Good afternoon!
I have a question about "https://shopify.dev/docs/api/admin-rest/2024-01/resources/pricerule"


How do I configure "Combinations" (on the screenshot) for discounts that I create via api/admin-rest pricerule
I can't find it in the documentation.
Here is an example of the code for creating a discount via pricerule:
$addPriceRule = $api->rest('POST','/admin/api/2024-01/price_rules.json', [
"price_rule" => [
"title" => $request['priceId'],
"target_type" => "line_item",
"target_selection" => "all",
"allocation_method" => "across",
"once_per_customer" => true,
"value_type" => "fixed_amount",
"value" => -intval($request['reward']),
"customer_selection" => "all",
"starts_at" => "2022-10-21T17:59:10Z"


What should be added to change the fields (Product discounts, Order discounts, Shipping discounts) in the new discount?
I currently need to activate "Order discounts" so that I can use several vouchers in one order.


Best regards

Replies 0 (0)