Skip to main content

Price Rules (2.0)

Download OpenAPI specification:Download

The Price Rules API enables you to manage price rulesets.

Refer to the changelog for the latest updates to this API.

Rulesets

Contains information about a ruleset, including a rules list, actions, conditions, product selection, and start and end dates. Use these endpoints to manage rulesets on a store.

List Rulesets

List all rulesets available for the specified shop. This requires read_price_rulesets scope/permission. For more information about querying for certain rulesets, refer to the Query and Pagination guide.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

query Parameters
external_ids
string

A list of ruleset external IDs that can be used as a filter in the search.

fields
string

List of the ruleset fields to be returned; if this parameter is empty, all the available fields will be included in the response.

page
string

Page number, considering that the results could span for several pages. Default is 1.

limit
string

Page size, considering that the results could span for several pages. Default is 50.

include_all_apps
boolean

The standard behaviour for this endpoint is to return just the rulesets that were created using the same auth token. To see all rulesets instead, this parameter should be set to true.

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "data": {
    },
  • "pagination": {
    }
}

Create Ruleset

Create a new ruleset for the specified shop. This requires write_price_rulesets scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

Request Body schema: application/json
object (BasicRuleset)

A set of rules that can apply to a defined group of products, depending on the rule conditions being met. The basic ruleset type refers to the fields that should be passed when creating or updating a ruleset.

external_id
string

If the ruleset was created by an external app, the external_id will be set as the app identifier for the ruleset.

internal_name
string

If the ruleset was created by an external app, this is the app name for the ruleset.

start_date
string or null <date-time>

Date from which the ruleset should be considered effective.

expiry_date
string or null <date-time>

Date from which the ruleset will stop being effective.

priority
number

Defines the priority of this ruleset above other rulesets that belong to the same app.

Array of objects (Rule)

Each one of the rules contained in this ruleset.

object

IDs, vendors or product titles used to filter where the ruleset applies, along with the specific platform filter type.

Responses

Request samples

Content type
application/json
{
  • "ruleset": {
    }
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "data": {
    }
}

List Rulesets for Shop

List all rulesets available for the specified shop. This requires read_price_rulesets scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

query Parameters
external_ids
string

A list of ruleset external IDs that can be used as a query filter.

product_ids
string

A list of product IDs that can be used as a query filter.

variant_ids
string

A list of product IDs or Variant IDs can be used combined as a query filter.

skus
string

A list of product SKUs can be used as a query filter.

fields
string

List of the ruleset fields to be returned; if this parameter is empty, all the available fields will be included in the response.

page
string

Page number, considering that the results could span for several pages. Default is 1.

limit
string

Page size, considering that the results could span for several pages. Default is 50.

include_all_apps
boolean

The standard behaviour for this endpoint is to return just the rulesets that were created using the same auth token. To see all rulesets instead, this parameter should be set to true.

filter_expression
string

This endpoint supports extra query columns to filter the rulesets. To use this parameter you should use like this: filter_expression:operation(column:value).

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "data": {
    },
  • "pagination": {
    }
}

Get Ruleset by ID

Return data for a specific ruleset, selected by the ruleset database ID. This requires read_price_rulesets scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

ruleset_id
required
string

Ruleset database ID.

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "data": {
    }
}

Update Ruleset by ID

Change attributes for an existent ruleset, selected by the ruleset database ID. This requires write_price_rulesets scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

ruleset_id
required
string

Ruleset database ID.

Request Body schema: application/json
object (BasicRuleset)

A set of rules that can apply to a defined group of products, depending on the rule conditions being met. The basic ruleset type refers to the fields that should be passed when creating or updating a ruleset.

external_id
string

If the ruleset was created by an external app, the external_id will be set as the app identifier for the ruleset.

internal_name
string

If the ruleset was created by an external app, this is the app name for the ruleset.

start_date
string or null <date-time>

Date from which the ruleset should be considered effective.

expiry_date
string or null <date-time>

Date from which the ruleset will stop being effective.

priority
number

Defines the priority of this ruleset above other rulesets that belong to the same app.

Array of objects (Rule)

Each one of the rules contained in this ruleset.

object

IDs, vendors or product titles used to filter where the ruleset applies, along with the specific platform filter type.

Responses

Request samples

Content type
application/json
{
  • "ruleset": {
    }
}

Response samples

Content type
application/json
{
  • "message": "Successfully updated ruleset",
  • "data": {
    }
}

Delete Ruleset by ID

Delete a ruleset, selected by the ruleset database ID. This requires write_price_rulesets scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

ruleset_id
required
string

Ruleset database ID.

Responses

Response samples

Content type
application/json
{
  • "message": "This request failed to be authenticated.",
  • "code": "00-1",
  • "type": "authentication.failed"
}

Patch Ruleset by ID

Change ruleset attributes including specified rules for an existing ruleset with the specified ruleset database ID without replacing unaffected rules. This requires write_price_rulesets scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

