POST /exports/coupons
This API triggers export of coupon data. The exported zip file contains CSV files with coupon-related data.
Servers
- {protocol}://{site}.{environment}:{port}/api/v2
- {protocol}://{site}-test.{environment}:{port}/api/v2
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:
|
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:
|
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-event-email |
String | No |
skip only emails Possible values:
|
Request body fields
Name | Type | Required | Description |
---|---|---|---|
currency_code |
Object | No |
optional, string filter The currency code ([ISO 4217 format](https://www.chargebee.com/docs/supported-currencies.html)) of the coupon. Applicable for *fixed_amount* coupons alone. **Supported operators :** is, is_not, starts_with, in, not_in **Example →** *currency_code\[is\] = "USD"* |
currency_code.not_in |
String | No | |
currency_code.starts_with |
String | No | |
currency_code.in |
String | No | |
currency_code.is_not |
String | No | |
currency_code.is |
String | No | |
coupon |
Object | No |
Parameters for coupon |
coupon.id |
Object | No |
Used to uniquely identify the coupon in your website/application and to integrate with Chargebee. **Note:** When the coupon ID contains a special character; for example: `#`, the API returns an error. Make sure that you [encode](https://www.urlencoder.org/) the coupon ID in the path parameter before making an API call. |
coupon.id.not_in |
String | No | |
coupon.id.starts_with |
String | No | |
coupon.id.in |
String | No | |
coupon.id.is_not |
String | No | |
coupon.id.is |
String | No | |
coupon.apply_on |
Object | No |
The amount on the invoice to which the coupon is applied. |
coupon.apply_on.not_in |
String | No | |
coupon.apply_on.in |
String | No | |
coupon.apply_on.is_not |
String | No |
* `invoice_amount` - The coupon is applied to the invoice Possible values:
|
coupon.apply_on.is |
String | No |
* `invoice_amount` - The coupon is applied to the invoice Possible values:
|
coupon.name |
Object | No |
The display name used in web interface for identifying the coupon. **Note:** When the name of the coupon set contains a special character; for example: `#`, the API returns an error. Make sure that you [encode](https://www.urlencoder.org/) the name of the coupon set in the path parameter before making an API call. |
coupon.name.not_in |
String | No | |
coupon.name.starts_with |
String | No | |
coupon.name.in |
String | No | |
coupon.name.is_not |
String | No | |
coupon.name.is |
String | No | |
coupon.duration_type |
Object | No |
Specifies the time duration for which this coupon is attached to the subscription. |
coupon.duration_type.not_in |
String | No | |
coupon.duration_type.in |
String | No | |
coupon.duration_type.is_not |
String | No |
* `one_time` - The coupon stays attached to the subscription till it is applied on an invoice once . It is removed after that from the subscription. * `forever` - The coupon is attached to the subscription and applied on the invoices until explicitly removed. * `limited_period` - The discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by Possible values:
|
coupon.duration_type.is |
String | No |
* `one_time` - The coupon stays attached to the subscription till it is applied on an invoice once . It is removed after that from the subscription. * `forever` - The coupon is attached to the subscription and applied on the invoices until explicitly removed. * `limited_period` - The discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by Possible values:
|
coupon.discount_type |
Object | No |
The type of deduction |
coupon.discount_type.not_in |
String | No | |
coupon.discount_type.in |
String | No | |
coupon.discount_type.is_not |
String | No |
* `fixed_amount` - The specified amount will be deducted. * `percentage` - The specified percentage will be deducted. * `offer_quantity` - The specified units will be offered without any deduction. Possible values:
|
coupon.discount_type.is |
String | No |
* `fixed_amount` - The specified amount will be deducted. * `percentage` - The specified percentage will be deducted. * `offer_quantity` - The specified units will be offered without any deduction. Possible values:
|
coupon.status |
Object | No |
Status of the coupon. |
coupon.status.not_in |
String | No | |
coupon.status.in |
String | No | |
coupon.status.is_not |
String | No |
* `active` - Can be applied to a subscription. * `expired` - Cannot be applied to a subscription. A coupon may expire due to exceeding max_redemptions or valid_till date is past. Existing associations remain unaffected. * `archived` - Cannot be applied to a subscription. Existing associations remain unaffected. * `deleted` - Indicates the coupon has been deleted. * `future` - The coupon is scheduled to start at a future date and cannot be applied to a subscription. From the valid_from date, the status changes to active. Possible values:
|
coupon.status.is |
String | No |
* `active` - Can be applied to a subscription. * `expired` - Cannot be applied to a subscription. A coupon may expire due to exceeding max_redemptions or valid_till date is past. Existing associations remain unaffected. * `archived` - Cannot be applied to a subscription. Existing associations remain unaffected. * `deleted` - Indicates the coupon has been deleted. * `future` - The coupon is scheduled to start at a future date and cannot be applied to a subscription. From the valid_from date, the status changes to active. Possible values:
|
coupon.created_at |
Object | No |
Timestamp indicating when this coupon is created. |
coupon.created_at.on |
String | No | |
coupon.created_at.after |
String | No | |
coupon.created_at.between |
String | No | |
coupon.created_at.before |
String | No | |
coupon.updated_at |
Object | No |
To filter based on updated at. This attribute will be present only if the resource has been updated after 2016-11-09. |
coupon.updated_at.on |
String | No | |
coupon.updated_at.after |
String | No | |
coupon.updated_at.between |
String | No | |
coupon.updated_at.before |
String | No |
How to start integrating
- Add HTTP Task to your workflow definition.
- 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.
- Click Test request to test run your request to the API and see the API's response.