The Promotional Scheme 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.

apply_on string

Default: Item Code

disable boolean

Default: false

mixed_conditions boolean

Default: false

is_cumulative 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
valid_from string
valid_upto string
company string required
currency string
The Promotional Scheme object
{
  "id": "promotional-scheme_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "apply_on": "Item Code",
  "disable": false,
  "mixed_conditions": false,
  "is_cumulative": 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",
  "valid_from": "valid_from_example",
  "valid_upto": "valid_upto_example",
  "company": "Example Corp",
  "currency": "USD"
}
GET /api/accounts/promotional-scheme/{id}

Retrieve a promotional scheme

Retrieves the details of an existing promotional scheme. Supply the unique promotional scheme ID that was returned from a previous request.

Path parameters

id string required

The identifier of the promotional scheme to retrieve.

Returns

Returns the promotional scheme object if a valid identifier was provided.

GET /api/accounts/promotional-scheme/{id}
curl https://api.overplane.dev/api/accounts/promotional-scheme/promotional-scheme_abc123 \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "id": "promotional-scheme_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "apply_on": "Item Code",
  "disable": false,
  "mixed_conditions": false,
  "is_cumulative": 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",
  "valid_from": "valid_from_example",
  "valid_upto": "valid_upto_example",
  "company": "Example Corp",
  "currency": "USD"
}
GET /api/accounts/promotional-scheme

List all promotional schemes

Returns a list of promotional schemes. 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 promotional scheme objects.

GET /api/accounts/promotional-scheme
curl https://api.overplane.dev/api/accounts/promotional-scheme \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "data": [
    {
      "id": "promotional-scheme_abc123",
      "created_at": "2024-01-15T09: 30: 00Z",
      "updated_at": "2024-01-15T09: 30: 00Z",
      "apply_on": "Item Code",
      "disable": false,
      "mixed_conditions": false,
      "is_cumulative": 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",
      "valid_from": "valid_from_example",
      "valid_upto": "valid_upto_example",
      "company": "Example Corp",
      "currency": "USD"
    }
  ],
  "has_more": false,
  "total": 1
}
POST /api/accounts/promotional-scheme

Create a promotional scheme

Creates a new promotional scheme object.

Body parameters

apply_on string

Default: Item Code

disable boolean

Default: false

mixed_conditions boolean

Default: false

is_cumulative 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
valid_from string
valid_upto string
company string required
currency string

Returns

Returns the newly created promotional scheme object if the call succeeded.

POST /api/accounts/promotional-scheme
curl https://api.overplane.dev/api/accounts/promotional-scheme \
  -H "Authorization: Bearer sk_test_..." \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"company":"Example Corp"}'
Response
{
  "id": "promotional-scheme_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "apply_on": "Item Code",
  "disable": false,
  "mixed_conditions": false,
  "is_cumulative": 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",
  "valid_from": "valid_from_example",
  "valid_upto": "valid_upto_example",
  "company": "Example Corp",
  "currency": "USD"
}
PATCH /api/accounts/promotional-scheme/{id}

Update a promotional scheme

Updates the specified promotional scheme 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 promotional scheme to update.

Body parameters

apply_on string

Default: Item Code

disable boolean

Default: false

mixed_conditions boolean

Default: false

is_cumulative 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
valid_from string
valid_upto string
company string
currency string

Returns

Returns the updated promotional scheme object.

PATCH /api/accounts/promotional-scheme/{id}
curl https://api.overplane.dev/api/accounts/promotional-scheme/promotional-scheme_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X PATCH \
  -H "Content-Type: application/json" \
  -d '{"apply_on":"Item Code","disable":false}'
Response
{
  "id": "promotional-scheme_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "apply_on": "Item Code",
  "disable": false,
  "mixed_conditions": false,
  "is_cumulative": 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",
  "valid_from": "valid_from_example",
  "valid_upto": "valid_upto_example",
  "company": "Example Corp",
  "currency": "USD"
}
DELETE /api/accounts/promotional-scheme/{id}

Delete a promotional scheme

Permanently deletes a promotional scheme. This cannot be undone.

Path parameters

id string required

The identifier of the promotional scheme to delete.

Returns

Returns a confirmation that the promotional scheme has been deleted.

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

Line items

Child objects that belong to this promotional scheme. These are accessed via the parent's ID.

Campaign Item

Attributes

idx integer
promotional_scheme_id string required
campaign string

Endpoints

GET /api/accounts/campaign-item?parent_id={id}
POST /api/accounts/campaign-item
PATCH /api/accounts/campaign-item/{id}
DELETE /api/accounts/campaign-item/{id}
POST /api/accounts/campaign-item/reorder
Campaign Item object
{
  "id": "campaign-item_abc123",
  "idx": 1,
  "promotional_scheme_id": "promotional_scheme_id_example",
  "campaign": "campaign_example"
}

Customer Group Item

Attributes

idx integer
promotional_scheme_id string required
customer_group string

Endpoints

GET /api/accounts/customer-group-item?parent_id={id}
POST /api/accounts/customer-group-item
PATCH /api/accounts/customer-group-item/{id}
DELETE /api/accounts/customer-group-item/{id}
POST /api/accounts/customer-group-item/reorder
Customer Group Item object
{
  "id": "customer-group-item_abc123",
  "idx": 1,
  "promotional_scheme_id": "promotional_scheme_id_example",
  "customer_group": "customer_group_example"
}

Customer Item

Attributes

idx integer
promotional_scheme_id string required
customer string

Endpoints