ruleset_id
required
string

Ruleset database ID.

Request Body schema: application/json
required
object
start_date
string <date-time>
expiry_date
string <date-time>
required
Array of objects (Rule) non-empty unique

Responses

Request samples

Content type
application/json
{
  • "ruleset": {
    }
}

Response samples

Content type
application/json
{
  • "message": "This request failed to be authenticated.",
  • "code": "00-1",
  • "type": "authentication.failed"
}

Get Ruleset by External ID

Return data for a specific ruleset, selected by the ruleset external ID. This requires read_price_rulesets scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

external_id
required
string

Ruleset external_id.

query Parameters
include_all_apps
boolean

Indicates whether to include rulesets created by other apps. Without this flag (?include_all_apps=true), only rulesets created via the Price Rules API are returned.

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "data": {
    }
}

Create Ruleset by External ID

This operation has two purposes. If the given ruleset external ID already exists in the database, the ruleset will be updated using the request body information. Otherwise, a new ruleset will be created with the same data. This requires write_price_rulesets scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

external_id
required
string

Ruleset external_id.

query Parameters
include_all_apps
boolean

Indicates whether to include rulesets created by other apps. Without this flag (?include_all_apps=true), only rulesets created via the Price Rules API are returned.

Request Body schema: application/json
object (BasicRuleset)

A set of rules that can apply to a defined group of products, depending on the rule conditions being met. The basic ruleset type refers to the fields that should be passed when creating or updating a ruleset.

external_id
string

If the ruleset was created by an external app, the external_id will be set as the app identifier for the ruleset.

internal_name
string

If the ruleset was created by an external app, this is the app name for the ruleset.

start_date
string or null <date-time>

Date from which the ruleset should be considered effective.

expiry_date
string or null <date-time>

Date from which the ruleset will stop being effective.

priority
number

Defines the priority of this ruleset above other rulesets that belong to the same app.

Array of objects (Rule)

Each one of the rules contained in this ruleset.

object

IDs, vendors or product titles used to filter where the ruleset applies, along with the specific platform filter type.

Responses

Request samples

Content type
application/json
{
  • "ruleset": {
    }
}

Response samples

Content type
application/json
{
  • "message": "Successfully updated ruleset",
  • "data": {
    }
}

Delete Ruleset by External ID

Removes a specific ruleset, selected by the ruleset external ID. This requires write_price_rulesets scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

external_id
required
string

Ruleset external_id.

query Parameters
include_all_apps
boolean

Indicates whether to include rulesets created by other apps. Without this flag (?include_all_apps=true), only rulesets created via the Price Rules API are returned.

Responses

Response samples

Content type
application/json
{
  • "message": "This request failed to be authenticated.",
  • "code": "00-1",
  • "type": "authentication.failed"
}

Patch Ruleset by External ID

Change ruleset attributes including specified rules for an existing ruleset with the specified ruleset external ID without replacing unaffected rules. This requires write_price_rulesets scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

external_id
required
string

Ruleset external_id.

query Parameters
include_all_apps
boolean

Indicates whether to include rulesets created by other apps. Without this flag (?include_all_apps=true), only rulesets created via the Price Rules API are returned.

Request Body schema: application/json
required
object
start_date
string <date-time>
expiry_date
string <date-time>
required
Array of objects (Rule) non-empty unique

Responses

Request samples

Content type
application/json
{
  • "ruleset": {
    }
}

Response samples

Content type
application/json
{
  • "message": "This request failed to be authenticated.",
  • "code": "00-1",
  • "type": "authentication.failed"
}

Activate All Rulesets

Set the status of all rulesets to active in the specified shop. This requires write_price_rulesets scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

Responses

Response samples

Content type
application/json
{
  • "message": "Successfully activated 22 rulesets",
  • "data": [ ]
}

Deactivate All Rulesets

Set the status of all rulesets to inactive in the specified shop. This requires write_price_rulesets scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

Responses

Response samples

Content type
application/json
{
  • "message": "Successfully deactivated 18 rulesets",
  • "data": [ ]
}

List Rulesets by Product ID

List all rulesets available for the specified shop and product IDs. This requires no special permissions.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

query Parameters
products
required
string

A comma separated list of all product IDs; Example: ?products=123

filter[]
string

Rule condition filter. Example: &filter[]=eq(CUSTOMER_GROUP%3Agold)&filter[]=like(CURRENCY%3ACAD)

Responses

Response samples

Content type
application/json
{
  • "message": "Successfully fetched rulesets",
  • "data": {
    }
}

Get Adjusted Cart

Return final price for lineItem in a cart. This requires read_price_rulesets scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

Request Body schema: application/json
required
Array of objects (LineItem)
matchLineItemProperty
required
string
Value: "sku"
object (Customer)

Responses

Request samples

Content type
application/json
{
  • "lineItems": [
    ],
  • "matchLineItemProperty": "sku",
  • "customer": {
    }
}

