Skip to content

Public API v2: Custom Pricing

Special prices for groups of customers: a discount, an increase or a fixed price on chosen products, optionally per market and on a schedule.

Scopes custom-pricing:read, custom-pricing:write
Plan Plans with Custom Pricing; otherwise 403
Takes effect Saved in the app; reaches the storefront at the next upload.

Every response has the same envelope (success, status, data, meta; see Responses). Returns below describes data. The examples are real calls; the rules were created disabled.

  • market_ids takes region markets only.
  • On the Free plan a store has one Custom Pricing rule at most, bulk-upsert included.
  • POST /rules/{id}/product-conditions/bulk-delete removes products from the rule: send the one list that matches its product_condition_type, up to 250 entries. Entries not in the rule are skipped.
  • On a rule with product_condition_type: all, product-conditions/bulk-delete answers 422: there is no list to remove from.
  • Prices reach the storefront and checkout at the next upload.

What every read returns. Lists come back as [] when empty, never null.

idstringread-only

Rule id.

namestring

Rule name.

priorityinteger

Lower number wins; see Rules.

statusenum

disabled rules are kept but not applied. One of disabled, enabled.

CustomersCommon object

Who gets the rule.

Show fields

apply_toenum

all everyone, logged in or not · logged_in any logged-in customer · non_logged_in visitors who are not logged in · customer_ids the listed customers · customer_tags customers with any of the tags · company_location the listed B2B company locations. Accepted here: all, logged_in, non_logged_in, customer_ids, customer_tags, company_location.

customer_ids[string]

Used when apply_to is customer_ids; required and not empty then.

customer_tags[string]

Used when apply_to is customer_tags; required and not empty then.

company_location_ids[string]

Used when apply_to is company_location; required and not empty then.

exclude_fromenum

none (default) · customer_tags · customer_ids · company_location. Excluded customers stay out even when apply_to includes them. Accepted here: none, customer_tags, customer_ids, company_location.

exc_customer_tags[string]

Used when exclude_from is customer_tags.

exc_customers[string]

Used when exclude_from is customer_ids.

exc_company_location_ids[string]

Used when exclude_from is company_location.

ProductsCommon object

Which products the rule covers.

Show fields

product_condition_typeenum

all every product · by_ids · by_collections · by_tags · by_variants. Accepted here: all, by_ids, by_collections, by_tags, by_variants.

product_ids[string]

Used when the type is by_ids; required and not empty then.

product_collections[string]

Used when the type is by_collections; required and not empty then.

product_tags[string]

Used when the type is by_tags; required and not empty then.

variant_ids[string]

Used when the type is by_variants; required and not empty then.

exc_product_typeenum

none (default) or one of the types above: these products are left out. Accepted here: none, by_ids, by_collections, by_tags, by_variants.

exc_specific_products[string]

Used when exc_product_type is by_ids.

exc_product_collections[string]

Used when exc_product_type is by_collections.

exc_product_tags[string]

Used when exc_product_type is by_tags.

exc_product_variants[string]

Used when exc_product_type is by_variants.

MarketsCommon object

Which markets the rule covers.

Show fields

market_condition_typeenum

all (default) every market · by_ids the listed markets. Accepted here: all, by_ids.

market_ids[string]

Shopify market ids.

discount_typeenum

One of apply_fixed, decrease_fixed, decrease_percentage, apply_increased_fixed, increase_fixed, increase_percentage, set_fixed_price.

discount_valuestring

ScheduleCommon object

When the rule applies.

Show fields

start_atstring

UTC date and time ending in Z; null or left out: starts at once.

end_atstring

After start_at; null or left out: never ends.

created_atstring or nullread-only

UTC, ending in Z.

updated_atstring or nullread-only

UTC, ending in Z.

