EcommercePromoRules
Returns details about promotional rules configured for a store, including eligibility and discount types.
View-Specific Information
Select
The driver uses the Mailchimp API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client-side within the driver.
| Column | Supported Operators |
| StoreId | = |
| Id | = |
SELECT * FROM EcommercePromoRules
SELECT * FROM EcommercePromoRules WHERE Id = 'ruleid1'
SELECT * FROM EcommercePromoRules WHERE Id = 'ruleid1' AND StoreId = 'STR002'
Note: To retrieve the StoreId, query the EcommerceStores view.
Columns
| Name | Type | ReadOnly | References | Description |
| StoreId [KEY] | String | False |
The Store Id. | |
| Id [KEY] | String | False |
The ID of the associated promo rule. | |
| Title | String | False |
The title that will show up in promotion campaign. | |
| Description | String | False |
The description of a promotion restricted to UTF-8 characters with max length 255. | |
| StartsAt | Datetime | False |
The date and time when the promotion is in effect in ISO 8601 format. | |
| EndsAt | Datetime | False |
The date and time when the promotion ends. Must be after starts_at and in ISO 8601 format. | |
| Amount | Decimal | False |
The amount of the promo code discount. If 'type' is 'fixed', the amount is treated as a monetary value. If 'type' is 'percentage', amount must be a decimal value between 0.0 and 1.0, inclusive | |
| Type | String | False |
Type of discount. For free shipping set type to fixed. The allowed values are fixed, percentage. | |
| Target | String | False |
The target that the discount applies to. The allowed values are per_item, total, shipping. | |
| Enabled | Boolean | False |
Whether the promo rule is currently enabled. | |
| CreatedAtForeign | Datetime | False |
The date and time the promotion was created in ISO 8601 format. | |
| UpdatedAtForeign | Datetime | False |
The date and time the promotion was updated in ISO 8601 format. | |
| Links | String | True |
A list of link types and descriptions for the API schema documents. |