Response samples

Content type
application/json
{
  • "pre_checkout_id": "POS_123",
  • "actions": [
    ]
}

Rules

A child of the Ruleset resource. Contains information about a rule, including the type, conditions, and actions of the rule. Use these endpoints to manage the rules in a ruleset.

Bulk Delete Rules by Ruleset EID

Remove one or more existent rules from a specific Ruleset. Requires the write_price_rulesets scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

external_id
required
string
Request Body schema: application/json
rule_ids
required
Array of integers

Responses

Request samples

Content type
application/json
{
  • "rule_ids": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "Successfully removed 2 rules from ruleset with rulesetId:1"
}

Bulk Delete Rules by Ruleset ID

Remove one or more existent rules from a specific Ruleset. Requires the write_price_rulesets scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

ruleset_id
required
string
Request Body schema: application/json
rule_ids
required
Array of integers

Responses

Request samples

Content type
application/json
{
  • "rule_ids": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "Successfully removed 2 rules from ruleset with rulesetId:1"
}

Update Rule by Ruleset EID and Rule EID

Update a Rule by using the Ruleset external_id and Rule external_id.

Requires the check_write_rulesets_permission scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

external_id
required
string
rule_external_id
required
string
Request Body schema: application/json
required
object (Rule)

Comprised by one or more actions that can alter the price or the storefront in general, and a set of zero or more conditions that must be met for the rule to be applied.

type
required
string
Enum: "DISCOUNT" "DISCOUNT_CODE" "DISCOUNTABLE_ADDITION" "ADDITION" "STACKABLE_DISCOUNT" "ROUNDING" "DISPLAY" "SETTING" "BUNDLE" "REF_URL" "LINE_ITEM_PROPERTY" "CUSTOMER_PROVINCE" "CUSTOMER_GROUP" "QTY_BY_MIX_AND_MATCH" "QTY_BY_PRODUCT" "QTY_BY_VARIANT" "QTY_BY_LINE" "SUBSCRIPTION_GROUP" "SUBSCRIPTION_INTERVAL"

The rule type defines how the rule is applied in parallel with other rules, and also how it should behave.

Array of any

One or more conditions that need to be matched for the rule to apply.

Array of any non-empty
meta
object
external_id
string
priority
number

Defines the priority of a Rule, 0 is default and highest

stack_order
number
id
number

Responses

Request samples

Content type
application/json
{
  • "rule": {
    }
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "data": {
    }
}

Bulk Add Rules by Ruleset EID

Bulk add Rules to a Ruleset.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
external_id
required
string
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

Request Body schema: application/json
required
Array of objects (Rule)
Array
type
required
string
Enum: "DISCOUNT" "DISCOUNT_CODE" "DISCOUNTABLE_ADDITION" "ADDITION" "STACKABLE_DISCOUNT" "ROUNDING" "DISPLAY" "SETTING" "BUNDLE" "REF_URL" "LINE_ITEM_PROPERTY" "CUSTOMER_PROVINCE" "CUSTOMER_GROUP" "QTY_BY_MIX_AND_MATCH" "QTY_BY_PRODUCT" "QTY_BY_VARIANT" "QTY_BY_LINE" "SUBSCRIPTION_GROUP" "SUBSCRIPTION_INTERVAL"

The rule type defines how the rule is applied in parallel with other rules, and also how it should behave.

Array of any

One or more conditions that need to be matched for the rule to apply.

Array of any non-empty
meta
object
external_id
string
priority
number

Defines the priority of a Rule, 0 is default and highest

stack_order
number
id
number

Responses

Request samples

Content type
application/json
{
  • "rules": [
    ]
}

Update Rule by Ruleset ID and Rule ID

Update a Rule by using the Ruleset id and Rule id.

Requires the check_write_rulesets_permission scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

ruleset_id
required
string
rule_id
required
string
Request Body schema: application/json
required
object (Rule)

Comprised by one or more actions that can alter the price or the storefront in general, and a set of zero or more conditions that must be met for the rule to be applied.

type
required
string
Enum: "DISCOUNT" "DISCOUNT_CODE" "DISCOUNTABLE_ADDITION" "ADDITION" "STACKABLE_DISCOUNT" "ROUNDING" "DISPLAY" "SETTING" "BUNDLE" "REF_URL" "LINE_ITEM_PROPERTY" "CUSTOMER_PROVINCE" "CUSTOMER_GROUP" "QTY_BY_MIX_AND_MATCH" "QTY_BY_PRODUCT" "QTY_BY_VARIANT" "QTY_BY_LINE" "SUBSCRIPTION_GROUP" "SUBSCRIPTION_INTERVAL"

The rule type defines how the rule is applied in parallel with other rules, and also how it should behave.

Array of any

One or more conditions that need to be matched for the rule to apply.

Array of any non-empty
meta
object
external_id
string
priority
number

