---
title: "Separate pricing for catalog variants"
description: >
  Batch removal of variant prices across multiple company location catalogs. Batch modification of tiered prices for variants across multiple company location catalogs, overwriting and updating them.
doc_type: openapi
doc_category: openapi
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-rest-api/product/catalog/separate-pricing-for-catalog-variants'
  md: 'https://developer.shopline.com/docs/admin-rest-api/product/catalog/separate-pricing-for-catalog-variants.md'
---
# Separate pricing for catalog variants

Batch removal of variant prices across multiple company location catalogs. Batch modification of tiered prices for variants across multiple company location catalogs, overwriting and updating them.

- **Base URL:** `https://{handle}.myshopline.com/admin/openapi`
- **Required Scopes:** `write_products`
- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** RESTful

## Endpoint

```http
PUT /company_location_catalog/variants_pricing.json
```

## Base URL

* `https://{handle}.myshopline.com/admin/openapi`

  * `{handle}`: `handle` : The store's unique identifier, which is the prefix of the store's domain name. For example, if a store's domain name is `open001.myshopline.com` , the store handle is `open001` .

## Required Permissions

* `write_products`

## Request

### Request Headers

* `Content-Type`

  string (required)

  The field must be set to the fixed value `application/json; charset=utf-8`.

* `Authorization`

  string (required)

   The access token for the API resource. Refer to [App authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/app-authorization.md?lang=en) to obtain the access token, and then pass the obtained token in the Bearer format. 

### Request Body

* `catalog_id`

  string

  The ID of company location catalog.

* `prices_to_delete_by_variant_ids`

  array<string>

  Identify the list of variants for which price rules and quantity rules need to be deleted. If both the deletion list and the addition list are provided simultaneously, the price of the variant will be cleared. A maximum of 500 variants can be processed.Invalid IDs will be filtered out.

* `product_id`

  string

  The ID of the product in the catalog.

* `variant_prices`

  array<object>

  Variant pricing list, limited to a maximum of 500 variants.

  * `variant_id`

    string

    The ID of the variant in the catalog.

  * `percent`

    integer

    The adjustment value based on `percent_type`, formatted as a percentage.
    - When decreasing the price, the value is limited to 0-100.
    - When increasing the price, the value is limited to 0-10,000.

  * `percent_type`

    integer

    The type of percentage adjustment, with a value of `1` for decreasing the price and a value of `2` for increasing the price.

  * `price`

    string

    Fixed price

  * `price_adjustment_method`

    integer

    The type of price adjustment, with a value of `1` for percentage and a value of `2` for fixed price.

  * `quantity_price_breaks`

    array<object>

    Gradient pricing list.

    * `percent`

      integer

      The adjustment value based on `percent_type`, formatted as a percentage.
      - When decreasing the price, the value is limited to 0-100.
      - When increasing the price, the value is limited to 0-10,000.

    * `percent_type`

      integer

      The type of percentage adjustment, with a value of `1` for decreasing the price and a value of `2` for increasing the price.

    * `price`

      string

      Fixed price, valid only when `price_adjustment_method=2`.

    * `minimum_qty`

      integer

      Gradient-based minimum purchase quantity.

  * `quantity_rules`

    object

    Rules for purchase quantity

    * `maximum`

      integer

      Maximum purchase quantity.

    * `minimum`

      integer

      Minimum purchase quantity.

    * `increment`

      integer

      Purchase quantity increment where each increase must be a multiple of the increment.

## Response

### Status Codes

