Options
All
  • Public
  • Public/Protected
  • All
Menu

Module coupons

Index

References

Namespaces

Classes

Type aliases

Variables

References

BoolFilter

Re-exports BoolFilter

BoolFilter

Re-exports BoolFilter

BoolFilterOperatorEnum

Re-exports BoolFilterOperatorEnum

BoolFilterOperatorEnum

Re-exports BoolFilterOperatorEnum

BoolQuery

Re-exports BoolQuery

BoolQuery

Re-exports BoolQuery

Coupon

Re-exports Coupon

Coupon

Re-exports Coupon

CouponCode

Re-exports CouponCode

CouponCode

Re-exports CouponCode

CouponCodeRedemptionRequest

Re-exports CouponCodeRedemptionRequest

CouponCodeRedemptionRequest

Re-exports CouponCodeRedemptionRequest

CouponCodes

Re-exports CouponCodes

CouponCodes

Re-exports CouponCodes

CouponMultiCodesRequest

Re-exports CouponMultiCodesRequest

CouponMultiCodesRequest

Re-exports CouponMultiCodesRequest

CouponRedemption

Re-exports CouponRedemption

CouponRedemption

Re-exports CouponRedemption

CouponRedemptionSearchResult

Re-exports CouponRedemptionSearchResult

CouponRedemptionSearchResult

Re-exports CouponRedemptionSearchResult

CouponSearchResult

Re-exports CouponSearchResult

CouponSearchResult

Re-exports CouponSearchResult

CouponSystemCodeConfig

Re-exports CouponSystemCodeConfig

CouponSystemCodeConfig

Re-exports CouponSystemCodeConfig

CouponTypeEnum

Re-exports CouponTypeEnum

CouponTypeEnum

Re-exports CouponTypeEnum

Coupons

Re-exports Coupons

Coupons

Re-exports Coupons

ErrorResponse

Re-exports ErrorResponse

ErrorResponse

Re-exports ErrorResponse

Filter

Re-exports Filter

Filter

Re-exports Filter

FilteredQuery

Re-exports FilteredQuery

FilteredQuery

Re-exports FilteredQuery

NestedQuery

Re-exports NestedQuery

NestedQuery

Re-exports NestedQuery

NestedQueryScoreModeEnum

Re-exports NestedQueryScoreModeEnum

NestedQueryScoreModeEnum

Re-exports NestedQueryScoreModeEnum

PaginatedResultBase

Re-exports PaginatedResultBase

PaginatedResultBase

Re-exports PaginatedResultBase

PaginatedSearchResult

Re-exports PaginatedSearchResult

PaginatedSearchResult

Re-exports PaginatedSearchResult

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

RedemptionLimitPerPeriod

Re-exports RedemptionLimitPerPeriod

RedemptionLimitPerPeriod

Re-exports RedemptionLimitPerPeriod

RedemptionLimits

Re-exports RedemptionLimits

RedemptionLimits

Re-exports RedemptionLimits

ResultBase

Re-exports ResultBase

ResultBase

Re-exports ResultBase

SearchRequest

Re-exports SearchRequest

SearchRequest

Re-exports SearchRequest

Sort

Re-exports Sort

Sort

Re-exports Sort

SortSortOrderEnum

Re-exports SortSortOrderEnum

SortSortOrderEnum

Re-exports SortSortOrderEnum

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

defaultBaseUri

Re-exports defaultBaseUri

Type aliases

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.

Coupon

Coupon: { couponId: string; creationDate?: string; description?: string; enabled: boolean; exportedCodeCount?: number; lastModified?: string; redemptionCount?: number; redemptionLimits?: RedemptionLimits; singleCode?: string; systemCodesConfig?: CouponSystemCodeConfig; totalCodesCount?: number; type: CouponTypeEnum } & {}
property

couponId: The ID of the coupon.

  • Min Length: 1
  • Max Length: 256
property

creationDate: Returns the value of attribute 'creationDate'.

property

description: The description of the coupon.

  • Max Length: 4000
property

enabled: A flag indicating whether the coupon is enabled.