Defines the priority of a Rule, 0 is default and highest

stack_order
number
id
number

Responses

Request samples

Content type
application/json
{
  • "rule": {
    }
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "data": {
    }
}

Remove Rule by Ruleset ID and Rule ID

Remove one rule from a specific Ruleset. Requires the write_price_rulesets scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

ruleset_id
required
string
rule_id
required
string

Responses

Response samples

Content type
application/json
{
  • "code": "string",
  • "message": "string",
  • "type": "string"
}

Update Rule by Ruleset EID and Rule ID

Update a Rule by using the Ruleset external_id and Rule id.

Requires the check_write_rulesets_permission scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

external_id
required
string
rule_id
required
string
Request Body schema: application/json
required
object (Rule)

Comprised by one or more actions that can alter the price or the storefront in general, and a set of zero or more conditions that must be met for the rule to be applied.

type
required
string
Enum: "DISCOUNT" "DISCOUNT_CODE" "DISCOUNTABLE_ADDITION" "ADDITION" "STACKABLE_DISCOUNT" "ROUNDING" "DISPLAY" "SETTING" "BUNDLE" "REF_URL" "LINE_ITEM_PROPERTY" "CUSTOMER_PROVINCE" "CUSTOMER_GROUP" "QTY_BY_MIX_AND_MATCH" "QTY_BY_PRODUCT" "QTY_BY_VARIANT" "QTY_BY_LINE" "SUBSCRIPTION_GROUP" "SUBSCRIPTION_INTERVAL"

The rule type defines how the rule is applied in parallel with other rules, and also how it should behave.

Array of any

One or more conditions that need to be matched for the rule to apply.

Array of any non-empty
meta
object
external_id
string
priority
number

Defines the priority of a Rule, 0 is default and highest

stack_order
number
id
number

Responses

Request samples

Content type
application/json
{
  • "rule": {
    }
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "data": {
    }
}

Delete Rule from Ruleset by Ruleset EID and Rule ID

Remove one rule from a specific Ruleset. Requires the write_price_rulesets scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

external_id
required
string
rule_id
required
string

Responses

Response samples

Content type
application/json
{
  • "code": "string",
  • "message": "string",
  • "type": "string"
}

Update Rule by Ruleset ID and Rule EID

Update a Rule by using the Ruleset id and Rule external_id.

Requires the check_write_rulesets_permission scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

ruleset_id
required
string
rule_external_id
required
string
Request Body schema: application/json
required
object (Rule)

Comprised by one or more actions that can alter the price or the storefront in general, and a set of zero or more conditions that must be met for the rule to be applied.

type
required
string
Enum: "DISCOUNT" "DISCOUNT_CODE" "DISCOUNTABLE_ADDITION" "ADDITION" "STACKABLE_DISCOUNT" "ROUNDING" "DISPLAY" "SETTING" "BUNDLE" "REF_URL" "LINE_ITEM_PROPERTY" "CUSTOMER_PROVINCE" "CUSTOMER_GROUP" "QTY_BY_MIX_AND_MATCH" "QTY_BY_PRODUCT" "QTY_BY_VARIANT" "QTY_BY_LINE" "SUBSCRIPTION_GROUP" "SUBSCRIPTION_INTERVAL"

The rule type defines how the rule is applied in parallel with other rules, and also how it should behave.

Array of any

One or more conditions that need to be matched for the rule to apply.

Array of any non-empty
meta
object
external_id
string
priority
number

Defines the priority of a Rule, 0 is default and highest

stack_order
number
id
number

Responses

Request samples

Content type
application/json
{
  • "rule": {
    }
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "data": {
    }
}

Bulk Add Rules by Ruleset ID

Bulk add Rules to a Ruleset.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

ruleset_id
required
string
Request Body schema: application/json
required
Array of objects (Rule) non-empty
Array (non-empty)
type
required
string
Enum: "DISCOUNT" "DISCOUNT_CODE" "DISCOUNTABLE_ADDITION" "ADDITION" "STACKABLE_DISCOUNT" "ROUNDING" "DISPLAY" "SETTING" "BUNDLE" "REF_URL" "LINE_ITEM_PROPERTY" "CUSTOMER_PROVINCE" "CUSTOMER_GROUP" "QTY_BY_MIX_AND_MATCH" "QTY_BY_PRODUCT" "QTY_BY_VARIANT" "QTY_BY_LINE" "SUBSCRIPTION_GROUP" "SUBSCRIPTION_INTERVAL"

The rule type defines how the rule is applied in parallel with other rules, and also how it should behave.

Array of any

One or more conditions that need to be matched for the rule to apply.

Array of any non-empty
meta
object
external_id
string
priority
number

Defines the priority of a Rule, 0 is default and highest

stack_order
number
id
number

Responses

Request samples

Content type
application/json
{
  • "rules": [
    ]
}

List Rules by Ruleset ID

Returns all rules in a ruleset in a paginated format.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

