POST /exports/subscriptions

This API triggers export of subscription data. The exported zip file contains CSV files with subscription-related data.

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

Possible 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

Possible 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

Possible values:

  • "all-disabled"

Request body fields

Name Type Required Description
cancel_reason_code Object No

optional, string filter Reason code for canceling the subscription. Must be one from a list of reason codes set in the Chargebee app in **Settings \> Configure Chargebee \> Reason Codes \> Subscriptions \> Subscription Cancellation** . Must be passed if set as mandatory in the app. The codes are case-sensitive. **Supported operators :** is, is_not, starts_with, in, not_in **Example →** *cancel_reason_code\[is\] = "Not Paid"*

cancel_reason_code.not_in String No
cancel_reason_code.starts_with String No
cancel_reason_code.in String No
cancel_reason_code.is_not String No
cancel_reason_code.is String No
subscription Object No

Parameters for subscription

subscription.cancel_reason Object No

The reason for canceling the subscription. Set by Chargebee automatically.

subscription.cancel_reason.not_in String No
subscription.cancel_reason.in String No
subscription.cancel_reason.is_not String No

* `not_paid` - Not Paid * `no_card` - No Card * `fraud_review_failed` - Fraud Review Failed * `non_compliant_eu_customer` - Non Compliant EU Customer * `tax_calculation_failed` - Tax Calculation Failed * `currency_incompatible_with_gateway` - Currency incompatible with Gateway * `non_compliant_customer` - Non Compliant Customer

Possible values:

  • "tax_calculation_failed"
  • "non_compliant_eu_customer"
  • "non_compliant_customer"
  • "not_paid"
  • "currency_incompatible_with_gateway"
  • "fraud_review_failed"
  • "no_card"
subscription.cancel_reason.is String No

* `not_paid` - Not Paid * `no_card` - No Card * `fraud_review_failed` - Fraud Review Failed * `non_compliant_eu_customer` - Non Compliant EU Customer * `tax_calculation_failed` - Tax Calculation Failed * `currency_incompatible_with_gateway` - Currency incompatible with Gateway * `non_compliant_customer` - Non Compliant Customer

Possible values:

  • "tax_calculation_failed"
  • "non_compliant_eu_customer"
  • "non_compliant_customer"
  • "not_paid"
  • "currency_incompatible_with_gateway"
  • "fraud_review_failed"
  • "no_card"
subscription.cancel_reason.is_present String No

Possible values:

  • "false"
  • "true"
subscription.activated_at Object No

Time at which the subscription `status` last changed to `active`. For example, this value is updated when an `in_trial` or `cancelled` subscription activates.

subscription.activated_at.on String No
subscription.activated_at.after String No
subscription.activated_at.between String No
subscription.activated_at.before String No
subscription.activated_at.is_present String No

Possible values:

  • "false"
  • "true"
subscription.has_scheduled_changes Object No

If `true`, there are subscription changes scheduled on next renewal.

subscription.has_scheduled_changes.is String No

Possible values:

  • "false"
  • "true"
subscription.status Object No

Current state of the subscription

subscription.status.not_in String No
subscription.status.in String No
subscription.status.is_not String No

* `future` - The subscription is scheduled to start at a future date. * `in_trial` - The subscription is in trial. * `active` - The subscription is active and will be charged for automatically based on the items in it. * `non_renewing` - The subscription will be canceled at the end of the current term. * `paused` - The subscription is paused. The subscription will not renew while in this state. * `cancelled` - The subscription has been canceled and is no longer in service. * `transferred` - The subscription has been transferred to another business entity within the organization.

Possible values:

  • "active"
  • "future"
  • "in_trial"
  • "non_renewing"
  • "paused"
  • "cancelled"
  • "transferred"
subscription.status.is String No

* `future` - The subscription is scheduled to start at a future date. * `in_trial` - The subscription is in trial. * `active` - The subscription is active and will be charged for automatically based on the items in it. * `non_renewing` - The subscription will be canceled at the end of the current term. * `paused` - The subscription is paused. The subscription will not renew while in this state. * `cancelled` - The subscription has been canceled and is no longer in service. * `transferred` - The subscription has been transferred to another business entity within the organization.

Possible values:

  • "active"
  • "future"
  • "in_trial"
  • "non_renewing"
  • "paused"
  • "cancelled"
  • "transferred"
subscription.auto_close_invoices Object No

