Options
All
  • Public
  • Public/Protected
  • All
Menu

Module promotions

Index

References

Namespaces

Classes

Type aliases

Variables

References

BogoDiscount

Re-exports BogoDiscount

BogoDiscount

Re-exports BogoDiscount

BoolFilter

Re-exports BoolFilter

BoolFilter

Re-exports BoolFilter

BoolFilterOperatorEnum

Re-exports BoolFilterOperatorEnum

BoolFilterOperatorEnum

Re-exports BoolFilterOperatorEnum

BoolQuery

Re-exports BoolQuery

BoolQuery

Re-exports BoolQuery

Campaign

Re-exports Campaign

Campaign

Re-exports Campaign

Discount

Re-exports Discount

Discount

Re-exports Discount

DiscountRule

Re-exports DiscountRule

DiscountRule

Re-exports DiscountRule

DiscountTypeEnum

Re-exports DiscountTypeEnum

DiscountTypeEnum

Re-exports DiscountTypeEnum

ErrorResponse

Re-exports ErrorResponse

ErrorResponse

Re-exports ErrorResponse

Filter

Re-exports Filter

Filter

Re-exports Filter

FilteredQuery

Re-exports FilteredQuery

FilteredQuery

Re-exports FilteredQuery

Money

Re-exports Money

Money

Re-exports Money

NestedQuery

Re-exports NestedQuery

NestedQuery

Re-exports NestedQuery

NestedQueryScoreModeEnum

Re-exports NestedQueryScoreModeEnum

NestedQueryScoreModeEnum

Re-exports NestedQueryScoreModeEnum

OrderPromotionRule

Re-exports OrderPromotionRule

OrderPromotionRule

Re-exports OrderPromotionRule

OrderPromotionRulePromotionClassEnum

Re-exports OrderPromotionRulePromotionClassEnum

OrderPromotionRulePromotionClassEnum

Re-exports OrderPromotionRulePromotionClassEnum

PaginatedResultBase

Re-exports PaginatedResultBase

PaginatedResultBase

Re-exports PaginatedResultBase

PaginatedSearchResult

Re-exports PaginatedSearchResult

PaginatedSearchResult

Re-exports PaginatedSearchResult

ProductCondition

Re-exports ProductCondition

ProductCondition

Re-exports ProductCondition

ProductConditionGroup

Re-exports ProductConditionGroup

ProductConditionGroup

Re-exports ProductConditionGroup

ProductConditionTypeEnum

Re-exports ProductConditionTypeEnum

ProductConditionTypeEnum

Re-exports ProductConditionTypeEnum

ProductPromotionRule

Re-exports ProductPromotionRule

ProductPromotionRule

Re-exports ProductPromotionRule

ProductPromotionRulePromotionClassEnum

Re-exports ProductPromotionRulePromotionClassEnum

ProductPromotionRulePromotionClassEnum

Re-exports ProductPromotionRulePromotionClassEnum

ProductSpecification

Re-exports ProductSpecification

ProductSpecification

Re-exports ProductSpecification

PromotedPaymentMethods

Re-exports PromotedPaymentMethods

PromotedPaymentMethods

Re-exports PromotedPaymentMethods

PromotedShippingMethods

Re-exports PromotedShippingMethods

PromotedShippingMethods

Re-exports PromotedShippingMethods

Promotion

Re-exports Promotion

Promotion

Re-exports Promotion

PromotionAbtestGroupAssignment

Re-exports PromotionAbtestGroupAssignment

PromotionAbtestGroupAssignment

Re-exports PromotionAbtestGroupAssignment

PromotionAssignmentInformation

Re-exports PromotionAssignmentInformation

PromotionAssignmentInformation

Re-exports PromotionAssignmentInformation

PromotionAssignmentInformationScheduleTypeEnum

Re-exports PromotionAssignmentInformationScheduleTypeEnum

PromotionAssignmentInformationScheduleTypeEnum

Re-exports PromotionAssignmentInformationScheduleTypeEnum

PromotionCampaignAssignment

Re-exports PromotionCampaignAssignment

PromotionCampaignAssignment

Re-exports PromotionCampaignAssignment

PromotionCompatibility

Re-exports PromotionCompatibility

PromotionCompatibility

Re-exports PromotionCompatibility

PromotionCompatibilityExclusivityEnum

Re-exports PromotionCompatibilityExclusivityEnum

PromotionCompatibilityExclusivityEnum

