๐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
Get your API Key. If you donโt have one yet, please follow this document to generate it.
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.
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
idis provided, a new rule is created. Ifidexists, 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_idisnull, 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
customersarray โ 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.
Last updated