Discounts (1.0)
Download OpenAPI specification:Download
Api to manage discounts
Get items
Authorizations:
query Parameters
required | object (Pageable) |
predicate required | object |
target | string Return selected fields only (multiple occurrences allowed for selecting multiple fields) |
customerId | string Customer Id |
storeIds | string Stores discount can be applied to |
productIds | string Products to which discount is restricted |
parentProductIds | string Products to which discount is restricted |
name | string Name of discount |
startDate | string Discount start date |
endDate | string Discount end date |
level | string Enum: "PRODUCT" "FORCED_CROSS_SELL" "CROSS_SELL" "UP_SELL" "CART" Level of product discount applies |
model | string Enum: "CAMPAIGN" "COUPON" "SINGLE_USE_CODE" "SUBSCRIPTION_PLAN" Model type of discount |
Responses
Response samples
- 200
- 401
- 403
- 404
- 500
{- "items": [
- {
- "amountByCurrency": {
- "property1": 0.1,
- "property2": 0.1
}, - "applyOnNetPrice": "false",
- "buyerBehaviorTriggers": [
- "RETAIN_BUYER"
], - "catalogId": "string",
- "countries": [
- "string"
], - "createDate": "2019-08-24T14:15:22Z",
- "cumulative": true,
- "currencies": [
- "string"
], - "customerId": "string",
- "dbVersion": 0,
- "discountRate": 1,
- "dynamicVariables": {
- "property1": { },
- "property2": { }
}, - "endDate": "2019-08-24T14:15:22Z",
- "endUserEmails": [
- "string"
], - "endUserGroupIds": [
- "string"
], - "endUserTypes": [
- "string"
], - "enduserId": "string",
- "externalContext": "string",
- "generated": 0,
- "id": "string",
- "lastUpdateReason": "string",
- "level": "PRODUCT",
- "localizedLabels": {
- "property1": "string",
- "property2": "string"
}, - "maxUsages": 0,
- "model": "CAMPAIGN",
- "modelVersion": "string",
- "name": "string",
- "offerSubSource": "RESUME | SUSPEND",
- "parentProductIds": [
- "string"
], - "productIds": [
- "string"
], - "publisherRefIds": [
- "string"
], - "sources": [
- "PURCHASE",
- "MANUAL_RENEWAL",
- "SUBSCRIPTION"
], - "startDate": "2019-08-24T14:15:22Z",
- "status": "ENABLED",
- "storeIds": [
- "string"
], - "subscriptionGenerations": [
- 0
], - "subscriptionId": "string",
- "subscriptionSubSources": [
- "TRIAL_CONVERSION"
], - "testOrder": "false",
- "thresholds": {
- "property1": 0.1,
- "property2": 0.1
}, - "updateDate": "2019-08-24T14:15:22Z",
- "used": 0,
- "codes": {
- "property1": { },
- "property2": { }
}, - "maxUsePerEndUser": 1,
- "maxUsePerStore": 1,
- "weight": 100
}
], - "last": true,
- "number": 0,
- "size": 0,
- "totalItems": 0,
- "totalPages": 0
}
Create an item
Authorizations:
Request Body schema: application/jsonrequired
object Discount amount by currencies | |
applyOnNetPrice | boolean Default: "false" Apply discount on net price instead gross |
buyerBehaviorTriggers | Array of strings unique Items Enum: "RETAIN_BUYER" "ABANDONED_CART" "RENEWAL" |
catalogId | string Catalog Id |
code | string |
countries | Array of strings unique |
createDate | string <date-time> Deprecated |
cumulative | boolean |
currencies | Array of strings unique |
customerId | string |
dbVersion | integer <int64> |
discountRate | number <double> [ 0 .. 1 ] Value of discount rate |
object Dynamic variables | |
endDate required | string <date-time> Discount end date timestamp in milliseconds |
endUserEmails | Array of strings unique |
endUserGroupIds | Array of strings unique |
endUserTypes | Array of strings unique Define list of end user types to which coupon can be applied. BUYER : allows apply coupon in cart / RESELLER : allows apply coupon in reseller portal |
endingDate | string |
enduserId | string End User Id |
externalContext | string External context |
generated | integer <int64> |
id | string Deprecated |
lastUpdateReason | string |
level required | string Enum: "PRODUCT" "FORCED_CROSS_SELL" "CROSS_SELL" "UP_SELL" "CART" |
object | |
maxUsages | integer <int32> |
model | string |
modelVersion | string Deprecated |
name required | string |
offerSubSource | string Enum: "SUSPEND" "RESUME" It defines which offer sub source that should be used for OFFER source. It is mandatory to use it, if OFFER is the discount source |
originalId | string |
parentProductIds | Array of strings unique Parent products IDs to which discount can be applied |
productIds | Array of strings unique Products to which discount can be applied |
productOrParentId | string |
publisherRefIds | Array of strings unique Product publisher references to which discount can be applied |
source | string |
sources | any Sources to which discount can be applied: PURCHASE, MANUAL_RENEWAL, SUBSCRIPTION, BILLING_PLAN, OFFER |
startDate | string <date-time> Discount start date timestamp in milliseconds |
startingDate | string |
status | string Enum: "ENABLED" "DISABLED" |
storeIds | Array of strings unique Stores to which discount can be applied |
subscriptionGenerations | Array of integers <int32> unique [ items <int32 > ] subscription generations where the discount can be applied |
subscriptionId | string Subscription id on which discount can be applied |
subscriptionSubSources | Array of strings Items Enum: "TRIAL_CONVERSION" "RENEWAL" Subscription sub sources on which the discount can be applied: CLASSIC, TRIAL_CONVERSION, RENEWAL |
testOrder | boolean Default: "false" To show if the order is test |
object | |
updateDate | string <date-time> Deprecated |
used | integer <int64> |
maxUsePerEndUser | integer <int32> >= 1 |
maxUsePerStore | integer <int32> >= 1 |
weight | integer <int32> Determines which coupon is applied when there are two with the same name. Higher value increases priority. |
Responses
Request samples
- Payload
{- "amountByCurrency": {
- "property1": 0.1,
- "property2": 0.1
}, - "applyOnNetPrice": "false",
- "buyerBehaviorTriggers": [
- "RETAIN_BUYER"
], - "catalogId": "string",
- "code": "string",
- "countries": [
- "string"
], - "createDate": "2019-08-24T14:15:22Z",
- "cumulative": true,
- "currencies": [
- "string"
], - "customerId": "string",
- "dbVersion": 0,
- "discountRate": 1,
- "dynamicVariables": {
- "property1": { },
- "property2": { }
}, - "endDate": "2019-08-24T14:15:22Z",
- "endUserEmails": [
- "string"
], - "endUserGroupIds": [
- "string"
], - "endUserTypes": [
- "string"
], - "endingDate": "string",
- "enduserId": "string",
- "externalContext": "string",
- "generated": 0,
- "id": "string",
- "lastUpdateReason": "string",
- "level": "PRODUCT",
- "localizedLabels": {
- "property1": "string",
- "property2": "string"
}, - "maxUsages": 0,
- "model": "CAMPAIGN",
- "modelVersion": "string",
- "name": "string",
- "offerSubSource": "RESUME | SUSPEND",
- "originalId": "string",
- "parentProductIds": [
- "string"
], - "productIds": [
- "string"
], - "productOrParentId": "string",
- "publisherRefIds": [
- "string"
], - "source": "string",
- "sources": [
- "PURCHASE",
- "MANUAL_RENEWAL",
- "SUBSCRIPTION"
], - "startDate": "2019-08-24T14:15:22Z",
- "startingDate": "string",
- "status": "ENABLED",
- "storeIds": [
- "string"
], - "subscriptionGenerations": [
- 0
], - "subscriptionId": "string",
- "subscriptionSubSources": [
- "TRIAL_CONVERSION"
], - "testOrder": "false",
- "thresholds": {
- "property1": 0.1,
- "property2": 0.1
}, - "updateDate": "2019-08-24T14:15:22Z",
- "used": 0,
- "codes": {
- "property1": { },
- "property2": { }
}, - "maxUsePerEndUser": 1,
- "maxUsePerStore": 1,
- "weight": 100
}
Response samples
- 401
- 403
- 404
- 500
{- "details": [
- {
- "errorType": "string",
- "resourceDisplayName": "string",
- "resourceId": "string",
- "resourceType": "string",
- "specific": { }
}
], - "error": "string",
- "message": "string",
- "status": 0,
- "timestamp": 0
}
applyDiscountsOnCart
Apply discounts on cart
Authorizations:
query Parameters
roundedPrice | boolean Default: true |
Request Body schema: application/jsonrequired
object (BuyerBehavior) | |
catalogId | string |
object | |
customerId | string |
discountOfferId | string |
discounts | Array of strings |
Array of objects (DiscountStatus) | |
object (EndUser) | |
id | string |
locale | string |
offerSubSource | string Enum: "SUSPEND" "RESUME" |
object (Price) | |
Array of objects (Product) | |
source | string Enum: "PURCHASE" "SUBSCRIPTION" "MANUAL_RENEWAL" "BILLING_PLAN" "OFFER" "MID_TERM_UPGRADE" "UPGRADE" |
storeId | string |
subscriptionGeneration | integer <int32> |
subscriptionId | string |
subscriptionSubSource | string Enum: "TRIAL_CONVERSION" "RENEWAL" |
totalAmount | number <double> |
Array of objects (Voucher) unique | |
vouchersTotalAmount | number <double> |
Responses
Request samples
- Payload
{- "buyerBehavior": {
- "abandonedCart": true,
- "renewal": true,
- "retainBuyer": true
}, - "catalogId": "string",
- "currency": {
- "currencyCode": "string",
- "defaultFractionDigits": 0,
- "displayName": "string",
- "numericCode": 0,
- "numericCodeAsString": "string",
- "symbol": "string"
}, - "customerId": "string",
- "discountOfferId": "string",
- "discounts": [
- "string"
], - "discountsStatus": [
- {
- "discount": "string",
- "discountLabel": "string",
- "status": "APPLIED"
}
], - "endUser": {
- "country": "string",
- "email": "string",
- "groupId": "string",
- "id": "string",
- "locale": "string",
- "type": "string"
}, - "id": "string",
- "locale": "string",
- "offerSubSource": "SUSPEND",
- "price": {
- "currency": {
- "currencyCode": "string",
- "defaultFractionDigits": 0,
- "displayName": "string",
- "numericCode": 0,
- "numericCodeAsString": "string",
- "symbol": "string"
}, - "discountedPrice": {
- "allDiscountsApplied": [
- {
- "discountAmount": 0.1,
- "discountCode": "string",
- "discountId": "string",
- "discountRate": 0.1,
- "discountedGrossPrice": 0.1,
- "discountedNetPrice": 0.1,
- "grossPrice": 0.1,
- "grossPriceDiscountAmount": 0.1,
- "model": "CAMPAIGN",
- "netPrice": 0.1,
- "netPriceDiscountAmount": 0.1,
- "vatDiscountAmount": 0.1
}
], - "cumulatedDiscountRate": 0.1,
- "discountCode": "string",
- "discountExternalContext": "string",
- "discountId": "string",
- "discountLabel": "string",
- "discountRate": 0.1,
- "discountTestOrder": true,
- "discountedGrossPrice": 0.1,
- "discountedNetPrice": 0.1,
- "grossPriceDiscountAmount": 0.1,
- "netPriceDiscountAmount": 0.1,
- "priceBeautifierId": "string",
- "signedDiscount": "string",
- "vatDiscountAmount": 0.1
}, - "grossMsrp": 0.1,
- "grossPrice": 0.1,
- "initialGrossPrice": 0.1,
- "initialNetPrice": 0.1,
- "initialVatAmount": 0.1,
- "netMsrp": 0.1,
- "netPrice": 0.1,
- "vatAmount": 0.1,
- "vatAmountMsrp": 0.1,
- "vatIncluded": true,
- "vatRate": 0.1
}, - "products": [
- {
- "crossSellBy": "string",
- "customerId": "string",
- "discountPlan": {
- "steps": [
- {
- "amountByCurrency": {
- "property1": 0.1,
- "property2": 0.1
}, - "discountRate": 1,
- "step": 0
}, - {
- "amountByCurrency": {
- "property1": 0.1,
- "property2": 0.1
}, - "discountRate": 1,
- "step": 0
}
], - "tag": "string"
}, - "discountsStatus": [
- {
- "discount": "string",
- "discountLabel": "string",
- "status": "APPLIED"
}
], - "forcedBy": "string",
- "fullPrice": {
- "currency": {
- "currencyCode": "string",
- "defaultFractionDigits": 0,
- "displayName": "string",
- "numericCode": 0,
- "numericCodeAsString": "string",
- "symbol": "string"
}, - "discounted": true,
- "discountedPrice": {
- "allDiscountsApplied": [
- {
- "discountAmount": 0.1,
- "discountCode": "string",
- "discountId": "string",
- "discountRate": 0.1,
- "discountedGrossPrice": 0.1,
- "discountedNetPrice": 0.1,
- "grossPrice": 0.1,
- "grossPriceDiscountAmount": 0.1,
- "model": "CAMPAIGN",
- "netPrice": 0.1,
- "netPriceDiscountAmount": 0.1,
- "vatDiscountAmount": 0.1
}
], - "cumulatedDiscountRate": 0.1,
- "discountCode": "string",
- "discountExternalContext": "string",
- "discountId": "string",
- "discountLabel": "string",
- "discountRate": 0.1,
- "discountTestOrder": true,
- "discountedGrossPrice": 0.1,
- "discountedNetPrice": 0.1,
- "grossPriceDiscountAmount": 0.1,
- "netPriceDiscountAmount": 0.1,
- "priceBeautifierId": "string",
- "signedDiscount": "string",
- "vatDiscountAmount": 0.1
}, - "grossMsrp": 0.1,
- "grossPrice": 0.1,
- "netMsrp": 0.1,
- "netPrice": 0.1,
- "vatAmount": 0.1,
- "vatAmountMsrp": 0.1,
- "vatRate": 0.1
}, - "id": "string",
- "parentId": "string",
- "price": {
- "currency": {
- "currencyCode": "string",
- "defaultFractionDigits": 0,
- "displayName": "string",
- "numericCode": 0,
- "numericCodeAsString": "string",
- "symbol": "string"
}, - "discounted": true,
- "discountedPrice": {
- "allDiscountsApplied": [
- {
- "discountAmount": 0.1,
- "discountCode": "string",
- "discountId": "string",
- "discountRate": 0.1,
- "discountedGrossPrice": 0.1,
- "discountedNetPrice": 0.1,
- "grossPrice": 0.1,
- "grossPriceDiscountAmount": 0.1,
- "model": "CAMPAIGN",
- "netPrice": 0.1,
- "netPriceDiscountAmount": 0.1,
- "vatDiscountAmount": 0.1
}
], - "cumulatedDiscountRate": 0.1,
- "discountCode": "string",
- "discountExternalContext": "string",
- "discountId": "string",
- "discountLabel": "string",
- "discountRate": 0.1,
- "discountTestOrder": true,
- "discountedGrossPrice": 0.1,
- "discountedNetPrice": 0.1,
- "grossPriceDiscountAmount": 0.1,
- "netPriceDiscountAmount": 0.1,
- "priceBeautifierId": "string",
- "signedDiscount": "string",
- "vatDiscountAmount": 0.1
}, - "grossMsrp": 0.1,
- "grossPrice": 0.1,
- "netMsrp": 0.1,
- "netPrice": 0.1,
- "vatAmount": 0.1,
- "vatAmountMsrp": 0.1,
- "vatRate": 0.1
}, - "priceFunctionParametersValues": {
- "property1": { },
- "property2": { }
}, - "publisherRefId": "string",
- "quantity": 0.1,
- "taxExempt": true,
- "unitPrice": {
- "currency": {
- "currencyCode": "string",
- "defaultFractionDigits": 0,
- "displayName": "string",
- "numericCode": 0,
- "numericCodeAsString": "string",
- "symbol": "string"
}, - "discounted": true,
- "discountedPrice": {
- "allDiscountsApplied": [
- {
- "discountAmount": 0.1,
- "discountCode": "string",
- "discountId": "string",
- "discountRate": 0.1,
- "discountedGrossPrice": 0.1,
- "discountedNetPrice": 0.1,
- "grossPrice": 0.1,
- "grossPriceDiscountAmount": 0.1,
- "model": "CAMPAIGN",
- "netPrice": 0.1,
- "netPriceDiscountAmount": 0.1,
- "vatDiscountAmount": 0.1
}
], - "cumulatedDiscountRate": 0.1,
- "discountCode": "string",
- "discountExternalContext": "string",
- "discountId": "string",
- "discountLabel": "string",
- "discountRate": 0.1,
- "discountTestOrder": true,
- "discountedGrossPrice": 0.1,
- "discountedNetPrice": 0.1,
- "grossPriceDiscountAmount": 0.1,
- "netPriceDiscountAmount": 0.1,
- "priceBeautifierId": "string",
- "signedDiscount": "string",
- "vatDiscountAmount": 0.1
}, - "grossMsrp": 0.1,
- "grossPrice": 0.1,
- "netMsrp": 0.1,
- "netPrice": 0.1,
- "vatAmount": 0.1,
- "vatAmountMsrp": 0.1,
- "vatRate": 0.1
}, - "upSellBy": "string",
- "variantOf": "string"
}
], - "source": "PURCHASE",
- "storeId": "string",
- "subscriptionGeneration": 0,
- "subscriptionId": "string",
- "subscriptionSubSource": "TRIAL_CONVERSION",
- "totalAmount": 0.1,
- "vouchers": [
- {
- "amount": 0.1,
- "code": "string",
- "discountExternalContext": "string",
- "id": "string",
- "localizedLabel": "string",
- "status": "APPLIED"
}
], - "vouchersTotalAmount": 0.1
}
Response samples
- 200
- 401
- 403
- 404
- 500
{- "buyerBehavior": {
- "abandonedCart": true,
- "renewal": true,
- "retainBuyer": true
}, - "catalogId": "string",
- "currency": {
- "currencyCode": "string",
- "defaultFractionDigits": 0,
- "displayName": "string",
- "numericCode": 0,
- "numericCodeAsString": "string",
- "symbol": "string"
}, - "customerId": "string",
- "discountOfferId": "string",
- "discounts": [
- "string"
], - "discountsStatus": [
- {
- "discount": "string",
- "discountLabel": "string",
- "status": "APPLIED"
}
], - "endUser": {
- "country": "string",
- "email": "string",
- "groupId": "string",
- "id": "string",
- "locale": "string",
- "type": "string"
}, - "id": "string",
- "locale": "string",
- "offerSubSource": "SUSPEND",
- "price": {
- "currency": {
- "currencyCode": "string",
- "defaultFractionDigits": 0,
- "displayName": "string",
- "numericCode": 0,
- "numericCodeAsString": "string",
- "symbol": "string"
}, - "discountedPrice": {
- "allDiscountsApplied": [
- {
- "discountAmount": 0.1,
- "discountCode": "string",
- "discountId": "string",
- "discountRate": 0.1,
- "discountedGrossPrice": 0.1,
- "discountedNetPrice": 0.1,
- "grossPrice": 0.1,
- "grossPriceDiscountAmount": 0.1,
- "model": "CAMPAIGN",
- "netPrice": 0.1,
- "netPriceDiscountAmount": 0.1,
- "vatDiscountAmount": 0.1
}
], - "cumulatedDiscountRate": 0.1,
- "discountCode": "string",
- "discountExternalContext": "string",
- "discountId": "string",
- "discountLabel": "string",
- "discountRate": 0.1,
- "discountTestOrder": true,
- "discountedGrossPrice": 0.1,
- "discountedNetPrice": 0.1,
- "grossPriceDiscountAmount": 0.1,
- "netPriceDiscountAmount": 0.1,
- "priceBeautifierId": "string",
- "signedDiscount": "string",
- "vatDiscountAmount": 0.1
}, - "grossMsrp": 0.1,
- "grossPrice": 0.1,
- "initialGrossPrice": 0.1,
- "initialNetPrice": 0.1,
- "initialVatAmount": 0.1,
- "netMsrp": 0.1,
- "netPrice": 0.1,
- "vatAmount": 0.1,
- "vatAmountMsrp": 0.1,
- "vatIncluded": true,
- "vatRate": 0.1
}, - "products": [
- {
- "crossSellBy": "string",
- "customerId": "string",
- "discountPlan": {
- "steps": [
- {
- "amountByCurrency": {
- "property1": 0.1,
- "property2": 0.1
}, - "discountRate": 1,
- "step": 0
}, - {
- "amountByCurrency": {
- "property1": 0.1,
- "property2": 0.1
}, - "discountRate": 1,
- "step": 0
}
], - "tag": "string"
}, - "discountsStatus": [
- {
- "discount": "string",
- "discountLabel": "string",
- "status": "APPLIED"
}
], - "forcedBy": "string",
- "fullPrice": {
- "currency": {
- "currencyCode": "string",
- "defaultFractionDigits": 0,
- "displayName": "string",
- "numericCode": 0,
- "numericCodeAsString": "string",
- "symbol": "string"
}, - "discounted": true,
- "discountedPrice": {
- "allDiscountsApplied": [
- {
- "discountAmount": 0.1,
- "discountCode": "string",
- "discountId": "string",
- "discountRate": 0.1,
- "discountedGrossPrice": 0.1,
- "discountedNetPrice": 0.1,
- "grossPrice": 0.1,
- "grossPriceDiscountAmount": 0.1,
- "model": "CAMPAIGN",
- "netPrice": 0.1,
- "netPriceDiscountAmount": 0.1,
- "vatDiscountAmount": 0.1
}
], - "cumulatedDiscountRate": 0.1,
- "discountCode": "string",
- "discountExternalContext": "string",
- "discountId": "string",
- "discountLabel": "string",
- "discountRate": 0.1,
- "discountTestOrder": true,
- "discountedGrossPrice": 0.1,
- "discountedNetPrice": 0.1,
- "grossPriceDiscountAmount": 0.1,
- "netPriceDiscountAmount": 0.1,
- "priceBeautifierId": "string",
- "signedDiscount": "string",
- "vatDiscountAmount": 0.1
}, - "grossMsrp": 0.1,
- "grossPrice": 0.1,
- "netMsrp": 0.1,
- "netPrice": 0.1,
- "vatAmount": 0.1,
- "vatAmountMsrp": 0.1,
- "vatRate": 0.1
}, - "id": "string",
- "parentId": "string",
- "price": {
- "currency": {
- "currencyCode": "string",
- "defaultFractionDigits": 0,
- "displayName": "string",
- "numericCode": 0,
- "numericCodeAsString": "string",
- "symbol": "string"
}, - "discounted": true,
- "discountedPrice": {
- "allDiscountsApplied": [
- {
- "discountAmount": 0.1,
- "discountCode": "string",
- "discountId": "string",
- "discountRate": 0.1,
- "discountedGrossPrice": 0.1,
- "discountedNetPrice": 0.1,
- "grossPrice": 0.1,
- "grossPriceDiscountAmount": 0.1,
- "model": "CAMPAIGN",
- "netPrice": 0.1,
- "netPriceDiscountAmount": 0.1,
- "vatDiscountAmount": 0.1
}
], - "cumulatedDiscountRate": 0.1,
- "discountCode": "string",
- "discountExternalContext": "string",
- "discountId": "string",
- "discountLabel": "string",
- "discountRate": 0.1,
- "discountTestOrder": true,
- "discountedGrossPrice": 0.1,
- "discountedNetPrice": 0.1,
- "grossPriceDiscountAmount": 0.1,
- "netPriceDiscountAmount": 0.1,
- "priceBeautifierId": "string",
- "signedDiscount": "string",
- "vatDiscountAmount": 0.1
}, - "grossMsrp": 0.1,
- "grossPrice": 0.1,
- "netMsrp": 0.1,
- "netPrice": 0.1,
- "vatAmount": 0.1,
- "vatAmountMsrp": 0.1,
- "vatRate": 0.1
}, - "priceFunctionParametersValues": {
- "property1": { },
- "property2": { }
}, - "publisherRefId": "string",
- "quantity": 0.1,
- "taxExempt": true,
- "unitPrice": {
- "currency": {
- "currencyCode": "string",
- "defaultFractionDigits": 0,
- "displayName": "string",
- "numericCode": 0,
- "numericCodeAsString": "string",
- "symbol": "string"
}, - "discounted": true,
- "discountedPrice": {
- "allDiscountsApplied": [
- {
- "discountAmount": 0.1,
- "discountCode": "string",
- "discountId": "string",
- "discountRate": 0.1,
- "discountedGrossPrice": 0.1,
- "discountedNetPrice": 0.1,
- "grossPrice": 0.1,
- "grossPriceDiscountAmount": 0.1,
- "model": "CAMPAIGN",
- "netPrice": 0.1,
- "netPriceDiscountAmount": 0.1,
- "vatDiscountAmount": 0.1
}
], - "cumulatedDiscountRate": 0.1,
- "discountCode": "string",
- "discountExternalContext": "string",
- "discountId": "string",
- "discountLabel": "string",
- "discountRate": 0.1,
- "discountTestOrder": true,
- "discountedGrossPrice": 0.1,
- "discountedNetPrice": 0.1,
- "grossPriceDiscountAmount": 0.1,
- "netPriceDiscountAmount": 0.1,
- "priceBeautifierId": "string",
- "signedDiscount": "string",
- "vatDiscountAmount": 0.1
}, - "grossMsrp": 0.1,
- "grossPrice": 0.1,
- "netMsrp": 0.1,
- "netPrice": 0.1,
- "vatAmount": 0.1,
- "vatAmountMsrp": 0.1,
- "vatRate": 0.1
}, - "upSellBy": "string",
- "variantOf": "string"
}
], - "source": "PURCHASE",
- "storeId": "string",
- "subscriptionGeneration": 0,
- "subscriptionId": "string",
- "subscriptionSubSource": "TRIAL_CONVERSION",
- "totalAmount": 0.1,
- "vouchers": [
- {
- "amount": 0.1,
- "code": "string",
- "discountExternalContext": "string",
- "id": "string",
- "localizedLabel": "string",
- "status": "APPLIED"
}
], - "vouchersTotalAmount": 0.1
}
applyDiscountsOnCart
Apply discounts on cart
Authorizations:
Request Body schema: application/jsonrequired
object (BuyerBehavior) | |
catalogId | string |
object | |
customerId | string |
discountOfferId | string |
discounts | Array of strings |
Array of objects (DiscountStatus) | |
object (EndUser) | |
id | string |
locale | string |
offerSubSource | string Enum: "SUSPEND" "RESUME" |
object (Price) | |
Array of objects (Product) | |
source | string Enum: "PURCHASE" "SUBSCRIPTION" "MANUAL_RENEWAL" "BILLING_PLAN" "OFFER" "MID_TERM_UPGRADE" "UPGRADE" |
storeId | string |
subscriptionGeneration | integer <int32> |
subscriptionId | string |
subscriptionSubSource | string Enum: "TRIAL_CONVERSION" "RENEWAL" |
totalAmount | number <double> |
Array of objects (Voucher) unique | |
vouchersTotalAmount | number <double> |
Responses
Request samples
- Payload
{- "buyerBehavior": {
- "abandonedCart": true,
- "renewal": true,
- "retainBuyer": true
}, - "catalogId": "string",
- "currency": {
- "currencyCode": "string",
- "defaultFractionDigits": 0,
- "displayName": "string",
- "numericCode": 0,
- "numericCodeAsString": "string",
- "symbol": "string"
}, - "customerId": "string",
- "discountOfferId": "string",
- "discounts": [
- "string"
], - "discountsStatus": [
- {
- "discount": "string",
- "discountLabel": "string",
- "status": "APPLIED"
}
], - "endUser": {
- "country": "string",
- "email": "string",
- "groupId": "string",
- "id": "string",
- "locale": "string",
- "type": "string"
}, - "id": "string",
- "locale": "string",
- "offerSubSource": "SUSPEND",
- "price": {
- "currency": {
- "currencyCode": "string",
- "defaultFractionDigits": 0,
- "displayName": "string",
- "numericCode": 0,
- "numericCodeAsString": "string",
- "symbol": "string"
}, - "discountedPrice": {
- "allDiscountsApplied": [
- {
- "discountAmount": 0.1,
- "discountCode": "string",
- "discountId": "string",
- "discountRate": 0.1,
- "discountedGrossPrice": 0.1,
- "discountedNetPrice": 0.1,
- "grossPrice": 0.1,
- "grossPriceDiscountAmount": 0.1,
- "model": "CAMPAIGN",
- "netPrice": 0.1,
- "netPriceDiscountAmount": 0.1,
- "vatDiscountAmount": 0.1
}
], - "cumulatedDiscountRate": 0.1,
- "discountCode": "string",
- "discountExternalContext": "string",
- "discountId": "string",
- "discountLabel": "string",
- "discountRate": 0.1,
- "discountTestOrder": true,
- "discountedGrossPrice": 0.1,
- "discountedNetPrice": 0.1,
- "grossPriceDiscountAmount": 0.1,
- "netPriceDiscountAmount": 0.1,
- "priceBeautifierId": "string",
- "signedDiscount": "string",
- "vatDiscountAmount": 0.1
}, - "grossMsrp": 0.1,
- "grossPrice": 0.1,
- "initialGrossPrice": 0.1,
- "initialNetPrice": 0.1,
- "initialVatAmount": 0.1,
- "netMsrp": 0.1,
- "netPrice": 0.1,
- "vatAmount": 0.1,
- "vatAmountMsrp": 0.1,
- "vatIncluded": true,
- "vatRate": 0.1
}, - "products": [
- {
- "crossSellBy": "string",
- "customerId": "string",
- "discountPlan": {
- "steps": [
- {
- "amountByCurrency": {
- "property1": 0.1,
- "property2": 0.1
}, - "discountRate": 1,
- "step": 0
}, - {
- "amountByCurrency": {
- "property1": 0.1,
- "property2": 0.1
}, - "discountRate": 1,
- "step": 0
}
], - "tag": "string"
}, - "discountsStatus": [
- {
- "discount": "string",
- "discountLabel": "string",
- "status": "APPLIED"
}
], - "forcedBy": "string",
- "fullPrice": {
- "currency": {
- "currencyCode": "string",
- "defaultFractionDigits": 0,
- "displayName": "string",
- "numericCode": 0,
- "numericCodeAsString": "string",
- "symbol": "string"
}, - "discounted": true,
- "discountedPrice": {
- "allDiscountsApplied": [
- {
- "discountAmount": 0.1,
- "discountCode": "string",
- "discountId": "string",
- "discountRate": 0.1,
- "discountedGrossPrice": 0.1,
- "discountedNetPrice": 0.1,
- "grossPrice": 0.1,
- "grossPriceDiscountAmount": 0.1,
- "model": "CAMPAIGN",
- "netPrice": 0.1,
- "netPriceDiscountAmount": 0.1,
- "vatDiscountAmount": 0.1
}
], - "cumulatedDiscountRate": 0.1,
- "discountCode": "string",
- "discountExternalContext": "string",
- "discountId": "string",
- "discountLabel": "string",
- "discountRate": 0.1,
- "discountTestOrder": true,
- "discountedGrossPrice": 0.1,
- "discountedNetPrice": 0.1,
- "grossPriceDiscountAmount": 0.1,
- "netPriceDiscountAmount": 0.1,
- "priceBeautifierId": "string",
- "signedDiscount": "string",
- "vatDiscountAmount": 0.1
}, - "grossMsrp": 0.1,
- "grossPrice": 0.1,
- "netMsrp": 0.1,
- "netPrice": 0.1,
- "vatAmount": 0.1,
- "vatAmountMsrp": 0.1,
- "vatRate": 0.1
}, - "id": "string",
- "parentId": "string",
- "price": {
- "currency": {
- "currencyCode": "string",
- "defaultFractionDigits": 0,
- "displayName": "string",
- "numericCode": 0,
- "numericCodeAsString": "string",
- "symbol": "string"
}, - "discounted": true,
- "discountedPrice": {
- "allDiscountsApplied": [
- {
- "discountAmount": 0.1,
- "discountCode": "string",
- "discountId": "string",
- "discountRate": 0.1,
- "discountedGrossPrice": 0.1,
- "discountedNetPrice": 0.1,
- "grossPrice": 0.1,
- "grossPriceDiscountAmount": 0.1,
- "model": "CAMPAIGN",
- "netPrice": 0.1,
- "netPriceDiscountAmount": 0.1,
- "vatDiscountAmount": 0.1
}
], - "cumulatedDiscountRate": 0.1,
- "discountCode": "string",
- "discountExternalContext": "string",
- "discountId": "string",
- "discountLabel": "string",
- "discountRate": 0.1,
- "discountTestOrder": true,
- "discountedGrossPrice": 0.1,
- "discountedNetPrice": 0.1,
- "grossPriceDiscountAmount": 0.1,
- "netPriceDiscountAmount": 0.1,
- "priceBeautifierId": "string",
- "signedDiscount": "string",
- "vatDiscountAmount": 0.1
}, - "grossMsrp": 0.1,
- "grossPrice": 0.1,
- "netMsrp": 0.1,
- "netPrice": 0.1,
- "vatAmount": 0.1,
- "vatAmountMsrp": 0.1,
- "vatRate": 0.1
}, - "priceFunctionParametersValues": {
- "property1": { },
- "property2": { }
}, - "publisherRefId": "string",
- "quantity": 0.1,
- "taxExempt": true,
- "unitPrice": {
- "currency": {
- "currencyCode": "string",
- "defaultFractionDigits": 0,
- "displayName": "string",
- "numericCode": 0,
- "numericCodeAsString": "string",
- "symbol": "string"
}, - "discounted": true,
- "discountedPrice": {
- "allDiscountsApplied": [
- {
- "discountAmount": 0.1,
- "discountCode": "string",
- "discountId": "string",
- "discountRate": 0.1,
- "discountedGrossPrice": 0.1,
- "discountedNetPrice": 0.1,
- "grossPrice": 0.1,
- "grossPriceDiscountAmount": 0.1,
- "model": "CAMPAIGN",
- "netPrice": 0.1,
- "netPriceDiscountAmount": 0.1,
- "vatDiscountAmount": 0.1
}
], - "cumulatedDiscountRate": 0.1,
- "discountCode": "string",
- "discountExternalContext": "string",
- "discountId": "string",
- "discountLabel": "string",
- "discountRate": 0.1,
- "discountTestOrder": true,
- "discountedGrossPrice": 0.1,
- "discountedNetPrice": 0.1,
- "grossPriceDiscountAmount": 0.1,
- "netPriceDiscountAmount": 0.1,
- "priceBeautifierId": "string",
- "signedDiscount": "string",
- "vatDiscountAmount": 0.1
}, - "grossMsrp": 0.1,
- "grossPrice": 0.1,
- "netMsrp": 0.1,
- "netPrice": 0.1,
- "vatAmount": 0.1,
- "vatAmountMsrp": 0.1,
- "vatRate": 0.1
}, - "upSellBy": "string",
- "variantOf": "string"
}
], - "source": "PURCHASE",
- "storeId": "string",
- "subscriptionGeneration": 0,
- "subscriptionId": "string",
- "subscriptionSubSource": "TRIAL_CONVERSION",
- "totalAmount": 0.1,
- "vouchers": [
- {
- "amount": 0.1,
- "code": "string",
- "discountExternalContext": "string",
- "id": "string",
- "localizedLabel": "string",
- "status": "APPLIED"
}
], - "vouchersTotalAmount": 0.1
}
Response samples
- 200
- 401
- 403
- 404
- 500
{- "buyerBehavior": {
- "abandonedCart": true,
- "renewal": true,
- "retainBuyer": true
}, - "catalogId": "string",
- "currency": {
- "currencyCode": "string",
- "defaultFractionDigits": 0,
- "displayName": "string",
- "numericCode": 0,
- "numericCodeAsString": "string",
- "symbol": "string"
}, - "customerId": "string",
- "discountOfferId": "string",
- "discounts": [
- "string"
], - "discountsStatus": [
- {
- "discount": "string",
- "discountLabel": "string",
- "status": "APPLIED"
}
], - "endUser": {
- "country": "string",
- "email": "string",
- "groupId": "string",
- "id": "string",
- "locale": "string",
- "type": "string"
}, - "id": "string",
- "locale": "string",
- "offerSubSource": "SUSPEND",
- "price": {
- "currency": {
- "currencyCode": "string",
- "defaultFractionDigits": 0,
- "displayName": "string",
- "numericCode": 0,
- "numericCodeAsString": "string",
- "symbol": "string"
}, - "discountedPrice": {
- "allDiscountsApplied": [
- {
- "discountAmount": 0.1,
- "discountCode": "string",
- "discountId": "string",
- "discountRate": 0.1,
- "discountedGrossPrice": 0.1,
- "discountedNetPrice": 0.1,
- "grossPrice": 0.1,
- "grossPriceDiscountAmount": 0.1,
- "model": "CAMPAIGN",
- "netPrice": 0.1,
- "netPriceDiscountAmount": 0.1,
- "vatDiscountAmount": 0.1
}
], - "cumulatedDiscountRate": 0.1,
- "discountCode": "string",
- "discountExternalContext": "string",
- "discountId": "string",
- "discountLabel": "string",
- "discountRate": 0.1,
- "discountTestOrder": true,
- "discountedGrossPrice": 0.1,
- "discountedNetPrice": 0.1,
- "grossPriceDiscountAmount": 0.1,
- "netPriceDiscountAmount": 0.1,
- "priceBeautifierId": "string",
- "signedDiscount": "string",
- "vatDiscountAmount": 0.1
}, - "grossMsrp": 0.1,
- "grossPrice": 0.1,
- "initialGrossPrice": 0.1,
- "initialNetPrice": 0.1,
- "initialVatAmount": 0.1,
- "netMsrp": 0.1,
- "netPrice": 0.1,
- "vatAmount": 0.1,
- "vatAmountMsrp": 0.1,
- "vatIncluded": true,
- "vatRate": 0.1
}, - "products": [
- {
- "crossSellBy": "string",
- "customerId": "string",
- "discountPlan": {
- "steps": [
- {
- "amountByCurrency": {
- "property1": 0.1,
- "property2": 0.1
}, - "discountRate": 1,
- "step": 0
}, - {
- "amountByCurrency": {
- "property1": 0.1,
- "property2": 0.1
}, - "discountRate": 1,
- "step": 0
}
], - "tag": "string"
}, - "discountsStatus": [
- {
- "discount": "string",
- "discountLabel": "string",
- "status": "APPLIED"
}
], - "forcedBy": "string",
- "fullPrice": {
- "currency": {
- "currencyCode": "string",
- "defaultFractionDigits": 0,
- "displayName": "string",
- "numericCode": 0,
- "numericCodeAsString": "string",
- "symbol": "string"
}, - "discounted": true,
- "discountedPrice": {
- "allDiscountsApplied": [
- {
- "discountAmount": 0.1,
- "discountCode": "string",
- "discountId": "string",
- "discountRate": 0.1,
- "discountedGrossPrice": 0.1,
- "discountedNetPrice": 0.1,
- "grossPrice": 0.1,
- "grossPriceDiscountAmount": 0.1,
- "model": "CAMPAIGN",
- "netPrice": 0.1,
- "netPriceDiscountAmount": 0.1,
- "vatDiscountAmount": 0.1
}
], - "cumulatedDiscountRate": 0.1,
- "discountCode": "string",
- "discountExternalContext": "string",
- "discountId": "string",
- "discountLabel": "string",
- "discountRate": 0.1,
- "discountTestOrder": true,
- "discountedGrossPrice": 0.1,
- "discountedNetPrice": 0.1,
- "grossPriceDiscountAmount": 0.1,
- "netPriceDiscountAmount": 0.1,
- "priceBeautifierId": "string",
- "signedDiscount": "string",
- "vatDiscountAmount": 0.1
}, - "grossMsrp": 0.1,
- "grossPrice": 0.1,
- "netMsrp": 0.1,
- "netPrice": 0.1,
- "vatAmount": 0.1,
- "vatAmountMsrp": 0.1,
- "vatRate": 0.1
}, - "id": "string",
- "parentId": "string",
- "price": {
- "currency": {
- "currencyCode": "string",
- "defaultFractionDigits": 0,
- "displayName": "string",
- "numericCode": 0,
- "numericCodeAsString": "string",
- "symbol": "string"
}, - "discounted": true,
- "discountedPrice": {
- "allDiscountsApplied": [
- {
- "discountAmount": 0.1,
- "discountCode": "string",
- "discountId": "string",
- "discountRate": 0.1,
- "discountedGrossPrice": 0.1,
- "discountedNetPrice": 0.1,
- "grossPrice": 0.1,
- "grossPriceDiscountAmount": 0.1,
- "model": "CAMPAIGN",
- "netPrice": 0.1,
- "netPriceDiscountAmount": 0.1,
- "vatDiscountAmount": 0.1
}
], - "cumulatedDiscountRate": 0.1,
- "discountCode": "string",
- "discountExternalContext": "string",
- "discountId": "string",
- "discountLabel": "string",
- "discountRate": 0.1,
- "discountTestOrder": true,
- "discountedGrossPrice": 0.1,
- "discountedNetPrice": 0.1,
- "grossPriceDiscountAmount": 0.1,
- "netPriceDiscountAmount": 0.1,
- "priceBeautifierId": "string",
- "signedDiscount": "string",
- "vatDiscountAmount": 0.1
}, - "grossMsrp": 0.1,
- "grossPrice": 0.1,
- "netMsrp": 0.1,
- "netPrice": 0.1,
- "vatAmount": 0.1,
- "vatAmountMsrp": 0.1,
- "vatRate": 0.1
}, - "priceFunctionParametersValues": {
- "property1": { },
- "property2": { }
}, - "publisherRefId": "string",
- "quantity": 0.1,
- "taxExempt": true,
- "unitPrice": {
- "currency": {
- "currencyCode": "string",
- "defaultFractionDigits": 0,
- "displayName": "string",
- "numericCode": 0,
- "numericCodeAsString": "string",
- "symbol": "string"
}, - "discounted": true,
- "discountedPrice": {
- "allDiscountsApplied": [
- {
- "discountAmount": 0.1,
- "discountCode": "string",
- "discountId": "string",
- "discountRate": 0.1,
- "discountedGrossPrice": 0.1,
- "discountedNetPrice": 0.1,
- "grossPrice": 0.1,
- "grossPriceDiscountAmount": 0.1,
- "model": "CAMPAIGN",
- "netPrice": 0.1,
- "netPriceDiscountAmount": 0.1,
- "vatDiscountAmount": 0.1
}
], - "cumulatedDiscountRate": 0.1,
- "discountCode": "string",
- "discountExternalContext": "string",
- "discountId": "string",
- "discountLabel": "string",
- "discountRate": 0.1,
- "discountTestOrder": true,
- "discountedGrossPrice": 0.1,
- "discountedNetPrice": 0.1,
- "grossPriceDiscountAmount": 0.1,
- "netPriceDiscountAmount": 0.1,
- "priceBeautifierId": "string",
- "signedDiscount": "string",
- "vatDiscountAmount": 0.1
}, - "grossMsrp": 0.1,
- "grossPrice": 0.1,
- "netMsrp": 0.1,
- "netPrice": 0.1,
- "vatAmount": 0.1,
- "vatAmountMsrp": 0.1,
- "vatRate": 0.1
}, - "upSellBy": "string",
- "variantOf": "string"
}
], - "source": "PURCHASE",
- "storeId": "string",
- "subscriptionGeneration": 0,
- "subscriptionId": "string",
- "subscriptionSubSource": "TRIAL_CONVERSION",
- "totalAmount": 0.1,
- "vouchers": [
- {
- "amount": 0.1,
- "code": "string",
- "discountExternalContext": "string",
- "id": "string",
- "localizedLabel": "string",
- "status": "APPLIED"
}
], - "vouchersTotalAmount": 0.1
}
importDiscount
Import a discount
Authorizations:
query Parameters
storeId | string |
reason | string Default: "resource import thru REST Api" |
Request Body schema: application/jsonrequired
object Discount amount by currencies | |
applyOnNetPrice | boolean Default: "false" Apply discount on net price instead gross |
buyerBehaviorTriggers | Array of strings unique Items Enum: "RETAIN_BUYER" "ABANDONED_CART" "RENEWAL" |
catalogId | string Catalog Id |
code | string |
countries | Array of strings unique |
createDate | string <date-time> Deprecated |
cumulative | boolean |
currencies | Array of strings unique |
customerId | string |
dbVersion | integer <int64> |
discountRate | number <double> [ 0 .. 1 ] Value of discount rate |
object Dynamic variables | |
endDate required | string <date-time> Discount end date timestamp in milliseconds |
endUserEmails | Array of strings unique |
endUserGroupIds | Array of strings unique |
endUserTypes | Array of strings unique Define list of end user types to which coupon can be applied. BUYER : allows apply coupon in cart / RESELLER : allows apply coupon in reseller portal |
endingDate | string |
enduserId | string End User Id |
externalContext | string External context |
generated | integer <int64> |
id | string Deprecated |
lastUpdateReason | string |
level required | string Enum: "PRODUCT" "FORCED_CROSS_SELL" "CROSS_SELL" "UP_SELL" "CART" |
object | |
maxUsages | integer <int32> |
model | string |
modelVersion | string Deprecated |
name required | string |
offerSubSource | string Enum: "SUSPEND" "RESUME" It defines which offer sub source that should be used for OFFER source. It is mandatory to use it, if OFFER is the discount source |
originalId | string |
parentProductIds | Array of strings unique Parent products IDs to which discount can be applied |
productIds | Array of strings unique Products to which discount can be applied |
productOrParentId | string |
publisherRefIds | Array of strings unique Product publisher references to which discount can be applied |
source | string |
sources | any Sources to which discount can be applied: PURCHASE, MANUAL_RENEWAL, SUBSCRIPTION, BILLING_PLAN, OFFER |
startDate | string <date-time> Discount start date timestamp in milliseconds |
startingDate | string |
status | string Enum: "ENABLED" "DISABLED" |
storeIds | Array of strings unique Stores to which discount can be applied |
subscriptionGenerations | Array of integers <int32> unique [ items <int32 > ] subscription generations where the discount can be applied |
subscriptionId | string Subscription id on which discount can be applied |
subscriptionSubSources | Array of strings Items Enum: "TRIAL_CONVERSION" "RENEWAL" Subscription sub sources on which the discount can be applied: CLASSIC, TRIAL_CONVERSION, RENEWAL |
testOrder | boolean Default: "false" To show if the order is test |
object | |
updateDate | string <date-time> Deprecated |
used | integer <int64> |
maxUsePerEndUser | integer <int32> >= 1 |
maxUsePerStore | integer <int32> >= 1 |
weight | integer <int32> Determines which coupon is applied when there are two with the same name. Higher value increases priority. |
Responses
Request samples
- Payload
{- "amountByCurrency": {
- "property1": 0.1,
- "property2": 0.1
}, - "applyOnNetPrice": "false",
- "buyerBehaviorTriggers": [
- "RETAIN_BUYER"
], - "catalogId": "string",
- "code": "string",
- "countries": [
- "string"
], - "createDate": "2019-08-24T14:15:22Z",
- "cumulative": true,
- "currencies": [
- "string"
], - "customerId": "string",
- "dbVersion": 0,
- "discountRate": 1,
- "dynamicVariables": {
- "property1": { },
- "property2": { }
}, - "endDate": "2019-08-24T14:15:22Z",
- "endUserEmails": [
- "string"
], - "endUserGroupIds": [
- "string"
], - "endUserTypes": [
- "string"
], - "endingDate": "string",
- "enduserId": "string",
- "externalContext": "string",
- "generated": 0,
- "id": "string",
- "lastUpdateReason": "string",
- "level": "PRODUCT",
- "localizedLabels": {
- "property1": "string",
- "property2": "string"
}, - "maxUsages": 0,
- "model": "CAMPAIGN",
- "modelVersion": "string",
- "name": "string",
- "offerSubSource": "RESUME | SUSPEND",
- "originalId": "string",
- "parentProductIds": [
- "string"
], - "productIds": [
- "string"
], - "productOrParentId": "string",
- "publisherRefIds": [
- "string"
], - "source": "string",
- "sources": [
- "PURCHASE",
- "MANUAL_RENEWAL",
- "SUBSCRIPTION"
], - "startDate": "2019-08-24T14:15:22Z",
- "startingDate": "string",
- "status": "ENABLED",
- "storeIds": [
- "string"
], - "subscriptionGenerations": [
- 0
], - "subscriptionId": "string",
- "subscriptionSubSources": [
- "TRIAL_CONVERSION"
], - "testOrder": "false",
- "thresholds": {
- "property1": 0.1,
- "property2": 0.1
}, - "updateDate": "2019-08-24T14:15:22Z",
- "used": 0,
- "codes": {
- "property1": { },
- "property2": { }
}, - "maxUsePerEndUser": 1,
- "maxUsePerStore": 1,
- "weight": 100
}
Response samples
- 200
- 201
- 401
- 403
- 404
- 500
{- "amountByCurrency": {
- "property1": 0.1,
- "property2": 0.1
}, - "applyOnNetPrice": "false",
- "buyerBehaviorTriggers": [
- "RETAIN_BUYER"
], - "catalogId": "string",
- "countries": [
- "string"
], - "createDate": "2019-08-24T14:15:22Z",
- "cumulative": true,
- "currencies": [
- "string"
], - "customerId": "string",
- "dbVersion": 0,
- "discountRate": 1,
- "dynamicVariables": {
- "property1": { },
- "property2": { }
}, - "endDate": "2019-08-24T14:15:22Z",
- "endUserEmails": [
- "string"
], - "endUserGroupIds": [
- "string"
], - "endUserTypes": [
- "string"
], - "enduserId": "string",
- "externalContext": "string",
- "generated": 0,
- "id": "string",
- "lastUpdateReason": "string",
- "level": "PRODUCT",
- "localizedLabels": {
- "property1": "string",
- "property2": "string"
}, - "maxUsages": 0,
- "model": "CAMPAIGN",
- "modelVersion": "string",
- "name": "string",
- "offerSubSource": "RESUME | SUSPEND",
- "parentProductIds": [
- "string"
], - "productIds": [
- "string"
], - "publisherRefIds": [
- "string"
], - "sources": [
- "PURCHASE",
- "MANUAL_RENEWAL",
- "SUBSCRIPTION"
], - "startDate": "2019-08-24T14:15:22Z",
- "status": "ENABLED",
- "storeIds": [
- "string"
], - "subscriptionGenerations": [
- 0
], - "subscriptionId": "string",
- "subscriptionSubSources": [
- "TRIAL_CONVERSION"
], - "testOrder": "false",
- "thresholds": {
- "property1": 0.1,
- "property2": 0.1
}, - "updateDate": "2019-08-24T14:15:22Z",
- "used": 0,
- "codes": {
- "property1": { },
- "property2": { }
}, - "maxUsePerEndUser": 1,
- "maxUsePerStore": 1,
- "weight": 100
}
Get recap quantities for a given field
Authorizations:
query Parameters
target required | string |
required | object (Pageable) |
predicate required | object |
Responses
Response samples
- 200
- 401
- 403
- 404
- 500
{- "items": [
- {
- "count": 0,
- "targetValue": "string"
}
], - "last": true,
- "number": 0,
- "size": 0,
- "totalItems": 0,
- "totalPages": 0
}
Search unwind for a given field
Authorizations:
query Parameters
target required | string |
required | object (Pageable) |
predicate required | object |
Responses
Response samples
- 200
- 401
- 403
- 404
- 500
{- "items": [
- {
- "empty": true,
- "property1": { },
- "property2": { }
}
], - "last": true,
- "number": 0,
- "size": 0,
- "totalItems": 0,
- "totalPages": 0
}
declareUsages
Declare discount usages
Authorizations:
query Parameters
reason | string Default: "notify usage of single codes thru REST Api" |
Request Body schema: application/jsonrequired
catalogId | string Catalog Id |
customerId required | string Customer Id discount applied to |
discountCode | string Discount Code |
discountId required | string Discount Id |
endUserEmail required | string Email used |
endUserId | string EndUser Id |
orderId required | string Order Id discount applied to |
storeId required | string Store Id discount applied to |
Responses
Request samples
- Payload
[- {
- "catalogId": "string",
- "customerId": "string",
- "discountCode": "string",
- "discountId": "string",
- "endUserEmail": "string",
- "endUserId": "string",
- "orderId": "string",
- "storeId": "string"
}
]
Response samples
- 200
- 401
- 403
- 404
- 500
{- "amountByCurrency": {
- "property1": 0.1,
- "property2": 0.1
}, - "applyOnNetPrice": "false",
- "buyerBehaviorTriggers": [
- "RETAIN_BUYER"
], - "catalogId": "string",
- "countries": [
- "string"
], - "createDate": "2019-08-24T14:15:22Z",
- "cumulative": true,
- "currencies": [
- "string"
], - "customerId": "string",
- "dbVersion": 0,
- "discountRate": 1,
- "dynamicVariables": {
- "property1": { },
- "property2": { }
}, - "endDate": "2019-08-24T14:15:22Z",
- "endUserEmails": [
- "string"
], - "endUserGroupIds": [
- "string"
], - "endUserTypes": [
- "string"
], - "enduserId": "string",
- "externalContext": "string",
- "generated": 0,
- "id": "string",
- "lastUpdateReason": "string",
- "level": "PRODUCT",
- "localizedLabels": {
- "property1": "string",
- "property2": "string"
}, - "maxUsages": 0,
- "model": "CAMPAIGN",
- "modelVersion": "string",
- "name": "string",
- "offerSubSource": "RESUME | SUSPEND",
- "parentProductIds": [
- "string"
], - "productIds": [
- "string"
], - "publisherRefIds": [
- "string"
], - "sources": [
- "PURCHASE",
- "MANUAL_RENEWAL",
- "SUBSCRIPTION"
], - "startDate": "2019-08-24T14:15:22Z",
- "status": "ENABLED",
- "storeIds": [
- "string"
], - "subscriptionGenerations": [
- 0
], - "subscriptionId": "string",
- "subscriptionSubSources": [
- "TRIAL_CONVERSION"
], - "testOrder": "false",
- "thresholds": {
- "property1": 0.1,
- "property2": 0.1
}, - "updateDate": "2019-08-24T14:15:22Z",
- "used": 0,
- "codes": {
- "property1": { },
- "property2": { }
}, - "maxUsePerEndUser": 1,
- "maxUsePerStore": 1,
- "weight": 100
}
Update item
Authorizations:
path Parameters
id required | string |
Request Body schema: application/jsonrequired
object Discount amount by currencies | |
applyOnNetPrice | boolean Default: "false" Apply discount on net price instead gross |
buyerBehaviorTriggers | Array of strings unique Items Enum: "RETAIN_BUYER" "ABANDONED_CART" "RENEWAL" |
catalogId | string Catalog Id |
code | string |
countries | Array of strings unique |
createDate | string <date-time> Deprecated |
cumulative | boolean |
currencies | Array of strings unique |
customerId | string |
dbVersion | integer <int64> |
discountRate | number <double> [ 0 .. 1 ] Value of discount rate |
object Dynamic variables | |
endDate required | string <date-time> Discount end date timestamp in milliseconds |
endUserEmails | Array of strings unique |
endUserGroupIds | Array of strings unique |
endUserTypes | Array of strings unique Define list of end user types to which coupon can be applied. BUYER : allows apply coupon in cart / RESELLER : allows apply coupon in reseller portal |
endingDate | string |
enduserId | string End User Id |
externalContext | string External context |
generated | integer <int64> |
id | string Deprecated |
lastUpdateReason | string |
level required | string Enum: "PRODUCT" "FORCED_CROSS_SELL" "CROSS_SELL" "UP_SELL" "CART" |
object | |
maxUsages | integer <int32> |
model | string |
modelVersion | string Deprecated |
name required | string |
offerSubSource | string Enum: "SUSPEND" "RESUME" It defines which offer sub source that should be used for OFFER source. It is mandatory to use it, if OFFER is the discount source |
originalId | string |
parentProductIds | Array of strings unique Parent products IDs to which discount can be applied |
productIds | Array of strings unique Products to which discount can be applied |
productOrParentId | string |
publisherRefIds | Array of strings unique Product publisher references to which discount can be applied |
source | string |
sources | any Sources to which discount can be applied: PURCHASE, MANUAL_RENEWAL, SUBSCRIPTION, BILLING_PLAN, OFFER |
startDate | string <date-time> Discount start date timestamp in milliseconds |
startingDate | string |
status | string Enum: "ENABLED" "DISABLED" |
storeIds | Array of strings unique Stores to which discount can be applied |
subscriptionGenerations | Array of integers <int32> unique [ items <int32 > ] subscription generations where the discount can be applied |
subscriptionId | string Subscription id on which discount can be applied |
subscriptionSubSources | Array of strings Items Enum: "TRIAL_CONVERSION" "RENEWAL" Subscription sub sources on which the discount can be applied: CLASSIC, TRIAL_CONVERSION, RENEWAL |
testOrder | boolean Default: "false" To show if the order is test |
object | |
updateDate | string <date-time> Deprecated |
used | integer <int64> |
maxUsePerEndUser | integer <int32> >= 1 |
maxUsePerStore | integer <int32> >= 1 |
weight | integer <int32> Determines which coupon is applied when there are two with the same name. Higher value increases priority. |
Responses
Request samples
- Payload
{- "amountByCurrency": {
- "property1": 0.1,
- "property2": 0.1
}, - "applyOnNetPrice": "false",
- "buyerBehaviorTriggers": [
- "RETAIN_BUYER"
], - "catalogId": "string",
- "code": "string",
- "countries": [
- "string"
], - "createDate": "2019-08-24T14:15:22Z",
- "cumulative": true,
- "currencies": [
- "string"
], - "customerId": "string",
- "dbVersion": 0,
- "discountRate": 1,
- "dynamicVariables": {
- "property1": { },
- "property2": { }
}, - "endDate": "2019-08-24T14:15:22Z",
- "endUserEmails": [
- "string"
], - "endUserGroupIds": [
- "string"
], - "endUserTypes": [
- "string"
], - "endingDate": "string",
- "enduserId": "string",
- "externalContext": "string",
- "generated": 0,
- "id": "string",
- "lastUpdateReason": "string",
- "level": "PRODUCT",
- "localizedLabels": {
- "property1": "string",
- "property2": "string"
}, - "maxUsages": 0,
- "model": "CAMPAIGN",
- "modelVersion": "string",
- "name": "string",
- "offerSubSource": "RESUME | SUSPEND",
- "originalId": "string",
- "parentProductIds": [
- "string"
], - "productIds": [
- "string"
], - "productOrParentId": "string",
- "publisherRefIds": [
- "string"
], - "source": "string",
- "sources": [
- "PURCHASE",
- "MANUAL_RENEWAL",
- "SUBSCRIPTION"
], - "startDate": "2019-08-24T14:15:22Z",
- "startingDate": "string",
- "status": "ENABLED",
- "storeIds": [
- "string"
], - "subscriptionGenerations": [
- 0
], - "subscriptionId": "string",
- "subscriptionSubSources": [
- "TRIAL_CONVERSION"
], - "testOrder": "false",
- "thresholds": {
- "property1": 0.1,
- "property2": 0.1
}, - "updateDate": "2019-08-24T14:15:22Z",
- "used": 0,
- "codes": {
- "property1": { },
- "property2": { }
}, - "maxUsePerEndUser": 1,
- "maxUsePerStore": 1,
- "weight": 100
}
Response samples
- 200
- 401
- 403
- 404
- 500
{- "amountByCurrency": {
- "property1": 0.1,
- "property2": 0.1
}, - "applyOnNetPrice": "false",
- "buyerBehaviorTriggers": [
- "RETAIN_BUYER"
], - "catalogId": "string",
- "countries": [
- "string"
], - "createDate": "2019-08-24T14:15:22Z",
- "cumulative": true,
- "currencies": [
- "string"
], - "customerId": "string",
- "dbVersion": 0,
- "discountRate": 1,
- "dynamicVariables": {
- "property1": { },
- "property2": { }
}, - "endDate": "2019-08-24T14:15:22Z",
- "endUserEmails": [
- "string"
], - "endUserGroupIds": [
- "string"
], - "endUserTypes": [
- "string"
], - "enduserId": "string",
- "externalContext": "string",
- "generated": 0,
- "id": "string",
- "lastUpdateReason": "string",
- "level": "PRODUCT",
- "localizedLabels": {
- "property1": "string",
- "property2": "string"
}, - "maxUsages": 0,
- "model": "CAMPAIGN",
- "modelVersion": "string",
- "name": "string",
- "offerSubSource": "RESUME | SUSPEND",
- "parentProductIds": [
- "string"
], - "productIds": [
- "string"
], - "publisherRefIds": [
- "string"
], - "sources": [
- "PURCHASE",
- "MANUAL_RENEWAL",
- "SUBSCRIPTION"
], - "startDate": "2019-08-24T14:15:22Z",
- "status": "ENABLED",
- "storeIds": [
- "string"
], - "subscriptionGenerations": [
- 0
], - "subscriptionId": "string",
- "subscriptionSubSources": [
- "TRIAL_CONVERSION"
], - "testOrder": "false",
- "thresholds": {
- "property1": 0.1,
- "property2": 0.1
}, - "updateDate": "2019-08-24T14:15:22Z",
- "used": 0,
- "codes": {
- "property1": { },
- "property2": { }
}, - "maxUsePerEndUser": 1,
- "maxUsePerStore": 1,
- "weight": 100
}
generateSingleUseCodes
Generate coupons
Authorizations:
path Parameters
id required | string Discount id |
query Parameters
dryRun | boolean |
reason | string Default: "generation request of single codes thru REST Api" |
Request Body schema: application/jsonrequired
forceLowercase | boolean |
forceUppercase | boolean |
prefix | string [ 0 .. 8 ] characters |
quantity | integer <int32> [ 1 .. 750 ] |
size | integer <int32> [ 8 .. 32 ] |
Responses
Request samples
- Payload
{- "forceLowercase": true,
- "forceUppercase": true,
- "prefix": "string",
- "quantity": 1,
- "size": 8
}
Response samples
- 201
- 401
- 403
- 404
- 500
{- "codes": [
- "string"
], - "remaining": 0
}
Get items
Authorizations:
query Parameters
required | object (Pageable) |
predicate required | object |
target | string |
Responses
Response samples
- 200
- 401
- 403
- 404
- 500
{- "items": [
- {
- "createDate": "2019-08-24T14:15:22Z",
- "dbVersion": 0,
- "id": "string",
- "lastUpdateReason": "string",
- "modelVersion": "string",
- "rules": {
- "property1": [
- {
- "decimalPart": 0,
- "intPart": 0
}
], - "property2": [
- {
- "decimalPart": 0,
- "intPart": 0
}
]
}, - "storeId": "string",
- "updateDate": "2019-08-24T14:15:22Z"
}
], - "last": true,
- "number": 0,
- "size": 0,
- "totalItems": 0,
- "totalPages": 0
}
Create an item
Authorizations:
Request Body schema: application/jsonrequired
createDate | string <date-time> Deprecated |
dbVersion | integer <int64> |
id | string Deprecated |
lastUpdateReason | string |
modelVersion | string Deprecated |
originalId | string |
object | |
storeId | string |
updateDate | string <date-time> Deprecated |
Responses
Request samples
- Payload
{- "createDate": "2019-08-24T14:15:22Z",
- "dbVersion": 0,
- "id": "string",
- "lastUpdateReason": "string",
- "modelVersion": "string",
- "originalId": "string",
- "rules": {
- "property1": [
- {
- "decimalPart": 0,
- "intPart": 0
}
], - "property2": [
- {
- "decimalPart": 0,
- "intPart": 0
}
]
}, - "storeId": "string",
- "updateDate": "2019-08-24T14:15:22Z"
}
Response samples
- 401
- 403
- 404
- 500
{- "details": [
- {
- "errorType": "string",
- "resourceDisplayName": "string",
- "resourceId": "string",
- "resourceType": "string",
- "specific": { }
}
], - "error": "string",
- "message": "string",
- "status": 0,
- "timestamp": 0
}
Get recap quantities for a given field
Authorizations:
query Parameters
target required | string |
required | object (Pageable) |
predicate required | object |
Responses
Response samples
- 200
- 401
- 403
- 404
- 500
{- "items": [
- {
- "count": 0,
- "targetValue": "string"
}
], - "last": true,
- "number": 0,
- "size": 0,
- "totalItems": 0,
- "totalPages": 0
}
Search unwind for a given field
Authorizations:
query Parameters
target required | string |
required | object (Pageable) |
predicate required | object |
Responses
Response samples
- 200
- 401
- 403
- 404
- 500
{- "items": [
- {
- "empty": true,
- "property1": { },
- "property2": { }
}
], - "last": true,
- "number": 0,
- "size": 0,
- "totalItems": 0,
- "totalPages": 0
}
Response samples
- 200
- 401
- 403
- 404
- 500
{- "createDate": "2019-08-24T14:15:22Z",
- "dbVersion": 0,
- "id": "string",
- "lastUpdateReason": "string",
- "modelVersion": "string",
- "rules": {
- "property1": [
- {
- "decimalPart": 0,
- "intPart": 0
}
], - "property2": [
- {
- "decimalPart": 0,
- "intPart": 0
}
]
}, - "storeId": "string",
- "updateDate": "2019-08-24T14:15:22Z"
}
Update item
Authorizations:
path Parameters
id required | string |
Request Body schema: application/jsonrequired
createDate | string <date-time> Deprecated |
dbVersion | integer <int64> |
id | string Deprecated |
lastUpdateReason | string |
modelVersion | string Deprecated |
originalId | string |
object | |
storeId | string |
updateDate | string <date-time> Deprecated |
Responses
Request samples
- Payload
{- "createDate": "2019-08-24T14:15:22Z",
- "dbVersion": 0,
- "id": "string",
- "lastUpdateReason": "string",
- "modelVersion": "string",
- "originalId": "string",
- "rules": {
- "property1": [
- {
- "decimalPart": 0,
- "intPart": 0
}
], - "property2": [
- {
- "decimalPart": 0,
- "intPart": 0
}
]
}, - "storeId": "string",
- "updateDate": "2019-08-24T14:15:22Z"
}
Response samples
- 200
- 401
- 403
- 404
- 500
{- "createDate": "2019-08-24T14:15:22Z",
- "dbVersion": 0,
- "id": "string",
- "lastUpdateReason": "string",
- "modelVersion": "string",
- "rules": {
- "property1": [
- {
- "decimalPart": 0,
- "intPart": 0
}
], - "property2": [
- {
- "decimalPart": 0,
- "intPart": 0
}
]
}, - "storeId": "string",
- "updateDate": "2019-08-24T14:15:22Z"
}
Get items
Authorizations:
query Parameters
required | object (Pageable) |
predicate required | object |
target | string Return selected fields only (multiple occurrences allowed for selecting multiple fields) |
orderId | string Order Id discount applied to |
customerId | string Customer Id discount applied to |
storeId | string Store Id discount applied to |
discountId | string Discount Id |
discountCode | string Discount Code |
endUserEmail | string Email used |
endUserId | string EndUser Id |
catalogId | string Catalog Id |
Responses
Response samples
- 200
- 401
- 403
- 404
- 500
{- "items": [
- {
- "createDate": "2019-08-24T14:15:22Z",
- "customerId": "string",
- "dbVersion": 0,
- "discountCode": "string",
- "discountId": "string",
- "endUserEmail": "string",
- "enduserId": "string",
- "id": "string",
- "lastUpdateReason": "string",
- "modelVersion": "string",
- "orderId": "string",
- "storeId": "string",
- "updateDate": "2019-08-24T14:15:22Z",
- "useDate": "2019-08-24T14:15:22Z",
- "used": true
}
], - "last": true,
- "number": 0,
- "size": 0,
- "totalItems": 0,
- "totalPages": 0
}
Get recap quantities for a given field
Authorizations:
query Parameters
target required | string |
required | object (Pageable) |
predicate required | object |
Responses
Response samples
- 200
- 401
- 403
- 404
- 500
{- "items": [
- {
- "count": 0,
- "targetValue": "string"
}
], - "last": true,
- "number": 0,
- "size": 0,
- "totalItems": 0,
- "totalPages": 0
}
Search unwind for a given field
Authorizations:
query Parameters
target required | string |
required | object (Pageable) |
predicate required | object |
Responses
Response samples
- 200
- 401
- 403
- 404
- 500
{- "items": [
- {
- "empty": true,
- "property1": { },
- "property2": { }
}
], - "last": true,
- "number": 0,
- "size": 0,
- "totalItems": 0,
- "totalPages": 0
}
Response samples
- 200
- 401
- 403
- 404
- 500
{- "createDate": "2019-08-24T14:15:22Z",
- "customerId": "string",
- "dbVersion": 0,
- "discountCode": "string",
- "discountId": "string",
- "endUserEmail": "string",
- "enduserId": "string",
- "id": "string",
- "lastUpdateReason": "string",
- "modelVersion": "string",
- "orderId": "string",
- "storeId": "string",
- "updateDate": "2019-08-24T14:15:22Z",
- "useDate": "2019-08-24T14:15:22Z",
- "used": true
}