Re-exports PromotionCompatibilityExclusivityEnum

PromotionExclusivityEnum

Re-exports PromotionExclusivityEnum

PromotionExclusivityEnum

Re-exports PromotionExclusivityEnum

PromotionPromotionClassEnum

Re-exports PromotionPromotionClassEnum

PromotionPromotionClassEnum

Re-exports PromotionPromotionClassEnum

PromotionRule

Re-exports PromotionRule

PromotionRule

Re-exports PromotionRule

PromotionSearchResult

Re-exports PromotionSearchResult

PromotionSearchResult

Re-exports PromotionSearchResult

Promotions

Re-exports Promotions

Promotions

Re-exports Promotions

Query

Re-exports Query

Query

Re-exports Query

QueryFilter

Re-exports QueryFilter

QueryFilter

Re-exports QueryFilter

Range2Filter

Re-exports Range2Filter

Range2Filter

Re-exports Range2Filter

Range2FilterFilterModeEnum

Re-exports Range2FilterFilterModeEnum

Range2FilterFilterModeEnum

Re-exports Range2FilterFilterModeEnum

RangeFilter

Re-exports RangeFilter

RangeFilter

Re-exports RangeFilter

RangeFilterFrom

Re-exports RangeFilterFrom

RangeFilterFrom

Re-exports RangeFilterFrom

RangeFilterTo

Re-exports RangeFilterTo

RangeFilterTo

Re-exports RangeFilterTo

Recurrence

Re-exports Recurrence

Recurrence

Re-exports Recurrence

RecurrenceDayOfWeekEnum

Re-exports RecurrenceDayOfWeekEnum

RecurrenceDayOfWeekEnum

Re-exports RecurrenceDayOfWeekEnum

ResultBase

Re-exports ResultBase

ResultBase

Re-exports ResultBase

Schedule

Re-exports Schedule

Schedule

Re-exports Schedule

SearchRequest

Re-exports SearchRequest

SearchRequest

Re-exports SearchRequest

ShippingPromotionRule

Re-exports ShippingPromotionRule

ShippingPromotionRule

Re-exports ShippingPromotionRule

ShippingPromotionRulePromotionClassEnum

Re-exports ShippingPromotionRulePromotionClassEnum

ShippingPromotionRulePromotionClassEnum

Re-exports ShippingPromotionRulePromotionClassEnum

Sort

Re-exports Sort

Sort

Re-exports Sort

SortSortOrderEnum

Re-exports SortSortOrderEnum

SortSortOrderEnum

Re-exports SortSortOrderEnum

Tag

Re-exports Tag

Tag

Re-exports Tag

TermFilter

Re-exports TermFilter

TermFilter

Re-exports TermFilter

TermFilterOperatorEnum

Re-exports TermFilterOperatorEnum

TermFilterOperatorEnum

Re-exports TermFilterOperatorEnum

TermQuery

Re-exports TermQuery

TermQuery

Re-exports TermQuery

TermQueryOperatorEnum

Re-exports TermQueryOperatorEnum

TermQueryOperatorEnum

Re-exports TermQueryOperatorEnum

TermQueryValuesInner

Re-exports TermQueryValuesInner

TermQueryValuesInner

Re-exports TermQueryValuesInner

TextQuery

Re-exports TextQuery

TextQuery

Re-exports TextQuery

TieredDiscount

Re-exports TieredDiscount

TieredDiscount

Re-exports TieredDiscount

TieredDiscountConditionTypeEnum

Re-exports TieredDiscountConditionTypeEnum

TieredDiscountConditionTypeEnum

Re-exports TieredDiscountConditionTypeEnum

TimeOfDay

Re-exports TimeOfDay

TimeOfDay

Re-exports TimeOfDay

defaultBaseUri

Re-exports defaultBaseUri

Type aliases

BogoDiscount

BogoDiscount: { discount?: Discount; eligibleQuantity?: number; requireExactEligibleQuantity?: boolean; threshold?: number } & {}
property

threshold: The quantity of eligible products required.

property

discount: The discount applied to the bonus product; typically fixed_price, percentage, or amount.

property

eligibleQuantity: The number of eligible products that earn the bonus.

property

requireExactEligibleQuantity: Determines if exactly the eligible quantity is required, rather than at least.

BoolFilter

BoolFilter: { filters?: Array<Filter>; operator: BoolFilterOperatorEnum } & {}
property

