The Custom Pricing Public API is a feature of the B2B/Wholesale 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.
⚙️ Requirements
Install the B2B/Wholesale Solution Shopify app
Upgrade to the Platinum plan
Obtain your Access Key
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
🔑 How to Get Your Access Key
Install the B2B/Wholesale Solution app from Shopify.
Navigate to the Public API page inside the app.
Click Copy to copy your Access Key.
Include it in every API request body.
🧱 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
CursorafterIndex 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.
Would you like me to format this as a Markdown developer doc (with copyable code blocks and collapsible sections like Shopify’s API reference style)? It’ll be perfect for publishing to your docs site.
You said:
Yes, help me Markdown developer doc (with copyable code blocks and collapsible sections like Shopify’s API reference style
ChatGPT said:
Thought for 4 seconds
Below is a publish-ready Markdown developer doc you can drop straight into your docs site.
It uses collapsible sections (<details><summary>…</summary>) like Shopify’s docs and keeps your technical content 100% accurate.
B2B & Wholesale Custom Pricing Public API for Shopify Stores
The Custom Pricing Public API is a feature of the B2B/Wholesale Solution Shopify app.
Requirements
App installed
Platinum plan
Access Key (from the app’s Public API page → Copy)
afterIndex is a cursor. If null, search starts from the beginning.
Example cursor:
eyJsYXN0X2lkIjo2NjU1NDU2Mzc5MDUzLCJsYXN0X3ZhbHVlIjo2NjU1NDU2Mzc5MDUzfQ==
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/product/get-by-tags
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/product/get-by-ids
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/customer/search
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/customer/get-tags
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/customer/get-by-ids
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/customer/get-by-tags
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/customer/search
0: inactive
1: active
0: All customers
1: Logged-in customers
2: Not-logged-in customers
3: Specific customers
4: Customer tags
0: None
1: Customer tags
2: Specific customers
0: All products
1: Specific products
2: Product collections
3: Product tags
4: Specific variants
0: None
1: Specific products
2: Product collections
3: Product tags
4: Specific variants
0: Apply a price to selected products
1: Decrease a fixed amount of the original prices of selected products
2: Decrease the original prices of selected products by a percentage (%)