The Pricing Rule object

Attributes

id string

Unique identifier for the object.

created_at string

ISO 8601 timestamp of when the object was created.

updated_at string

ISO 8601 timestamp of when the object was last updated.

title string required
disable boolean

Default: false

apply_on string

Default: Item Code

price_or_product_discount string required
warehouse string
mixed_conditions boolean

Default: false

is_cumulative boolean

Default: false

coupon_code_based boolean

Default: false

apply_rule_on_other string
other_item_code string
other_item_group string
other_brand string
selling boolean

Default: false

buying boolean

Default: false

applicable_for string
customer string
customer_group string
territory string
sales_partner string
campaign string
supplier string
supplier_group string
min_qty number
max_qty number
min_amt number

Default: 0

max_amt number

Default: 0

valid_from string
valid_upto string
company string
currency string required
margin_type string

Default: Percentage

margin_rate_or_amount number

Default: 0

rate_or_discount string

Default: Discount Percentage

apply_discount_on string

Default: Grand Total

rate number

Default: 0

discount_amount number

Default: 0

discount_percentage number
for_price_list string
same_item boolean

Default: false

free_item string
free_qty number

Default: 0

free_item_uom string
free_item_rate number
threshold_percentage number
priority string
apply_multiple_pricing_rules boolean

Default: false

apply_discount_on_rate boolean

Default: false

validate_applied_rule boolean

Default: false

rule_description string
promotional_scheme_id string
promotional_scheme string
condition string
is_recursive boolean

Default: false

round_free_qty boolean

Default: false

recurse_for number
apply_recursion_over number

Default: 0

has_priority boolean

Default: false

dont_enforce_free_item_qty boolean

Default: false

The Pricing Rule object
{
  "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
}
GET /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

id string required

The identifier of the pricing rule to retrieve.

Returns

Returns the pricing rule object if a valid identifier was provided.

GET /api/accounts/pricing-rule/{id}
curl https://api.overplane.dev/api/accounts/pricing-rule/pricing-rule_abc123 \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "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
}
GET /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

limit integer

Maximum number of objects to return. Default: 20.

offset integer

Number of objects to skip for pagination. Default: 0.

Returns

A paginated list of pricing rule objects.

GET /api/accounts/pricing-rule
curl https://api.overplane.dev/api/accounts/pricing-rule \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "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
}
POST /api/accounts/pricing-rule

Create a pricing rule

Creates a new pricing rule object.

Body parameters

title string required
disable boolean

Default: false

apply_on string

Default: Item Code

price_or_product_discount string required
warehouse string
mixed_conditions boolean

Default: false

is_cumulative boolean

Default: false

coupon_code_based boolean

Default: false

apply_rule_on_other string
other_item_code string
other_item_group string
other_brand string
selling boolean

Default: false

buying boolean

Default: false

applicable_for string
customer string
customer_group string
territory string
sales_partner string
campaign string
supplier string
supplier_group string
min_qty number
max_qty number
min_amt number

Default: 0

max_amt number

Default: 0

valid_from string
valid_upto string
company string
currency string required
margin_type string

Default: Percentage

margin_rate_or_amount number

Default: 0

rate_or_discount string

Default: Discount Percentage

apply_discount_on string

Default: Grand Total

rate number

Default: 0

discount_amount number

Default: 0

discount_percentage number
for_price_list string
same_item boolean

Default: false

free_item string
free_qty number

Default: 0

free_item_uom string
free_item_rate number
threshold_percentage number
priority string
apply_multiple_pricing_rules boolean

Default: false

apply_discount_on_rate boolean

Default: false

validate_applied_rule boolean

Default: false

rule_description string
promotional_scheme_id string
promotional_scheme string
condition string
is_recursive boolean

Default: false

round_free_qty boolean

Default: false

recurse_for number
apply_recursion_over number

Default: 0

has_priority boolean

Default: false

dont_enforce_free_item_qty boolean

Default: false

Returns

Returns the newly created pricing rule object if the call succeeded.

POST /api/accounts/pricing-rule
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"}'
Response
{
  "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
}
PATCH /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

id string required

The identifier of the pricing rule to update.

Body parameters

title string
disable boolean

Default: false

apply_on string

Default: Item Code

price_or_product_discount string
warehouse string
mixed_conditions boolean

Default: false

is_cumulative boolean

Default: false

coupon_code_based boolean

Default: false

apply_rule_on_other string
other_item_code string
other_item_group string
other_brand string
selling boolean

Default: false

buying boolean

Default: false

applicable_for string
customer string
customer_group string
territory string
sales_partner string
campaign string
supplier string
supplier_group string
min_qty number
max_qty number
min_amt number

Default: 0

max_amt number

Default: 0

valid_from string
valid_upto string
company string
currency string
margin_type string

Default: Percentage

margin_rate_or_amount number

Default: 0

rate_or_discount string

Default: Discount Percentage

apply_discount_on string

Default: Grand Total

rate number

Default: 0

discount_amount number

Default: 0

discount_percentage number
for_price_list string
same_item boolean

Default: false

free_item string
free_qty number

Default: 0

free_item_uom string
free_item_rate number
threshold_percentage number
priority string
apply_multiple_pricing_rules boolean

Default: false

apply_discount_on_rate boolean

Default: false

validate_applied_rule boolean

Default: false

rule_description string
promotional_scheme_id string
promotional_scheme string
condition string
is_recursive boolean

Default: false

round_free_qty boolean

Default: false

recurse_for number
apply_recursion_over number

Default: 0

has_priority boolean

Default: false

dont_enforce_free_item_qty boolean

Default: false

Returns

Returns the updated pricing rule object.

PATCH /api/accounts/pricing-rule/{id}
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}'
Response
{
  "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
}
DELETE /api/accounts/pricing-rule/{id}

Delete a pricing rule

Permanently deletes a pricing rule. This cannot be undone.

Path parameters

id string required

The identifier of the pricing rule to delete.

Returns

Returns a confirmation that the pricing rule has been deleted.

DELETE /api/accounts/pricing-rule/{id}
curl https://api.overplane.dev/api/accounts/pricing-rule/pricing-rule_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X DELETE
Response
{
  "id": "pricing-rule_abc123",
  "deleted": true
}