The rule object
{
"id": "90718",
"name": "VIP 10%",
"priority": 1,
"status": "disabled",
"apply_to": "customer_tags",
"customer_ids": [],
"customer_tags": [
"vip"
],
"company_location_ids": [],
"exclude_from": "none",
"exc_customer_tags": [],
"exc_customers": [],
"exc_company_location_ids": [],
"product_condition_type": "by_collections",
"product_ids": [],
"product_collections": [
"482901234567"
],
"product_tags": [],
"variant_ids": [],
"exc_product_type": "none",
"exc_specific_products": [],
"exc_product_collections": [],
"exc_product_tags": [],
"exc_product_variants": [],
"market_condition_type": "all",
"market_ids": [],
"discount_type": "decrease_percentage",
"discount_value": "10.00",
"start_at": "2026-10-31T17:00:00.000Z",
"end_at": null,
"created_at": "2026-10-21T09:32:48.000Z",
"updated_at": "2026-10-21T09:32:48.000Z"
}

List rules

GET/api/v2/custom-pricing/rules

Scope custom-pricing:readCost 10

List rules, newest first.

limitinteger

1–250, default 50. See Paging.

cursorstring

next_cursor or prev_cursor of the last page; leave out for the first page. Keep the same filters on every page.

filter_statusenum

One of disabled, enabled.

filter_namestring

Part of the name, any case. 1–200 characters.

data[Rule]

The rules of this page; [] when there are none.

meta.paginationobject

limit, next_cursor, prev_cursor and links to the next and previous pages.

cURL
curl -X GET "https://solution-public-api.bss-b2b.solutions/api/v2/custom-pricing/rules?limit=2&filter_name=VIP" \
-H "X-API-Key: $B2B_API_KEY" \
-H "X-Shop-Domain: your-store.myshopify.com"

Create a rule

POST/api/v2/custom-pricing/rules

Scope custom-pricing:writeCost 11

Create a rule.

The body of POST /rules, PUT /rules/{id} and each element of bulk-upsert (add id to replace a rule). PUT replaces the whole rule: optional fields left out go back to their defaults. Fields not listed here are refused with 422.

namestringrequired

Rule name. 1–200 characters.

priorityintegerrequired

Lower number wins; see Rules. 0–99.

statusenumrequired

disabled rules are kept but not applied. One of disabled, enabled.

CustomersCommon objectrequired

Who gets the rule.

Show fields

apply_toenum

all everyone, logged in or not · logged_in any logged-in customer · non_logged_in visitors who are not logged in · customer_ids the listed customers · customer_tags customers with any of the tags · company_location the listed B2B company locations. Accepted here: all, logged_in, non_logged_in, customer_ids, customer_tags, company_location.

customer_ids[string]

Used when apply_to is customer_ids; required and not empty then.

customer_tags[string]

Used when apply_to is customer_tags; required and not empty then.

company_location_ids[string]

Used when apply_to is company_location; required and not empty then.

exclude_fromenum

none (default) · customer_tags · customer_ids · company_location. Excluded customers stay out even when apply_to includes them. Accepted here: none, customer_tags, customer_ids, company_location.

exc_customer_tags[string]

Used when exclude_from is customer_tags.

exc_customers[string]

Used when exclude_from is customer_ids.

exc_company_location_ids[string]

Used when exclude_from is company_location.

ProductsCommon objectrequired

Which products the rule covers.

Show fields

product_condition_typeenum

all every product · by_ids · by_collections · by_tags · by_variants. Accepted here: all, by_ids, by_collections, by_tags, by_variants.

product_ids[string]

Used when the type is by_ids; required and not empty then.

product_collections[string]

Used when the type is by_collections; required and not empty then.

product_tags[string]

Used when the type is by_tags; required and not empty then.

variant_ids[string]

Used when the type is by_variants; required and not empty then.

exc_product_typeenum

none (default) or one of the types above: these products are left out. Accepted here: none, by_ids, by_collections, by_tags, by_variants.

exc_specific_products[string]

Used when exc_product_type is by_ids.

exc_product_collections[string]

Used when exc_product_type is by_collections.

exc_product_tags[string]

