Use case for BSS B2B Solution

Sync B2B Rules and Customers With Your ERP via API

Use the Public API in BSS B2B Solution to create and update Custom Pricing, Price List, Volume Pricing and registration data from your ERP or PIM with an API key, instead of editing rules by hand.

  • App: BSS B2B Solution
  • Business model: Distributor
  • Key feature: Public API

Last updated

Reviewed by Hoa Nguyen, Senior Marketer. Last reviewed

API key card in BSS B2B Solution right after a key is generated, with the key hidden and the Copy and Download buttons
  • 4.9/5 1,187 reviews of BSS B2B Solution on the Shopify App Store
  • Built for Shopify Badge Shopify gives apps that meet its quality standards
  • 20 languages supported in the app

The problem

Prices, customers and rules already live in an ERP, PIM or spreadsheet, and nobody wants to maintain them a second time inside the app. Copying changes by hand is slow, and the two systems drift apart. Large catalogs make the problem worse every month.

The outcome

Your developer or integration partner pushes pricing rules from the system of record into BSS B2B Solution with an API key. Enabled rules are uploaded to the live theme, and the Logs and usage card shows each request and why a failed one failed.

how it works

How it works

  1. Check the plan

    The Public API is part of the Platinum plan. Confirm the plan before you plan any integration work.

  2. Generate the API key

    Open Integrations in the app, find the Public API card, click Get API key and generate the key. Copy or download it at once, because it is shown only one time.

  3. Send a first request

    Call a version 1 endpoint with your shop domain and the key, either as the accessKey field in the body or in the x-bss-b2b-api-key header.

  4. Write rules from your ERP data

    Create, update or delete Custom Pricing, Price List, Volume Pricing, Discount Code and registration records with the matching endpoint group, in bulk where the endpoint allows it.

  5. Upload the enabled rules

    Call the upload endpoint for the module so the enabled rules reach your active theme, at most once per module every 5 minutes.

  6. Watch the logs

    Open Logs and usage to see each request, its status and the full request and response when something fails.

To sync B2B pricing from an ERP to Shopify, use the Public API in BSS B2B Solution: generate one API key on the Platinum plan, then have your developer or integration partner create, update and delete Custom Pricing, Price List and Volume Pricing rules from your system of record, and call the upload endpoint so the enabled rules reach the live theme. Your team stops retyping prices into an admin screen.

This guide is for distributors and manufacturers whose prices, price classes or customer groups already live in an ERP, a PIM or a data pipeline. It explains who benefits, what the API covers and does not cover, a five-step integration outline, a worked example, and the limits to plan around, including the fact that there is no orders endpoint. It is written for the person who decides whether to build the integration, and it points to the developer docs for exact payloads.

Who this is for

The Public API suits you if most of these describe your store:

  • Your prices are maintained in an ERP, a PIM or a master spreadsheet, and the Shopify store is a second copy.
  • You have several price classes or customer groups, and a price change touches hundreds or thousands of variants.
  • Prices change weekly or daily, so a manual update falls behind between runs.
  • You have a developer, an agency or an integration partner who can write a scheduled job.
  • You already export price data as CSV, and want the same data to flow without anyone opening the app.

If your price list changes a few times a year, a CSV import is simpler. See import wholesale prices from CSV.

Why this matters

Two copies of a price list drift apart. Someone updates the ERP on Monday, forgets the store, and a buyer sees last quarter’s price on Tuesday. The buyer either orders at the wrong price, and you absorb the difference or cancel the order, or loses trust in the portal and calls the sales desk. The bigger the catalog and the more price classes you run, the more often this happens.

A data pipeline fixes the cause instead of the symptom. The ERP stays the system of record, a scheduled job writes the changes into BSS B2B Solution, and the storefront follows. Real stores want this flexibility. Alpha Coffee, a coffee roaster, notes that with API access in place it can keep Shopify as the central commerce layer while extending to ERP, CRM or finance platforms, and DermaplanePro reports reduced manual work through public API connections with external systems. See the Alpha Coffee and DermaplanePro case studies.

How to set it up with BSS B2B Solution

This section outlines the integration from the merchant side. Your developer needs the Public API guide for endpoints and payloads.

Step 1: Confirm the plan