ruleset_id
required
string
query Parameters
page
string

Page number, considering that the results could span for several pages. Default is 1.

limit
string

Page size, considering that the results could span for several pages. Default is 50.

Responses

Response samples

Content type
application/json
{
  • "message": "Successfully fetched rules",
  • "data": [
    ],
  • "pagination": {
    }
}

List Rules by Ruleset External ID

Returns all rules in a ruleset in a paginated format.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

external_id
required
string
query Parameters
page
string

Page number, considering that the results could span for several pages. Default is 1.

limit
string

Page size, considering that the results could span for several pages. Default is 50.

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "data": { },
  • "pagination": {
    }
}

Order Conditions

Child of the Ruleset resource. Contains information about the criteria for triggering actions in a ruleset. Conditions are usually a type:value pair. Use these endpoints to manage the conditions in a ruleset.

List Order Conditions

List all Order Conditions available for the specified shop. Requires the read_price_order_conditions scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

query Parameters
deep
string

If this flag is true, all the details of the Order Condition will be included in the response. Otherwise, only basic information (name, value, etc.) will be returned.

page
integer

The desired page number for the paginated result (default is 1).

limit
integer

Size of the page to be used for the paginated result (default is 50).

Responses

Response samples

Content type
application/json
{
  • "message": "Successfully fetched order conditions",
  • "data": {
    },
  • "pagination": {
    }
}

Create Order Condition

Creates an Order Condition. Requires the write_price_order_conditions scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

Request Body schema: application/json
name
required
string

The name of the Order Condition.

value
required
string

The value of the Order Condition.

operator
required
string (Operator)

Defines the relationship of the Order Condition. Eg 'ONE_OF'.

type
required
string

Specifies the type the operator must match with for this condition. Eg. "operator: 'ONE_OF'", "type:'FIELD_SET`" means that this condition applies if one field_set matches.

Array of objects (FieldSet)

All the different combinations of fields and values that match the Order Condition. For example, all the sets of country + city + postal code that are included in the 'DELIVERY_ZONE: NorthAmerica' condition.

Responses

Request samples

Content type
application/json
{
  • "name": "zone",
  • "value": "north-america-05",
  • "operator": "ONE_OF",
  • "type": "FIELD_SET",
  • "field_sets": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "data": {
    }
}

Get Order Condition

Gets an Order Condition by its name and value. Requires the read_price_order_conditions scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

condition_name
required
string

Name of the condition. This can be used to group similar options that depend on the same piece of data. For example, it is possible to have several Order Conditions with the same name (DELIVERY_ZONE) and different values (NorthAmerica, Europe) that evaluate the same fields (country, city and postal code).

condition_value
required
string

Value of the condition. This describes an option available for a collection of conditions that share the same name. Discounts will be applied based on the presence of a specific "name:value" pair. It is possible to have several Order Conditions with identical names (DELIVERY_ZONE) and different values/options (NorthAmerica, Europe) as long as they evaluate the same fields (country, city and postal code).

Responses

Response samples

Content type
application/json
{
  • "message": "Successfully fetched order condition",
  • "data": {
    }
}

Delete Order Condition by Name and Value

Delete an Order Condition by condition_name and condition_value. Requires the write_price_order_conditions scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

condition_name
required
string

Name of the condition. This can be used to group similar options that depend on the same piece of data. For example, it is possible to have several Order Conditions with the same name (DELIVERY_ZONE) and different values (NorthAmerica, Europe) that evaluate the same fields (country, city and postal code).

condition_value
required
string

Value of the condition. This describes an option available for a collection of conditions that share the same name. Discounts will be applied based on the presence of a specific "name:value" pair. It is possible to have several Order Conditions with identical names (DELIVERY_ZONE) and different values/options (NorthAmerica, Europe) as long as they evaluate the same fields (country, city and postal code).

Responses

Response samples

Content type
application/json
{
  • "code": "string",
  • "message": "string",
  • "type": "string"
}

Update Order Condition

Updates an Order Condition. Requires the write_price_order_conditions scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

condition_name
required
string

Name of the condition. This can be used to group similar options that depend on the same piece of data. For example, it is possible to have several Order Conditions with the same name (DELIVERY_ZONE) and different values (NorthAmerica, Europe) that evaluate the same fields (country, city and postal code).

condition_value
required
string

Value of the condition. This describes an option available for a collection of conditions that share the same name. Discounts will be applied based on the presence of a specific "name:value" pair. It is possible to have several Order Conditions with identical names (DELIVERY_ZONE) and different values/options (NorthAmerica, Europe) as long as they evaluate the same fields (country, city and postal code).

Request Body schema: application/json
name
required
string

The name of the Order Condition.

value
required
string

The value of the Order Condition.

operator
required
string (Operator)

Defines the relationship of the Order Condition. Eg 'ONE_OF'.

type
required
string