filters: A list of filters that are logically combined by an operator.

property

operator: The logical operator that is used to combine the filters.

BoolFilterOperatorEnum

BoolFilterOperatorEnum: "and" | "or" | "not"

BoolQuery

BoolQuery: { must?: Array<Query>; mustNot?: Array<Query>; should?: Array<Query> } & {}
property

must: List of queries to be evaluated as an AND operator.

property

mustNot: List of queries to be evaluated as a NOT operator.

property

should: List of queries to be evaluated as an OR operator.

Campaign

Campaign: { campaignId: string; coupons?: Array<string>; creationDate?: string; customerGroups?: Array<string>; description?: string; enabled?: boolean; endDate?: string; lastModified?: string; sourceCodeGroups?: Array<string>; startDate?: string } & {}
property

campaignId: The ID of the campaign.

  • Min Length: 1
  • Max Length: 256
property

coupons: The array of assigned coupon IDs, not sorted.

property

creationDate: Returns the value of attribute 'creationDate'.

property

customerGroups: The array of assigned customer groups, not sorted.

property

description: The description of the campaign.

  • Max Length: 4000
property

enabled: The enabled flag for campaign.

property

endDate: The date the scenario ends.

property

lastModified: Returns the value of attribute 'lastModified'.

property

sourceCodeGroups: The array of assigned source code groups, not sorted.

property

startDate: The date the scenario begins.

Discount

Discount: { amount?: Money; bonusProducts?: Array<string>; percentage?: number; priceBookId?: string; type: DiscountTypeEnum } & {}
property

type: The kind of discount.

property

amount: The monetary value, for amount, fixed_price, total_fixed_price, and fixed_price_shipping discounts.

property

percentage: The percentage off, for percentage and percent_off_options discounts.

property

priceBookId: The price book the discounted price is taken from, for a price_book_price discount.

  • Max Length: 256
property

bonusProducts: The bonus products offered, for bonus and bonus_choice discounts.

DiscountRule

DiscountRule: { discountedProducts?: ProductSpecification; excludedProducts?: ProductSpecification; paymentMethodQualifiers?: PromotedPaymentMethods; promotionRule?: PromotionRule; qualifyingProducts?: ProductSpecification } & {}
property

promotionRule: The discount rule for this promotion. Its shape is selected by the parent promotion's promotionClass (product, order, or shipping) and holds the discount, tiers, BOGO, thresholds, max-applications, and class-specific flags.

property

qualifyingProducts: The products a customer must purchase for the promotion to apply.

property

discountedProducts: The products that receive the discount. Valid only for a product-class promotion; supplying it for an order or shipping promotion is rejected with a 400.

property

excludedProducts: The products excluded from both qualifying for and receiving the discount. Valid only for an order-class promotion; supplying it for a product or shipping promotion is rejected with a 400.

property

paymentMethodQualifiers: The payment methods the promotion is restricted to.

DiscountTypeEnum

DiscountTypeEnum: "amount" | "percentage" | "fixed_price" | "total_fixed_price" | "price_book_price" | "bonus" | "bonus_choice" | "free_shipping" | "fixed_price_shipping" | "percent_off_options"

ErrorResponse

ErrorResponse: { detail: string; instance?: string; title: string; type: string } & {}
property

title: A short, human-readable summary of the problem type. It will not change from occurrence to occurrence of the problem, except for purposes of localization

  • Max Length: 256
property

type: A URI reference [RFC3986] that identifies the problem type. This specification encourages that, when dereferenced, it provide human-readable documentation for the problem type (e.g., using HTML [W3C.REC-html5-20141028]). When this member is not present, its value is assumed to be "about:blank". It accepts relative URIs; this means that they must be resolved relative to the document's base URI, as per [RFC3986], Section 5.

  • Max Length: 2048
property

detail: A human-readable explanation specific to this occurrence of the problem.

property

instance: A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. It accepts relative URIs; this means that they must be resolved relative to the document's base URI, as per [RFC3986], Section 5.

  • Max Length: 2048

Filter

Filter: { boolFilter?: BoolFilter; queryFilter?: QueryFilter; range2Filter?: Range2Filter; rangeFilter?: RangeFilter; termFilter?: TermFilter } & {}
property

boolFilter:

property

queryFilter:

property

range2Filter:

property

rangeFilter:

property

termFilter:

FilteredQuery

FilteredQuery: { filter: Filter; query: Query } & {}
property