Set to `false` to override for this subscription, the [site-level setting](https://www.chargebee.com/docs/2.0/metered_billing.html#configuring-metered-billing) for auto-closing invoices. Only applicable when auto-closing invoices has been enabled for the site. This attribute has a higher precedence than the same attribute at the [customer level](/docs/api/customers?prod_cat_ver=2#customer_auto_close_invoices).

subscription.auto_close_invoices.is String No

Possible values:

  • "false"
  • "true"
subscription.updated_at Object No

To filter based on `updated_at`. This attribute will be present only if the resource has been updated after 2016-09-28. It is advisable when using this filter, to pass the `sort_by` input parameter as `updated_at` for a faster response.

subscription.updated_at.on String No
subscription.updated_at.after String No
subscription.updated_at.between String No
subscription.updated_at.before String No
subscription.id Object No

A unique and immutable identifier for the subscription. If not provided, it is autogenerated.

subscription.id.not_in String No
subscription.id.starts_with String No
subscription.id.in String No
subscription.id.is_not String No
subscription.id.is String No
subscription.customer_id Object No

Identifier of the customer with whom this subscription is associated.

subscription.customer_id.not_in String No
subscription.customer_id.starts_with String No
subscription.customer_id.in String No
subscription.customer_id.is_not String No
subscription.customer_id.is String No
subscription.offline_payment_method Object No

The preferred offline payment method for the subscription.

subscription.offline_payment_method.not_in String No
subscription.offline_payment_method.in String No
subscription.offline_payment_method.is_not String No

* `no_preference` - No Preference * `cash` - Cash * `check` - Check * `bank_transfer` - Bank Transfer * `ach_credit` - ACH Credit * `sepa_credit` - SEPA Credit * `boleto` - Boleto * `us_automated_bank_transfer` - US Automated Bank Transfer * `eu_automated_bank_transfer` - EU Automated Bank Transfer * `uk_automated_bank_transfer` - UK Automated Bank Transfer * `jp_automated_bank_transfer` - JP Automated Bank Transfer * `mx_automated_bank_transfer` - MX Automated Bank Transfer * `custom` - Custom

Possible values:

  • "mx_automated_bank_transfer"
  • "cash"
  • "boleto"
  • "no_preference"
  • "bank_transfer"
  • "jp_automated_bank_transfer"
  • "custom"
  • "check"
  • "eu_automated_bank_transfer"
  • "sepa_credit"
  • "ach_credit"
  • "us_automated_bank_transfer"
  • "uk_automated_bank_transfer"
subscription.offline_payment_method.is String No

* `no_preference` - No Preference * `cash` - Cash * `check` - Check * `bank_transfer` - Bank Transfer * `ach_credit` - ACH Credit * `sepa_credit` - SEPA Credit * `boleto` - Boleto * `us_automated_bank_transfer` - US Automated Bank Transfer * `eu_automated_bank_transfer` - EU Automated Bank Transfer * `uk_automated_bank_transfer` - UK Automated Bank Transfer * `jp_automated_bank_transfer` - JP Automated Bank Transfer * `mx_automated_bank_transfer` - MX Automated Bank Transfer * `custom` - Custom

Possible values:

  • "mx_automated_bank_transfer"
  • "cash"
  • "boleto"
  • "no_preference"
  • "bank_transfer"
  • "jp_automated_bank_transfer"
  • "custom"
  • "check"
  • "eu_automated_bank_transfer"
  • "sepa_credit"
  • "ach_credit"
  • "us_automated_bank_transfer"
  • "uk_automated_bank_transfer"
subscription.next_billing_at Object No

The date/time at which the next billing for the subscription happens. This is usually right after `current_term_end` unless multiple subscription terms were invoiced in advance using the `terms_to_charge` parameter.

subscription.next_billing_at.on String No
subscription.next_billing_at.after String No
subscription.next_billing_at.between String No
subscription.next_billing_at.before String No
subscription.channel Object No

The subscription channel this object originated from and is maintained in.

subscription.channel.not_in String No
subscription.channel.in String No
subscription.channel.is_not String No

* `web` - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI. * `app_store` - The 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_store` - The 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.

Possible values:

  • "web"
  • "play_store"
  • "app_store"
subscription.channel.is String No

* `web` - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI. * `app_store` - The 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_store` - The 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.

Possible values:

  • "web"
  • "play_store"
  • "app_store"
subscription.remaining_billing_cycles Object No

* When the subscription is not on a contract term: this value is the number of billing cycles remaining after the current cycle, at the end of which, the subscription cancels. * When the subscription is on a [contract term](contract_terms): this value is the number of billing cycles remaining in the contract term after the current billing cycle.

subscription.remaining_billing_cycles.gt String No
subscription.remaining_billing_cycles.lte String No
subscription.remaining_billing_cycles.between String No
subscription.remaining_billing_cycles.gte String No
subscription.remaining_billing_cycles.is_not String No
subscription.remaining_billing_cycles.lt String No
subscription.remaining_billing_cycles.is String No
subscription.remaining_billing_cycles.is_present String No

Possible values:

  • "false"
  • "true"
subscription.cancelled_at Object No

Time at which subscription was cancelled or is set to be cancelled.

subscription.cancelled_at.on String No
subscription.cancelled_at.after String No
subscription.cancelled_at.between String No
subscription.cancelled_at.before String No
subscription.created_at Object No

The time at which the subscription was created.

subscription.created_at.on String No
subscription.created_at.after String No
subscription.created_at.between String No
subscription.created_at.before String No
item_price_id Object No

optional, string filter The plan item price code. **Supported operators :** is, is_not, starts_with, in, not_in **Example →** *item_price_id\[is\] = "silver-USD-monthly"*

item_price_id.not_in String No
item_price_id.starts_with String No
item_price_id.in String No
item_price_id.is_not String No
item_price_id.is String No
export_type String No

Determines the format of the data. Returns the export type based on the selected value. * import_friendly_data - Download import friendly data in CSV. This CSV can be used to perform bulk operations. * data - Download your current data in CSV.

Possible values:

  • "data"
  • "import_friendly_data"

Default value: "data"

item_id Object No

optional, string filter The plan item code. **Supported operators :** is, is_not, starts_with, in, not_in **Example →** *item_id\[is\] = "silver"*

item_id.not_in String No
item_id.starts_with String No
item_id.in String No
item_id.is_not String No
item_id.is String No

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.