Specifies the type the operator must match with for this condition. Eg. "operator: 'ONE_OF'", "type:'FIELD_SET`" means that this condition applies if one field_set matches.

Array of objects (FieldSet)

All the different combinations of fields and values that match the Order Condition. For example, all the sets of country + city + postal code that are included in the 'DELIVERY_ZONE: NorthAmerica' condition.

Responses

Request samples

Content type
application/json
{
  • "name": "ZONE",
  • "value": "north-america-01",
  • "operator": "ONE_OF",
  • "type": "FIELD_SET",
  • "field_sets": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "Successfully updated order condition",
  • "data": {
    }
}

List Valid Fields for Order Condition

Gets a list of all the shop/customer fields that can be evaluated in an Order Condition. Requires the read_price_order_conditions scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

Responses

Response samples

Content type
application/json
{
  • "message": "Successfully fetched valid field names",
  • "data": {
    }
}

Delete Order Condition by Name

Delete a collection of Order Conditions that share the same name, for example all the DELIVERY_ZONE Order Conditions regardless of their values (NorthAmerica, Europe, etc.). Requires the write_price_order_conditions scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

condition_name
required
string

The name and value of an Order Condition are a combination that uniquely identifies that condition.

query Parameters
condition_name
required
string

Name of the condition.

Responses

Response samples

Content type
application/json
{
  • "code": "string",
  • "message": "string",
  • "type": "string"
}

Delete Order Condition Field by Name

Delete a field from all the Order Conditions that share the same name. For example, if a list of DELIVERY_ZONE conditions were evaluating both city and postal code before, and now they should check the postal code only, then the irrelevant field (city) can be erased by this operation. Requires the write_price_order_conditions scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

condition_name
required
string

The name and value of an Order Condition are a combination that uniquely identifies that condition.

field_name
required
string

Field that should be deleted, for example "customer.shipping.province".

Responses

Response samples

Content type
application/json
{
  • "code": "string",
  • "message": "string",
  • "type": "string"
}

Add Field Sets to Order Condition

Adds one or more new Field Sets to a specific Order Condition. Requires the write_price_order_conditions scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

Request Body schema: application/json
name
string

The name and value of an Order Condition are a combination that uniquely identifies that condition.

value
string

The name and value of an Order Condition are a combination that uniquely identifies that condition.

Array of objects (FieldSet)

Field sets to be added.

Responses

Request samples

Content type
application/json
{
  • "name": "ZONE",
  • "value": "north-america-05",
  • "field_sets": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "Successfully added field set(s) to order condition",
  • "data": {
    }
}

Delete Field Sets from Order Condition

Remove one or more existent Field Sets from a specific Order Condition. Requires the write_price_order_conditions scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

Request Body schema: application/json
name
string

The name and value of an Order Condition are a combination that uniquely identifies that condition.

value
string

The name and value of an Order Condition are a combination that uniquely identifies that condition.

field_set_ids
Array of any

List containing the ids of each Field Set that should be removed.

Responses

Request samples

Content type
application/json
{
  • "name": "ZONE",
  • "value": "north-america-05",
  • "field_set_ids": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "Successfully removed 3 field set(s) from order condition",
  • "data": {
    }
}

List Matching Field Sets for Order Condition

Gets all the sets of fields that are valid/that comply with an Order Condition. An Order Condition can be matched by different sets of data, for example 'DELIVERY_ZONE: NorthAmerica' could include a lot of possible country + postal code combinations. Requires the read_price_order_conditions scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

condition_name
required
string

Name of the condition. This can be used to group similar options that depend on the same piece of data. For example, it is possible to have several Order Conditions with the same name (DELIVERY_ZONE) and different values (NorthAmerica, Europe) that evaluate the same fields (country, city and postal code).

condition_value
required
string

Value of the condition. This describes an option available for a collection of conditions that share the same name. Discounts will be applied based on the presence of a specific "name:value" pair. It is possible to have several Order Conditions with the identical names (DELIVERY_ZONE) and different values/options (NorthAmerica, Europe) as long as they evaluate the same fields (country, city and postal code).

query Parameters
page
string

The desired page number for the paginated result (default is 1).

limit
string

Size of the page to be used for the paginated result (default is 50).

Responses

Response samples

Content type
application/json
{
  • "message": "Successfully fetched matched field sets for order condition",
  • "data": {
    },
  • "pagination": {
    }
}

Validate Order Condition Group

This endpoint can be used to check internal inconsistencies between an Order Condition group (a set of conditions that share the same condition_name). All Order Conditions that share a name should evaluate the same fields.

For example: If a shop has a condition "name: zone, value: north-america-05" that contains several combinations of country and postal code on its field sets, when a new condition "name: zone, value: europe-01" is created on the same shop it should also use country and postal code to define its field sets.

Requires the read_price_order_conditions scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

condition_name
required
string

