POST /features

Creates a new feature.

Servers

Request headers

Name Type Required Description
chargebee-request-origin-device String No

The device from which the customer has made the request

Content-Type String Yes The media type of the request body.

Default value: "application/x-www-form-urlencoded"

chargebee-event-webhook String No

skip only webhooks

Valid values:

  • "all-disabled"
chargebee-business-entity-id String No

If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.

chargebee-event-actions String No

skip all actions to be done on the events

Valid values:

  • "all-disabled"
chargebee-request-origin-user String No

The email address of your customer/user. Use this when the email address has only ASCII characters.

chargebee-request-origin-ip String No

The IP address of the customer where the request originated

chargebee-request-origin-user-encoded String No

The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.

chargebee-event-email String No

skip only emails

Valid values:

  • "all-disabled"

Request body fields

Name Type Required Description
id String No

A unique and immutable identifier for the feature. You can set it yourself, in which case it is recommended that a human-readable format (or slug) be used. For example, number-of-users-ccjht01. When not provided, a random value is automatically set.

name String Yes

A case-sensitive unique name for the feature. For example: user license , data storage , Salesforce Integration , devices , UHD Streaming , and so on.

Note: This name is not displayed on any customer-facing documents or pages such as invoice PDFs or hosted pages. However, in the future, it is likely to be introduced on the Self-Serve Portal .

description String No

A brief description of the feature. For example: Access to 10TB cloud storage .

levels Object No

Parameters for levels

levels.is_unlimited[] Array No

When type is quantity or range, this attribute indicates whether the entitlement level corresponds to unlimited units of the feature. Possible values are:

  • true: The entitlement level corresponds to unlimited units of the feature. levels[].value is ignored for this level. This can only be set for the level that has the highest value for levels[].level.
  • false: The entitlement level does not correspond to unlimited units of the feature.

Either this or levels[value] should be passed.

levels.name[] Array No

A case-sensitive display name for the entitlement level. Provide a name that helps you clearly identify the entitlement level. For example: a feature such as Email Support can have entitlement levels named as All weekdays , All days , 40 hours per week and so on.

When not provided for feature.type quantity or range , this name is auto-generated as the space-separated concatenation of levels[].value and the pluralized version of unit. For example, if levels[].value is 20 and unit is user , then levels[].name becomes 20 users .

levels.level[] Array No

Represents the order of the entitlement levels from lowest to highest.

  • When type is quantity or custom: Provide the level for the lowest entitlement level as 0, the next higher level as 1, followed by 2, and so on.
  • When type is range: Provide 0 for the minimum value and 1 for the maximum value in the range.

When not defined, it is assumed as the index of the levels[] array.

levels.value[] Array No

The value denoting the entitlement level granted.

  • When type is quantity: this attribute denotes the quantity of units of the feature for this entitlement level. For example, a feature such as number of users can have levels[].value as 5, 20, 50, and 100. levels[].is_unlimited is used to set the entitlement level to "unlimited".
  • When type is range: there can be be only two elements in the levels[] array; one corresponding to the minimum value (levels[0]) and the other to the maximum value (levels[1]) of the range of possible entitlement levels. For example, a feature such as number of users may have levels[0].value = 5 and levels[1].value = 50000. When the upper limit is "unlimited", then levels[1].value is not set and levels[1].is_unlimited is true.
  • When type is custom: this attribute denotes the value of this custom entitlement level. For example, a feature Email Support can have levels[].value as one of say, 24×7 and 24×5.
type String No

The type of feature.

* quantity -

The feature is quantity-based and entitlement levels available for it are a set of predefined number of quantity units. For example, a feature with name such as number of users can have entitlement levels of say, 5 , 20 , 50 , and 100. levels[is_unlimited] is used for specifying the "unlimited" entitlement level.

* range -

The feature is quantity-based and the entitlement levels available for it are the set of whole numbers within a range. The range is defined by a minimum and a maximum value. For example, a feature such as number of users can have entitlement levels starting at 5 users and go up to 50000. levels[is_unlimited] is used for specifying the "unlimited" entitlement level.

* switch -

A switch or toggle is a feature that an item or subscription can be either fully entitled to or not entitled to at all.

* custom -

The entitlement levels available for this feature are defined as a set of custom values. For example, a feature Email Support can have entitlement levels as 24×7 and 24×5 .

Valid values:

  • "quantity"
  • "range"
  • "custom"
  • "switch"
status String No

The current status of the feature.

* active -

A draft or an archived feature can be changed to active. Any entitlements or subscription entitlements defined for the feature take effect immediately.

* draft -

The feature is in an unpublished state. Entitlements and subscription entitlements can be created for a draft feature but they are not effective until the feature is active. A feature status cannot be changed back to draft once it is in active or archived status .

* archived -

An active feature can be changed to archived. Once archived , no new entitlements or subscription entitlements can be created for the feature. However, any pre-existing item or subscription entitlements from the time that the feature was active , remain effective.

Valid values:

  • "active"
  • "draft"
unit String No

For features of type quantity or range , this specifies the unit of measure. The value is expected in the singular form and when used by the system, it is pluralized automatically as needed. For example, for a feature such as user licenses , the unit can be license .

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. 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.
  3. Click Test request to test run your request to the API and see the API's response.