Public APIs for Uploading

When you create rules using Public APIs, it's essential to follow these steps to upload them to your store and make them effective. Below are the API Requests to upload rules

I. Upload Custom Pricing rules

Upload all the Custom Pricing rules to your store.

POST https://b2b-solution-public-api.bsscommerce.com/api/v1/rule/upload

When the request is sent, all enabled rules will be uploaded to the active theme.

This request has a rate limit of 5 mins/request.

Request Body

NameTypeDescription

domain*

String

Your store's myshopify domain

accessKey*

String

Your API Access Key

Example request body:

{ 
  "domain": "bsscommerce-store.myshopify.com", 
  "accessKey": "yt1pRFAU8ARdwQORhz/Ww7vyS+xxxxxxxxxxxxxx" 
}

II. Upload Quantity/Amount Breaks rules

Upload all the Quantity/Amount Breaks rules to your store.

POST https://b2b-solution-public-api.bsscommerce.com/api/v1/qb/rule/upload

When the request is sent, all enabled rules will be uploaded to the active theme.

This request has a rate limit of 5 mins/request.

Request Body

NameTypeDescription

domain*

String

Your store's myshopify domain

accessKey*

String

Your API Access Key

Example request body:

{ 
  "domain": "bsscommerce-store.myshopify.com", 
  "accessKey": "yt1pRFAU8ARdwQORhz/Ww7vyS+xxxxxxxxxxxxxx" 
}

III. Upload Price List rules

Upload all the Price List rules to your store.

POST https://b2b-solution-public-api.bsscommerce.com/api/v1/pl/rule/upload

When the request is sent, all enabled rules will be uploaded to the active theme.

This request has a rate limit of 5 mins/request.

Request Body

NameTypeDescription

domain*

String

Your store's myshopify domain

accessKey*

String

Your API Access Key

Example request body:

{ 
  "domain": "bsscommerce-store.myshopify.com", 
  "accessKey": "yt1pRFAU8ARdwQORhz/Ww7vyS+xxxxxxxxxxxxxx" 
}

How do we upload data to Shopify?

  • Data will be saved into a maximum of 10 keys metafield.

  • Each key data type is JSON and has a limit size of 2.000.000 characters. Then, the data rule max size will be around 20.000.000 characters, all data exceed will not be uploaded.

  • The data uploaded to the storefront contains mostly rules data and some data on settings (but the setting data is small).

  • Only active rules will be uploaded.

Last updated