Name of the condition. This can be used to group similar options that depend on the same piece of data. For example, it is possible to have several Order Conditions with the same name (DELIVERY_ZONE) and different values (NorthAmerica, Europe) that evaluate the same fields (country, city and postal code).

Responses

Response samples

Content type
application/json
{
  • "message": "Order condition 'ZONE: North-America-05' has one or more field sets that are missing field(s). Order condition 'ZONE: North-America-10' has one or more field sets that contain unexpected fields. Order condition 'ZONE: Europe-07' has one or more field sets that are missing field(s). Expected fields for the 'ZONE' group are: [customer.shipping.country, customer.shipping.postal_code]",
  • "data": [ ]
}

List Eligible Order Conditions for Shop

Tests order conditions against shop and customer data, and returns the condition names and values that match. Requires no special permissions/scopes.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_domain
required
string
Request Body schema: application/json
object (OrderConditionCustomerSchema)
object (CustomerShippingSchema)
postal_code
string
country
string
country_code
string
province
string
province_code
string

Responses

Request samples

Content type
application/json
{
  • "customer": {
    }
}

Response samples

Content type
application/json
{
  • "message": "Successfully applied order condition to shop",
  • "data": {
    }
}

Discount Codes

Contains information about a discount on your store and the products that are eligible for it. Use these endpoints to manipulate the discount codes available on your store.

Create Discount Code

Create one or more discount codes for the specified shop. This requires write_discount_codes scope/permission. Bold automatically assigns a DISCOUNT_CODE rule condition type to every discount code created.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

Request Body schema: application/json

Initial data needed to configure the new discount code(s).

required
object (CreateDiscountCode)

Payload to create one or more discount codes from scratch.

codes
required
Array of strings

List of discount code names that should be created sharing this same configuration.

Array of ConditionCartSubtotalMin (object) or ConditionShippingRateRange (object) or ConditionQtyOnCart (object) or ConditionCustomerInAnyGroupFromList (object) or ConditionCustomerCountry (object) or ConditionBuyXGetYDiscountCode (object)

Extra requirements for the discount code to be considered eligible. This is an optional field.

required
ActionPriceAdjustRelative (object) or ActionPriceAdjustPercent (object) or ActionFreeShipping (object) or ActionShippingAdjustRelative (object) or ActionShippingAdjustPercent (object) or ActionCartAdjustRelative (object) or ActionCartAdjustPercent (object)
required
DiscountCodeProductSelection (object) or DiscountCodeVariantSelection (object) or DiscountCodeAllSelection (object) or DiscountCodeCollectionSelection (object) or DiscountCodeSKUSelection (object)
start_date
string <date-time>

Date from which the discount code should be considered valid (optional).

expiry_date
string <date-time>

Date from which the discount code should be considered expired/invalid (optional).

restrict_by_emails
Array of strings <= 50 items

This optional field can be used to make the discount code valid only for certain customers (defined by their email addresses).

Array of objects (UsageLimit)

If a discount code can be used only a limited amount of times (per customer, or in the entire shop) those optional limits can be defined here.

object (DiscountCodeRawProductSelection)
object (DiscountCodeRawProductSelection)

Responses

Request samples

Content type
application/json
{
  • "discount_code": {
    }
}

Response samples

Content type
application/json
{
  • "message": "Discount code(s) created successfully!",
  • "data": {
    }
}

List Discount Codes

List all discount codes available for the specified shop. Requires the read_discount_codes scope/permission. Bold automatically assigns a DISCOUNT_CODE rule condition type to every discount code created.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

query Parameters
page
integer

The desired page number for the paginated result (default is 1).

limit
integer

Size of the page to be used for the paginated result (default is 50).

status
string
Enum: "ACTIVE" "SCHEDULED" "EXPIRED"

Filter the results based on status

name
string

The name of the discount code

Responses

Response samples

Content type
application/json
{
  • "message": "Successfully fetched discount codes",
  • "data": {
    },
  • "pagination": {
    }
}

Update Discount Code

Update an existing discount code available for the specified shop. This requires write_discount_codes scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

discount_code_id
required
integer

The discount code unique identifier in the database

Request Body schema: application/json

Target values for the discount code after update; all fields should be passed, fields that are not intended to change should contain their current values.

required
object (UpdateDiscountCode)

Payload to update an existing discount code.

code
string

The discount code name (to be used during checkout). When updating, you don't need to provide the code unless you are changing it.

Array of ConditionCartSubtotalMin (object) or ConditionShippingRateRange (object) or ConditionQtyOnCart (object) or ConditionCustomerInAnyGroupFromList (object) or ConditionCustomerCountry (object) or ConditionBuyXGetYDiscountCode (object)

Extra requirements for the discount code to be considered eligible. This is an optional field.

required
ActionPriceAdjustRelative (object) or ActionPriceAdjustPercent (object) or ActionFreeShipping (object) or ActionShippingAdjustRelative (object) or ActionShippingAdjustPercent (object) or ActionCartAdjustRelative (object) or ActionCartAdjustPercent (object)
object (UsageLimit)

