For the complete documentation index, see llms.txt. This page is also available as Markdown.

๐Ÿ”—Public APIs for Custom Pricing (CP)

Programmatically manage Custom Pricing rules via REST API โ€” create, retrieve, update, delete rules, and calculate prices for specific customers.

The Custom Pricing Public API is a feature of the BSS B2B Solution Shopify app. It allows developers to manage and sync customer-specific pricing rules directly from external systems such as ERPs, CRMs, or custom integrations.

These are REST APIs โ€” you can use them to:

  • Manage customer pricing rules

  • Calculate variant prices based on active rules

  • Retrieve product and customer data

  • Automate B2B price synchronization


๐Ÿ”‘ Get the Access Key

  1. Get your API Key. If you donโ€™t have one yet, please follow this document to generate it.

  2. Include it in the request body for endpoints that require it.


๐Ÿงฑ Rule Endpoints

Before using the endpoints, familiarize yourself with the Rule model fields below.

Field
Description
Values

priority

Determines which rule takes precedence over others.

Integer

status

Activation status of the rule.

0: Inactive 1: Active

apply_to

Defines which customers the rule applies to.

0: All customers 1: Logged-in customers 2: Not-logged-in customers 3: Specific customers 4: Customer tags

exclude_customer

Exclude rules for certain customers.

0: None 1: Customer tags 2: Specific customers

product_condition_type

Determines which products are targeted.

0: All products 1: Specific products 2: Product collections 3: Product tags 4: Specific variants

exc_product_type

Excludes certain products from the rule.

0: None 1: Specific products 2: Product collections 3: Product tags 4: Specific variants

discount_type

Discount method to apply.

0: Apply a fixed price 1: Subtract a fixed amount 2: Subtract a percentage (%)

market_condition_type

Determines which markets the rule applies to.

0: All markets 1: Specific markets


๐Ÿ“˜ Get Rules by Domain

Endpoint

Headers

Request Body

Response


๐Ÿ“— Get Rule by ID

Endpoint

Request Body

Response


๐Ÿ“• Get Rules by Products

Endpoint

Request Body

You can get rules either by product IDs or product tags.

Response


๐Ÿ“™ Get Rules by Customers

Endpoint

Request Body

You can get rules by customer IDs or customer tags.

Response


โœ๏ธ Create or Update a Single Rule

Endpoint

If no id is provided, a new rule is created. If id exists, the existing rule is updated.

Request Body

Response


โœจ Create or Update Multiple Rules

Endpoint

Request Body

Response


โŒ Delete a Rule

Body

Response


๐Ÿ—‘๏ธ Delete Multiple Rules

Body

Response


๐Ÿงน Remove Existing Products from Rules

Request Body

Response (Success)

Response (Error)


๐Ÿงพ Get Applied Rules for Products

If customer_id is null, the system checks rules that apply to all or not-logged-in customers.

Request Body

Response


๐Ÿ’ฐ Get Variant Price List Based on Rules

Request Body

Response


๐Ÿงญ Product Endpoints

All product endpoints follow the same pattern โ€” domain + accessKey required.

๐Ÿ”Ž Search Products

Cursor afterIndex indicates where to continue fetching. If null, search starts from the beginning.


โš™๏ธ Get Product Tags


๐Ÿ“„ Get Products by Tags

  • "operation": "AND" โ†’ all tags must match

  • "operation": "OR" โ†’ any tag matches


๐Ÿ† Get Products by IDs


๐Ÿ‘ฅ Customer Endpoints

๐Ÿ™‹๐Ÿปโ€โ™‚๏ธ Search Customers

โœจ Get Customer Tags

๐Ÿ—‚๏ธ Get Customers by IDs

๐Ÿ“ Get Customers by Tags

"operation": "AND" โ†’ must contain all tags "operation": "OR" โ†’ contain any tag


๐Ÿ“š Collection Endpoints

Note: The โ€œGet Collectionsโ€ endpoint currently returns a customers array โ€” behavior is identical to /customer/search.


โš™๏ธ Request Handling Policy

  • Requests are processed one at a time.

  • A new request starts only after the previous one completes.

  • If a server error occurs, please wait up to 3 minutes before retrying.

If you need further assistance, please feel free to reach us at support-sbc@bsscommerce.com or Live Chat.

Last updated