optional, string, max chars=100 A unique identifier code a seller assigns to each product variant. Retailers and merchants use SKUs to keep track of inventory and sales data and help organize products within a store or warehouse. SKUs can include a combination of letters, numbers, and symbols and can vary in length depending on the seller's needs.
boolean, default=false Product variant is deleted or not. If the value is true then the product variant has been deleted else it exists. Once the product variant is deleted, you can reuse the product variant id and name.
optional, enumerated string Status of the product variant.
Possible values are
activeThe active product variants are visible on the storefront, subscription, or checkout.inactiveThe inactive product variants are not visible on the storefront, subscription, or checkout.
optional, long Version number of this resource. The resource_version is updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.
This is a list of the event types we currently support. We will continue
to add more events moving forward. All events follow a uniform pattern -
<resource>_<event_name>. The resources that will be
present in the event content are provided beneath each event type's
description.
Note: If consolidated invoicing is enabled, the
attributes invoice.subscription_id and
credit_note.subscription_id should not be used
(as it will not be present if the invoice / credit note has lines from
multiple subscriptions). Instead to know the related subscriptions,
their line_items' subscription_id attribute should be referred.
optional, string, max chars=100 A unique identifier code a seller assigns to each product variant. Retailers and merchants use SKUs to keep track of inventory and sales data and help organize products within a store or warehouse. SKUs can include a combination of letters, numbers, and symbols and can vary in length depending on the seller's needs.
boolean, default=false Product variant is deleted or not. If the value is true then the product variant has been deleted else it exists. Once the product variant is deleted, you can reuse the product variant id and name.
optional, enumerated string Status of the product variant.
Possible values are
activeThe active product variants are visible on the storefront, subscription, or checkout.inactiveThe inactive product variants are not visible on the storefront, subscription, or checkout.
optional, long Version number of this resource. The resource_version is updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.
optional, string, max chars=100 A unique identifier code a seller assigns to each product variant. Retailers and merchants use SKUs to keep track of inventory and sales data and help organize products within a store or warehouse. SKUs can include a combination of letters, numbers, and symbols and can vary in length depending on the seller's needs.
optional, enumerated string Status of the product variant. Refer to the table for more information.
Possible values are
activeThe active product variants are visible on the storefront, subscription, or checkout.inactiveThe inactive product variants are not visible on the storefront, subscription, or checkout.
Parameters for option_values. Multiple option_values can be passed by specifying unique indices. pass parameters as option_values[<param name>][<idx:0..n>]
optional, enumerated string Status of the product variant.
Possible values are
activeThe active product variants are visible on the storefront, subscription, or checkout.inactiveThe inactive product variants are not visible on the storefront, subscription, or checkout.
optional, string, max chars=100 A unique identifier code a seller assigns to each product variant. Retailers and merchants use SKUs to keep track of inventory and sales data and help organize products within a store or warehouse. SKUs can include a combination of letters, numbers, and symbols and can vary in length depending on the seller's needs.
This API deletes a product variant and returns the delete attribute value as true. Deletion of a product variant is not allowed if there are active or archiveditem_price_id under the variant. Once the variant is deleted, the id and name of the product variant can be reused.
This API is not enabled for live sites by default. Please contact
support to get this enabled.
Notes
Sample Request
Try in API Explorer
Only for Java
copy full code
Click to Copy
curl https://{site}.chargebee.com/api/v2/variants/01GVJR0BZWQNK469QKE05AEMC2/delete \
-X POST \
-u {site_api_key}:
optional, string, max chars=1000 Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set 'offset' to the value of 'next_offset' obtained in the previous iteration of the API call.
optional, boolean, default=false If set to true, includes the deleted resources in the response. For the deleted resources in the response, the 'deleted' attribute will be 'true'.
optional, string filter Filter variant based on their id.Possible values are : Supported operators : is, is_not, starts_with, in, not_in
Example →id[is] = "basic"
+
id
Filter variant based on their id. pass parameters as id[<param name>][<operator>]
id[is][operator]
id[is][operator]
optional, string, min chars=1 filter Possible values are : Supported operators :
Example →
id[is_not][operator]
id[is_not][operator]
optional, string, min chars=1 filter Possible values are : Supported operators :
Example →
id[starts_with][operator]
id[starts_with][operator]
optional, string, min chars=1 filter Possible values are : Supported operators :
Example →
id[in][operator]
id[in][operator]
optional, string filter Possible values are : Supported operators :
Example →
id[not_in][operator]
id[not_in][operator]
optional, string filter Possible values are : Supported operators :
Example →
name[<operator>]
name[<operator>]
optional, string filter Filter variant based on their names.Possible values are : Supported operators : is, is_not, starts_with, in, not_in
Example →name[is] = "basic"
+
name
Filter variant based on their names. pass parameters as name[<param name>][<operator>]
name[is][operator]
name[is][operator]
optional, string, min chars=1 filter Possible values are : Supported operators :
Example →
name[is_not][operator]
name[is_not][operator]
optional, string, min chars=1 filter Possible values are : Supported operators :
Example →
name[starts_with][operator]
name[starts_with][operator]
optional, string, min chars=1 filter Possible values are : Supported operators :
Example →
name[in][operator]
name[in][operator]
optional, string filter Possible values are : Supported operators :
Example →
name[not_in][operator]
name[not_in][operator]
optional, string filter Possible values are : Supported operators :
Example →
sku[<operator>]
sku[<operator>]
optional, string filter Filter variant based on their sku.Possible values are : Supported operators : is, is_not, starts_with, in, not_in
Example →sku[is] = "basic"
+
sku
Filter variant based on their sku. pass parameters as sku[<param name>][<operator>]
sku[is][operator]
sku[is][operator]
optional, string, min chars=1 filter Possible values are : Supported operators :
Example →
sku[is_not][operator]
sku[is_not][operator]
optional, string, min chars=1 filter Possible values are : Supported operators :
Example →
sku[starts_with][operator]
sku[starts_with][operator]
optional, string, min chars=1 filter Possible values are : Supported operators :
Example →
sku[in][operator]
sku[in][operator]
optional, string filter Possible values are : Supported operators :
Example →
sku[not_in][operator]
sku[not_in][operator]
optional, string filter Possible values are : Supported operators :
Example →
status[<operator>]
status[<operator>]
optional, enumerated string filter Filter variant based on their status. Possible values are : active, inactive Supported operators : is, is_not, in, not_in
Example →status[is] = "active"
+
status
Filter variant based on their status. pass parameters as status[<param name>][<operator>]
status[is][operator]
status[is][operator]
optional, enumerated string filter Possible values are : active, inactive Supported operators :
Example →
status[is_not][operator]
status[is_not][operator]
optional, enumerated string filter Possible values are : active, inactive Supported operators :
Example →
status[in][operator]
status[in][operator]
optional, string filter Possible values are : Supported operators :
Example →
status[not_in][operator]
status[not_in][operator]
optional, string filter Possible values are : Supported operators :
Example →
updated_at[<operator>]
updated_at[<operator>]
optional, timestamp(UTC) in seconds filter Filter product based on their updated time.Possible values are : Supported operators : after, before, on, between
Example →updated_at[after] = "basic"
+
updated_at
Filter product based on their updated time. pass parameters as updated_at[<param name>][<operator>]
updated_at[after][operator]
updated_at[after][operator]
optional, timestamp(UTC) in seconds filter Possible values are : Supported operators :
Example →
updated_at[before][operator]
updated_at[before][operator]
optional, timestamp(UTC) in seconds filter Possible values are : Supported operators :
Example →
updated_at[on][operator]
updated_at[on][operator]
optional, timestamp(UTC) in seconds filter Possible values are : Supported operators :
Example →
updated_at[between][operator]
updated_at[between][operator]
optional, string filter Possible values are : Supported operators :
Example →
created_at[<operator>]
created_at[<operator>]
optional, timestamp(UTC) in seconds filter Filter product based on their created time.Possible values are : Supported operators : after, before, on, between
Example →created_at[after] = "basic"
+
created_at
Filter product based on their created time. pass parameters as created_at[<param name>][<operator>]
created_at[after][operator]
created_at[after][operator]
optional, timestamp(UTC) in seconds filter Possible values are : Supported operators :
Example →
created_at[before][operator]
created_at[before][operator]
optional, timestamp(UTC) in seconds filter Possible values are : Supported operators :
Example →
created_at[on][operator]
created_at[on][operator]
optional, timestamp(UTC) in seconds filter Possible values are : Supported operators :
Example →
created_at[between][operator]
created_at[between][operator]
optional, string filter Possible values are : Supported operators :
always returned optional, string, max chars=1000 This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter `offset`.