Used when exc_product_type is by_tags.

exc_product_variants[string]

Used when exc_product_type is by_variants.

MarketsCommon object

Which markets the rule covers.

Show fields

market_condition_typeenum

all (default) every market · by_ids the listed markets. Accepted here: all, by_ids.

market_ids[string]

Shopify market ids.

discount_typeenumrequired

  • apply_fixed: Apply a decreasing price: the price becomes the value where that is lower than the current price; higher, the price stays.
  • decrease_fixed: Take a fixed amount off the price.
  • decrease_percentage: Take a percentage off the price (at most 100).
  • apply_increased_fixed: Apply an increasing price: the price becomes the value.
  • increase_fixed: Add a fixed amount to the price.
  • increase_percentage: Add a percentage to the price.
  • set_fixed_price: Set a fixed price; lowers prices only — products already at or below the value keep their price. Must be greater than 0.

discount_valuestringrequired

Decimal string, up to 2 decimals.

ScheduleCommon object

When the rule applies.

Show fields

start_atstring

UTC date and time ending in Z; null or left out: starts at once.

end_atstring

After start_at; null or left out: never ends.

dataRule

The new rule.

cURL
curl -X POST "https://solution-public-api.bss-b2b.solutions/api/v2/custom-pricing/rules" \
-H "X-API-Key: $B2B_API_KEY" \
-H "X-Shop-Domain: your-store.myshopify.com" \
-H "Content-Type: application/json" \
-d '{
"name": "VIP 10%",
"priority": 1,
"status": "disabled",
"apply_to": "customer_tags",
"customer_tags": [
"vip"
],
"product_condition_type": "by_collections",
"product_collections": [
"482901234567"
],
"discount_type": "decrease_percentage",
"discount_value": "10",
"start_at": "2026-10-31T17:00:00Z",
"end_at": null
}'

Get a rule

GET/api/v2/custom-pricing/rules/{id}

Scope custom-pricing:readCost 10

Get a rule.

idstringrequired

Rule id.

dataRule

The rule. An id that does not exist answers 404 RESOURCE_NOT_FOUND.

cURL
curl -X GET "https://solution-public-api.bss-b2b.solutions/api/v2/custom-pricing/rules/90718" \
-H "X-API-Key: $B2B_API_KEY" \
-H "X-Shop-Domain: your-store.myshopify.com"

Replace a rule

PUT/api/v2/custom-pricing/rules/{id}

Scope custom-pricing:writeCost 11

Replace a rule; optional fields left out go back to their defaults.

idstringrequired

Rule id.

The same fields as Create a rule.

dataRule

The rule after the change.

cURL
curl -X PUT "https://solution-public-api.bss-b2b.solutions/api/v2/custom-pricing/rules/90718" \
-H "X-API-Key: $B2B_API_KEY" \
-H "X-Shop-Domain: your-store.myshopify.com" \
-H "Content-Type: application/json" \
-d '{
"name": "VIP 10% (updated)",
"priority": 2,
"status": "disabled",
"apply_to": "customer_tags",
"customer_tags": [
"vip"
],
"product_condition_type": "by_collections",
"product_collections": [
"482901234567"
],
"discount_type": "decrease_percentage",
"discount_value": "10",
"start_at": "2026-10-31T17:00:00Z",
"end_at": null
}'

Delete a rule

DEL/api/v2/custom-pricing/rules/{id}

Scope custom-pricing:writeCost 11

Delete a rule.

idstringrequired

Rule id.

data.idstring

Id of the deleted rule.

data.deletedboolean

true.

cURL
curl -X DELETE "https://solution-public-api.bss-b2b.solutions/api/v2/custom-pricing/rules/90718" \
-H "X-API-Key: $B2B_API_KEY" \
-H "X-Shop-Domain: your-store.myshopify.com"

Remove products from a rule

POST/api/v2/custom-pricing/rules/{id}/product-conditions/bulk-delete

