๐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
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/rule/get-by-domain
Headers
Content-Type: application/json
Request Body
{
"domain": "abc.myshopify.com",
"accessKey": "xxx"
}
Response
{
"success": true,
"rules": [
{
"id": 536662,
"shop_id": 9204,
"name": "Discount 20%l",
"priority": 1,
"status": 1,
"apply_to": 0,
"customer_ids": [],
"customer_tags": [],
"product_condition_type": 4,
"variant_ids": ["6586590625965", "6586590658733", "6586590691501"],
"discount_type": 2,
"discount_value": "10.00",
"market_condition_type": 1,
"market_ids": ["49314136349"],
"createdAt": "2023-03-09T03:38:50.000Z",
"updatedAt": "2023-06-15T02:16:47.000Z"
},
{
"id": 545507,
"name": "test4",
"status": 0,
"apply_to": 3,
"customer_ids": ["6819529654557", "6905095291165"],
"product_ids": ["8174450049309"],
"discount_type": 0,
"discount_value": "50.00",
"market_condition_type": 0
}
]
}
๐ Get Rule by ID
Endpoint
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/rule/get-by-id
Request Body
{
"domain": "abc.myshopify.com",
"accessKey": "xxx",
"id": 79
}
Response
{
"success": true,
"rule": {
"id": 79,
"name": "Discount 20%l",
"priority": 1,
"status": 1,
"apply_to": 0,
"variant_ids": ["6586590625965", "6586590658733", "6586590691501"],
"discount_type": 2,
"discount_value": "10.00",
"market_condition_type": 1,
"market_ids": ["49314136349"]
}
}
๐ Get Rules by Products
Endpoint
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/rule/get-rules-by-products
Request Body
{
"domain": "abc.myshopify.com",
"accessKey": "xxx",
"product_ids": [7208233467979, 7208233467980],
"product_tags": ["b2b", "pants"]
}
You can get rules either by product IDs or product tags.
Response
{
"success": true,
"data": [
{ "productId": "8249126813999", "ruleId": 40, "ruleName": "VIP group", "appliedPrice": 27100 },
{ "productId": "8249222791471", "ruleId": 40, "ruleName": "VIP group", "appliedPrice": 63.5 }
]
}
๐ Get Rules by Customers
Endpoint
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/rule/get-rules-by-customers
Request Body
{
"domain": "abc.myshopify.com",
"accessKey": "xxx",
"customer_ids": [7208233467979, 7208233467980],
"customer_tags": ["b2b", "pants"]
}
You can get rules by customer IDs or customer tags.
Response
{
"success": true,
"data": [
{
"customerId": "6764123291723",
"rules": [
{ "ruleId": 2151079182, "ruleName": "Wholesale", "customerTags": ["b2b"] }
]
}
]
}
โ๏ธ Create or Update a Single Rule
Endpoint
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/rule/save
If no
id
is provided, a new rule is created. Ifid
exists, the existing rule is updated.
Request Body
{
"domain": "abc.myshopify.com",
"accessKey": "xxx",
"rule": {
"name": "Test rule",
"priority": 1,
"status": 0,
"apply_to": 1,
"product_condition_type": 4,
"product_ids": ["5460196589730"],
"discount_type": 2,
"discount_value": "40",
"exc_product_variants": [44531061752093, 45056544342301]
}
}
Response
{
"success": true,
"message": "Create the rule successfully",
"ruleId": 11
}
โจ Create or Update Multiple Rules
Endpoint
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/rule/bulk-save
Request Body
{
"domain": "abc.myshopify.com",
"accessKey": "xxx",
"rules": [
{
"name": "sencond1",
"priority": 0,
"status": 1,
"discount_type": 2,
"discount_value": 10.0
},
{
"id": 545507,
"name": "test4",
"status": 0,
"discount_type": 0,
"discount_value": "50.00",
"exc_product_tags": ["b2b", "wholesale"]
}
]
}
Response
{
"success": true,
"message": [
"Create new rule 'sencond1' with ID 214780831 successfully",
"Update rule 'test4' with ID 545507 successfully"
]
}
โ Delete a Rule
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/rule/delete
Body
{
"domain": "abc.myshopify.com",
"accessKey": "xxx",
"id": 79
}
Response
{
"success": true,
"message": "Deleted rule ID 79 successfully"
}
๐๏ธ Delete Multiple Rules
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/rule/mass-delete
Body
{
"domain": "abc.myshopify.com",
"accessKey": "xxx",
"ids": [79, 80, 81]
}
Response
{
"success": true,
"message": "Deleted multiple rule successfully"
}
๐งน Remove Existing Products from Rules
PUT https://b2b-solution-public-api.bsscommerce.com/api/v1/rule/delete-items
Request Body
{
"domain": "abc.myshopify.com",
"accessKey": "xxx",
"rules": [
{
"id": 2,
"product_condition_type": 1,
"product_ids": ["8746948329722", "8746948821242"]
}
]
}
Response (Success)
{
"success": true,
"message": "Success",
"data": {
"success": ["Update rule with id 2 success"],
"failed": []
}
}
Response (Error)
{
"message": "Fail",
"data": {
"failed": [
{ "rule_id": 3, "errors": ["Invalid product_condition_type", "product_ids must be array"] }
]
}
}
๐งพ Get Applied Rules for Products
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/rule/get-products-applied-rules
If
customer_id
isnull
, the system checks rules that apply to all or not-logged-in customers.
Request Body
{
"domain": "abc.myshopify.com",
"product_ids": [6586590625965, 6586590658733],
"customer_id": 5127974846637,
"accessKey": "xxxx"
}
Response
{
"success": true,
"productsAppliedRule": [
{ "id": "6586590625965", "discount_type": 2, "value": "10.00", "name": "Discount 30%" }
]
}
๐ฐ Get Variant Price List Based on Rules
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/rule/get-variants-price-list
Request Body
{
"domain": "abc.myshopify.com",
"product_ids": [6586590625965, 6586590658733],
"customer_id": 5127974846637,
"accessKey": "xxx"
}
Response
{
"success": true,
"priceList": [
{
"id": "6586590625965",
"discount_type": 2,
"value": "10.00",
"name": "Discount 30%",
"variants": [
{
"id": "39454422368429",
"price": "70",
"compareAtPrice": "85",
"appliedRulePrice": 63
}
]
}
]
}
๐งญ Product Endpoints
All product endpoints follow the same pattern โ domain
+ accessKey
required.
Search Products
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/product/search
Cursor
afterIndex
indicates where to continue fetching.
If null
, search starts from the beginning.
{
"domain": "abc.myshopify.com",
"accessKey": "xxx",
"afterIndex": null,
"first": 20,
"searchQuery": "ocean"
}
Get Product Tags
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/product/get-tags
{
"domain": "abc.myshopify.com",
"accessKey": "xxx"
}
Get Products by Tags
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/product/get-by-tags
"operation": "AND"
โ all tags must match"operation": "OR"
โ any tag matches
Get Products by IDs
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/product/get-by-ids
๐ฅ Customer Endpoints
Search Customers
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/customer/search
Get Customer Tags
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/customer/get-tags
Get Customers by IDs
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/customer/get-by-ids
Get Customers by Tags
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/customer/get-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
.
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/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
0: inactive
1: active
apply_to
0: All customers
1: Logged-in customers
2: Not-logged-in customers
3: Specific customers
4: Customer tags
exclude_customer
0: None
1: Customer tags
2: Specific customers
product_condition_type
0: All products
1: Specific products
2: Product collections
3: Product tags
4: Specific variants
exc_product_type
0: None
1: Specific products
2: Product collections
3: Product tags
4: Specific variants
discount_type
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 (%)
market_condition_type
0: All markets
1: Specific markets
</details>
Get Rules by Domain
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/rule/get-by-domain
Headers
Content-Type: application/json
Body
{
"domain": "abc.myshopify.com",
"accessKey": "xxx"
}
Response (example)
{
"success": true,
"rules": [
{
"id": 536662,
"shop_id": 9204,
"name": "Discount 20%l",
"priority": 1,
"status": 1,
"apply_to": 0,
"customer_ids": [],
"customer_tags": [],
"product_condition_type": 4,
"product_ids": [],
"variant_ids": [
"6586590625965",
"6586590658733",
"6586590691501"
],
"product_collections": [],
"product_tags": [],
"discount_type": 2,
"discount_value": "10.00",
"published_at": null,
"unpublished_at": null,
"date_rule_type": 0,
"start_date": null,
"end_date": null,
"exc_customer_tags": "",
"exclude_from": 0,
"exc_customers": "",
"market_condition_type": 1,
"market_ids": ["49314136349"],
"file_theme_index": 0,
"createdAt": "2023-03-09T03:38:50.000Z",
"updatedAt": "2023-06-15T02:16:47.000Z"
},
{
"id": 545507,
"shop_id": 9204,
"name": "test4",
"priority": 0,
"status": 0,
"apply_to": 3,
"customer_ids": [
"6819529654557",
"6905095291165"
],
"customer_tags": [],
"product_condition_type": 0,
"product_ids": ["8174450049309"],
"product_collections": [],
"product_tags": [],
"discount_type": 0,
"discount_value": "50.00",
"published_at": null,
"unpublished_at": null,
"date_rule_type": 0,
"start_date": null,
"end_date": null,
"exc_customer_tags": "",
"exclude_from": 0,
"exc_customers": "",
"market_condition_type": 0,
"market_ids": [],
"file_theme_index": 0,
"createdAt": "2023-03-15T07:33:24.000Z",
"updatedAt": "2023-06-05T01:59:50.000Z"
}
]
}
Get Rule by ID
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/rule/get-by-id
Headers
Content-Type: application/json
Body
{
"domain": "abc.myshopify.com",
"accessKey": "xxx",
"id": 79
}
Response (example)
{
"success": true,
"rule": {
"id": 79,
"name": "Discount 20%l",
"priority": 1,
"status": 1,
"apply_to": 0,
"customer_ids": [],
"customer_tags": [],
"exclude_from": 0,
"exc_customers": [],
"exc_customer_tags": [],
"product_condition_type": 4,
"product_ids": [],
"variant_ids": [
"6586590625965",
"6586590658733",
"6586590691501"
],
"product_collections": [],
"product_tags": [],
"market_condition_type": 1,
"market_ids": ["49314136349"],
"discount_type": 2,
"discount_value": "10.00",
"start_date": null,
"end_date": null
}
}
Get Rules by Products
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/rule/get-rules-by-products
Headers
Content-Type: application/json
Body
{
"domain": "abc.myshopify.com",
"accessKey": "xxx",
"product_ids": [7208233467979, 7208233467980],
"product_tags": ["b2b", "pants"]
}
You can choose to get rules by product IDs or product tags.
Response (example)
{
"success": true,
"data": [
{
"productId": "8249126813999",
"ruleId": 40,
"ruleName": "VIP group",
"appliedPrice": 27100
},
{
"productId": "8249222791471",
"ruleId": 40,
"ruleName": "VIP group",
"appliedPrice": 63.5
}
]
}
Get Rules by Customers
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/rule/get-rules-by-customers
Headers
Content-Type: application/json
Body
{
"domain": "abc.myshopify.com",
"accessKey": "xxx",
"customer_ids": [7208233467979, 7208233467980],
"customer_tags": ["b2b", "pants"]
}
You can choose to get rules by either customer IDs or customer tags.
Response (example)
{
"success": true,
"data": [
{
"customerId": "6764123291723",
"rules": [
{
"ruleId": 2151079182,
"ruleName": "Wholesale",
"customerTags": ["b2b"]
}
]
},
{
"customerId": "7196156198987",
"rules": [
{
"ruleId": 2151079182,
"ruleName": "Wholesale",
"customerTags": ["b2b"]
}
]
},
{
"customerId": "7905261387851",
"rules": [
{
"ruleId": 2151079182,
"ruleName": "Wholesale",
"customerTags": ["b2b"]
}
]
}
]
}
Create or Update a Single Rule
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/rule/save
Headers
Content-Type: application/json
Body
If there is no
id
, a new rule is created. If there is anid
, that rule is updated.
{
"domain": "abc.myshopify.com",
"accessKey": "xxx",
"rule": {
"name": "Test rule",
"priority": 1,
"status": 0,
"apply_to": 1,
"product_condition_type": 4,
"customer_ids": [],
"customer_tags": [],
"product_ids": ["5460196589730"],
"variant_ids": [],
"product_collections": [],
"product_tags": [],
"discount_type": 2,
"discount_value": "40",
"exclude_from": 0,
"exc_customers": ["5462063382693"],
"exc_customer_tags": [],
"exc_product_type": 4,
"exc_specific_products": [],
"exc_product_tags": [],
"exc_product_collections": [],
"exc_product_variants": [
44531061752093,
45056544342301
],
"market_condition_type": 0,
"market_ids": []
}
}
Response (example)
{
"success": true,
"message": "Create the rule successfully",
"ruleId": 11
}
Create or Update Multiple Rules
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/rule/bulk-save
Headers
Content-Type: application/json
Body
If there is no
id
, a rule is created. If anid
exists, that rule is updated.
{
"domain": "abc.myshopify.com",
"accessKey": "xxx",
"rules": [
{
"name": "sencond1",
"priority": 0,
"status": 1,
"apply_to": 0,
"product_condition_type": 0,
"customer_ids": [],
"customer_tags": [],
"product_ids": [],
"variant_ids": [],
"product_collections": [],
"product_tags": [],
"exc_customer_tags": "",
"exclude_from": 0,
"exc_customers": "",
"exc_product_type": 0,
"exc_specific_products": [],
"exc_product_tags": [],
"exc_product_collections": [],
"exc_product_variants": [],
"discount_type": 2,
"discount_value": 10.00,
"date_rule_type": 0,
"start_date": null,
"end_date": null,
"market_condition_type": 0,
"market_ids": null
},
{
"id": 545507,
"name": "test4",
"priority": 0,
"status": 0,
"apply_to": 3,
"customer_ids": [
"6819529654557",
"6905095291165"
],
"customer_tags": [],
"product_condition_type": 0,
"product_ids": ["8174450049309"],
"variant_ids": [],
"product_collections": [],
"product_tags": [],
"discount_type": 0,
"discount_value": "50.00",
"date_rule_type": 0,
"start_date": null,
"end_date": null,
"exc_customer_tags": "",
"exclude_from": 0,
"exc_product_type": 3,
"exc_specific_products": [],
"exc_product_tags": ["b2b", "wholesale"],
"exc_product_collections": [],
"exc_product_variants": [],
"exc_customers": "",
"market_condition_type": 0,
"market_ids": []
}
]
}
Response (example)
{
"success": true,
"message": [
"Create new rule 'sencond1' with ID 214780831 successfully",
"Update rule 'test4' with ID 545507 successfully"
]
}
Delete Rule
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/rule/delete
Headers
Content-Type: application/json
Body
{
"domain": "abc.myshopify.com",
"accessKey": "xxx",
"id": 79
}
Response
{
"success": true,
"message": "Deleted rule ID 79 successfully"
}
Delete Multiple Rules
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/rule/mass-delete
Headers
Content-Type: application/json
Body
{
"domain": "abc.myshopify.com",
"accessKey": "xxx",
"ids": [79, 80, 81]
}
Response
{
"success": true,
"message": "Deleted multiple rule successfully"
}
Remove Existing Products from Rules
PUT https://b2b-solution-public-api.bsscommerce.com/api/v1/rule/delete-items
Headers
Content-Type: application/json
Body
{
"domain": "abc.myshopify.com",
"accessKey": "xxx",
"rules": [
{
"id": 2,
"product_condition_type": 1,
"product_ids": [
"8746948329722",
"8746948821242",
"7622399262970",
"7622389432570"
],
"product_collections": [],
"product_tags": [],
"product_variants": []
},
{
"id": 3,
"product_condition_type": 1,
"product_ids": [
"8746948329722",
"8746948821242",
"7622399262970",
"7622389432570"
],
"product_collections": [],
"product_tags": [],
"product_variants": []
}
]
}
Response (success)
{
"success": true,
"message": "Success",
"data": {
"success": ["Update rule with id 2 success"],
"failed": []
}
}
Response (error)
{
"message": "Fail",
"data": {
"success": [],
"failed": [
{
"rule_id": 3,
"errors": ["Invalid product_condition_type", "product_ids must be array"]
}
]
}
}
Get Applied Rules for Products
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/rule/get-products-applied-rules
Headers
Content-Type: application/json
Body
If
customer_id
isnull
, the system checks Custom Pricing Rules that apply to all customers or not-logged-in customers.
{
"domain": "abc.myshopify.com",
"product_ids": [6586590625965, 6586590658733, 6586590691501],
"customer_id": 5127974846637,
"accessKey": "xxxx"
}
Response (example)
{
"success": true,
"productsAppliedRule": [
{ "id": "6586590625965", "discount_type": 2, "value": "10.00", "name": "Discount 30%" },
{ "id": "6586590658733", "discount_type": 2, "value": "10.00", "name": "Discount 30%" },
{ "id": "6586590691501", "discount_type": 2, "value": "10.00", "name": "Discount 30%" }
]
}
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
Content-Type: application/json
Body
If
customer_id
isnull
, the system checks Custom Pricing Rules that apply to all customers or not-logged-in customers.
{
"domain": "abc.myshopify.com",
"product_ids": [6586590625965, 6586590658733, 6586590691501],
"customer_id": 5127974846637,
"accessKey": "xxx"
}
Response (example)
{
"success": true,
"priceList": [
{
"id": "6586590625965",
"discount_type": 2,
"value": "10.00",
"name": "Discount 30%",
"variants": [
{
"id": "39454422368429",
"price": "70",
"compareAtPrice": "85",
"appliedRulePrice": 63
},
{
"id": "39454422401197",
"price": "55",
"compareAtPrice": "85",
"appliedRulePrice": 49.5
}
]
},
{
"id": "6586590658733",
"discount_type": 2,
"value": "10.00",
"name": "Discount 30%",
"variants": [
{
"id": "39454422433965",
"price": "40",
"compareAtPrice": "44",
"appliedRulePrice": 36
}
]
},
{
"id": "6586590691501",
"discount_type": 2,
"value": "10.00",
"name": "Discount 30%",
"variants": [
{
"id": "39454422466733",
"price": "43",
"compareAtPrice": "45",
"appliedRulePrice": 38.7
}
]
}
]
}
๐๏ธ Product Endpoints
Search Products
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/product/search
Headers
Content-Type: application/json
Body
afterIndex
is a cursor. Ifnull
, search starts from the beginning. Example cursor:eyJsYXN0X2lkIjo2NjU1NDU2Mzc5MDUzLCJsYXN0X3ZhbHVlIjo2NjU1NDU2Mzc5MDUzfQ==
{
"domain": "abc.myshopify.com",
"accessKey": "xxx",
"afterIndex": null,
"first": 20,
"searchQuery": "ocean"
}
Response (example)
{
"success": true,
"productList": {
"edges": [
{
"node": {
"id": "gid://shopify/Product/6586580271277",
"title": "Ocean Blue Shirt",
"handle": "ocean-blue-shirt",
"productType": "",
"totalVariants": 1,
"hasOnlyDefaultVariant": true,
"priceRange": {
"minVariantPrice": { "currencyCode": "VND", "amount": "50.0" },
"maxVariantPrice": { "currencyCode": "VND", "amount": "50.0" }
},
"featuredImage": {
"transformedSrc": "https://cdn.shopify.com/s/files/1/0538/3874/1677/products/young-man-in-bright-fashion_925x_5251bcfa-6939-4d7a-9287-dd9bf058ed03.jpg?v=1616405807"
},
"onlineStoreUrl": null
},
"cursor": "eyJsYXN0X2lkIjo2NTg2NTgwMjcxMjc3LCJsYXN0X3ZhbHVlIjo2NTg2NTgwMjcxMjc3fQ=="
},
{
"node": {
"id": "gid://shopify/Product/6655456379053",
"title": "Riri Bracelet",
"handle": "riri-bracelet-rose",
"productType": "women's bracelets",
"totalVariants": 1,
"hasOnlyDefaultVariant": false,
"priceRange": {
"minVariantPrice": { "currencyCode": "VND", "amount": "68.0" },
"maxVariantPrice": { "currencyCode": "VND", "amount": "68.0" }
},
"featuredImage": {
"transformedSrc": "https://cdn.shopify.com/s/files/1/0538/3874/1677/products/2015-04-20_Accessories_31_23500_21376.jpg?v=1619597977"
},
"onlineStoreUrl": null
},
"cursor": "eyJsYXN0X2lkIjo2NjU1NDU2Mzc5MDUzLCJsYXN0X3ZhbHVlIjo2NjU1NDU2Mzc5MDUzfQ=="
}
],
"pageInfo": { "hasNextPage": false, "hasPreviousPage": false }
}
}
Get Product Tags
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/product/get-tags
Headers
Content-Type: application/json
Body
{ "domain": "abc.myshopify.com", "accessKey": "xxx" }
Response (example)
{
"success": true,
"productTags": {
"tags": [
"cotton blouse",
"Couch",
"cowl",
"cpace",
"Crane",
"cream",
"crepe wool",
"crew",
"crew neck",
"crewneck",
"crisp"
],
"last_cursor": "Y3Jpc3A="
}
}
Get Products by Tags
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/product/get-by-tags
Headers
Content-Type: application/json
Body
{
"domain": "abc.myshopify.com",
"accessKey": "xxx",
"afterIndex": null,
"first": 20,
"tags": ["tag1", "tags2", "t3"],
"operation": "AND"
}
"AND"
โ returned products must contain all tags."OR"
โ returned products need any one tag in the array.
Response (example)
{
"success": true,
"productList": [
{
"id": "gid://shopify/Product/6586590625965",
"title": "Anchor Bracelet Mens",
"handle": "leather-anchor",
"productType": "Bracelet",
"totalVariants": 2,
"hasOnlyDefaultVariant": false,
"priceRange": {
"minVariantPrice": { "currencyCode": "VND", "amount": "55.0" },
"maxVariantPrice": { "currencyCode": "VND", "amount": "70.0" }
},
"featuredImage": {
"transformedSrc": "https://cdn.shopify.com/s/files/1/0538/3874/1677/products/anchor-bracelet-mens_925x_8dcf313c-5c78-41ea-874d-59804d449315.jpg?v=1616407017"
},
"onlineStoreUrl": null
}
]
}
Get Products by IDs
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/product/get-by-ids
Headers
Content-Type: application/json
Body
{
"domain": "abc.myshopify.com",
"accessKey": "xxx",
"ids": [6586590625965]
}
Response (example)
{
"success": true,
"productList": [
{
"id": "gid://shopify/Product/6586590625965",
"title": "Anchor Bracelet Mens",
"handle": "leather-anchor",
"productType": "Bracelet",
"totalVariants": 2,
"hasOnlyDefaultVariant": false,
"priceRange": {
"minVariantPrice": { "currencyCode": "VND", "amount": "55.0" },
"maxVariantPrice": { "currencyCode": "VND", "amount": "70.0" }
},
"featuredImage": {
"transformedSrc": "https://cdn.shopify.com/s/files/1/0538/3874/1677/products/anchor-bracelet-mens_925x_8dcf313c-5c78-41ea-874d-59804d449315.jpg?v=1616407017"
},
"onlineStoreUrl": null
}
]
}
๐ค Customer Endpoints
Search Customers
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/customer/search
Headers
Content-Type: application/json
Body
{
"domain": "abc.myshopify.com",
"accessKey": "xxx",
"afterIndex": null,
"first": 20,
"searchQuery": "nta"
}
Response (example)
{
"success": true,
"customers": [
{
"node": {
"id": "gid://shopify/Customer/5127974846637",
"displayName": "nta",
"email": "[email protected]",
"firstName": "n",
"lastName": "ta",
"phone": null,
"tags": ["wholesale"],
"note": ""
},
"cursor": "eyJsYXN0X2lkIjo1MTI3OTc0ODQ2NjM3LCJsYXN0X3ZhbHVlIjo1MTI3OTc0ODQ2NjM3fQ=="
}
]
}
Get Customer Tags
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/customer/get-tags
Headers
Content-Type: application/json
Body
{ "domain": "abc.myshopify.com", "accessKey": "xxx" }
Response (example)
{
"success": true,
"customerTags": [
{ "node": "wholesale", "cursor": "d2hvbGVzYWxl" }
]
}
Get Customers by IDs
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/customer/get-by-ids
Headers
Content-Type: application/json
Body
{
"domain": "abc.myshopify.com",
"accessKey": "xxx",
"ids": [5127974846637]
}
Response (example)
{
"success": true,
"customerList": [
{
"id": "gid://shopify/Customer/5127974846637",
"displayName": "nta",
"email": "[email protected]",
"firstName": "n",
"lastName": "ta"
}
]
}
Get Customers by Tags
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/customer/get-by-tags
Headers
Content-Type: application/json
Body
{
"domain": "abc.myshopify.com",
"accessKey": "xxx",
"afterIndex": null,
"first": 20,
"tags": ["tag1", "tags2"],
"operation": "AND"
}
"AND"
โ returned products/customers must contain all tags."OR"
โ returned products/customers need any tag in the array.
Response (example)
{
"success": true,
"customers": [
{
"node": {
"id": "gid://shopify/Customer/5127974846637",
"displayName": "nta",
"email": "[email protected]",
"firstName": "n",
"lastName": "ta",
"phone": null,
"tags": ["wholesale"],
"note": ""
},
"cursor": "eyJsYXN0X2lkIjo1MTI3OTc0ODQ2NjM3LCJsYXN0X3ZhbHVlIjo1MTI3OTc0ODQ2NjM3fQ=="
}
]
}
๐๏ธ Collection Endpoints
Note: As provided, Get Collections uses the
/customer/search
endpoint and returns acustomers
array.
POST https://b2b-solution-public-api.bsscommerce.com/api/v1/customer/search
Headers
Content-Type: application/json
Body
{
"domain": "abc.myshopify.com",
"accessKey": "xxx",
"afterIndex": null,
"first": 20,
"searchQuery": "nta"
}
Response (example)
{
"success": true,
"customers": [
{
"node": {
"id": "gid://shopify/Customer/5127974846637",
"displayName": "nta",
"email": "[email protected]",
"firstName": "n",
"lastName": "ta",
"phone": null,
"tags": ["wholesale"],
"note": ""
},
"cursor": "eyJsYXN0X2lkIjo1MTI3OTc0ODQ2NjM3LCJsYXN0X3ZhbHVlIjo1MTI3OTc0ODQ2NjM3fQ=="
}
]
}
โ๏ธ 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?