* `200`

  For the complete list of codes and messages, see [Http status code](https://developer.shopline.com/docs/apps/api-instructions-for-use/http-status-code.md?lang=en).

* `401`

  

* `429`

  

### Response Headers

* `traceId`

  A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise.

### Response Body

#### 200

_No response body_

#### 401

* `errors`

  string

  Error message. 


#### 429

* `errors`

  string

  Error message. 


## OpenAPI Definition

```json
{
  "description": "Batch removal of variant prices across multiple company location catalogs. Batch modification of tiered prices for variants across multiple company location catalogs, overwriting and updating them.",
  "externalDocs": {
    "description": "Permission point used by the interface is `write_products` , For more information about the use of permission points, see",
    "url": "ec20/3cv5d7wpfgr6a8z5/xabczf5442284vkq?lang=en",
    "errorTableDescription": ""
  },
  "operationId": "0Kw92hKe",
  "parameters": [
    {
      "name": "Content-Type",
      "in": "header",
      "description": "The field must be set to the fixed value `application/json; charset=utf-8`.",
      "required": true,
      "style": "string",
      "schema": {
        "name": "Content-Type",
        "type": "string",
        "example": "application/json; charset=utf-8"
      }
    },
    {
      "name": "Authorization",
      "in": "header",
      "description": " The access token for the API resource. Refer to [App authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/app-authorization.md?lang=en) to obtain the access token, and then pass the obtained token in the Bearer format. ",
      "required": true,
      "style": "string",
      "schema": {
        "name": "Authorization",
        "description": " The access token for the API. Please refer to [App authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/app-authorization.md?lang=en) to obtain the access token, and then put the obtained access token into the API request header in Bearer Token.",
        "type": "string",
        "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
      },
      "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "catalog_id": {
              "name": "catalog_id",
              "description": "The ID of company location catalog.",
              "type": "string",
              "example": "6598087148213149672"
            },
            "prices_to_delete_by_variant_ids": {
              "name": "prices_to_delete_by_variant_ids",
              "description": "Identify the list of variants for which price rules and quantity rules need to be deleted. If both the deletion list and the addition list are provided simultaneously, the price of the variant will be cleared. A maximum of 500 variants can be processed.Invalid IDs will be filtered out.",
              "type": "array",
              "items": {
                "name": "prices_to_delete_by_variant_ids",
                "description": "Identify the list of variants for which price rules and quantity rules need to be deleted. If both the deletion list and the addition list are provided simultaneously, the price of the variant will be cleared. A maximum of 500 variants can be processed.Invalid IDs will be filtered out.",
                "type": "string",
                "example": "18064429954848899821950520"
              },
              "example": [
                "18064429954848899821950520"
              ]
            },
            "product_id": {
              "name": "product_id",
              "description": "The ID of the product in the catalog.",
              "type": "string",
              "example": "16064429954842188935480520"
            },
            "variant_prices": {
              "name": "variant_prices",
              "description": "Variant pricing list, limited to a maximum of 500 variants.",
              "type": "array",
              "items": {
                "name": "variant_prices",
                "description": "Variant pricing list, limited to a maximum of 500 variants.",
                "type": "object",
                "properties": {
                  "variant_id": {
                    "name": "variant_id",
                    "description": "The ID of the variant in the catalog.",
                    "type": "string",
                    "example": "18064429954848899821990520"
                  },
                  "percent": {
                    "name": "percent",
                    "description": "The adjustment value based on `percent_type`, formatted as a percentage.\n- When decreasing the price, the value is limited to 0-100.\n- When increasing the price, the value is limited to 0-10,000.",
                    "type": "integer",
                    "example": 50
                  },
                  "percent_type": {
                    "name": "percent_type",
                    "description": "The type of percentage adjustment, with a value of `1` for decreasing the price and a value of `2` for increasing the price.",
                    "type": "integer",
                    "example": 1
                  },
                  "price": {
                    "name": "price",
                    "description": "Fixed price",
                    "type": "string",
                    "example": "100"
                  },
                  "price_adjustment_method": {
                    "name": "price_adjustment_method",
                    "description": "The type of price adjustment, with a value of `1` for percentage and a value of `2` for fixed price.",
                    "type": "integer",
                    "example": 1
                  },
                  "quantity_price_breaks": {
                    "name": "quantity_price_breaks",
                    "description": "Gradient pricing list.",
                    "type": "array",
                    "items": {
                      "name": "quantity_price_breaks",
                      "description": "Gradient pricing list.",
                      "type": "object",
                      "properties": {
                        "percent": {
                          "name": "percent",
                          "description": "The adjustment value based on `percent_type`, formatted as a percentage.\n- When decreasing the price, the value is limited to 0-100.\n- When increasing the price, the value is limited to 0-10,000.",
                          "type": "integer",
                          "example": 50
                        },
                        "percent_type": {
                          "name": "percent_type",
                          "description": "The type of percentage adjustment, with a value of `1` for decreasing the price and a value of `2` for increasing the price.",
                          "type": "integer",
                          "example": 1
                        },
                        "price": {
                          "name": "price",
                          "description": "Fixed price, valid only when `price_adjustment_method=2`.",
                          "type": "string",
                          "example": "100"
                        },
                        "minimum_qty": {
                          "name": "minimum_qty",
                          "description": "Gradient-based minimum purchase quantity.",
                          "type": "integer",
                          "example": 2
                        }
                      },
                      "example": {
                        "percent_type": 1,
                        "price": "100",
                        "minimum_qty": 2,
                        "percent": 50
                      }
                    },
                    "example": [
                      {
                        "price": "100",
                        "minimum_qty": 2,
                        "percent": 50,
                        "percent_type": 1
                      }
                    ]
                  },
                  "quantity_rules": {
                    "name": "quantity_rules",
                    "description": "Rules for purchase quantity",
                    "type": "object",
                    "properties": {
                      "maximum": {
                        "name": "maximum",
                        "description": "Maximum purchase quantity.",
                        "type": "integer",
                        "example": 8
                      },
                      "minimum": {
                        "name": "minimum",
                        "description": "Minimum purchase quantity.",
                        "type": "integer",
                        "example": 2
                      },
                      "increment": {
                        "name": "increment",
                        "description": "Purchase quantity increment where each increase must be a multiple of the increment.",
                        "type": "integer",
                        "example": 2
                      }
                    },
                    "required": [
                      "increment",
                      "minimum"
                    ],
                    "example": {
                      "increment": 2,
                      "maximum": 8,
                      "minimum": 2
                    }
                  }
                },
                "required": [
                  "price_adjustment_method",
                  "quantity_rules",
                  "variant_id"
                ],
                "example": {
                  "percent": 50,
                  "percent_type": 1,
                  "price": "100",
                  "price_adjustment_method": 1,
                  "quantity_price_breaks": [
                    {
                      "percent": 50,
                      "percent_type": 1,
                      "price": "100",
                      "minimum_qty": 2
                    }
                  ],
                  "quantity_rules": {
                    "increment": 2,
                    "maximum": 8,
                    "minimum": 2
                  },
                  "variant_id": "18064429954848899821990520"
                }
              },
              "example": [
                {
                  "variant_id": "18064429954848899821990520",
                  "percent": 50,
                  "percent_type": 1,
                  "price": "100",
                  "price_adjustment_method": 1,
                  "quantity_price_breaks": [
                    {
                      "percent_type": 1,
                      "price": "100",
                      "minimum_qty": 2,
                      "percent": 50
                    }
                  ],
                  "quantity_rules": {
                    "minimum": 2,
                    "increment": 2,
                    "maximum": 8
                  }
                }
              ]
            }
          },
          "required": [
            "catalog_id",
            "product_id"
          ],
          "example": {
            "prices_to_delete_by_variant_ids": [
              "18064429954848899821950520"
            ],
            "product_id": "16064429954842188935480520",
            "variant_prices": [
              {
                "variant_id": "18064429954848899821990520",
                "percent": 50,
                "percent_type": 1,
                "price": "100",
                "price_adjustment_method": 1,
                "quantity_price_breaks": [
                  {
                    "minimum_qty": 2,
                    "percent": 50,
                    "percent_type": 1,
                    "price": "100"
                  }
                ],
                "quantity_rules": {
                  "maximum": 8,
                  "minimum": 2,
                  "increment": 2
                }
              }
            ],
            "catalog_id": "6598087148213149672"
          }
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "description": "For the complete list of codes and messages, see [Http status code](https://developer.shopline.com/docs/apps/api-instructions-for-use/http-status-code.md?lang=en).",
      "headers": {
        "traceId": {
          "description": "A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise."
        }
      },
      "content": {
        "application/json": {}
      }
    },
    "401": {
      "headers": {
        "traceId": {
          "description": "A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise."
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "Error message. ",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    },
    "429": {
      "headers": {
        "traceId": {
          "description": "A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise."
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "Error message. ",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    }
  },
  "security": [
    {
      "oauth2": []
    }
  ],
  "method": "put",
  "path": "/company_location_catalog/variants_pricing.json",
  "servers": [
    {
      "url": "https://{handle}.myshopline.com/admin/openapi",
      "variables": {
        "handle": {
          "default": "openapiceshidianpu",
          "description": "`handle` : The store's unique identifier, which is the prefix of the store's domain name. For example, if a store's domain name is `open001.myshopline.com` , the store handle is `open001` ."
        }
      }
    }
  ],
  "info": {
    "title": "Separate pricing for catalog variants",
    "version": "v20270301"
  },
  "authIndexes": [
    "write_products"
  ]
}
```