Scope custom-pricing:writeCost 11

Remove items from the rule’s product list; items not in it are skipped.

idstringrequired

Rule id.

product_ids[string]

1–250 items.

product_collections[string]

1–250 items.

product_tags[string]

1–250 items.

variant_ids[string]

1–250 items.

dataRule

The rule after the change.

cURL
curl -X POST "https://solution-public-api.bss-b2b.solutions/api/v2/custom-pricing/rules/90718/product-conditions/bulk-delete" \
-H "X-API-Key: $B2B_API_KEY" \
-H "X-Shop-Domain: your-store.myshopify.com" \
-H "Content-Type: application/json" \
-d '{
"product_collections": [
"482901234567"
]
}'

Create or replace rules in bulk

POST/api/v2/custom-pricing/rules/bulk-upsert

Scope custom-pricing:writeCost ceil(10 + 0.4 × rules)

Create or replace up to 250 rules; each one succeeds or fails on its own.

See Bulk & idempotency.

rules[object]required

1–250 rules, each with the fields of Create a rule.

Show fields

idstring

Set it to replace that rule, as Replace a rule does; leave it out to create one.

data.results[object]

One entry per rule, in the order sent.

Show fields

indexinteger

Position of the rule in rules.

idstring

Rule id.

resultenum

created, updated or error.

errorobject

code and message, only when result is error.

data.summaryobject

total, succeeded, failed.

cURL
curl -X POST "https://solution-public-api.bss-b2b.solutions/api/v2/custom-pricing/rules/bulk-upsert" \
-H "X-API-Key: $B2B_API_KEY" \
-H "X-Shop-Domain: your-store.myshopify.com" \
-H "Content-Type: application/json" \
-d '{
"rules": [
{
"name": "VIP 10% B",
"priority": 1,
"status": "disabled",
"apply_to": "customer_tags",
"customer_tags": [
"vip"
],
"product_condition_type": "by_collections",
"product_collections": [
"482901234567"
],
"discount_type": "decrease_percentage",
"discount_value": "10",
"start_at": "2026-10-31T17:00:00Z",
"end_at": null
},
{
"name": "VIP 10% (bulk)",
"priority": 1,
"status": "disabled",
"apply_to": "customer_tags",
"customer_tags": [
"vip"
],
"product_condition_type": "by_collections",
"product_collections": [
"482901234567"
],
"discount_type": "decrease_percentage",
"discount_value": "10",
"start_at": "2026-10-31T17:00:00Z",
"end_at": null,
"id": "90718"
}
]
}'

Delete rules in bulk

POST/api/v2/custom-pricing/rules/bulk-delete

Scope custom-pricing:writeCost ceil(10 + 0.4 × rules)

Delete up to 250 rules; an unknown id fails on its own.

See Bulk & idempotency.

ids[string]required

1–250 rule ids.

data.results[object]

One entry per id: index, id, result (deleted or error) and error (code, message) when it failed.

data.summaryobject

total, succeeded, failed.

cURL
curl -X POST "https://solution-public-api.bss-b2b.solutions/api/v2/custom-pricing/rules/bulk-delete" \
-H "X-API-Key: $B2B_API_KEY" \
-H "X-Shop-Domain: your-store.myshopify.com" \
-H "Content-Type: application/json" \
-d '{
"ids": [
"90719",
"999999999"
]
}'

Upload rules to the storefront

POST/api/v2/custom-pricing/rules/upload

Scope custom-pricing:writeCost 20

Upload the rules to the storefront, as the app does.

The body is empty. See Upload.

data.statusenum

uploaded, or partial_success when some rules did not reach the storefront.

data.skippedobject

capacity_exceeded, write_failed and rule_id_range; see Upload.

cURL
curl -X POST "https://solution-public-api.bss-b2b.solutions/api/v2/custom-pricing/rules/upload" \
-H "X-API-Key: $B2B_API_KEY" \
-H "X-Shop-Domain: your-store.myshopify.com"