Update shipping rules
PUT http://{{queries_url}}/config/{{shop_id}}/shipping-rules
Create a shipping rule for specified shop. Your shop shipping rules allow you to speed the label creation process by automatically selecting the recommended services according to your ecommerce orders characteristics and the established rules.
Important Information:
- Fixed: All shop orders will use the selected carrier services, regardless of the order characteristics.
- Money: Carrier services will be selected based on the total price of the order.
- Weight: Carrier services will be selected based on the total weight of the order.
- Product: Carrier services will be selected based on the products in the order. If the order contains multiple products with different rules, the rule for the most expensive product will be given priority.
Request Body
{"name"=>"Express shipping for selected products", "country_code"=>"MX", "international"=>false, "type"=>"Product", "measurement"=>"ID", "min"=>nil, "max"=>nil, "option_1"=>2, "option_2"=>9, "option_3"=>22, "active"=>true, "products"=>[{"ecart_product_id"=>"40191406899366", "ecart_variant_id"=>"6806813933734"}, {"ecart_product_id"=>"39843538895014", "ecart_variant_id"=>"6703866282150"}], "methods"=>{"option_name_1"=>["alias1.1.1", "alias1.2.1"], "option_name_2"=>["alias2.1.1", "alias2.2.1"], "option_name_3"=>nil}}