The Public API is part of the Platinum plan. A shop can hold one API key at a time, and the plan also unlocks Price Lists, which many ERP integrations use for customer-specific prices. Confirm the plan before you scope any integration work.

Step 2: Generate the API key

In the app, open Integrations, find the Public API card and choose Get API key. The key is shown once, so copy or download it at that moment and put it in a password manager or a server environment variable. If it leaks, delete it on the same card, which stops every client that uses it, then generate a new one.

Integrations page in the BSS B2B Solution admin with the Public API card and its Get API key button
Open Integrations and find the Public API card.
API key card with the message that the key is generated, the key hidden, and Copy and Download buttons
The key is generated and shown once: copy or download it right away.

Step 3: Authenticate your first request

Version 1 endpoints take your `myshopify.com` domain and the key, either as `accessKey` in the request body or in the `x-bss-b2b-api-key` header. The version 2 volume pricing endpoint uses the `x-api-key` header. A Bearer token is not supported and returns 401, so do not build the client around the `Authorization` header.

Step 4: Write rules from your ERP data

Map each ERP price class to a rule target, such as a customer tag, and call the endpoint group for the module you use. The API manages Custom Pricing, Price List and Volume Pricing rules, discount code rules, registration form records and order limit rules, with create, update, delete and bulk operations where the endpoint allows them. Customer and product endpoints are read-only lookups that help you build rule payloads, for example finding customers by tag or listing products and collections. Requests are processed one at a time, so a client should queue its calls.

Custom Pricing page in the BSS B2B Solution admin with a list of rules, their customers, discounts, priority and status
Rules your integration writes appear in the same rule lists your team uses in the admin.

Step 5: Upload once, then verify

After a batch of changes, call the upload endpoint for the module so all enabled rules are written to your active theme. Upload endpoints allow one request per module every five minutes, so upload once at the end of a sync run, not after every row. A request over the limit returns `429`, and only enabled rules are uploaded. If your rules exceed the metafield capacity, the API saves what fits and returns a `partial_success` report with HTTP 200, so read the response body and not only the status code. Then check the result in the Logs and usage card under Advanced Settings > Public API, which lists recent requests with time, method, path and status, and shows the full request and response when something fails. The API can also return the price a given customer gets for given products, which is useful for comparing the app against the ERP.

Demo storefront collection for a wholesale customer where each product shows the retail price struck through next to the wholesale price
After the upload, the storefront shows the prices that came from your data.

Example: a distributor with three price classes

This example uses illustrative numbers, not results from a real store. A distributor keeps three price classes in its ERP: Retail Partner, Trade and Key Account. In BSS B2B Solution each class is a Price List rule that targets one customer tag. A nightly job exports the changed price rows, groups them by class, and calls the bulk save endpoint for each Price List. When all three finish, the job calls the Price List upload endpoint once.

On a Monday the ERP shows 3,200 changed prices. Instead of an analyst re-entering them, the job runs at 02:00, uploads once, and checks the Logs and usage card for any failed request. By morning a Trade buyer who logs in sees the Monday prices on product and collection pages. A failed request leaves an entry in the log with its status and body, and the job retries it after a short wait.

Price Lists page in the BSS B2B Solution admin with the module on and one rule for logged-in customers
A Price Lists page with a list rule for a customer group: the same rule type your integration writes.

Works well with

The API is one input path for the pricing engine. Other pages cover what happens to those rules once they exist:

The wholesale pricing hub collects the pricing guides. Useful glossary entries are price list, wholesale price and customer tag.

Import and export page in BSS B2B Solution with Export and Import cards and an export history section
The Import and export page is the no-code alternative for smaller catalogs.

Limits and common mistakes

  • There is no orders endpoint. The API manages pricing and discount rules, registration records and order limit rules, plus read-only customer, product and collection lookups. Keep order sync in your ERP connector for Shopify, and use this API for prices and customer groups.
  • One key per shop. Deleting the key stops every client that uses it, so rotate it on a plan and update the integration immediately.
  • Upload is rate limited. Upload endpoints allow one request per module every five minutes. The version 2 volume pricing endpoint allows 60 requests per 60 seconds for each shop.
  • Pricing data has caps. Rules are stored in Shopify metafields with at most 10 keys and 2,000,000 characters per key. Content over the caps is skipped and reported as `partial_success`, so prune inactive rules or split a very large rule set before you upload again.
  • Retries need a pause. Requests are processed one at a time, and after a server error the guide says to wait up to three minutes before retrying.
  • The API does not replace rule design. Targeting, priority and exclusions still follow the same rules as hand-made rules, so test one rule in the admin first.
  • The API feeds a theme storefront. Prices appear through the BSS B2B Solution app embed in your Shopify theme, so confirm the embed is on after any theme change.