If a discount code has usage limits, this object will describe those limits.

required
DiscountCodeProductSelection (object) or DiscountCodeVariantSelection (object) or DiscountCodeAllSelection (object) or DiscountCodeCollectionSelection (object) or DiscountCodeSKUSelection (object)
start_date
string <date-time>

Date from which the discount code should be considered valid (optional).

expiry_date
string <date-time>

Date from which the discount code should be considered expired/invalid (optional).

restrict_by_emails
Array of strings <= 50 items

This optional field can be used to make the discount code valid only for certain customers (defined by their email addresses).

Array of objects (UsageLimit)

If a discount code can be used only a limited amount of times (per customer, or in the entire shop) those optional limits can be defined here.

object (DiscountCodeRawProductSelection)
object (DiscountCodeRawProductSelection)

Responses

Request samples

Content type
application/json
{
  • "discount_code": {
    }
}

Response samples

Content type
application/json
{
  • "message": "Discount code updated successfully!",
  • "data": {
    }
}

Get Discount Code by ID

Return data for a specific discount code, selected by the discount code ID. This requires read_discount_codes scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

discount_code_id
required
integer

The discount code unique identifier in the database

Responses

Response samples

Content type
application/json
{
  • "message": "Successfully fetched discount code by id",
  • "data": {
    }
}

Delete Discount Code

Remove an existing discount code available for the specified shop. This requires write_discount_codes scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

discount_code_id
required
integer

The discount code unique identifier in the database

Responses

Response samples

Content type
application/json
{
  • "code": "string",
  • "message": "string",
  • "type": "string"
}

Get Discount Code by Ruleset ID

Return data for a specific discount code, selected by the related ruleset ID. This requires read_discount_codes scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

ruleset_id
required
string

The database ID for the ruleset that describes the discount code behaviour.

Responses

Response samples

Content type
application/json
{
  • "message": "Successfully fetched discount code for ruleset",
  • "data": {
    }
}

Activate Discount Code

Updates the start_date to be now(), and will update the expiry_date if it is in the past. Returns the data for the updated discount code. This requires write_discount_codes scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

discount_code_id
required
string

Responses

Response samples

Content type
application/json
{
  • "message": "Successfully activated discount code",
  • "data": {
    }
}

Deactivate Discount Code

Updates the expiry_date to be now(). Returns the data for the updated discount code. This requires write_discount_codes scope/permission.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

discount_code_id
required
string

Responses

Response samples

Content type
application/json
{
  • "message": "Successfully deactivated discount code",
  • "data": {
    }
}

Storefronts

Use these endpoints to get the final price for a product or cart after all rules have been applied.

Get Final Price for Product

Return the final price for item. This requires no special permissions.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

Request Body schema: application/json
required
Array of objects (BestProductPriceItem)
cart_params
object

Supply optional parameters, such as orderData and source

lineItemIdType
required
string
Value: "sku"
object (TaggedCustomer)

Responses

Request samples

Content type
application/json
{
  • "lineItemIdType": "sku",
  • "items": [
    ],
  • "cart_params": { },
  • "customer": {
    }
}

Response samples

Content type
application/json
{
  • "pre_best_price_log_id": "string",
  • "actions": [
    ]
}

Get Currency Symbol for Currency Code

Get Currency information from a currency code (ie. USD, CAD, GDP). Can be obtained through: https://www.iban.com/currency-codes

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
currency_name
required
string

Currency Code (ie. USD, CAD, GDP). Can be optained through: https://www.iban.com/currency-codes

Responses

Response samples

Content type
application/json
{
  • "id": 181,
  • "currency_iso_name": "CAD",
  • "friendly_name": "Canadian Dollar",
  • "currency_symbol": "$",
  • "money_format": "${{amount}}",
  • "money_with_currency_format": "${{amount}} CAD"
}

Get Best Price for Cart

Return final price for lineItem in a cart. This requires no special permissions.

Authorizations:
OAuthTokenAPIAccessToken
path Parameters
shop_identifier
required
string

Bold platform identifier for the shop. Find this identifier using the Get Shop Info endpoint.

Request Body schema: application/json
required
Array of objects (LineItem)
lineItemIdType
required
string
Value: "sku"
object (TaggedCustomer)

Responses

Request samples

Content type
application/json
{
  • "lineItems": [
    ],
  • "lineItemIdType": "sku",
  • "customer": {}
}

Response samples

Content type
application/json
{
  • "pre_checkout_id": "POS_123",
  • "actions": [
    ]
}

Simple Communication Test

Simple Communication Test

Test endpoint to ensure that the request contains a valid token and that it is successfully reaching Price Rules API. This requires no special permissions.

Authorizations:
OAuthTokenAPIAccessToken

Responses

Response samples

Content type
application/json
{
  • "message": "Successfully reached Price Rules API",
  • "data": {
    }
}