The Pricing Rule object
Attributes
Unique identifier for the object.
ISO 8601 timestamp of when the object was created.
ISO 8601 timestamp of when the object was last updated.
Default: false
Default: Item Code
Default: false
Default: false
Default: false
Default: false
Default: false
Default: 0
Default: 0
Default: Percentage
Default: 0
Default: Discount Percentage
Default: Grand Total
Default: 0
Default: 0
Default: false
Default: 0
Default: false
Default: false
Default: false
Default: false
Default: false
Default: 0
Default: false
Default: false
{
"id": "pricing-rule_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"title": "title_example",
"disable": false,
"apply_on": "Item Code",
"price_or_product_discount": "price_or_product_discount_example",
"warehouse": "warehouse_example",
"mixed_conditions": false,
"is_cumulative": false,
"coupon_code_based": false,
"apply_rule_on_other": "apply_rule_on_other_example",
"other_item_code": "other_item_code_example",
"other_item_group": "other_item_group_example",
"other_brand": "other_brand_example",
"selling": false,
"buying": false,
"applicable_for": "applicable_for_example",
"customer": "customer_example",
"customer_group": "customer_group_example",
"territory": "territory_example",
"sales_partner": "sales_partner_example",
"campaign": "campaign_example",
"supplier": "supplier_example",
"supplier_group": "supplier_group_example",
"min_qty": 0,
"max_qty": 0,
"min_amt": 0,
"max_amt": 0,
"valid_from": "valid_from_example",
"valid_upto": "valid_upto_example",
"company": "Example Corp",
"currency": "USD",
"margin_type": "Percentage",
"margin_rate_or_amount": 0,
"rate_or_discount": "Discount Percentage",
"apply_discount_on": "Grand Total",
"rate": 0,
"discount_amount": 0,
"discount_percentage": 0,
"for_price_list": "for_price_list_example",
"same_item": false,
"free_item": "free_item_example",
"free_qty": 0,
"free_item_uom": "free_item_uom_example",
"free_item_rate": 0,
"threshold_percentage": 0,
"priority": "priority_example",
"apply_multiple_pricing_rules": false,
"apply_discount_on_rate": false,
"validate_applied_rule": false,
"rule_description": "rule_description_example",
"promotional_scheme_id": "promotional_scheme_id_example",
"promotional_scheme": "promotional_scheme_example",
"condition": "condition_example",
"is_recursive": false,
"round_free_qty": false,
"recurse_for": 0,
"apply_recursion_over": 0,
"has_priority": false,
"dont_enforce_free_item_qty": false
} /api/accounts/pricing-rule/{id} Retrieve a pricing rule
Retrieves the details of an existing pricing rule. Supply the unique pricing rule ID that was returned from a previous request.
Path parameters
The identifier of the pricing rule to retrieve.
Returns
Returns the pricing rule object if a valid identifier was provided.
curl https://api.overplane.dev/api/accounts/pricing-rule/pricing-rule_abc123 \
-H "Authorization: Bearer sk_test_..." {
"id": "pricing-rule_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"title": "title_example",
"disable": false,
"apply_on": "Item Code",
"price_or_product_discount": "price_or_product_discount_example",
"warehouse": "warehouse_example",
"mixed_conditions": false,
"is_cumulative": false,
"coupon_code_based": false,
"apply_rule_on_other": "apply_rule_on_other_example",
"other_item_code": "other_item_code_example",
"other_item_group": "other_item_group_example",
"other_brand": "other_brand_example",
"selling": false,
"buying": false,
"applicable_for": "applicable_for_example",
"customer": "customer_example",
"customer_group": "customer_group_example",
"territory": "territory_example",
"sales_partner": "sales_partner_example",
"campaign": "campaign_example",
"supplier": "supplier_example",
"supplier_group": "supplier_group_example",
"min_qty": 0,
"max_qty": 0,
"min_amt": 0,
"max_amt": 0,
"valid_from": "valid_from_example",
"valid_upto": "valid_upto_example",
"company": "Example Corp",
"currency": "USD",
"margin_type": "Percentage",
"margin_rate_or_amount": 0,
"rate_or_discount": "Discount Percentage",
"apply_discount_on": "Grand Total",
"rate": 0,
"discount_amount": 0,
"discount_percentage": 0,
"for_price_list": "for_price_list_example",
"same_item": false,
"free_item": "free_item_example",
"free_qty": 0,
"free_item_uom": "free_item_uom_example",
"free_item_rate": 0,
"threshold_percentage": 0,
"priority": "priority_example",
"apply_multiple_pricing_rules": false,
"apply_discount_on_rate": false,
"validate_applied_rule": false,
"rule_description": "rule_description_example",
"promotional_scheme_id": "promotional_scheme_id_example",
"promotional_scheme": "promotional_scheme_example",
"condition": "condition_example",
"is_recursive": false,
"round_free_qty": false,
"recurse_for": 0,
"apply_recursion_over": 0,
"has_priority": false,
"dont_enforce_free_item_qty": false
} /api/accounts/pricing-rule List all pricing rules
Returns a list of pricing rules. The results are sorted by creation date, with the most recently created appearing first.
Query parameters
Maximum number of objects to return. Default: 20.
Number of objects to skip for pagination. Default: 0.
Returns
A paginated list of pricing rule objects.
curl https://api.overplane.dev/api/accounts/pricing-rule \
-H "Authorization: Bearer sk_test_..." {
"data": [
{
"id": "pricing-rule_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"title": "title_example",
"disable": false,
"apply_on": "Item Code",
"price_or_product_discount": "price_or_product_discount_example",
"warehouse": "warehouse_example",
"mixed_conditions": false,
"is_cumulative": false,
"coupon_code_based": false,
"apply_rule_on_other": "apply_rule_on_other_example",
"other_item_code": "other_item_code_example",
"other_item_group": "other_item_group_example",
"other_brand": "other_brand_example",
"selling": false,
"buying": false,
"applicable_for": "applicable_for_example",
"customer": "customer_example",
"customer_group": "customer_group_example",
"territory": "territory_example",
"sales_partner": "sales_partner_example",
"campaign": "campaign_example",
"supplier": "supplier_example",
"supplier_group": "supplier_group_example",
"min_qty": 0,
"max_qty": 0,
"min_amt": 0,
"max_amt": 0,
"valid_from": "valid_from_example",
"valid_upto": "valid_upto_example",
"company": "Example Corp",
"currency": "USD",
"margin_type": "Percentage",
"margin_rate_or_amount": 0,
"rate_or_discount": "Discount Percentage",
"apply_discount_on": "Grand Total",
"rate": 0,
"discount_amount": 0,
"discount_percentage": 0,
"for_price_list": "for_price_list_example",
"same_item": false,
"free_item": "free_item_example",
"free_qty": 0,
"free_item_uom": "free_item_uom_example",
"free_item_rate": 0,
"threshold_percentage": 0,
"priority": "priority_example",
"apply_multiple_pricing_rules": false,
"apply_discount_on_rate": false,
"validate_applied_rule": false,
"rule_description": "rule_description_example",
"promotional_scheme_id": "promotional_scheme_id_example",
"promotional_scheme": "promotional_scheme_example",
"condition": "condition_example",
"is_recursive": false,
"round_free_qty": false,
"recurse_for": 0,
"apply_recursion_over": 0,
"has_priority": false,
"dont_enforce_free_item_qty": false
}
],
"has_more": false,
"total": 1
} /api/accounts/pricing-rule Create a pricing rule
Creates a new pricing rule object.
Body parameters
Default: false
Default: Item Code
Default: false
Default: false
Default: false
Default: false
Default: false
Default: 0
Default: 0
Default: Percentage
Default: 0
Default: Discount Percentage
Default: Grand Total
Default: 0
Default: 0
Default: false
Default: 0
Default: false
Default: false
Default: false
Default: false
Default: false
Default: 0
Default: false
Default: false
Returns
Returns the newly created pricing rule object if the call succeeded.
curl https://api.overplane.dev/api/accounts/pricing-rule \
-H "Authorization: Bearer sk_test_..." \
-X POST \
-H "Content-Type: application/json" \
-d '{"title":"title_example","price_or_product_discount":"price_or_product_discount_example","currency":"USD"}' {
"id": "pricing-rule_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"title": "title_example",
"disable": false,
"apply_on": "Item Code",
"price_or_product_discount": "price_or_product_discount_example",
"warehouse": "warehouse_example",
"mixed_conditions": false,
"is_cumulative": false,
"coupon_code_based": false,
"apply_rule_on_other": "apply_rule_on_other_example",
"other_item_code": "other_item_code_example",
"other_item_group": "other_item_group_example",
"other_brand": "other_brand_example",
"selling": false,
"buying": false,
"applicable_for": "applicable_for_example",
"customer": "customer_example",
"customer_group": "customer_group_example",
"territory": "territory_example",
"sales_partner": "sales_partner_example",
"campaign": "campaign_example",
"supplier": "supplier_example",
"supplier_group": "supplier_group_example",
"min_qty": 0,
"max_qty": 0,
"min_amt": 0,
"max_amt": 0,
"valid_from": "valid_from_example",
"valid_upto": "valid_upto_example",
"company": "Example Corp",
"currency": "USD",
"margin_type": "Percentage",
"margin_rate_or_amount": 0,
"rate_or_discount": "Discount Percentage",
"apply_discount_on": "Grand Total",
"rate": 0,
"discount_amount": 0,
"discount_percentage": 0,
"for_price_list": "for_price_list_example",
"same_item": false,
"free_item": "free_item_example",
"free_qty": 0,
"free_item_uom": "free_item_uom_example",
"free_item_rate": 0,
"threshold_percentage": 0,
"priority": "priority_example",
"apply_multiple_pricing_rules": false,
"apply_discount_on_rate": false,
"validate_applied_rule": false,
"rule_description": "rule_description_example",
"promotional_scheme_id": "promotional_scheme_id_example",
"promotional_scheme": "promotional_scheme_example",
"condition": "condition_example",
"is_recursive": false,
"round_free_qty": false,
"recurse_for": 0,
"apply_recursion_over": 0,
"has_priority": false,
"dont_enforce_free_item_qty": false
} /api/accounts/pricing-rule/{id} Update a pricing rule
Updates the specified pricing rule by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
Path parameters
The identifier of the pricing rule to update.
Body parameters
Default: false
Default: Item Code
Default: false
Default: false
Default: false
Default: false
Default: false
Default: 0
Default: 0
Default: Percentage
Default: 0
Default: Discount Percentage
Default: Grand Total
Default: 0
Default: 0
Default: false
Default: 0
Default: false
Default: false
Default: false
Default: false
Default: false
Default: 0
Default: false
Default: false
Returns
Returns the updated pricing rule object.
curl https://api.overplane.dev/api/accounts/pricing-rule/pricing-rule_abc123 \
-H "Authorization: Bearer sk_test_..." \
-X PATCH \
-H "Content-Type: application/json" \
-d '{"title":"title_example","disable":false}' {
"id": "pricing-rule_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"title": "title_example",
"disable": false,
"apply_on": "Item Code",
"price_or_product_discount": "price_or_product_discount_example",
"warehouse": "warehouse_example",
"mixed_conditions": false,
"is_cumulative": false,
"coupon_code_based": false,
"apply_rule_on_other": "apply_rule_on_other_example",
"other_item_code": "other_item_code_example",
"other_item_group": "other_item_group_example",
"other_brand": "other_brand_example",
"selling": false,
"buying": false,
"applicable_for": "applicable_for_example",
"customer": "customer_example",
"customer_group": "customer_group_example",
"territory": "territory_example",
"sales_partner": "sales_partner_example",
"campaign": "campaign_example",
"supplier": "supplier_example",
"supplier_group": "supplier_group_example",
"min_qty": 0,
"max_qty": 0,
"min_amt": 0,
"max_amt": 0,
"valid_from": "valid_from_example",
"valid_upto": "valid_upto_example",
"company": "Example Corp",
"currency": "USD",
"margin_type": "Percentage",
"margin_rate_or_amount": 0,
"rate_or_discount": "Discount Percentage",
"apply_discount_on": "Grand Total",
"rate": 0,
"discount_amount": 0,
"discount_percentage": 0,
"for_price_list": "for_price_list_example",
"same_item": false,
"free_item": "free_item_example",
"free_qty": 0,
"free_item_uom": "free_item_uom_example",
"free_item_rate": 0,
"threshold_percentage": 0,
"priority": "priority_example",
"apply_multiple_pricing_rules": false,
"apply_discount_on_rate": false,
"validate_applied_rule": false,
"rule_description": "rule_description_example",
"promotional_scheme_id": "promotional_scheme_id_example",
"promotional_scheme": "promotional_scheme_example",
"condition": "condition_example",
"is_recursive": false,
"round_free_qty": false,
"recurse_for": 0,
"apply_recursion_over": 0,
"has_priority": false,
"dont_enforce_free_item_qty": false
} /api/accounts/pricing-rule/{id} Delete a pricing rule
Permanently deletes a pricing rule. This cannot be undone.
Path parameters
The identifier of the pricing rule to delete.
Returns
Returns a confirmation that the pricing rule has been deleted.
curl https://api.overplane.dev/api/accounts/pricing-rule/pricing-rule_abc123 \
-H "Authorization: Bearer sk_test_..." \
-X DELETE {
"id": "pricing-rule_abc123",
"deleted": true
}