filter:

property

query:

Money

Money: { currencyMnemonic?: string; value?: number } & {}
property

currencyMnemonic: A three letter uppercase currency code conforming to the ISO 4217 standard, or the string N/A indicating that a currency is not applicable.

  • Pattern: /^([A-Z][A-Z][A-Z]|N/A)$/
property

value: The amount of money for the given currency.

NestedQuery

NestedQuery: { path: string; query: Query; scoreMode?: NestedQueryScoreModeEnum } & {}
property

path: The path to the nested document.

  • Max Length: 2048
property

query:

property

scoreMode: Indicates how scores for matching child objects affect the root parent document’s relevance score.

NestedQueryScoreModeEnum

NestedQueryScoreModeEnum: "avg" | "total" | "max" | "none"

OrderPromotionRule

OrderPromotionRule: { disableGlobalExcludedProducts?: boolean; discount?: Discount; discountOnlyQualifyingProducts?: boolean; enableUpsells?: boolean; excludeDiscountedProducts?: boolean; promotionClass: OrderPromotionRulePromotionClassEnum; tiers?: Array<TieredDiscount>; upsellThreshold?: Money } & {}
property

promotionClass: The promotion class discriminator. Always order for an order promotion rule.

property

discount: The discount applied by this rule.

property

tiers: The tiered discounts, applied by threshold. Empty or absent for a non-tiered rule.

property

discountOnlyQualifyingProducts: Determines if only the qualifying products are discounted.

property

excludeDiscountedProducts: Determines if products that already received a product-level discount are excluded.

property

disableGlobalExcludedProducts: Determines if this rule ignores the site-level global product exclusions. Distinct from the promotion-level disableGloballyExcluded flag.

property

enableUpsells: Determines if the promotion is returned as an approaching promotion to encourage upsell.

property

upsellThreshold: The amount by which the merchandise total may fall short of the purchase condition and still upsell.

OrderPromotionRulePromotionClassEnum

OrderPromotionRulePromotionClassEnum: "order"

PaginatedResultBase

PaginatedResultBase: { limit: number; offset: number; total: number } & {}
property

offset: The zero-based index of the first hit/data to include in the result.

property

limit: Maximum records to retrieve per request. The limit with its constraints (minimum, maximum, default) is defined by the request parameter limit of the endpoint returning this schema.

property

total: The total number of hits that match the search's criteria. This can be greater than the number of results returned as search results are pagenated.

PaginatedSearchResult

PaginatedSearchResult: { hits?: Array<object>; limit: number; offset: number; query: Query; sorts?: Array<Sort>; total: number } & {}
property

query:

property

sorts: The sorting that was applied to the result.

property

hits: The sorted array of search hits. Can be empty.

property

offset: The zero-based index of the first hit/data to include in the result.

property

limit: Maximum records to retrieve per request. The limit with its constraints (minimum, maximum, default) is defined by the request parameter limit of the endpoint returning this schema.

property

total: The total number of hits that match the search's criteria. This can be greater than the number of results returned as search results are pagenated.

ProductCondition

ProductCondition: { attributeId?: string; catalogId?: string; operator?: string; optionId?: string; type: ProductConditionTypeEnum; values?: Array<string> } & {}
property

type: The kind of product condition.

property

operator: The comparison operator, as a lower_snake_case token. The valid set depends on the condition type: category: is_equal, is_exactly, is_direct_child_of, is_child_of, is_direct_parent_of, is_parent_of, is_sibling_of; brand: exists, does_not_exist, is_equal, is_not_equal, starts_with, ends_with, contains, does_not_contain; product_id: is_equal, is_not_equal, starts_with, ends_with, contains, does_not_contain; price: less_than, greater_than, ends_with; inventory: less_than, greater_than; attribute: less_than, greater_than, equals, is_not_equal, exists, does_not_exist, starts_with, ends_with, contains, does_not_contain; product_set: is_equal, exists; price_book: storefront_price_in_recursive, storefront_price_in, price_in; option: is_equal, exists, does_not_exist.

  • Max Length: 256
property

values: The values compared against.

property

