When offering subscriptions of products or services, each entity that is made available for sale is represented by an “item” object. Items therefore represent the various plans, addons or charges that you offer as part of your product catalog. Non-metered
items are charged upfront in Chargebee, while metered
items are charged at the end of the billing cycle, based on usage.
Types of Items
There are three types of items and they’re listed and explained here. Examples for each type are provided in the table that follows.
Plan-items or Plans
Plan-items are items that have a recurring charge and are an essential component of any subscription. Typically, plans represent a principal or key product or service in your catalog. They are charged at recurring intervals and often have other products or services offered along with them as addons and charges.
Addon-items or Addons
Addon-items are items that are sold along with a plan and are charged for at recurring intervals.
Charge-items or Charges
Charge-items are items that are sold along with a plan but charged once (or each time) a specified event occurs. A charge can also be applied to a customer without attaching to a subscription.
Examples
To help understand each type of item better, listed below are some examples of items from different business domains:
Non-Metered (SaaS)
- Item Family: A project management solution.
- Plans:
- A “basic” plan offering a small set of features.
- A “business” plan offering a larger set of features.
- Addons:
- An analytics plugin that is available only with the “business” plan.
- A reporting plugin, available with both the above plans.
- Charges:
- Implementation charges.
- Trial charges.
Non-Metered (E-commerce)
- Item Family: A printed news magazine.
- Plans:
- Periodic issues of the magazine.
- Periodic issues of the magazine, with digital content.
- Addons:
- Supplementary online content.
- Access to a year’s worth of back issues.
- Searchable access to all back issues.
- Charges:
- Special edition books that are published every so often.
Metered
- Item Family: SMS delivery services.
- Plans:
- A basic plan of up to 100K messages @ $0.03 per message.
- A volume plan of 2M messages @ $0.01 per message.
- Addons:
- An addon of 50K MMS messages @ $0.1 per message.
- Instant messaging.
- Charges:
- Automated Metered Billing is not applicable for charges.
Sample item [ JSON ]
{
"enabled_for_checkout": true,
"enabled_in_portal": true,
"id": "silver",
"is_giftable": false,
"is_shippable": false,
"item_applicability": "all",
"name": "Silver",
"object": "item",
"resource_version": 1599817249982,
"status": "active",
"type": "plan",
"updated_at": 1599817249
}
API Index URL GET
https://{site}.chargebee.com/api/v2/items
Model Class
com.chargebee.models.Item
string, max chars=100 The identifier for the item. It is unique and immutable.
string, max chars=100 A unique display name for the item. This is visible only in Chargebee and not to customers.
optional, string, max chars=100 A unique display name for the item.
optional, string, max chars=2000 Description of the item. This is visible only in Chargebee and not to customers. Note:
- The description field supports up to 2000 characters, including HTML tags. The inner text (excluding HTML tags) must not exceed 500 characters.
For example:
<ul><li>testing</li><li>desc</li></ul>
.
Total with tags: 38 characters,
inner text: 'testing desc' (12 characters). - If your input includes characters requiring sanitization, such as incomplete HTML tags, the sanitization process may alter the input and increase its length. If the sanitized content exceeds the allowed limit, the request will be rejected.
optional, enumerated string The status of the item. Possible values are
ACTIVEThe item can be used to create new item prices.ARCHIVEDThe item is no longer active and no new item prices can be createdDELETEDIndicates that the item has been deleted. The id
and name
can be reused. Deleted items can be retrieved using List items. ACTIVEThe item can be used to create new item prices.ARCHIVEDThe item is no longer active and no new item prices can be createdDELETEDIndicates that the item has been deleted. The id
and name
can be reused. Deleted items can be retrieved using List items. Show all values[+]
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, timestamp(UTC) in seconds Timestamp indicating when the item was last updated.
optional, string, max chars=100 The id
of the Item family that the item belongs to. Is mandatory when Product Families have been enabled.
enumerated string The type of the item. Possible values are
PLANAn essential component of a subscription. Every subscription has exactly one plan. It has a recurring charge and its period defines the billing period of the subscription.ADDONA recurring component that can be added to a subscription in addition to its plan.CHARGEA non-recurring component that can be added to a subscription in addition to its plan. An charge can also be applied to a customer directly without being applied to a subscription. PLANAn essential component of a subscription. Every subscription has exactly one plan. It has a recurring charge and its period defines the billing period of the subscription.ADDONA recurring component that can be added to a subscription in addition to its plan.CHARGEA non-recurring component that can be added to a subscription in addition to its plan. An charge can also be applied to a customer directly without being applied to a subscription. Show all values[+]
optional, boolean, default=false Indicates that the item is a physical product. If Orders are enabled in Chargebee, subscriptions created for this item will have orders associated with them.
boolean, default=false Specifies if gift subscriptions can be created for this item.
optional, string, max chars=500 If enabled_for_checkout
, then the URL to be redirected to once the checkout is complete. This attribute is only available for plan-items.
boolean, default=true Allow the plan to subscribed to via Checkout. Applies only for plan-items.
Note: Only the in-app version of Checkout is supported for Product Catalog v2.
optional, boolean The item is included in MRR calculations for your site. This attribute is only applicable for items of type = charge
and when the feature is enabled in Chargebee. Note: If the site-level setting is to exclude charge-items from MRR calculations, this value is always returned false
.
optional, enumerated string, default=all Indicates which addon-items and charge-items can be applied to the item. Only meant for plan-items. Other details of attaching items such as whether to attach as a mandatory item or to attach on a certain event, can be specified using the Create or Update an attached item API. Possible values are
ALLall addon-items and charge-items are applicable to this plan-item.RESTRICTEDonly the addon-items or charge-items provided in applicable_items
can be applied to this plan-item.
ALLall addon-items and charge-items are applicable to this plan-item.RESTRICTEDonly the addon-items or charge-items provided in applicable_items
can be applied to this plan-item.
Show all values[+]
optional, string, max chars=500 The URL to redirect to once the gift has been claimed by the receiver.
optional, string, max chars=30 The unit of measure for a quantity-based item. This is displayed on the Chargebee UI and on customer facing documents/pages. The latter includes hosted pages, invoices and quotes. Examples follow:
- “user“ for a cloud-collaboration platform.
- “GB“ for a data service.
- “issue“ for a magazine.
boolean, default=false Specifies whether the item undergoes metered billing. When true
, the quantity is calculated from usage records. When false
, the quantity
is as determined while adding an item price to the subscription. Applicable only for items of type
plan
or addon
and when Metered Billing is enabled. The value of this attribute cannot be changed.
optional, enumerated string How the quantity is calculated from usage data for the item prices belonging to this item. Only applicable when the item is metered
. This value overrides the one set at the site level. Possible values are
SUM_OF_USAGESthe net quantity is the sum of the quantity
of all usages for the current term.LAST_USAGEfrom among the usage records for the item price with usage_date
within the relevant billing period, the quantity
of the usage record with the most recent usage_date
is taken as the net quantity consumed.MAX_USAGEfrom among the usage records for the item price with usage_date
within the relevant billing period, the quantity
of the usage record with the maximum value is taken as the net quantity consumed. SUM_OF_USAGESthe net quantity is the sum of the quantity
of all usages for the current term.LAST_USAGEfrom among the usage records for the item price with usage_date
within the relevant billing period, the quantity
of the usage record with the most recent usage_date
is taken as the net quantity consumed.MAX_USAGEfrom among the usage records for the item price with usage_date
within the relevant billing period, the quantity
of the usage record with the maximum value is taken as the net quantity consumed. Show all values[+]
optional, boolean, default=false
optional, timestamp(UTC) in seconds Timestamp indicating when this item was archived.
optional, enumerated string The subscription channel this object originated from and is maintained in. Possible values are
WEBThe object was created (and is maintained) for the web channel directly in Chargebee via API or UI.APP_STOREThe object data is synchronized with data from in-app subscription(s) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed.PLAY_STOREThe object data is synchronized with data from in-app subscription(s) created in Google Play Store. Direct manipulation of this object via UI or API is disallowed.
In-App Subscriptions is currently in early access. Contact
eap@chargebee.com for more information.
WEBThe object was created (and is maintained) for the web channel directly in Chargebee via API or UI.APP_STOREThe object data is synchronized with data from in-app subscription(s) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed.PLAY_STOREThe object data is synchronized with data from in-app subscription(s) created in Google Play Store. Direct manipulation of this object via UI or API is disallowed.
In-App Subscriptions is currently in early access. Contact
eap@chargebee.com for more information.
Show all values[+]
optional, jsonobject A collection of key-value pairs that provides extra information about the item. Learn more.
boolean Indicates whether the item has been deleted or not.
optional, string, max chars=50 The unique ID of the business entity of this item. 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.
optional, list of applicable_item The list of addons and charges that are allowed to be applied to the plan. This attribute is applicable only for plan-items and that too when item_applicability
is restricted
.
Other details of attaching items can be specified using the Create or Update an attached item API.
ApplicableItem attributes
optional, string, max chars=100 Id of the addon-item or plan-item that can be applied to the plan-item. optional, list of bundle_item The list of items(plans, addons, and charges) added to the bundle plan. This attribute is only available when the item_type is plan
.
string, max chars=100 The ID of the item(plan, addon, or charge) associated with this bundle.
Note: At least one plan item must be associated with this bundle.
optional, enumerated string Type of item Possible values are
PLANAn essential component of the bundle plan.
Note: At least one plan item should be associated with the bundle.ADDONA recurring component that can be added to a bundle plan.CHARGEA non-recurring component that can be added to a bundle plan.
PLANAn essential component of the bundle plan.
Note: At least one plan item should be associated with the bundle.ADDONA recurring component that can be added to a bundle plan.CHARGEA non-recurring component that can be added to a bundle plan.
Show all values[+]
optional, integer, default=1, min=1 Quantity of the item(plan, addon, and charge) associated with the bundle.
optional, bigdecimal, min=0, max=100 Price allocation of the item(plan, addon, and charge) associated with the bundle. optional, bundle_configuration This attribute holds additional information about the bundle item. This attribute is only available when the item_type is plan
.
BundleConfiguration attributes
enumerated string Type of the bundle Possible values are
FIXEDFixed bundle_configuration.type
appears when you create a bundle plan that cannot be updated during checkout or subscription creation.
FIXEDFixed bundle_configuration.type
appears when you create a bundle plan that cannot be updated during checkout or subscription creation.
Show all values[+]
string, max chars=100 The identifier for the item. It is unique and immutable.
string, max chars=100 A unique display name for the item. This is visible only in Chargebee and not to customers.
optional, string, max chars=100 A unique display name for the item.
optional, string, max chars=2000 Description of the item. This is visible only in Chargebee and not to customers. Note:
- The description field supports up to 2000 characters, including HTML tags. The inner text (excluding HTML tags) must not exceed 500 characters.
For example:
<ul><li>testing</li><li>desc</li></ul>
.
Total with tags: 38 characters,
inner text: 'testing desc' (12 characters). - If your input includes characters requiring sanitization, such as incomplete HTML tags, the sanitization process may alter the input and increase its length. If the sanitized content exceeds the allowed limit, the request will be rejected.
optional, enumerated string The status of the item. Possible values are
ACTIVEThe item can be used to create new item prices.ARCHIVEDThe item is no longer active and no new item prices can be createdDELETEDIndicates that the item has been deleted. The id
and name
can be reused. Deleted items can be retrieved using List items. ACTIVEThe item can be used to create new item prices.ARCHIVEDThe item is no longer active and no new item prices can be createdDELETEDIndicates that the item has been deleted. The id
and name
can be reused. Deleted items can be retrieved using List items. Show all values[+]
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, timestamp(UTC) in seconds Timestamp indicating when the item was last updated.
optional, string, max chars=100 The id
of the Item family that the item belongs to. Is mandatory when Product Families have been enabled.
enumerated string The type of the item. Possible values are
PLANAn essential component of a subscription. Every subscription has exactly one plan. It has a recurring charge and its period defines the billing period of the subscription.ADDONA recurring component that can be added to a subscription in addition to its plan.CHARGEA non-recurring component that can be added to a subscription in addition to its plan. An charge can also be applied to a customer directly without being applied to a subscription. PLANAn essential component of a subscription. Every subscription has exactly one plan. It has a recurring charge and its period defines the billing period of the subscription.ADDONA recurring component that can be added to a subscription in addition to its plan.CHARGEA non-recurring component that can be added to a subscription in addition to its plan. An charge can also be applied to a customer directly without being applied to a subscription. Show all values[+]
optional, boolean, default=false Indicates that the item is a physical product. If Orders are enabled in Chargebee, subscriptions created for this item will have orders associated with them.
boolean, default=false Specifies if gift subscriptions can be created for this item.
optional, string, max chars=500 If enabled_for_checkout
, then the URL to be redirected to once the checkout is complete. This attribute is only available for plan-items.
boolean, default=true Allow the plan to subscribed to via Checkout. Applies only for plan-items.
Note: Only the in-app version of Checkout is supported for Product Catalog v2.
optional, boolean The item is included in MRR calculations for your site. This attribute is only applicable for items of type = charge
and when the feature is enabled in Chargebee. Note: If the site-level setting is to exclude charge-items from MRR calculations, this value is always returned false
.
optional, enumerated string, default=all Indicates which addon-items and charge-items can be applied to the item. Only meant for plan-items. Other details of attaching items such as whether to attach as a mandatory item or to attach on a certain event, can be specified using the Create or Update an attached item API. Possible values are
ALLall addon-items and charge-items are applicable to this plan-item.RESTRICTEDonly the addon-items or charge-items provided in applicable_items
can be applied to this plan-item.
ALLall addon-items and charge-items are applicable to this plan-item.RESTRICTEDonly the addon-items or charge-items provided in applicable_items
can be applied to this plan-item.
Show all values[+]
optional, string, max chars=500 The URL to redirect to once the gift has been claimed by the receiver.
optional, string, max chars=30 The unit of measure for a quantity-based item. This is displayed on the Chargebee UI and on customer facing documents/pages. The latter includes hosted pages, invoices and quotes. Examples follow:
- “user“ for a cloud-collaboration platform.
- “GB“ for a data service.
- “issue“ for a magazine.
boolean, default=false Specifies whether the item undergoes metered billing. When true
, the quantity is calculated from usage records. When false
, the quantity
is as determined while adding an item price to the subscription. Applicable only for items of type
plan
or addon
and when Metered Billing is enabled. The value of this attribute cannot be changed.
optional, enumerated string How the quantity is calculated from usage data for the item prices belonging to this item. Only applicable when the item is metered
. This value overrides the one set at the site level. Possible values are
SUM_OF_USAGESthe net quantity is the sum of the quantity
of all usages for the current term.LAST_USAGEfrom among the usage records for the item price with usage_date
within the relevant billing period, the quantity
of the usage record with the most recent usage_date
is taken as the net quantity consumed.MAX_USAGEfrom among the usage records for the item price with usage_date
within the relevant billing period, the quantity
of the usage record with the maximum value is taken as the net quantity consumed. SUM_OF_USAGESthe net quantity is the sum of the quantity
of all usages for the current term.LAST_USAGEfrom among the usage records for the item price with usage_date
within the relevant billing period, the quantity
of the usage record with the most recent usage_date
is taken as the net quantity consumed.MAX_USAGEfrom among the usage records for the item price with usage_date
within the relevant billing period, the quantity
of the usage record with the maximum value is taken as the net quantity consumed. Show all values[+]
optional, boolean, default=false
optional, timestamp(UTC) in seconds Timestamp indicating when this item was archived.
optional, enumerated string The subscription channel this object originated from and is maintained in. Possible values are
WEBThe object was created (and is maintained) for the web channel directly in Chargebee via API or UI.APP_STOREThe object data is synchronized with data from in-app subscription(s) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed.PLAY_STOREThe object data is synchronized with data from in-app subscription(s) created in Google Play Store. Direct manipulation of this object via UI or API is disallowed.
In-App Subscriptions is currently in early access. Contact
eap@chargebee.com for more information.
WEBThe object was created (and is maintained) for the web channel directly in Chargebee via API or UI.APP_STOREThe object data is synchronized with data from in-app subscription(s) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed.PLAY_STOREThe object data is synchronized with data from in-app subscription(s) created in Google Play Store. Direct manipulation of this object via UI or API is disallowed.
In-App Subscriptions is currently in early access. Contact
eap@chargebee.com for more information.
Show all values[+]
optional, jsonobject A collection of key-value pairs that provides extra information about the item. Learn more.
boolean Indicates whether the item has been deleted or not.
optional, string, max chars=50 The unique ID of the business entity of this item. 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.
optional, list of applicable_item The list of addons and charges that are allowed to be applied to the plan. This attribute is applicable only for plan-items and that too when item_applicability
is restricted
.
Other details of attaching items can be specified using the Create or Update an attached item API.
optional, list of bundle_item The list of items(plans, addons, and charges) added to the bundle plan. This attribute is only available when the item_type is plan
.
optional, bundle_configuration This attribute holds additional information about the bundle item. This attribute is only available when the item_type is plan
.
Creates a new item.
This API is not enabled for live sites by default. Please contact
support to get this enabled.
Sample Codes
import java.io.IOException;
import com.chargebee.*;
import com.chargebee.models.*;
import com.chargebee.models.enums.*;
public class Sample{
public static void main(String args[]) throws IOException{
Environment.configure("{site}","{site_api_key}");
Result result = Item.create()
.id("silver")
.name("Silver")
.type(Type.PLAN)
.itemFamilyId("acme-inc")
.itemApplicability(ItemApplicability.ALL)
.request();
Item item = result.item();
System.out.println(result);
}
}
import java.io.IOException;
import com.chargebee.*;
import com.chargebee.models.*;
import com.chargebee.models.enums.*;
public class Sample{
public static void main(String args[]) throws IOException{
Environment.configure("{site}","{site_api_key}");
Result result = Item.create()
.id("ssl")
.name("ssl")
.type(Type.ADDON)
.itemFamilyId("acme-inc")
.request();
Item item = result.item();
System.out.println(result);
}
}
import java.io.IOException;
import com.chargebee.*;
import com.chargebee.models.*;
import com.chargebee.models.enums.*;
public class Sample{
public static void main(String args[]) throws IOException{
Environment.configure("{site}","{site_api_key}");
Result result = Item.create()
.id("gold")
.name("Gold")
.type(Type.PLAN)
.itemFamilyId("acme-inc")
.itemApplicability(ItemApplicability.RESTRICTED)
.applicableItems("day-pass")
.request();
Item item = result.item();
System.out.println(result);
}
}
copy full code
Click to Copy
Environment.configure("{site}","{site_api_key}");
Result result = Item.create()
.id("silver")
.name("Silver")
.type(Type.PLAN)
.itemFamilyId("acme-inc")
.itemApplicability(ItemApplicability.ALL)
.request();
Item item = result.item();
Environment.configure("{site}","{site_api_key}");
Result result = Item.create()
.id("ssl")
.name("ssl")
.type(Type.ADDON)
.itemFamilyId("acme-inc")
.request();
Item item = result.item();
Environment.configure("{site}","{site_api_key}");
Result result = Item.create()
.id("gold")
.name("Gold")
.type(Type.PLAN)
.itemFamilyId("acme-inc")
.itemApplicability(ItemApplicability.RESTRICTED)
.applicableItems("day-pass")
.request();
Item item = result.item();
copy snippet
Click to Copy
Create a plan item
Environment.configure("{site}","{site_api_key}");
Result result = Item.create()
.id("silver")
.name("Silver")
.type(Type.PLAN)
.itemFamilyId("acme-inc")
.itemApplicability(ItemApplicability.ALL)
.request();
Item item = result.item();
Create a plan item
Environment.configure("{site}","{site_api_key}");
Result result = Item.create()
.id("silver")
.name("Silver")
.type(Type.PLAN)
.itemFamilyId("acme-inc")
.itemApplicability(ItemApplicability.ALL)
.request();
Item item = result.item();
Create an addon item
Environment.configure("{site}","{site_api_key}");
Result result = Item.create()
.id("ssl")
.name("ssl")
.type(Type.ADDON)
.itemFamilyId("acme-inc")
.request();
Item item = result.item();
Create a plan item with restricted applicable addon item
Environment.configure("{site}","{site_api_key}");
Result result = Item.create()
.id("gold")
.name("Gold")
.type(Type.PLAN)
.itemFamilyId("acme-inc")
.itemApplicability(ItemApplicability.RESTRICTED)
.applicableItems("day-pass")
.request();
Item item = result.item();
Sample Result [ JSON ]
Show more...
{
"item": {
"enabled_for_checkout": true,
"enabled_in_portal": true,
"id": "silver",
"is_giftable": false,
"is_shippable": false,
"item_applicability": "all",
"name": "Silver",
"object": "item",
"resource_version": 1599817249982,
"status": "active",
"type": "plan",
"updated_at": 1599817249
}
}
URL Format
POST
https://{site}.chargebee.com/api/v2/items
required, string, max chars=100 The identifier for the item. Must be unique and is immutable once set.
required, string, max chars=100 A unique display name for the item. Must be unique. This is visible only in Chargebee and not to customers.
required, enumerated string The type of the item. Possible values are
PLANAn essential component of a subscription. Every subscription has exactly one plan. It has a recurring charge and its period defines the billing period of the subscription.ADDONA recurring component that can be added to a subscription in addition to its plan.CHARGEA non-recurring component that can be added to a subscription in addition to its plan. An charge can also be applied to a customer directly without being applied to a subscription. PLANAn essential component of a subscription. Every subscription has exactly one plan. It has a recurring charge and its period defines the billing period of the subscription.ADDONA recurring component that can be added to a subscription in addition to its plan.CHARGEA non-recurring component that can be added to a subscription in addition to its plan. An charge can also be applied to a customer directly without being applied to a subscription. Show all values[+]
optional, string, max chars=2000 Description of the item. This is visible only in Chargebee and not to customers. Note:
- The description field supports up to 2000 characters, including HTML tags. The inner text (excluding HTML tags) must not exceed 500 characters.
For example:
<ul><li>testing</li><li>desc</li></ul>
.
Total with tags: 38 characters,
inner text: 'testing desc' (12 characters). - If your input includes characters requiring sanitization, such as incomplete HTML tags, the sanitization process may alter the input and increase its length. If the sanitized content exceeds the allowed limit, the request will be rejected.
required, string, max chars=100 The id
of the Item family that the item belongs to. Is mandatory when Product Families have been enabled.
optional, boolean, default=false Specifies if gift subscriptions can be created for this item.
optional, boolean, default=false Indicates that the item is a physical product. If Orders are enabled in Chargebee, subscriptions created for this item will have orders associated with them.
optional, string, max chars=100 A unique display name for the item. enabledInPortal[(val)](val)
optional, boolean, default=true Allow customers to change their subscription to this plan via the Self-Serve Portal. Applies only for plan-items. This requires the Portal configuration to allow changing subscriptions. Only the in-app version of the Portal is supported for Product Catalog v2.
optional, string, max chars=500 If enabled_for_checkout
, then the URL to be redirected to once the checkout is complete. This attribute is only available for plan-items. enabledForCheckout[(val)](val)
optional, boolean, default=true Allow the plan to subscribed to via Checkout. Applies only for plan-items.
Note: Only the in-app version of Checkout is supported for Product Catalog v2. itemApplicability[(val)](val)
optional, enumerated string, default=all Indicates which addon-items and charge-items can be applied to the item. Only possible for plan-items. Other details of attaching items such as whether to attach as a mandatory item or to attach on a certain event, can be specified using the Create or Update an attached item API. Possible values are
ALLall addon-items and charge-items are applicable to this plan-item.RESTRICTEDonly the addon-items or charge-items provided in applicable_items
can be applied to this plan-item.
ALLall addon-items and charge-items are applicable to this plan-item.RESTRICTEDonly the addon-items or charge-items provided in applicable_items
can be applied to this plan-item.
Show all values[+] applicableItems[(val)](val)
optional, list of string The list of ids of addon-items and charge-items that can be applied to the plan-item. This parameter can be provided only for plan-items and that too when item_applicability is restricted. Other details of attaching items can be specified using the Create or Update an attached item API.
optional, string, max chars=30 The unit of measure for a quantity-based item. This is displayed on the Chargebee UI and on customer facing documents/pages. The latter includes hosted pages, invoices and quotes. Examples follow:
- “user“ for a cloud-collaboration platform.
- “GB“ for a data service.
- “issue“ for a magazine.
giftClaimRedirectUrl[(val)](val)
optional, string, max chars=500 The URL to redirect to once the gift has been claimed by the receiver. includedInMrr[(val)](val)
optional, boolean The item is included in MRR calculations for your site. This attribute is only applicable for items of type = charge
and when the feature is enabled in Chargebee. Note: If the site-level setting is to exclude charge-items from MRR calculations, this value is always returned false
.
optional, boolean, default=false Specifies whether the item undergoes metered billing. When true
, the quantity is calculated from usage records. When false
, the quantity
is as determined while adding an item price to the subscription. Applicable only for items of type
plan
or addon
and when Metered Billing is enabled. The value of this attribute cannot be changed. usageCalculation[(val)](val)
optional, enumerated string How the quantity is calculated from usage data for the item prices belonging to this item. Only applicable when the item is metered
. This value overrides the one set at the site level. . Possible values are
SUM_OF_USAGESthe net quantity is the sum of the quantity
of all usages for the current term.LAST_USAGEfrom among the usage records for the item price with usage_date
within the relevant billing period, the quantity
of the usage record with the most recent usage_date
is taken as the net quantity consumed.MAX_USAGEfrom among the usage records for the item price with usage_date
within the relevant billing period, the quantity
of the usage record with the maximum value is taken as the net quantity consumed. SUM_OF_USAGESthe net quantity is the sum of the quantity
of all usages for the current term.LAST_USAGEfrom among the usage records for the item price with usage_date
within the relevant billing period, the quantity
of the usage record with the most recent usage_date
is taken as the net quantity consumed.MAX_USAGEfrom among the usage records for the item price with usage_date
within the relevant billing period, the quantity
of the usage record with the maximum value is taken as the net quantity consumed. Show all values[+] isPercentagePricing[(val)](val)
optional, boolean, default=false
optional, jsonobject A collection of key-value pairs that provides extra information about the item. Note: There's a character limit of 65,535.
Learn more. businessEntityId[(val)](val)
optional, string, max chars=50 The unique ID of the business entity for this item
. 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. .
optional, enumerated string Parameters for bundleConfiguration
optional, array Parameters for bundleItemsToAdd. Multiple bundleItemsToAdd can be passed by specifying unique indices.
Parameters for bundleConfiguration
methods are prefixed like bundleConfiguration<param name>(val)
bundleConfigurationType(val) optional, enumerated string Type of the bundle Possible values are
FIXEDFixed bundle_configuration.type
appears when you create a bundle plan that cannot be updated during checkout or subscription creation. FIXEDFixed bundle_configuration.type
appears when you create a bundle plan that cannot be updated during checkout or subscription creation. Show all values[+]
Parameters for bundleItemsToAdd. Multiple bundleItemsToAdd can be passed by specifying unique indices.
methods are prefixed like bundleItemsToAdd<param name>(idx,val)
bundleItemsToAddItemId(idx,val) optional, string, max chars=100 item_id
that needs to be added to the bundle.
Note: This parameter is only applicable when the item_type
is plan
. bundleItemsToAddItemType(idx,val) optional, enumerated string item_type
that can be added to the bundle. Possible values are
PLANAn essential component of the bundle plan.
Note: At least one plan
item must be associated with the bundle.ADDONA recurring component that can be added to a bundle plan.CHARGEA non-recurring component that can be added to a bundle plan. PLANAn essential component of the bundle plan.
Note: At least one plan
item must be associated with the bundle.ADDONA recurring component that can be added to a bundle plan.CHARGEA non-recurring component that can be added to a bundle plan. Show all values[+] bundleItemsToAddQuantity(idx,val) optional, integer, default=1, min=1 Quantity of the item(plan, addon, and charge) associated with the bundle. bundleItemsToAddPriceAllocation(idx,val) optional, bigdecimal, min=0, max=100 Price allocation of the item(plan, addon, and charge) associated with the bundle.
always returned required
Resource object representing item
Sample admin console URL
https://{site}.chargebee.com/admin-console/items/123x
Retrieve an item resource.
This API is not enabled for live sites by default. Please contact
support to get this enabled.
Sample Codes
import java.io.IOException;
import com.chargebee.*;
import com.chargebee.models.*;
import com.chargebee.models.enums.*;
public class Sample{
public static void main(String args[]) throws IOException{
Environment.configure("{site}","{site_api_key}");
Result result = Item.retrieve("cbdemo_additionaluser").request();
Item item = result.item();
System.out.println(result);
}
}
copy full code
Click to Copy
Environment.configure("{site}","{site_api_key}");
Result result = Item.retrieve("cbdemo_additionaluser").request();
Item item = result.item();
copy snippet
Click to Copy
Environment.configure("{site}","{site_api_key}");
Result result = Item.retrieve("cbdemo_additionaluser").request();
Item item = result.item();
Environment.configure("{site}","{site_api_key}");
Result result = Item.retrieve("cbdemo_additionaluser").request();
Item item = result.item();
Sample Result [ JSON ]
Show more...
{
"item": {
"enabled_for_checkout": true,
"enabled_in_portal": true,
"id": "cbdemo_additionaluser",
"is_giftable": false,
"is_shippable": false,
"name": "CbDemo Additional User",
"object": "item",
"resource_version": 1599817250735,
"status": "active",
"type": "addon",
"updated_at": 1599817250
}
}
URL Format
GET
https://{site}.chargebee.com/api/v2/items/{item-id}
always returned required
Resource object representing item
Sample admin console URL
https://{site}.chargebee.com/admin-console/items/123x
Updates an item with the changes specified. Unspecified item parameters are not modified.
This API is not enabled for live sites by default. Please contact
support to get this enabled.
Sample Codes
import java.io.IOException;
import com.chargebee.*;
import com.chargebee.models.*;
import com.chargebee.models.enums.*;
public class Sample{
public static void main(String args[]) throws IOException{
Environment.configure("{site}","{site_api_key}");
Result result = Item.update("basic")
.description("basic plan")
.enabledForCheckout(false)
.enabledInPortal(false)
.request();
Item item = result.item();
System.out.println(result);
}
}
copy full code
Click to Copy
Environment.configure("{site}","{site_api_key}");
Result result = Item.update("basic")
.description("basic plan")
.enabledForCheckout(false)
.enabledInPortal(false)
.request();
Item item = result.item();
copy snippet
Click to Copy
Environment.configure("{site}","{site_api_key}");
Result result = Item.update("basic")
.description("basic plan")
.enabledForCheckout(false)
.enabledInPortal(false)
.request();
Item item = result.item();
Environment.configure("{site}","{site_api_key}");
Result result = Item.update("basic")
.description("basic plan")
.enabledForCheckout(false)
.enabledInPortal(false)
.request();
Item item = result.item();
Sample Result [ JSON ]
Show more...
{
"item": {
"description": "basic plan",
"enabled_for_checkout": false,
"enabled_in_portal": false,
"id": "basic",
"is_giftable": false,
"is_shippable": false,
"item_applicability": "all",
"name": "Basic",
"object": "item",
"resource_version": 1599817250886,
"status": "active",
"type": "plan",
"updated_at": 1599817250
}
}
URL Format
POST
https://{site}.chargebee.com/api/v2/items/{item-id}
optional, string, max chars=100 The display name for the item. Must be unique. This is visible only in Chargebee and not to customers.
optional, string, max chars=2000 Description of the item. This is visible only in Chargebee and not to customers. Note:
- The description field supports up to 2000 characters, including HTML tags. The inner text (excluding HTML tags) must not exceed 500 characters.
For example:
<ul><li>testing</li><li>desc</li></ul>
.
Total with tags: 38 characters,
inner text: 'testing desc' (12 characters). - If your input includes characters requiring sanitization, such as incomplete HTML tags, the sanitization process may alter the input and increase its length. If the sanitized content exceeds the allowed limit, the request will be rejected.
optional, boolean, default=false Indicates that the item is a physical product. If Orders are enabled in Chargebee, subscriptions created for this item will have orders associated with them.
optional, string, max chars=100 A unique display name for the item.
optional, string, max chars=100 The id
of the Item family that the item belongs to. Is mandatory when Product Families have been enabled. enabledInPortal[(val)](val)
optional, string, max chars=500 If enabled_for_checkout
, then the URL to be redirected to once the checkout is complete. This parameter is only meant for plan-items. enabledForCheckout[(val)](val)
optional, boolean, default=true Allow the plan to subscribed to via Checkout. Applies only for plan-items.
Note: Only the in-app version of Checkout is supported for Product Catalog v2. itemApplicability[(val)](val)
optional, enumerated string, default=all Indicates which addon-items and charge-items can be applied to the item. Only possible for plan-items. Other details of attaching items such as whether to attach as a mandatory item or to attach on a certain event, can be specified using the Create or Update an attached item API. Possible values are
ALLall addon-items and charge-items are applicable to this plan-item.RESTRICTEDonly the addon-items or charge-items provided in applicable_items
can be applied to this plan-item.
ALLall addon-items and charge-items are applicable to this plan-item.RESTRICTEDonly the addon-items or charge-items provided in applicable_items
can be applied to this plan-item.
Show all values[+] applicableItems[(val)](val)
optional, list of string The list of ids of addon-items and charge-items that can be applied to the plan-item. This parameter can be provided only for plan-items and that too when item_applicability is restricted. Other details of attaching items can be specified using the Create or Update an attached item API.
optional, string, max chars=30 The unit of measure for a quantity-based item. This is displayed on the Chargebee UI and on customer facing documents/pages. The latter includes hosted pages, invoices and quotes. Examples follow:
- “user“ for a cloud-collaboration platform.
- “GB“ for a data service.
- “issue“ for a magazine.
giftClaimRedirectUrl[(val)](val)
optional, string, max chars=500 The URL to redirect to once the gift has been claimed by the receiver.
optional, jsonobject A collection of key-value pairs that provides extra information about the item. Learn more. includedInMrr[(val)](val)
optional, boolean The item is included in MRR calculations for your site. This attribute is only applicable for items of type = charge
and when the feature is enabled in Chargebee. Note: If the site-level setting is to exclude charge-items from MRR calculations, this value is always returned false
.
optional, enumerated string The status of the item. Possible values are
ACTIVEThe item can be used to create new item prices.ARCHIVEDThe item is no longer active and no new item prices can be created
ACTIVEThe item can be used to create new item prices.ARCHIVEDThe item is no longer active and no new item prices can be created
Show all values[+] isPercentagePricing[(val)](val)
optional, boolean, default=false
optional, enumerated string Parameters for bundleConfiguration
optional, array Parameters for bundleItemsToAdd. Multiple bundleItemsToAdd can be passed by specifying unique indices.
optional, array Parameters for bundleItemsToUpdate. Multiple bundleItemsToUpdate can be passed by specifying unique indices.
optional, array Parameters for bundleItemsToRemove. Multiple bundleItemsToRemove can be passed by specifying unique indices.
Parameters for bundleConfiguration
methods are prefixed like bundleConfiguration<param name>(val)
bundleConfigurationType(val) optional, enumerated string Type of the bundle Possible values are
FIXEDFixed bundle_configuration.type
should be provided when you create a bundle plan that cannot be updated during checkout or subscription creation.
FIXEDFixed bundle_configuration.type
should be provided when you create a bundle plan that cannot be updated during checkout or subscription creation.
Show all values[+]
Parameters for bundleItemsToAdd. Multiple bundleItemsToAdd can be passed by specifying unique indices.
methods are prefixed like bundleItemsToAdd<param name>(idx,val)
bundleItemsToAddItemId(idx,val) optional, string, max chars=100 item_id
that needs to be added to the bundle.
Note: This parameter is only applicable when the item_type
is plan
. bundleItemsToAddItemType(idx,val) optional, enumerated string item_type
that can be added to the bundle. Possible values are
PLANAn essential component of the bundle plan.
Note: At least one plan item must be associated with the bundle.ADDONA recurring component that can be added to a bundle plan.CHARGEA non-recurring component that can be added to a bundle plan.
PLANAn essential component of the bundle plan.
Note: At least one plan item must be associated with the bundle.ADDONA recurring component that can be added to a bundle plan.CHARGEA non-recurring component that can be added to a bundle plan.
Show all values[+] bundleItemsToAddQuantity(idx,val) optional, integer, default=1, min=1 Quantity of the item(plan, addon, and charge) associated with the bundle. bundleItemsToAddPriceAllocation(idx,val) optional, bigdecimal, min=0, max=100 Price allocation of the item(plan, addon, and charge) associated with the bundle.
Parameters for bundleItemsToUpdate. Multiple bundleItemsToUpdate can be passed by specifying unique indices.
methods are prefixed like bundleItemsToUpdate<param name>(idx,val)
bundleItemsToUpdateItemId(idx,val) optional, string, max chars=100 item_id
that needs to be updated from the bundle plan. This attribute is only applicable when the item_type
is plan
. bundleItemsToUpdateItemType(idx,val) optional, enumerated string item_type
that you want to update from the bundle. Possible values are
PLANAn essential component of the bundle plan.
Note: At least one plan item must be associated with the bundle.ADDONA recurring component that can be added to a bundle plan.CHARGEA non-recurring component that can be added to a bundle plan.
PLANAn essential component of the bundle plan.
Note: At least one plan item must be associated with the bundle.ADDONA recurring component that can be added to a bundle plan.CHARGEA non-recurring component that can be added to a bundle plan.
Show all values[+] bundleItemsToUpdateQuantity(idx,val) optional, integer, default=1, min=1 Quantity of the item(plan, addon, and charge) associated with the bundle. bundleItemsToUpdatePriceAllocation(idx,val) optional, bigdecimal, min=0, max=100 Price allocation of the item(plan, addon, and charge) associated with the bundle.
Parameters for bundleItemsToRemove. Multiple bundleItemsToRemove can be passed by specifying unique indices.
methods are prefixed like bundleItemsToRemove<param name>(idx,val)
bundleItemsToRemoveItemId(idx,val) optional, string, max chars=100 item_id
that needs to be removed from the bundle plan.
Note: This attribute is only applicable when the item_type
is plan
. bundleItemsToRemoveItemType(idx,val) optional, enumerated string item_type
that you want to remove from the bundle. Possible values are
PLANAn essential component of the bundle plan.
Note: At least one plan item must be associated with the bundle.ADDONA recurring component that can be added to a bundle plan.CHARGEA non-recurring component that can be added to a bundle plan.
PLANAn essential component of the bundle plan.
Note: At least one plan item must be associated with the bundle.ADDONA recurring component that can be added to a bundle plan.CHARGEA non-recurring component that can be added to a bundle plan.
Show all values[+]
always returned required
Resource object representing item
Sample admin console URL
https://{site}.chargebee.com/admin-console/items/123x
Returns a list of items satisfying all the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
This API is not enabled for live sites by default. Please contact
support to get this enabled.
Sample Codes
import java.io.IOException;
import com.chargebee.*;
import com.chargebee.models.*;
import com.chargebee.models.enums.*;
public class Sample{
public static void main(String args[]) throws IOException{
Environment.configure("{site}","{site_api_key}");
ListResult result = Item.list()
.limit(2)
.request();
for(ListResult.Entry entry:result) {
Item item = entry.item();
}
System.out.println(result);
}
}
copy full code
Click to Copy
Environment.configure("{site}","{site_api_key}");
ListResult result = Item.list()
.limit(2)
.request();
for(ListResult.Entry entry:result) {
Item item = entry.item();
}
copy snippet
Click to Copy
Environment.configure("{site}","{site_api_key}");
ListResult result = Item.list()
.limit(2)
.request();
for(ListResult.Entry entry:result) {
Item item = entry.item();
}
Environment.configure("{site}","{site_api_key}");
ListResult result = Item.list()
.limit(2)
.request();
for(ListResult.Entry entry:result) {
Item item = entry.item();
}
Sample Result [ JSON ]
Show more...
{
"list": [
{
"item": {
"applicable_items": [
{
"id": "day-pass"
},
{..}
],
"enabled_for_checkout": true,
"enabled_in_portal": true,
"id": "gold",
"is_giftable": false,
"is_shippable": false,
"item_applicability": "restricted",
"name": "Gold",
"object": "item",
"resource_version": 1599817250235,
"status": "active",
"type": "plan",
"updated_at": 1599817250
}
},
{..}
],
"next_offset": "1"
}
URL Format
GET
https://{site}.chargebee.com/api/v2/items
optional, integer, default=10, min=1, max=100 The number of resources to be returned.
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.
sortBy<Attribute>(<sort-order>) optional, string filter
Sorts based on the specified attribute.
Supported attributes : name, id, updatedAt
Supported sort-orders : SortOrder.ASC, SortOrder.DESC
Example → sortByName(SortOrder.asc)
This will sort the result based on the 'name'
attribute in ascending(earliest first) order.
optional, string filter
Filter items based on item id. Possible values are :
Supported operators : is, isNot, startsWith, in, notIn
Example → id().is(basic)
Filter items based on item id.
methods are prefixed like id<param name>().<operator>(val)
optional, string, min chars=1 filter
Possible values are :
Supported operators :
Example →
optional, string, min chars=1 filter
Possible values are :
Supported operators :
Example →
starts_with().<operator>(val) starts_with().<operator>(val) optional, string, min chars=1 filter
Possible values are :
Supported operators :
Example →
optional, string filter
Possible values are :
Supported operators :
Example →
optional, string filter
Possible values are :
Supported operators :
Example →
itemFamilyId().<operator>(val) itemFamilyId().<operator>(val) optional, string filter
Filter items based on item_family_id
. Possible values are :
Supported operators : is, isNot, startsWith, in, notIn
Example → itemFamilyId().is(acme)
Filter items based on item_family_id
.
methods are prefixed like itemFamilyId<param name>().<operator>(val)
optional, string, min chars=1 filter
Possible values are :
Supported operators :
Example →
optional, string, min chars=1 filter
Possible values are :
Supported operators :
Example →
starts_with().<operator>(val) starts_with().<operator>(val) optional, string, min chars=1 filter
Possible values are :
Supported operators :
Example →
optional, string filter
Possible values are :
Supported operators :
Example →
optional, string filter
Possible values are :
Supported operators :
Example →
optional, enumerated string filter
Filter items based on item type
. Possible values are : PLAN, ADDON, CHARGE
Supported operators : is, isNot, in, notIn
Example → type().is(plan)
Filter items based on item type
.
methods are prefixed like type<param name>().<operator>(val)
optional, enumerated string filter
Possible values are : PLAN, ADDON, CHARGE
Supported operators :
Example →
optional, enumerated string filter
Possible values are : plan, addon, charge
Supported operators :
Example →
optional, string filter
Possible values are :
Supported operators :
Example →
optional, string filter
Possible values are :
Supported operators :
Example →
optional, string filter
Filter items based on item name
. Possible values are :
Supported operators : is, isNot, startsWith
Example → name().is(basic)
Filter items based on item name
.
methods are prefixed like name<param name>().<operator>(val)
optional, string, min chars=1 filter
Possible values are :
Supported operators :
Example →
optional, string, min chars=1 filter
Possible values are :
Supported operators :
Example →
starts_with().<operator>(val) starts_with().<operator>(val) optional, string, min chars=1 filter
Possible values are :
Supported operators :
Example →
itemApplicability().<operator>(val) itemApplicability().<operator>(val) optional, enumerated string filter
Filter items based on item_applicability
. Possible values are : ALL, RESTRICTED
Supported operators : is, isNot, in, notIn
Example → itemApplicability().is(all)
Filter items based on item_applicability
.
methods are prefixed like itemApplicability<param name>().<operator>(val)
optional, enumerated string filter
Possible values are : ALL, RESTRICTED
Supported operators :
Example →
optional, enumerated string filter
Possible values are : all, restricted
Supported operators :
Example →
optional, string filter
Possible values are :
Supported operators :
Example →
optional, string filter
Possible values are :
Supported operators :
Example →
optional, enumerated string filter
Filter items based on item status
. Possible values are : ACTIVE, ARCHIVED, DELETED
Supported operators : is, isNot, in, notIn
Example → status().is(active)
Filter items based on item status
.
methods are prefixed like status<param name>().<operator>(val)
optional, enumerated string filter
Possible values are : ACTIVE, ARCHIVED, DELETED
Supported operators :
Example →
optional, enumerated string filter
Possible values are : active, archived, deleted
Supported operators :
Example →
optional, string filter
Possible values are :
Supported operators :
Example →
optional, string filter
Possible values are :
Supported operators :
Example →
isGiftable().<operator>(val) isGiftable().<operator>(val) optional, enumerated string filter
Specifies if gift subscriptions can be created for this item. Possible values are : TRUE, FALSE
Supported operators : is
Example → isGiftable().is(true)
Specifies if gift subscriptions can be created for this item.
methods are prefixed like isGiftable<param name>().<operator>(val)
optional, enumerated string filter
Possible values are : TRUE, FALSE
Supported operators :
Example →
updatedAt().<operator>(val) updatedAt().<operator>(val) optional, timestamp(UTC) in seconds filter
Filter items based on when the items were last updated. Possible values are :
Supported operators : after, before, on, between
Example → updatedAt().after(1243545465)
Filter items based on when the items were last updated.
methods are prefixed like updatedAt<param name>().<operator>(val)
optional, timestamp(UTC) in seconds filter
Possible values are :
Supported operators :
Example →
optional, timestamp(UTC) in seconds filter
Possible values are :
Supported operators :
Example →
optional, timestamp(UTC) in seconds filter
Possible values are :
Supported operators :
Example →
between().<operator>(val) between().<operator>(val) optional, string filter
Possible values are :
Supported operators :
Example →
enabledForCheckout().<operator>(val) enabledForCheckout().<operator>(val) optional, enumerated string filter
Allow the plan to subscribed to via Checkout. Applies only for plan-items.
Note: Only the in-app version of Checkout is supported for Product Catalog v2. Possible values are : TRUE, FALSE
Supported operators : is
Example → enabledForCheckout().is(null)
Allow the plan to subscribed to via Checkout. Applies only for plan-items.
Note: Only the in-app version of Checkout is supported for Product Catalog v2.
methods are prefixed like enabledForCheckout<param name>().<operator>(val)
optional, enumerated string filter
Possible values are : TRUE, FALSE
Supported operators :
Example →
enabledInPortal().<operator>(val) enabledInPortal().<operator>(val) optional, enumerated string filter Allow customers to change their subscription to this plan via the Self-Serve Portal. Applies only for plan-items. This requires the Portal configuration to allow changing subscriptions. Possible values are : TRUE, FALSE Supported operators : is
Example → enabledInPortal().is(null) Allow customers to change their subscription to this plan via the Self-Serve Portal. Applies only for plan-items. This requires the Portal configuration to allow changing subscriptions. methods are prefixed like enabledInPortal<param name>().<operator>(val) optional, enumerated string filter
Possible values are : TRUE, FALSE
Supported operators :
Example →
metered().<operator>(val) metered().<operator>(val) optional, enumerated string filter Specifies whether the item undergoes metered billing. When true
, the quantity is calculated from usage records. When false
, the quantity
is as determined while adding an item price to the subscription. Applicable only for items of type
plan
or addon
and when Metered Billing is enabled. The value of this attribute cannot be changed. Possible values are : TRUE, FALSE Supported operators : is
Example → metered().is(true) Specifies whether the item undergoes metered billing. When true
, the quantity is calculated from usage records. When false
, the quantity
is as determined while adding an item price to the subscription. Applicable only for items of type
plan
or addon
and when Metered Billing is enabled. The value of this attribute cannot be changed. methods are prefixed like metered<param name>().<operator>(val) optional, enumerated string filter
Possible values are : TRUE, FALSE
Supported operators :
Example →
usageCalculation().<operator>(val) usageCalculation().<operator>(val) optional, enumerated string filter How the quantity is calculated from usage data for the item prices belonging to this item. Only applicable when the item is metered
. This value overrides the one set at the site level. . Possible values are : SUM_OF_USAGES, LAST_USAGE, MAX_USAGE Supported operators : is, isNot, in, notIn
Example → usageCalculation().is(SUM_OF_USAGES) How the quantity is calculated from usage data for the item prices belonging to this item. Only applicable when the item is metered
. This value overrides the one set at the site level. . methods are prefixed like usageCalculation<param name>().<operator>(val) optional, enumerated string filter
Possible values are : SUM_OF_USAGES, LAST_USAGE, MAX_USAGE
Supported operators :
Example →
optional, enumerated string filter
Possible values are : sum_of_usages, last_usage, max_usage
Supported operators :
Example →
optional, string filter
Possible values are :
Supported operators :
Example →
optional, string filter
Possible values are :
Supported operators :
Example →
channel().<operator>(val) channel().<operator>(val) optional, enumerated string filter
The subscription channel this object originated from and is maintained in. Possible values are : WEB, APP_STORE, PLAY_STORE
Supported operators : is, isNot, in, notIn
Example → channel().is(APP STORE)
The subscription channel this object originated from and is maintained in.
methods are prefixed like channel<param name>().<operator>(val)
optional, enumerated string filter
Possible values are : WEB, APP_STORE, PLAY_STORE
Supported operators :
Example →
optional, enumerated string filter
Possible values are : web, app_store, play_store
Supported operators :
Example →
optional, string filter
Possible values are :
Supported operators :
Example →
optional, string filter
Possible values are :
Supported operators :
Example →
businessEntityId().<operator>(val) businessEntityId().<operator>(val) optional, enumerated string filter The unique ID of the
business entity of this item
. Learn more about all the scenarios before using this filter.
Possible values are : TRUE, FALSE Supported operators : isPresent, is
Example → businessEntityId().isPresent(business_entity_id) The unique ID of the
business entity of this item
. Learn more about all the scenarios before using this filter.
methods are prefixed like businessEntityId<param name>().<operator>(val) is_present().<operator>(val) is_present().<operator>(val) optional, enumerated string filter
Possible values are : TRUE, FALSE
Supported operators :
Example →
optional, string, min chars=1 filter
Possible values are :
Supported operators :
Example →
includeSiteLevelResources().<operator>(val) includeSiteLevelResources().<operator>(val) 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 → includeSiteLevelResources().is(null) +
includeSiteLevelResources
Default value is true
. To exclude site-level resources in specific cases, set this parameter to false
.
methods are prefixed like includeSiteLevelResources<param name>().<operator>(val) optional, enumerated string filter
Possible values are : TRUE, FALSE
Supported operators :
Example →
bundleConfiguration().<operator>(val) bundleConfiguration().<operator>(val) optional, enumerated string filter
Parameters of bundle_configuration
Possible values are :
Supported operators : type
Example → bundleConfiguration().type(undefined)
Parameters of bundle_configuration
methods are prefixed like bundleConfiguration<param name>().<operator>(val)
optional, enumerated string filter
Type of the bundle Possible values are : fixed
Supported operators : is, isNot, in, notIn
Example → bundleConfigurationType().is(fixed)
always returned required
Resource object representing item
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`.
Sample admin console URL
https://{site}.chargebee.com/admin-console/items/123x
Deletes an item, marking its status
as deleted. This is not allowed if there are active
or archived
item prices under the item. Once deleted, the id and name of the item can be reused.
This API is not enabled for live sites by default. Please contact
support to get this enabled.
Sample Codes
import java.io.IOException;
import com.chargebee.*;
import com.chargebee.models.*;
import com.chargebee.models.enums.*;
public class Sample{
public static void main(String args[]) throws IOException{
Environment.configure("{site}","{site_api_key}");
Result result = Item.delete("delete-sample").request();
Item item = result.item();
System.out.println(result);
}
}
copy full code
Click to Copy
Environment.configure("{site}","{site_api_key}");
Result result = Item.delete("delete-sample").request();
Item item = result.item();
copy snippet
Click to Copy
Environment.configure("{site}","{site_api_key}");
Result result = Item.delete("delete-sample").request();
Item item = result.item();
Environment.configure("{site}","{site_api_key}");
Result result = Item.delete("delete-sample").request();
Item item = result.item();
Sample Result [ JSON ]
Show more...
{
"item": {
"enabled_for_checkout": true,
"enabled_in_portal": true,
"id": "delete-sample",
"is_giftable": false,
"is_shippable": false,
"name": "delete sample",
"object": "item",
"resource_version": 1599817250429,
"status": "deleted",
"type": "addon",
"updated_at": 1599817250
}
}
URL Format
POST
https://{site}.chargebee.com/api/v2/items/{item-id}/delete
always returned required
Resource object representing item
Sample admin console URL
https://{site}.chargebee.com/admin-console/items/123x