Setup checklist

  • Confirm the shop is on the Platinum plan.
  • Decide the system of record for each price class and which customer tag each class maps to.
  • Generate the API key and store it in a password manager or environment variable.
  • Build the client with `accessKey` or the `x-bss-b2b-api-key` header, and queue requests.
  • Test one rule end to end in a development store, then check it in the admin.
  • Plan one upload call per module at the end of each sync run.
  • Add alerting on `429` and server errors, and read the Logs and usage card after the first runs.
  • Keep order sync in a separate connector.

Plans and requirements

The Public API needs the Platinum plan of BSS B2B Solution, one key per shop, and the app embed on your theme. The other plans and the 14-day free trial on paid plans are on the BSS B2B pricing page. The exact payloads are in the Public API guide, the uploading API guide and the Custom Pricing API guide. Install BSS B2B Solution from the Shopify App Store and ask your developer to start with one Price List.

key features

What makes it work

Rule endpoints

Read, create, update and delete Custom Pricing, Price List and Volume Pricing rules from code, including bulk save and mass delete.

Customer and product lookups

Read-only endpoints to find customers by tag, ID or search, and to list products and collections for your rule payloads.

Upload to theme

A request uploads all enabled rules to the active theme so the storefront matches your data.

Logs and usage

A card in the app lists recent requests with time, method, path and status.

Set this up with BSS B2B Solution

Install BSS B2B Solution from the Shopify App Store, then follow the guide to turn this on in your store.

faq

Frequently asked questions

Which plan includes the Public API?

The Platinum plan. A shop can hold one API key at a time. If a key leaks, delete it on the Public API card in Integrations, and every client using it stops working at once. You can then generate a new key and update your integration. Treat the key like a password and keep it in a server environment variable.

Can I sync orders through the API?

No. The API manages pricing and discount rules, registration form records and order limit rules, plus read-only lookups for customers, products and collections. It has no orders resource. Orders stay in Shopify, so use Shopify's own tools if your ERP needs them, and use this API for prices and customer groups.

What are the rate limits?

Upload endpoints allow one request per module every 5 minutes, and a request over the limit returns 429. The version 2 Volume Pricing endpoint allows 60 requests per 60 seconds for each shop and sends rate limit headers. Batch your changes and upload once after a sync run, instead of after every row.

How do I authenticate a request?

Version 1 endpoints take your shop domain and the access key, either as accessKey in the body or in the x-bss-b2b-api-key header. The version 2 endpoint uses the x-api-key header. Do not send the key as a Bearer token, because that format is not supported and the request fails with 401.

Which rules can I manage with the API?

You can create, update and delete Custom Pricing, Price List and Volume Pricing rules, plus discount code rules, registration form records and order limit rules, with bulk operations on several endpoints. Customer, product and collection endpoints are read-only lookups for building rule payloads. Check each guide for the exact operations.

What happens when I upload more rules than fit?

Pricing data is stored in Shopify metafields with at most 10 keys and 2,000,000 characters per key. If your enabled rules exceed that capacity, the API saves the rules that fit and returns a partial_success report with HTTP 200, listing how many were skipped. Prune inactive rules or split the set, then upload again.

How do I see why an API request failed?

Open the Logs and usage card under Advanced Settings and Public API. It lists recent requests with time, method, path and status, with tabs for Custom Pricing, Volume Pricing and Pricing List. Click a row to see the full request and response. Use it to confirm the integration connects and to debug failures.

Do I need the API, or is a CSV import enough?

If prices change a few times a year, the CSV import in the app is simpler and needs no developer. The Public API makes sense when prices live in an ERP or PIM and change often, because a scheduled job can push changes without anyone opening the app. The API needs the Platinum plan.

  • Public API