🔗Public APIs for Custom Pricing (CP)
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.
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.
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)
These REST APIs let you:
Manage customer pricing rules
Calculate variant prices based on active rules
Search customers & get products
🔑 Get the Access Key
Open the B2B/Wholesale Solution app in Shopify.
Go to Public API.
Click Copy to copy your accessKey.
Include it in every request body.
📦 Rule Endpoints
Rule Model Reference
<details> <summary><strong>Fields & Enumerations</strong></summary>
priority — determines which rule wins when multiple rules apply.
status
apply_to
exclude_customer
product_condition_type
exc_product_type
discount_type
market_condition_type
</details>
Get Rules by Domain
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/rule/get-by-domain
Headers
Body
Response (example)
Get Rule by ID
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/rule/get-by-id
Headers
Body
Response (example)
Get Rules by Products
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/rule/get-rules-by-products
Headers
Body
You can choose to get rules by product IDs or product tags.
Response (example)
Get Rules by Customers
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/rule/get-rules-by-customers
Headers
Body
You can choose to get rules by either customer IDs or customer tags.
Response (example)
Create or Update a Single Rule
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/rule/save
Headers
Body
If there is no
id, a new rule is created. If there is anid, that rule is updated.
Response (example)
Create or Update Multiple Rules
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/rule/bulk-save
Headers
Body
If there is no
id, a rule is created. If anidexists, that rule is updated.
Response (example)
Delete Rule
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/rule/delete
Headers
Body
Response
Delete Multiple Rules
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/rule/mass-delete
Headers
Body
Response
Remove Existing Products from Rules
PUT https://b2b-solution-public-api.bsscommerce.com/api/v1/rule/delete-items
Headers
Body
Response (success)
Response (error)
Get Applied Rules for Products
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/rule/get-products-applied-rules
Headers
Body
If
customer_idisnull, the system checks Custom Pricing Rules that apply to all customers or not-logged-in customers.
Response (example)
Get Price List of Variants based on Applied Rules
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/rule/get-variants-price-list
Headers
Body
If
customer_idisnull, the system checks Custom Pricing Rules that apply to all customers or not-logged-in customers.
Response (example)
🛍️ Product Endpoints
Search Products
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/product/search
Headers
Body
afterIndexis a cursor. Ifnull, search starts from the beginning. Example cursor:eyJsYXN0X2lkIjo2NjU1NDU2Mzc5MDUzLCJsYXN0X3ZhbHVlIjo2NjU1NDU2Mzc5MDUzfQ==
Response (example)
Get Product Tags
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/product/get-tags
Headers
Body
Response (example)
Get Products by Tags
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/product/get-by-tags
Headers
Body
"AND"→ returned products must contain all tags."OR"→ returned products need any one tag in the array.
Response (example)
Get Products by IDs
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/product/get-by-ids
Headers
Body
Response (example)
👤 Customer Endpoints
Search Customers
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/customer/search
Headers
Body
Response (example)
Get Customer Tags
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/customer/get-tags
Headers
Body
Response (example)
Get Customers by IDs
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/customer/get-by-ids
Headers
Body
Response (example)
Get Customers by Tags
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/customer/get-by-tags
Headers
Body
"AND"→ returned products/customers must contain all tags."OR"→ returned products/customers need any tag in the array.
Response (example)
🗂️ Collection Endpoints
Note: As provided, Get Collections uses the
/customer/searchendpoint and returns acustomersarray.
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/customer/search
Headers
Body
Response (example)
⚙️ Request Handling Policy
The system handles one request at a time.
The next request starts after the current one completes.
If a server error occurs, it may take up to 3 minutes to recover and process a new request.
Last updated
Was this helpful?