> For the complete documentation index, see [llms.txt](https://docs.b2bridge.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.b2bridge.io/integration/api-integration/public-apis-for-price-lists.md).

# Public APIs for Price Lists

### How to get the access key

Go to **Dashboard > Pubic API**, fill out the form and submit your access request. We’ll review it and send the access key to your email.

<figure><img src="/files/McdnOtcVHySxSszC2oVM" alt=""><figcaption></figcaption></figure>

## Rule endpoints

There are fields of Price List rule, you need to understand:

* `id`: If provided and matches an existing price list, the rule will be updated. If omitted or does not match any existing price list, a new price list will be created.
* `name`<mark style="color:red;">\*</mark>: Price list name.
* `priority`: Must be a number between `0` and `99` if provided.
* `status`
  * 0: disable
  * 1: enable
* `replacedVariants`
  * true: Replace all existing variants (default).
  * false: Overwrite variants with matching IDs.
* `discount_type`
  * PERCENT: Apply a percentage as a discount.
  * FIXED: Decrease a fixed amount off original prices.
  * NEW: Apply a new price.
  * CUSTOMIZE: Customize for each product.
* `discount_value`
* `volume_type`
  * NO\_LIMIT: No discount.
  * QUANTITY: Discount on purchasing quantity.
  * AMOUNT: Discount on purchasing amount.
  * CUSTOMIZE: Customize for each product.
* `volume_apply`
  * EVERY\_PRODUCT: Applies to all products in the price list.
  * TOTAL\_PRODUCT: Applies to the total quantity/amount of all products in the price list.
* `volume_table`: If provided, must be an **array** of volume pricing tiers.
  * volume\_pricing\_from: value must be **greater than** the previous one.
  * volume\_pricing\_type: "PERCENT", "FIXED", or "NEW".
  * volume\_pricing\_value: discount value.
* `limit_type`
  * NO\_LIMIT: No limit.
  * QUANTITY: Limit on purchasing quantity.
  * AMOUNT: Limit on purchasing amount.
  * CUSTOMIZE: Customize for each product.
* `limit_apply`
  * EVERY\_PRODUCT: Applies to all products in the price list.
  * TOTAL\_PRODUCT: Applies to the total quantity/amount of all products in the price list.
* `minimum`: Minimum quantity/amount of each product or all products in the price list in the order.
* `maximum`: Maximum quantity/amount of each product or all products in the price list in the order.
* `increment_quantity`
* `pricingVariants`: If provided, must be an **array**.
  * variant\_id, product\_id, origin\_price, variant\_title, product\_title, handle, sku, barcode, image\_url, inventory\_quantity: <mark style="color:red;">require</mark>.
  * price: Applicable only when `discount_type` is `"CUSTOMIZE"`. Defaults to the value of `origin_price` if not provided.
  * minimum: Only applicable when `limit_type` is `"CUSTOMIZE"`.
  * maximum: Only applicable when `limit_type` is `"CUSTOMIZE"`. Must be **greater than** `minimum` if provided.
  * order\_limit\_by: Applicable only when `limit_type` is `"CUSTOMIZE"`. Defaults to `"QUANTITY"` if not provided.
  * increment\_quantity: Applicable only when `limit_type` is `"CUSTOMIZE"` and `order_limit_by` is `"QUANTITY"`. Defaults to `1` if not provided.
  * volume\_limit\_by: Applicable only when `volume_type` is `"CUSTOMIZE"`. Defaults to `"QUANTITY"` if not provided.
  * volume\_pricing: Same structure and validation rules as `volume_table`.

### Get all pricing list rules by domain

<mark style="color:green;">**`GET`**</mark> `https://b2bridge-public-api.b2bridge.io/api/v1/pricing-lists/get-by-domain`

#### Headers

| KEY                | VALUE |
| ------------------ | ----- |
| x-b2bridge-api-key | xxx   |

#### Params

| KEY    | VALUE             |
| ------ | ----------------- |
| domain | abc.myshopify.com |

#### Response <mark style="color:green;">`200`</mark>

```json
{
    "success": true,
    "message": "Get pricing rule successfully",
    "rules": [
        {
            "id": 1,
            "shop_id": 1,
            "name": "pl1",
            "status": 1,
            "priority": 0,
            "market_condition_type": "ALL",
            "market_ids": "[]",
            "discount_type": "PERCENT",
            "discount_value": "10",
            "volume_type": "QUANTITY",
            "volume_apply": "EVERY_PRODUCT",
            "volume_table": "[{\"volume_pricing_from\":5,\"volume_pricing_type\":\"PERCENT\",\"volume_pricing_value\":10},{\"volume_pricing_from\":10,\"volume_pricing_type\":\"PERCENT\",\"volume_pricing_value\":20}]",
            "limit_type": "QUANTITY",
            "limit_apply": "EVERY_PRODUCT",
            "minimum": "0",
            "maximum": "5",
            "increment_quantity": 0,
            "start_date": "2025-05-20 06:46:22.03",
            "end_date": null,
            "enable_end_date": 0,
            "created_at": "2025-05-23T04:46:29.110Z",
            "updated_at": "2025-06-02T07:31:26.228Z"
        }
    ]
}
```

### Get pricing list rule by id

<mark style="color:green;">**`GET`**</mark> `https://b2bridge-public-api.b2bridge.io/api/v1/pricing-lists/get-by-id`

#### Headers

| KEY                | VALUE |
| ------------------ | ----- |
| x-b2bridge-api-key | xxx   |

#### Params

| KEY    | VALUE             |
| ------ | ----------------- |
| domain | abc.myshopify.com |
| id     | 1                 |

#### Response <mark style="color:green;">`200`</mark>

```json
{
    "success": true,
    "message": "Get pricing rule by id successfully",
    "rule": {
        "id": 1,
        "shop_id": 1,
        "name": "pl1",
        "status": 1,
        "priority": 0,
        "market_condition_type": "ALL",
        "market_ids": "[]",
        "discount_type": "PERCENT",
        "discount_value": "10",
        "volume_type": "QUANTITY",
        "volume_apply": "EVERY_PRODUCT",
        "volume_table": "[{\"volume_pricing_from\":5,\"volume_pricing_type\":\"PERCENT\",\"volume_pricing_value\":10},{\"volume_pricing_from\":10,\"volume_pricing_type\":\"PERCENT\",\"volume_pricing_value\":20}]",
        "limit_type": "QUANTITY",
        "limit_apply": "EVERY_PRODUCT",
        "minimum": "0",
        "maximum": "5",
        "increment_quantity": 0,
        "start_date": "2025-05-20 06:46:22.03",
        "end_date": null,
        "enable_end_date": 0,
        "created_at": "2025-05-23T04:46:29.110Z",
        "updated_at": "2025-06-02T07:31:26.228Z",
        "pricingListVariants": [
            {
                "id": 70,
                "shop_id": 1,
                "rule_id": 1,
                "product_id": "9040691429593",
                "variant_id": "46076618014937",
                "sku": "",
                "barcode": "",
                "price": 557.1,
                "origin_price": 619,
                "variant_title": "Default Title",
                "product_title": "14k Dangling Pendant Earrings Bac",
                "handle": "14k-dangling-pendant-earrings-1",
                "image_url": "https://cdn.shopify.com/s/files/1/0719/7638/6777/files/18k-white-gold-dangling-pendant-earrings_17e71027-81d8-4a49-a455-2e5c205963ee.jpg?v=1730281621",
                "inventory_quantity": -11,
                "variant_different": "{}",
                "minimum": 1,
                "maximum": null,
                "increment_quantity": 1,
                "order_limit_by": "QUANTITY",
                "volume_pricing": "[]",
                "volume_limit_by": "QUANTITY",
                "created_at": "2025-06-02T07:31:26.237Z",
                "updated_at": null
            }
        ]
    }
}
```

### Get variants in price list rule by rule id

<mark style="color:green;">**`GET`**</mark> `https://b2bridge-public-api.b2bridge.io/api/v1/pricing-lists/get-variants-by-rule-id`

#### Headers

| KEY                | VALUE |
| ------------------ | ----- |
| x-b2bridge-api-key | xxx   |

#### Params

| KEY    | VALUE             |
| ------ | ----------------- |
| domain | abc.myshopify.com |
| id     | 1                 |

#### Response <mark style="color:green;">`200`</mark>

```json
{
    "success": true,
    "message": "Get variants successfully",
    "rule": [
        {
            "product_id": "9040691429593",
            "pricing_list_variants": [
                {
                    "id": 70,
                    "shop_id": 1,
                    "rule_id": 1,
                    "product_id": "9040691429593",
                    "variant_id": "46076618014937",
                    "sku": "",
                    "barcode": "",
                    "price": 557.1,
                    "origin_price": 619,
                    "variant_title": "Default Title",
                    "product_title": "14k Dangling Pendant Earrings Bac",
                    "handle": "14k-dangling-pendant-earrings-1",
                    "image_url": "https://cdn.shopify.com/s/files/1/0719/7638/6777/files/18k-white-gold-dangling-pendant-earrings_17e71027-81d8-4a49-a455-2e5c205963ee.jpg?v=1730281621",
                    "inventory_quantity": -11,
                    "variant_different": "{}",
                    "minimum": 1,
                    "maximum": null,
                    "increment_quantity": 1,
                    "order_limit_by": "QUANTITY",
                    "volume_pricing": "[]",
                    "volume_limit_by": "QUANTITY",
                    "created_at": "2025-06-02T07:31:26.23775",
                    "updated_at": null
                }
            ]
        }
    ]
}
```

### Save price list rule

<mark style="color:yellow;">**`POST`**</mark> `https://b2bridge-public-api.b2bridge.io/api/v1/pricing-lists/save`

#### Headers

| KEY                | VALUE            |
| ------------------ | ---------------- |
| Content-Type       | application/json |
| x-b2bridge-api-key | xxx              |

#### Body

```json
{
    "domain": "abc.myshopify.com",
    "rule": {
        "replacedVariants": false,
        "discount_type": "CUSTOMIZE",
        "discount_value": 0,
        "enable_end_date": 0,
        "end_date": null,
        "increment_quantity": 0,
        "limit_apply": "EVERY_PRODUCT",
        "limit_type": "CUSTOMIZE",
        "name": "pl hehe",
        "priority": 0,
        "status": 1,
        "volume_apply": "EVERY_PRODUCT",
        "volume_type": "CUSTOMIZE",
        "volume_table": "",
        "pricingVariants": [
            {
                "product_id": "9040691134681",
                "variant_id": "46076617752793",
                "price": 579,
                "origin_price": 579,
                "variant_title": "Default Title",
                "product_title": "14k Dangling Pendant Earrings Vang",
                "handle": "14k-dangling-pendant-earrings",
                "sku": "SKU8386",
                "barcode": "",
                "image_url": "https://cdn.shopify.com/s/files/1/0719/6777/files/18k-rose-gold-infinite",
                "inventory_quantity": 0,
                "minimum": 1,
                "increment_quantity": 1,
                "order_limit_by": "AMOUNT",
                "volume_pricing": [
                    {
                        "volume_pricing_from": 1,
                        "volume_pricing_type": "PERCENT",
                        "volume_pricing_value": 4
                    },
                    {
                        "volume_pricing_from": 2,
                        "volume_pricing_type": "FIXED",
                        "volume_pricing_value": 4
                    },
                    {
                        "volume_pricing_from": 3,
                        "volume_pricing_type": "NEW",
                        "volume_pricing_value": 4
                    }
                ],
                "volume_limit_by": "QUANTITY",
                "variant_different": "{\"limit_different\":false}"
            }
        ]
    }
}
```

#### Response <mark style="color:green;">`200`</mark>

```json
{
    "success": true,
    "message": "Created pricing list rule successfully",
    "rule": {
        "id": 4,
        "shop_id": 1,
        "name": "pl hehe",
        "status": 1,
        "priority": 0,
        "market_condition_type": "ALL",
        "market_ids": "[]",
        "discount_type": "CUSTOMIZE",
        "discount_value": "0",
        "volume_type": "CUSTOMIZE",
        "volume_apply": "EVERY_PRODUCT",
        "volume_table": "[{\"volume_pricing_from\":0,\"volume_pricing_type\":\"PERCENT\",\"volume_pricing_value\":0}]",
        "limit_type": "CUSTOMIZE",
        "limit_apply": "EVERY_PRODUCT",
        "minimum": "0",
        "maximum": "0",
        "increment_quantity": 0,
        "start_date": "2025-06-02 10:38:11.568",
        "end_date": null,
        "enable_end_date": 0,
        "created_at": "2025-06-02T10:38:11.670Z",
        "updated_at": null
    }
}
```

### Save multiple price list rules

<mark style="color:yellow;">**`POST`**</mark> `https://b2bridge-public-api.b2bridge.io/api/v1/pricing-lists/bulk-save`

#### Headers

| KEY                | VALUE            |
| ------------------ | ---------------- |
| Content-Type       | application/json |
| x-b2bridge-api-key | xxx              |

#### Body

```json
{
    "domain": "abc.myshopify.com",
    "rules": [
        {
            "replacedVariants": false,
            "discount_type": "PERCENT",
            "discount_value": 0,
            "enable_end_date": 0,
            "end_date": null,
            "increment_quantity": 0,
            "limit_apply": "EVERY_PRODUCT",
            "limit_type": "NO_LIMIT",
            "name": "pl test",
            "priority": 0,
            "status": 1,
            "volume_apply": "EVERY_PRODUCT",
            "volume_type": "NO_LIMIT",
            "volume_table": "",
            "pricingVariants": [
                {
                    "product_id": "9040691134681",
                    "variant_id": "46076617752793",
                    "price": 579,
                    "origin_price": 579,
                    "variant_title": "Default Title",
                    "product_title": "14k Dangling Pendant Earrings Vang",
                    "handle": "14k-dangling-pendant-earrings",
                    "sku": "SKU8386",
                    "barcode": "",
                    "image_url": "https://cdn.shopify.com/s/files/1/0719/6777/files/18k-rose-gold-infinite",
                    "inventory_quantity": 0,
                    "minimum": 1,
                    "maximum": null,
                    "increment_quantity": 1,
                    "order_limit_by": "AMOUNT",
                    "volume_pricing": [],
                    "volume_limit_by": "QUANTITY",
                    "variant_different": "{\"limit_different\":false}"
                }
            ]
        }
    ]
}
```

#### Response <mark style="color:green;">`200`</mark>

```json
{
    "success": true,
    "message": [
        "Create new rule 'pl test' with ID 5 successfully"
    ]
}
```

### Duplicate price list rule

<mark style="color:yellow;">**`POST`**</mark> `https://b2bridge-public-api.b2bridge.io/api/v1/pricing-lists/duplicate-by-id`

#### Headers

| KEY                | VALUE            |
| ------------------ | ---------------- |
| Content-Type       | application/json |
| x-b2bridge-api-key | xxx              |

#### Body

```json
{
    "domain": "abc.myshopify.com",
    "id": 1
}
```

#### Response <mark style="color:green;">`200`</mark>

```json
{
    "success": true,
    "message": "Duplicate rule successfully",
    "rule": {
        "id": 3,
        "shop_id": 1,
        "name": "pl1",
        "status": 1,
        "priority": 0,
        "market_condition_type": "ALL",
        "market_ids": "[]",
        "discount_type": "PERCENT",
        "discount_value": "10",
        "volume_type": "QUANTITY",
        "volume_apply": "EVERY_PRODUCT",
        "volume_table": "[{\"volume_pricing_from\":5,\"volume_pricing_type\":\"PERCENT\",\"volume_pricing_value\":10},{\"volume_pricing_from\":10,\"volume_pricing_type\":\"PERCENT\",\"volume_pricing_value\":20}]",
        "limit_type": "QUANTITY",
        "limit_apply": "EVERY_PRODUCT",
        "minimum": "0",
        "maximum": "5",
        "increment_quantity": 0,
        "start_date": "2025-05-20 06:46:22.03",
        "end_date": null,
        "enable_end_date": 0,
        "created_at": "2025-06-02T10:37:12.705Z",
        "updated_at": null
    }
}
```

### Delete price list rule

<mark style="color:red;">**`DELETE`**</mark> `https://b2bridge-public-api.b2bridge.io/api/v1/pricing-lists/delete-by-id`

#### Headers

| KEY                | VALUE |
| ------------------ | ----- |
| x-b2bridge-api-key | xxx   |

#### Params

| KEY    | VALUE             |
| ------ | ----------------- |
| domain | abc.myshopify.com |
| id     | 1                 |

#### Response <mark style="color:green;">`200`</mark>

```json
{
    "success": true,
    "message": "Delete rule successfully"
}
```

### Mass delete price list rules

<mark style="color:yellow;">**`POST`**</mark> `https://b2bridge-public-api.b2bridge.io/api/v1/pricing-lists/delete-by-id`

#### Headers

| KEY                | VALUE            |
| ------------------ | ---------------- |
| Content-Type       | application/json |
| x-b2bridge-api-key | xxx              |

#### Body

```json
{
    "domain": "abc.myshopify.com",
    "ids": [
        6,
        19
    ]
}
```

#### Response <mark style="color:green;">`200`</mark>

```json
{
    "success": true,
    "message": "Deleted pricing rules successfully",
    "deleted": [
        6,
        19
    ],
    "failed": []
}
```

{% hint style="success" %}

### Need Help?

If you have questions or run into issues while using any feature, we’re here to help.

* 💬 **Start a** [**Live Chat** with our support team](https://go.crisp.chat/chat/embed/?website_id=a59f354c-f51f-4f84-ae9a-c0e8dd69d2e5) directly from your B2Bridge dashboard.
* 📧 **Email us at** [**support@b2bridge.io**](mailto:support@b2bridge.io) and we’ll get back to you as soon as possible.
  {% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.b2bridge.io/integration/api-integration/public-apis-for-price-lists.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