catalogId: The id of the catalog that owns the categories listed in values. Required when type is `category; ignored for every other condition type.

  • Max Length: 256
property

attributeId: The id of the custom product attribute to compare. Required when type is attribute; ignored for every other condition type.

  • Max Length: 256
property

optionId: The id of the product option to compare. Required when type is option; ignored for every other condition type.

  • Max Length: 256

ProductConditionGroup

ProductConditionGroup: { conditions?: Array<ProductCondition> } & {}
property

conditions: The conditions in this group.

ProductConditionTypeEnum

ProductConditionTypeEnum: "brand" | "product_id" | "category" | "price" | "inventory" | "attribute" | "product_set" | "price_book" | "option"

ProductPromotionRule

ProductPromotionRule: { bogo?: BogoDiscount; disableGlobalExcludedProducts?: boolean; discount?: Discount; identicalProducts?: boolean; maxApplications?: number; promotionClass: ProductPromotionRulePromotionClassEnum; prorate?: boolean; tiers?: Array<TieredDiscount> } & {}
property

promotionClass: The promotion class discriminator. Always product for a product promotion rule.

property

discount: The discount applied by this rule.

property

tiers: The tiered discounts, applied by threshold. Empty or absent for a non-tiered rule.

property

bogo: The buy-one-get-one discount. Present only for a buy-X-get-Y product promotion.

property

maxApplications: The maximum number of times the discount can be applied.

property

identicalProducts: Determines if the qualifying and discounted products must all be identical.

property

prorate: Determines if the discount is prorated across the eligible items.

property

disableGlobalExcludedProducts: Determines if this rule ignores the site-level global product exclusions. Distinct from the promotion-level disableGloballyExcluded flag.

ProductPromotionRulePromotionClassEnum

ProductPromotionRulePromotionClassEnum: "product"

ProductSpecification

ProductSpecification: { excludedProducts?: Array<ProductConditionGroup>; includedProducts?: Array<ProductConditionGroup> } & {}
property

includedProducts: The condition groups a product must match.

property

excludedProducts: The condition groups that exclude a product.

PromotedPaymentMethods

PromotedPaymentMethods: { methodIds?: Array<string> } & {}
property

methodIds: The payment method IDs. Each is either a payment method ID or a credit card type prefixed with CREDIT_CARD (for example CREDIT_CARD.Visa).

PromotedShippingMethods

PromotedShippingMethods: { methodIds?: Array<string> } & {}
property

methodIds: The shipping method IDs.

Promotion

Promotion: { archived?: boolean; assignmentInformation?: PromotionAssignmentInformation; creationDate?: string; currencyCode?: string; disableGloballyExcluded?: boolean; enabled?: boolean; exclusivity?: PromotionExclusivityEnum; id?: string; lastModified?: string; name?: {}; promotionClass?: PromotionPromotionClassEnum; tags?: Array<Tag> } & {}
property

archived: Determines if this promotion is archived. This attribute is allowed to be updated when using the Open Commerce API to update multiple promotions at once.

property

assignmentInformation: Information about the assignments and assignment schedules of this promotion.

property

creationDate: Returns the value of attribute 'creationDate'.

property

currencyCode: The ISO 4217 mnemonic code of the currency this promotion is restricted to. If not populated, then there is no currency restriction on the promotion.

  • Max Length: 3
property

disableGloballyExcluded: Determines if this promotion ignores the global product exclusions for promotions.

property

enabled: Determines if this promotion is enabled. This attribute is allowed to be updated when using the Open Commerce API to update multiple promotions at once.

property

exclusivity: Determines if the promotion can be combined with other promotions of the same promotion class or if it cannot be combined with any other promotions. This attribute is allowed to be updated when using the Open Commerce API to update multiple promotions at once.

property

id: The ID for the promotion.

property

lastModified: Returns the value of attribute 'lastModified'.

property

name: The user supplied name of this promotion, which can be localized.

property

promotionClass: The class of the promotion. If the promotion class is modified, then the promotion rule and all of its values, such as whether or not to disable global product exclusions, are reset.

property

tags: Returns the list of tags assigned to this promotion. If used to set the tags on a promotion, the promotion will only have the tags passed in the input. Any existing tags are removed.

PromotionAbtestGroupAssignment

PromotionAbtestGroupAssignment: { abtestDescription: string; abtestId: string; enabled: boolean; schedule: Schedule; segmentDescription: string; segmentId: string } & {}
property

abtestDescription:

property

abtestId:

property

enabled:

property

schedule:

property

segmentDescription:

property

segmentId:

PromotionAssignmentInformation

PromotionAssignmentInformation: { abtestId?: string; abtestSegmentId?: string; active: boolean; activeAbtestAssignments?: Array<PromotionAbtestGroupAssignment>; activeCampaignAssignments: Array<PromotionCampaignAssignment>; campaignId: string; enabled: boolean; endDate?: string; schedule: Schedule; scheduleType: PromotionAssignmentInformationScheduleTypeEnum; startDate?: string; upcomingAbtestAssignments?: Array<PromotionAbtestGroupAssignment>; upcomingCampaignAssignments?: Array<PromotionCampaignAssignment> } & {}
property

abtestId: If there is only one assignment, and that assignment is an A/B test segment, the ID of the A/B test the segment belongs to. Otherwise, empty.

property

abtestSegmentId: If there is only one assignment, and that assignment is an A/B test segment, the ID of the A/B test segment. Otherwise, empty.

property

active: True if the individual assignment or the multiple assignments are currently active.

property

activeAbtestAssignments: A list of currently active A/B tests this is assigned to.

property

activeCampaignAssignments: A list of currently active campaigns this is assigned to.

property

campaignId: If there is only one assignment, and that assignment is a campaign, the ID of the campaign. Otherwise, empty.

property

enabled:

property

endDate: The end date of the container of the assignment (a Campaign or ABTest). If scheduleType is scheduleType : "multiple" or scheduleType : "none", then then result is null. Also, a null date returns null.

property

schedule: The schedule of the assignment (a Campaign or ABTest). If scheduleType is scheduleType : "multiple" or scheduleType : "none", then then result is null.

property

scheduleType: If there is only one active assignment, or no active assignments and one upcoming assignment, this is that type of assignment (scheduleType : "campaign" or scheduleType : "abtest"). If there are no assignments, it is scheduleType : "none", otherwise, scheduleType : "multiple".

property

startDate: The start date of the container of the assignment (a Campaign or ABTest). If scheduleType is scheduleType : "multiple" or scheduleType : "none", then then result is null. Also, a null date returns null.

property

upcomingAbtestAssignments: A list of upcoming A/B tests this is assigned to.

property

upcomingCampaignAssignments: A list of upcoming campaigns this is assigned to.

PromotionAssignmentInformationScheduleTypeEnum

PromotionAssignmentInformationScheduleTypeEnum: "none" | "campaign" | "abtest" | "multiple"

PromotionCampaignAssignment

PromotionCampaignAssignment: { campaign?: Campaign; campaignId: string; coupons?: Array<string>; customerGroups?: Array<string>; description: string; enabled: boolean; promotion?: Promotion; promotionId: string; rank?: number; schedule: Schedule; sourceCodeGroups?: Array<string> } & {}
property

campaign: The campaign.

property

campaignId: The ID of the campaign.

  • Min Length: 1
  • Max Length: 256
property

coupons: The sorted array of assigned coupon IDs.

property

customerGroups: The sorted array of assigned customer groups.

property

description: The description of the promotion campaign assignment.

  • Max Length: 4000
property

enabled: True if the assignment resource is enabled.

property

promotion: The promotion.

property

promotionId: The ID of the promotion.

  • Min Length: 1
  • Max Length: 256
property

rank: The rank of promotion campaign assignment.

property

schedule: The schedule of the assignment resource.

property

sourceCodeGroups: The sorted array of assigned source code groups.

PromotionCompatibility

PromotionCompatibility: { combinablePromotions?: Array<string>; exclusivity?: PromotionCompatibilityExclusivityEnum; exclusivityGroup?: string; mutuallyExclusivePromotions?: Array<string> } & {}
property

exclusivity: Determines if the promotion can be combined with other promotions of the same promotion class, cannot be combined with any other promotion, or has no exclusivity restriction.

property

exclusivityGroup: The ID of the exclusivity group this promotion belongs to. Only meaningful when exclusivity restricts combination to promotions within the same group.

  • Max Length: 256
property

combinablePromotions: The set of promotion or promotion-group IDs this promotion can be combined with.

property

mutuallyExclusivePromotions: The set of promotion or promotion-group IDs this promotion cannot be combined with.

PromotionCompatibilityExclusivityEnum

PromotionCompatibilityExclusivityEnum: "no" | "class" | "global"

PromotionExclusivityEnum

PromotionExclusivityEnum: "no" | "class" | "global"

PromotionPromotionClassEnum

PromotionPromotionClassEnum: "product" | "shipping" | "order"

PromotionRule

PromotionRule: ({ promotionClass: "order" } & OrderPromotionRule) | ({ promotionClass: "product" } & ProductPromotionRule) | ({ promotionClass: "shipping" } & ShippingPromotionRule)

PromotionSearchResult

PromotionSearchResult: { hits: Array<Promotion>; limit: number; offset: number; query: Query; sorts?: Array<Sort>; total: number } & {}
property

hits: The sorted array of promotion search hits. Can be empty.

property

query:

property

sorts: The sorting that was applied to the result.

property

offset: The zero-based index of the first hit/data to include in the result.

property

limit: Maximum records to retrieve per request. The limit with its constraints (minimum, maximum, default) is defined by the request parameter limit of the endpoint returning this schema.

property

total: The total number of hits that match the search's criteria. This can be greater than the number of results returned as search results are pagenated.

Query

Query: { boolQuery?: BoolQuery; filteredQuery?: FilteredQuery; matchAllQuery?: object; nestedQuery?: NestedQuery; termQuery?: TermQuery; textQuery?: TextQuery } & {}
property

boolQuery:

property

filteredQuery:

property

matchAllQuery: Matches all documents (namespace and document type). This query comes in handy if you just want to filter a search result or really do not have any constraints.

property

nestedQuery:

property

termQuery:

property

textQuery:

QueryFilter

QueryFilter: { query: Query } & {}
property

query:

Range2Filter

Range2Filter: { filterMode?: Range2FilterFilterModeEnum; fromField: string; fromInclusive?: boolean; fromValue?: any | null; toField: string; toInclusive?: boolean; toValue?: any | null } & {}
property

filterMode: Compare mode: overlap, containing, or contained.

property

fromField: The field name of the field that starts the first range.

  • Max Length: 260
property

fromInclusive: A flag indicating if the lower bound of the second range is inclusive. To make the lower bound exclusive, set to false.

property

fromValue: The lower bound of the second range. If not specified, the range is open-ended with respect to the lower bound. You can't leave both the lower and upper bounds open-ended.

property

toField: The field name of the field that ends the first range.

  • Max Length: 260
property

toInclusive: A flag indicating if the upper bound of the second range is inclusive. To make the lower bound exclusive, set to false.

property

toValue: The upper bound of the second range. If not specified, the range is open-ended with respect to the upper bound. You can't leave both the upper and lower bounds open-ended.

Range2FilterFilterModeEnum

Range2FilterFilterModeEnum: "overlap" | "containing" | "contained"

RangeFilter

RangeFilter: { field: string; from?: RangeFilterFrom; fromInclusive?: boolean; to?: RangeFilterTo; toInclusive?: boolean } & {}
property

field: The search field.

  • Max Length: 260
property

from:

property

fromInclusive: A flag indicating if the lower bound of the range is inclusive. To make the lower bound exclusive, set to false.

property

to:

property

toInclusive: A flag indicating if the upper bound of the range is inclusive. To make the upper bound exclusive, set to false.

RangeFilterFrom

RangeFilterFrom: Date | number

RangeFilterTo

RangeFilterTo: Date | number

Recurrence

Recurrence: { dayOfWeek?: Array<RecurrenceDayOfWeekEnum>; timeOfDay?: TimeOfDay } & {}
property

dayOfWeek: The days of week for recurrence.

property

timeOfDay: The time of the day for recurrence.

RecurrenceDayOfWeekEnum

RecurrenceDayOfWeekEnum: "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday"

ResultBase

ResultBase: { limit: number; total: number } & {}
property

limit: Maximum records to retrieve per request. The limit with its constraints (minimum, maximum, default) is defined by the request parameter limit of the endpoint returning this schema.

property

total: The total number of hits that match the search's criteria. This can be greater than the number of results returned as search results are pagenated.

Schedule

Schedule: { endDate?: string; recurrence?: Recurrence; startDate?: string } & {}
property

startDate: The date to start validity. ISO8601 date time format: yyyy-MM-dd'T'HH:mm:ssZ.

property

endDate: The date to end of validity. ISO8601 date time format: yyyy-MM-dd'T'HH:mm:ssZ.

property

recurrence: The recurrence of the schedule by day of week and time of day. Not all schedules support a recurrence.

SearchRequest

SearchRequest: { limit?: number; offset?: number; query: Query; sorts?: Array<Sort> } & {}
property

limit: Maximum records to retrieve per request, not to exceed 200.

property

query:

property

sorts: The list of sort clauses configured for the search request. Sort clauses are optional. See the description of the search endpoint for details on the default sorting behavior that is used when explicit sorts are not passed.

property

offset: The zero-based index of the first hit/data to include in the result.

ShippingPromotionRule

ShippingPromotionRule: { disableGlobalExcludedProducts?: boolean; discount?: Discount; maxApplications?: number; prohibitNonqualifyingProducts?: boolean; promotionClass: ShippingPromotionRulePromotionClassEnum; shippingMethodQualifiers?: PromotedShippingMethods; tiers?: Array<TieredDiscount> } & {}
property

promotionClass: The promotion class discriminator. Always shipping for a shipping promotion rule.

property

discount: The discount applied by this rule.

property

tiers: The tiered discounts, applied by threshold. Empty or absent for a non-tiered rule.

property

shippingMethodQualifiers: The shipping methods the promotion applies to. Shipping-class only.

property

prohibitNonqualifyingProducts: Determines if the shipment must contain only qualifying products for the discount to apply.

property

disableGlobalExcludedProducts: Determines if this rule ignores the site-level global product exclusions. Distinct from the promotion-level disableGloballyExcluded flag.

property

maxApplications: The maximum number of times the discount can be applied.

ShippingPromotionRulePromotionClassEnum

ShippingPromotionRulePromotionClassEnum: "shipping"

Sort

Sort: { field: string; sortOrder?: SortSortOrderEnum } & {}
property

field: The name of the field to sort on.

  • Max Length: 256
property

sortOrder: The sort order to be applied when sorting. When omitted, the default sort order (asc) is used.

SortSortOrderEnum

SortSortOrderEnum: "asc" | "desc"

Tag

Tag: { tagId: string } & {}
property

tagId: The ID of the tag.

TermFilter

TermFilter: { field: string; operator: TermFilterOperatorEnum; values?: Array<string> } & {}
property

field: The filter field.

  • Max Length: 260
property

operator: The operator used to compare the field's values with the given values.

property

values: The filter values.

TermFilterOperatorEnum

TermFilterOperatorEnum: "is" | "one_of" | "is_null" | "is_not_null" | "less" | "greater" | "not_in" | "neq"

TermQuery

TermQuery: { fields: Array<string>; operator: TermQueryOperatorEnum; values?: Array<TermQueryValuesInner> } & {}
property

fields: The document fields that the values are matched against, combined with the operator.

property

operator: Returns the operator to use for the term query.

property

values: The values that the fields are compared against, combined with the operator.

TermQueryOperatorEnum

TermQueryOperatorEnum: "is" | "one_of" | "is_null" | "is_not_null" | "less" | "greater" | "not_in" | "neq"

TermQueryValuesInner

TermQueryValuesInner: boolean | number | string

TextQuery

TextQuery: { fields: Array<string>; searchPhrase: string } & {}
property

fields: The document fields that the search phrase matches against.

property

searchPhrase: A search phrase, which can include multiple terms separated by spaces.

TieredDiscount

TieredDiscount: { conditionType: TieredDiscountConditionTypeEnum; discount: Discount; threshold: number } & {}
property

threshold: The threshold at which this tier's discount applies.

property

conditionType: The kind of threshold. All tiers in the same rule MUST send the same value. Valid values depend on the promotion class - product: product_quantity, product_amount; order: order_total, product_quantity, product_combination; shipping: shipment_total, product_quantity, product_combination.

property

discount: The discount applied at this tier.

TieredDiscountConditionTypeEnum

TieredDiscountConditionTypeEnum: "product_quantity" | "product_amount" | "order_total" | "product_combination" | "shipment_total"

TimeOfDay

TimeOfDay: { timeFrom?: string; timeTo?: string } & {}
property

timeFrom: The time to start from. Time format: HH:mm or HH:mm:ss. Seconds are ignored and set to 0.

  • Pattern: /^([01][0-9]|2[0-3]):[0-5]0-9?$/
property

timeTo: The time to end on. Time format: HH:mm or HH:mm:ss. Seconds are ignored and set to 0.

  • Pattern: /^([01][0-9]|2[0-3]):[0-5]0-9?$/

Variables

Const defaultBaseUri

defaultBaseUri: "https://{shortCode}.api.commercecloud.salesforce.com/pricing/promotions/v1" = "https://{shortCode}.api.commercecloud.salesforce.com/pricing/promotions/v1"

Generated using TypeDoc