property

exportedCodeCount: The number of coupon codes attached to the coupon that have been issued (read only).

property

lastModified: Returns the value of attribute 'lastModified'.

property

redemptionCount: The number of times the coupon has been redeemed (read only). The count is updated once per hour.

property

redemptionLimits: The redemption limit per coupon code.

property

singleCode: Single coupon code, only valid for Single Code type.

  • Min Length: 1
  • Max Length: 256
property

systemCodesConfig: The configuration of system coupon codes, including prefix and number of codes.

property

totalCodesCount: The total number of coupon codes associated with this coupon (read only). The count is updated once per hour.

property

type: The type of coupon code.

CouponCode

CouponCode: { code: string; issued: boolean; redemptionCount: number } & {}
property

code: The code used to redeem the coupon.

property

issued: Flag indicating if the coupon code has been issued.

property

redemptionCount: The count of the number of redemptions associated with the code.

CouponCodeRedemptionRequest

CouponCodeRedemptionRequest: { code: string; customerEmail?: string; orderNo: string } & {}
property

code: The coupon code to redeem.

property

customerEmail: The customer email to use on the redemption.

property

orderNo: The order number to use on the redemption. In case the coupon was redeemed externally and no order number is associated, use a reference id or custom string to identify the source of the redemption.

CouponCodes

CouponCodes: { data: Array<CouponCode>; limit: number; offset: number; total: number } & {}
property

data: The collection of coupon codes.

property

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

property

limit: Maximum records to retrieve per request, not to exceed the maximum defined. A limit must be at least 1 so at least one record is returned (if any match the criteria).

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.

CouponMultiCodesRequest

CouponMultiCodesRequest: { codes: Array<string> } & {}
property

codes: The list of coupon codes to add or delete.

CouponRedemption

CouponRedemption: { code: string; couponId: string; creationDate: string; customerEmail: string; orderNo: string; viewOrderUrl: string } & {}
property

code: The coupon code that was redeemed.

property

couponId: The coupon id that was redeemed.

property

creationDate: Date when the redemption was created.

property

customerEmail: The customer email that was used to redeem it.

property

orderNo: The order number where the redemption occurred.

property

viewOrderUrl: A URL able to access the order.

CouponRedemptionSearchResult

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

hits: The array of coupon redemption 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, not to exceed the maximum defined. A limit must be at least 1 so at least one record is returned (if any match the criteria).

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.

CouponSearchResult

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

hits: The sorted array of coupon 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, not to exceed the maximum defined. A limit must be at least 1 so at least one record is returned (if any match the criteria).

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.

CouponSystemCodeConfig

CouponSystemCodeConfig: { codePrefix: string; numberOfCodes: number } & {}
property

codePrefix: The code prefix for system-generated coupon codes.

property

numberOfCodes: The number of system coupon codes that can be issued.

CouponTypeEnum

CouponTypeEnum: "single_code" | "multiple_codes" | "system_codes"

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:

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"

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, not to exceed the maximum defined. A limit must be at least 1 so at least one record is returned (if any match the criteria).

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, not to exceed the maximum defined. A limit must be at least 1 so at least one record is returned (if any match the criteria).

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

RedemptionLimitPerPeriod

RedemptionLimitPerPeriod: { limit: number; redemptionTimeFrame: number } & {}
property

limit: The limit on the number of times a coupon can be redeemed for a specified redemption time period.

property

redemptionTimeFrame: The redemption time period.

RedemptionLimits

RedemptionLimits: { limitPerCode: number; limitPerCustomer: number; limitPerTimeFrame: RedemptionLimitPerPeriod } & {}
property

limitPerCode: The redemption limit per code.

property

limitPerCustomer: The redemption limit per customer.

property

limitPerTimeFrame: The redemption limit per time frame.

ResultBase

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

limit: Maximum records to retrieve per request, not to exceed the maximum defined. A limit must be at least 1 so at least one record is returned (if any match the criteria).

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.

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.

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"

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.

Variables

Const defaultBaseUri

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

Generated using TypeDoc