The Pricing Rule Detail object

Attributes

id string

Unique identifier for the object.

idx integer
parent_id string required
parent_type string required
pricing_rule string
item_code string
margin_type string
rate_or_discount string
child_docname string
rule_applied boolean

Default: true

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

parent_id string required

The ID of the parent to list children for.

Returns

A list of pricing rule detail objects belonging to the parent.

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

Create a pricing rule detail

Creates a new pricing rule detail object.

Body parameters

idx integer
parent_id string required
parent_type string required
pricing_rule string
item_code string
margin_type string
rate_or_discount string
child_docname string
rule_applied boolean

Default: true

Returns

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

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

id string required

The identifier of the pricing rule detail to update.

Body parameters

idx integer
parent_id string
parent_type string
pricing_rule string
item_code string
margin_type string
rate_or_discount string
child_docname string
rule_applied boolean

Default: true

Returns

Returns the updated pricing rule detail object.

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

Delete a pricing rule detail

Permanently deletes a pricing rule detail. This cannot be undone.

Path parameters

id string required

The identifier of the pricing rule detail to delete.

Returns

Returns a confirmation that the pricing rule detail has been deleted.

DELETE /api/accounts/pricing-rule-detail/{id}
curl https://api.overplane.dev/api/accounts/pricing-rule-detail/pricing-rule-detail_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X DELETE
Response
{
  "id": "pricing-rule-detail_abc123",
  "deleted": true
}
POST /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.

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