Price variant resource offers businesses the flexibility to manage pricing for multiple variations of an item (plan, addon, or charge) in the Product Catalog. It enables the creation of diverse pricing structures based on variables such as geography, partners, versions, and more.
See also:
For a more detailed understanding of Price Variants, including how to enable, configure, and manage them, as well as their impact on other features, follow these resources:
optional, string, max chars=100 The variant_group organizes similar price_variants to optimize strategies such as bundling, geo-based pricing experiments, and campaign-specific pricing like cb-atomic-pricing- for effective grouping. The variant_group provides greater flexibility and precision in your pricing models.
optional, enumerated string Status of a price variant.
Possible values are
activeActive price variant. This price variant can be attached to item prices.archivedArchived price variant. This price variant is no longer active and cannot be attached to new item prices. Existing item prices that already have this price variant attached will continue to remain as is.deletedDeleted price variant. The id and name of the deleted price variant can be reused.
optional, long The version number of this resource. For every change made to the resource, resource_version is updated with a new timestamp in milliseconds.
optional, string, max chars=50 The unique ID of the
business entity of this price_variant. This is applicable only when multiple business entities have been created for the site. The value of this attribute indicates that the resource is specific to the given business entity.
Attributes can be used to store additional information about the price variant. For example, for a price variant called ‘Germany’, the attributes can be ‘Country’:'Germany', ‘City’:'Berlin' and so on.
optional, string, max chars=100 The variant_group organizes similar price_variants to optimize strategies such as bundling, geo-based pricing experiments, and campaign-specific pricing like cb-atomic-pricing- for effective grouping. The variant_group provides greater flexibility and precision in your pricing models.
optional, enumerated string Status of a price variant.
Possible values are
activeActive price variant. This price variant can be attached to item prices.archivedArchived price variant. This price variant is no longer active and cannot be attached to new item prices. Existing item prices that already have this price variant attached will continue to remain as is.deletedDeleted price variant. The id and name of the deleted price variant can be reused.
optional, long The version number of this resource. For every change made to the resource, resource_version is updated with a new timestamp in milliseconds.
optional, string, max chars=50 The unique ID of the
business entity of this price_variant. This is applicable only when multiple business entities have been created for the site. The value of this attribute indicates that the resource is specific to the given business entity.
Attributes can be used to store additional information about the price variant. For example, for a price variant called ‘Germany’, the attributes can be ‘Country’:'Germany', ‘City’:'Berlin' and so on.
optional, string, max chars=100 The variant_group organizes similar price_variants to optimize strategies such as bundling, geo-based pricing experiments, and campaign-specific pricing like cb-atomic-pricing- for effective grouping. The variant_group provides greater flexibility and precision in your pricing models.
optional, string, max chars=50 The unique ID of the business entity for this price_variant. This is applicable only when multiple business entities have been created for the site. When provided, the operation will read or write data associated with the specified business entity. If not provided, the resource will be created at the site level, and the business_entity_id will not be included in the API response.
Note
An alternative way of passing this parameter is by means of a custom HTTP header.
optional, string, max chars=100 The variant_group organizes similar price_variants to optimize strategies such as bundling, geo-based pricing experiments, and campaign-specific pricing like cb-atomic-pricing- for effective grouping. The variant_group provides greater flexibility and precision in your pricing models.
optional, enumerated string Status of a price variant.
Possible values are
activeActive price variant. This price variant can be attached to item prices.archivedArchived price variant. This price variant is no longer active and cannot be attached to new item prices. Existing item prices that already have this price variant attached will continue to remain as is.
Deletes the price variant. This is not allowed if price variant is attached to any item price. Once deleted, the id and name of the price 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/price_variants/delete-sample/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, 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 →
status[<operator>]
status[<operator>]
optional, enumerated string filter Filter variant based on their status. Possible values are : active, archived 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, archived Supported operators :
Example →
status[is_not][operator]
status[is_not][operator]
optional, enumerated string filter Possible values are : active, archived 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] = "1243545465"
+
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] = "1243545465"
+
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 :
Example →
business_entity_id[<operator>]
business_entity_id[<operator>]
optional, string filter The unique ID of the
business entity of this price_variant. Learn more about all the scenarios before using this filter.
Possible values are : Supported operators : is, is_present
Example →business_entity_id[is] = "business_entity_id"
+
business_entity_id
The unique ID of the
business entity of this price_variant. Learn more about all the scenarios before using this filter.
pass parameters as business_entity_id[<param name>][<operator>]
business_entity_id[is][operator]
business_entity_id[is][operator]
optional, string, min chars=1 filter Possible values are : Supported operators :
Example →
business_entity_id[is_present][operator]
business_entity_id[is_present][operator]
optional, enumerated string filter Possible values are : true, false Supported operators :
Example →
include_site_level_resources[<operator>]
include_site_level_resources[<operator>]
optional, enumerated string filter
Default value is true . To exclude site-level resources in specific cases, set this parameter to false.
Possible values are : true, false Supported operators : is
Example →include_site_level_resources[is] = "null"
+
include_site_level_resources
Default value is true . To exclude site-level resources in specific cases, set this parameter to false.
pass parameters as include_site_level_resources[<param name>][<operator>]
include_site_level_resources[is][operator]
include_site_level_resources[is][operator]
optional, enumerated string filter Possible values are : true, false 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`.