PUT /catalog/products/{product_id}/variants/{variant_id}
Updates a product variant.
Servers
- https://api.bigcommerce.com/stores/{store_hash}/v3
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
product_id |
Integer | Yes |
The ID of the |
variant_id |
Integer | Yes |
ID of the variant on a product, or on an associated Price List Record. |
Request headers
| Name | Type | Required | Description |
|---|---|---|---|
Accept |
String | Yes |
The MIME type of the response body. Default value: "application/json" |
Content-Type |
String | Yes |
The MIME type of the request body. Default value: "application/json" |
Request body fields
| Name | Type | Required | Description |
|---|---|---|---|
price |
Number | No |
This variant’s base price on the storefront. If a Price List ID is used, the Price List value will be used. If a Price List ID is not used, and this value is |
retail_price |
Number | No |
This variant’s retail price on the storefront. If a Price List ID is used, the Price List value will be used. If a Price List ID is not used, and this value is null, the product’s retail price (set in the Product resource’s |
mpn |
String | No |
The Manufacturer Part Number (MPN) for the variant. |
inventory_level |
Integer | No |
Inventory level for the variant, which is used when the product’s inventory_tracking is set to The inventory for a variant cannot exceed 2,147,483,647 in the catalog. The sum of the variant inventories, or the total inventory for a product, cannot exceed 2,147,483,647. If you exceed the limit, the store sets the variant inventory to the limit if no other variant inventories are set. If other variant inventories are set, the store does not save the variant inventory rather than setting the variant inventory to the remaining limit. The Catalog API handles limits in a different way than the Inventory API. For more information, see Limit handling. |
bin_picking_number |
String | No |
Identifies where in a warehouse the variant is located. |
cost_price |
Number | No |
The cost price of the variant. It is not affected by Price List prices. This value displays as null in the control panel when |
height |
Number | No |
Height of the variant, which can be used when calculating shipping costs. If this value is |
width |
Number | No |
Width of the variant, which can be used when calculating shipping costs. If this value is |
depth |
Number | No |
Depth of the variant, which can be used when calculating shipping costs. If this value is |
image_url |
String | No |
Publicly available image url |
fixed_cost_shipping_price |
Number | No |
A fixed shipping cost for the variant. If defined, this value will be used during checkout instead of normal shipping-cost calculation. |
sku |
String | No | |
purchasing_disabled |
Boolean | No |
If |
purchasing_disabled_message |
String | No |
If |
is_free_shipping |
Boolean | No |
Flag used to indicate whether the variant has free shipping. If |
gtin |
String | No | |
sale_price |
Number | No |
This variant’s sale price on the storefront. If a Price List ID is used, the Price List value will be used. If a Price List ID is not used, and this value is null, the product’s sale price (set in the Product resource’s |
inventory_warning_level |
Integer | No |
When the variant hits this inventory level, it is considered low stock. |
weight |
Number | No |
This variant’s base weight on the storefront. If this value is null, the product’s default weight (set in the Product resource’s weight field) will be used as the base weight. |
upc |
String | No |
The UPC code used in feeds for shopping comparison sites and external channel integrations. |
product_id |
Integer | No |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.