GET /api/accounts/customer-item?parent_id={id}
POST /api/accounts/customer-item
PATCH /api/accounts/customer-item/{id}
DELETE /api/accounts/customer-item/{id}
POST /api/accounts/customer-item/reorder
Customer Item object
{
  "id": "customer-item_abc123",
  "idx": 1,
  "promotional_scheme_id": "promotional_scheme_id_example",
  "customer": "customer_example"
}

Promotional Scheme Price Discount

Attributes

idx integer
promotional_scheme_id string required
disable boolean
rule_description string required
min_qty number
max_qty number
min_amount number
max_amount number
rate_or_discount string
rate number
discount_amount number
discount_percentage number
for_price_list string
warehouse string
threshold_percentage number
validate_applied_rule boolean
priority string
apply_multiple_pricing_rules boolean
apply_discount_on_rate boolean

Endpoints

GET /api/accounts/promotional-scheme-price-discount?parent_id={id}
POST /api/accounts/promotional-scheme-price-discount
PATCH /api/accounts/promotional-scheme-price-discount/{id}
DELETE /api/accounts/promotional-scheme-price-discount/{id}
POST /api/accounts/promotional-scheme-price-discount/reorder
Promotional Scheme Price Discount object
{
  "id": "promotional-scheme-price-discount_abc123",
  "idx": 1,
  "promotional_scheme_id": "promotional_scheme_id_example",
  "disable": false,
  "rule_description": "rule_description_example",
  "min_qty": 0,
  "max_qty": 0,
  "min_amount": 0,
  "max_amount": 0,
  "rate_or_discount": "Discount Percentage",
  "rate": 0,
  "discount_amount": 0,
  "discount_percentage": 0,
  "for_price_list": "for_price_list_example",
  "warehouse": "warehouse_example",
  "threshold_percentage": 0,
  "validate_applied_rule": false,
  "priority": "priority_example",
  "apply_multiple_pricing_rules": false,
  "apply_discount_on_rate": false
}

Promotional Scheme Product Discount

Attributes

idx integer
promotional_scheme_id string required
disable boolean
rule_description string required
min_qty number
max_qty number
min_amount number
max_amount number
same_item boolean
free_item string
free_qty number
free_item_uom string
free_item_rate number
warehouse string
threshold_percentage number
priority string
apply_multiple_pricing_rules boolean
is_recursive boolean
recurse_for number
apply_recursion_over number
round_free_qty boolean

Endpoints

GET /api/accounts/promotional-scheme-product-discount?parent_id={id}
POST /api/accounts/promotional-scheme-product-discount
PATCH /api/accounts/promotional-scheme-product-discount/{id}
DELETE /api/accounts/promotional-scheme-product-discount/{id}
POST /api/accounts/promotional-scheme-product-discount/reorder
Promotional Scheme Product Discount object
{
  "id": "promotional-scheme-product-discount_abc123",
  "idx": 1,
  "promotional_scheme_id": "promotional_scheme_id_example",
  "disable": false,
  "rule_description": "rule_description_example",
  "min_qty": 0,
  "max_qty": 0,
  "min_amount": 0,
  "max_amount": 0,
  "same_item": false,
  "free_item": "free_item_example",
  "free_qty": 0,
  "free_item_uom": "free_item_uom_example",
  "free_item_rate": 0,
  "warehouse": "warehouse_example",
  "threshold_percentage": 0,
  "priority": "priority_example",
  "apply_multiple_pricing_rules": false,
  "is_recursive": false,
  "recurse_for": 0,
  "apply_recursion_over": 0,
  "round_free_qty": false
}

Sales Partner Item

Attributes

idx integer
promotional_scheme_id string required
sales_partner string

Endpoints

GET /api/accounts/sales-partner-item?parent_id={id}
POST /api/accounts/sales-partner-item
PATCH /api/accounts/sales-partner-item/{id}
DELETE /api/accounts/sales-partner-item/{id}
POST /api/accounts/sales-partner-item/reorder
Sales Partner Item object
{
  "id": "sales-partner-item_abc123",
  "idx": 1,
  "promotional_scheme_id": "promotional_scheme_id_example",
  "sales_partner": "sales_partner_example"
}

Supplier Group Item

Attributes

idx integer
promotional_scheme_id string required
supplier_group string

Endpoints

GET /api/accounts/supplier-group-item?parent_id={id}
POST /api/accounts/supplier-group-item
PATCH /api/accounts/supplier-group-item/{id}
DELETE /api/accounts/supplier-group-item/{id}
POST /api/accounts/supplier-group-item/reorder
Supplier Group Item object
{
  "id": "supplier-group-item_abc123",
  "idx": 1,
  "promotional_scheme_id": "promotional_scheme_id_example",
  "supplier_group": "supplier_group_example"
}

Supplier Item

Attributes

idx integer
promotional_scheme_id string required
supplier string

Endpoints

GET /api/accounts/supplier-item?parent_id={id}
POST /api/accounts/supplier-item
PATCH /api/accounts/supplier-item/{id}
DELETE /api/accounts/supplier-item/{id}
POST /api/accounts/supplier-item/reorder
Supplier Item object
{
  "id": "supplier-item_abc123",
  "idx": 1,
  "promotional_scheme_id": "promotional_scheme_id_example",
  "supplier": "supplier_example"
}

Territory Item

Attributes

idx integer
promotional_scheme_id string required
territory string

Endpoints

GET /api/accounts/territory-item?parent_id={id}
POST /api/accounts/territory-item
PATCH /api/accounts/territory-item/{id}
DELETE /api/accounts/territory-item/{id}
POST /api/accounts/territory-item/reorder
Territory Item object
{
  "id": "territory-item_abc123",
  "idx": 1,
  "promotional_scheme_id": "promotional_scheme_id_example",
  "territory": "territory_example"
}