The Pricing Rule Detail object
Attributes
Unique identifier for the object.
Default: true
{
"id": "pricing-rule-detail_abc123",
"idx": 1,
"parent_id": null,
"parent_type": "parent_type_example",
"pricing_rule": "pricing_rule_example",
"item_code": "item_code_example",
"margin_type": "margin_type_example",
"rate_or_discount": "rate_or_discount_example",
"child_docname": "child_docname_example",
"rule_applied": true
} /api/accounts/pricing-rule-detail?parent_id={id} List pricing rule details by parent
Returns all pricing rule details belonging to the specified parent.
Query parameters
The ID of the parent to list children for.
Returns
A list of pricing rule detail objects belonging to the parent.
curl https://api.overplane.dev/api/accounts/pricing-rule-detail?parent_id=parent_abc123 \
-H "Authorization: Bearer sk_test_..." {
"data": [
{
"id": "pricing-rule-detail_abc123",
"idx": 1,
"parent_id": null,
"parent_type": "parent_type_example",
"pricing_rule": "pricing_rule_example",
"item_code": "item_code_example",
"margin_type": "margin_type_example",
"rate_or_discount": "rate_or_discount_example",
"child_docname": "child_docname_example",
"rule_applied": true
}
],
"has_more": false,
"total": 1
} /api/accounts/pricing-rule-detail Create a pricing rule detail
Creates a new pricing rule detail object.
Body parameters
Default: true
Returns
Returns the newly created pricing rule detail object if the call succeeded.
curl https://api.overplane.dev/api/accounts/pricing-rule-detail \
-H "Authorization: Bearer sk_test_..." \
-X POST \
-H "Content-Type: application/json" \
-d '{"parent_id":null,"parent_type":"parent_type_example"}' {
"id": "pricing-rule-detail_abc123",
"idx": 1,
"parent_id": null,
"parent_type": "parent_type_example",
"pricing_rule": "pricing_rule_example",
"item_code": "item_code_example",
"margin_type": "margin_type_example",
"rate_or_discount": "rate_or_discount_example",
"child_docname": "child_docname_example",
"rule_applied": true
} /api/accounts/pricing-rule-detail/{id} Update a pricing rule detail
Updates the specified pricing rule detail by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
Path parameters
The identifier of the pricing rule detail to update.
Body parameters
Default: true
Returns
Returns the updated pricing rule detail object.
curl https://api.overplane.dev/api/accounts/pricing-rule-detail/pricing-rule-detail_abc123 \
-H "Authorization: Bearer sk_test_..." \
-X PATCH \
-H "Content-Type: application/json" \
-d '{"idx":1,"parent_id":null}' {
"id": "pricing-rule-detail_abc123",
"idx": 1,
"parent_id": null,
"parent_type": "parent_type_example",
"pricing_rule": "pricing_rule_example",
"item_code": "item_code_example",
"margin_type": "margin_type_example",
"rate_or_discount": "rate_or_discount_example",
"child_docname": "child_docname_example",
"rule_applied": true
} /api/accounts/pricing-rule-detail/{id} Delete a pricing rule detail
Permanently deletes a pricing rule detail. This cannot be undone.
Path parameters
The identifier of the pricing rule detail to delete.
Returns
Returns a confirmation that the pricing rule detail has been deleted.
curl https://api.overplane.dev/api/accounts/pricing-rule-detail/pricing-rule-detail_abc123 \
-H "Authorization: Bearer sk_test_..." \
-X DELETE {
"id": "pricing-rule-detail_abc123",
"deleted": true
} /api/accounts/pricing-rule-detail/reorder Reorder pricing rule details
Updates the sort order of pricing rule details within their parent by setting new index values.
Returns
Returns the reordered list.
curl https://api.overplane.dev/api/accounts/pricing-rule-detail/reorder \
-H "Authorization: Bearer sk_test_..." \
-X POST {
"id": "pricing-rule-detail_abc123",
"idx": 1,
"parent_id": null,
"parent_type": "parent_type_example",
"pricing_rule": "pricing_rule_example",
"item_code": "item_code_example",
"margin_type": "margin_type_example",
"rate_or_discount": "rate_or_discount_example",
"child_docname": "child_docname_example",
"rule_applied": true
}