Skip to main content

Discounts (1.0)

Download OpenAPI specification:Download

Api to manage discounts

Discount

generateSingleUseCodes

Generate coupons

Authorizations:
Bearer
path Parameters
id
required
string

Discount id

Responses

Response samples

Content type
application/json
{
  • "remaining": 0,
  • "codes": [
    ]
}

importDiscount

Import a discount

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
Example
{
  • "id": "string",
  • "customerId": "string",
  • "enduserId": "string",
  • "createDate": "2019-08-24T14:15:22Z",
  • "updateDate": "2019-08-24T14:15:22Z",
  • "modelVersion": "string",
  • "dbVersion": 0,
  • "lastUpdateReason": "string",
  • "startDate": "2019-08-24T14:15:22Z",
  • "endDate": "2019-08-24T14:15:22Z",
  • "catalogId": "string",
  • "storeIds": [
    ],
  • "productIds": [
    ],
  • "parentProductIds": [
    ],
  • "publisherRefIds": [
    ],
  • "sources": [
    ],
  • "subscriptionId": "string",
  • "dynamicVariables": {
    },
  • "discountRate": 0,
  • "amountByCurrency": {
    },
  • "applyOnNetPrice": false,
  • "externalContext": "string",
  • "name": "string",
  • "localizedLabels": {
    },
  • "model": "COUPON",
  • "countries": [
    ],
  • "status": "ENABLED",
  • "maxUsages": 0,
  • "level": "PRODUCT",
  • "thresholds": {
    },
  • "endUserEmails": [
    ],
  • "endUserTypes": [
    ],
  • "endUserGroupIds": [
    ],
  • "buyerBehaviorTriggers": [
    ],
  • "used": 0,
  • "generated": 0,
  • "cumulative": true,
  • "weight": 100,
  • "maxUsePerStore": 1,
  • "maxUsePerEndUser": 1,
  • "codes": {
    }
}

declareUsages

Declare discount usages

Authorizations:
Bearer

Responses

applyDiscountsOnCart

Apply discounts on cart

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "storeId": "string",
  • "customerId": "string",
  • "locale": "string",
  • "products": [
    ],
  • "endUser": {
    },
  • "totalAmount": 0.1,
  • "vouchersTotalAmount": 0.1,
  • "currency": {
    },
  • "discounts": [
    ],
  • "discountsStatus": [
    ],
  • "buyerBehavior": {
    },
  • "catalogId": "string",
  • "source": "PURCHASE",
  • "price": {
    },
  • "vouchers": [
    ],
  • "subscriptionId": "string"
}

applyDiscountsOnCart

Apply discounts on cart

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "storeId": "string",
  • "customerId": "string",
  • "locale": "string",
  • "products": [
    ],
  • "endUser": {
    },
  • "totalAmount": 0.1,
  • "vouchersTotalAmount": 0.1,
  • "currency": {
    },
  • "discounts": [
    ],
  • "discountsStatus": [
    ],
  • "buyerBehavior": {
    },
  • "catalogId": "string",
  • "source": "PURCHASE",
  • "price": {
    },
  • "vouchers": [
    ],
  • "subscriptionId": "string"
}

Get items

Authorizations:
Bearer
query Parameters
target
required
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"

Model type of discount

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "last": true,
  • "totalItems": 0,
  • "totalPages": 0,
  • "size": 0,
  • "number": 0
}

Create an item

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
Example
{
  • "id": "string",
  • "customerId": "string",
  • "enduserId": "string",
  • "createDate": "2019-08-24T14:15:22Z",
  • "updateDate": "2019-08-24T14:15:22Z",
  • "modelVersion": "string",
  • "dbVersion": 0,
  • "lastUpdateReason": "string",
  • "startDate": "2019-08-24T14:15:22Z",
  • "endDate": "2019-08-24T14:15:22Z",
  • "catalogId": "string",
  • "storeIds": [
    ],
  • "productIds": [
    ],
  • "parentProductIds": [
    ],
  • "publisherRefIds": [
    ],
  • "sources": [
    ],
  • "subscriptionId": "string",
  • "dynamicVariables": {
    },
  • "discountRate": 0,
  • "amountByCurrency": {
    },
  • "applyOnNetPrice": false,
  • "externalContext": "string",
  • "name": "string",
  • "localizedLabels": {
    },
  • "model": "COUPON",
  • "countries": [
    ],
  • "status": "ENABLED",
  • "maxUsages": 0,
  • "level": "PRODUCT",
  • "thresholds": {
    },
  • "endUserEmails": [
    ],
  • "endUserTypes": [
    ],
  • "endUserGroupIds": [
    ],
  • "buyerBehaviorTriggers": [
    ],
  • "used": 0,
  • "generated": 0,
  • "cumulative": true,
  • "weight": 100,
  • "maxUsePerStore": 1,
  • "maxUsePerEndUser": 1,
  • "codes": {
    }
}

Get item

Authorizations:
Bearer
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
Example
{
  • "id": "string",
  • "customerId": "string",
  • "enduserId": "string",
  • "createDate": "2019-08-24T14:15:22Z",
  • "updateDate": "2019-08-24T14:15:22Z",
  • "modelVersion": "string",
  • "dbVersion": 0,
  • "lastUpdateReason": "string",
  • "startDate": "2019-08-24T14:15:22Z",
  • "endDate": "2019-08-24T14:15:22Z",
  • "catalogId": "string",
  • "storeIds": [
    ],
  • "productIds": [
    ],
  • "parentProductIds": [
    ],
  • "publisherRefIds": [
    ],
  • "sources": [
    ],
  • "subscriptionId": "string",
  • "dynamicVariables": {
    },
  • "discountRate": 0,
  • "amountByCurrency": {
    },
  • "applyOnNetPrice": false,
  • "externalContext": "string",
  • "name": "string",
  • "localizedLabels": {
    },
  • "model": "COUPON",
  • "countries": [
    ],
  • "status": "ENABLED",
  • "maxUsages": 0,
  • "level": "PRODUCT",
  • "thresholds": {
    },
  • "endUserEmails": [
    ],
  • "endUserTypes": [
    ],
  • "endUserGroupIds": [
    ],
  • "buyerBehaviorTriggers": [
    ],
  • "used": 0,
  • "generated": 0,
  • "cumulative": true,
  • "weight": 100,
  • "maxUsePerStore": 1,
  • "maxUsePerEndUser": 1,
  • "codes": {
    }
}

Update item

Authorizations:
Bearer
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
Example
{
  • "id": "string",
  • "customerId": "string",
  • "enduserId": "string",
  • "createDate": "2019-08-24T14:15:22Z",
  • "updateDate": "2019-08-24T14:15:22Z",
  • "modelVersion": "string",
  • "dbVersion": 0,
  • "lastUpdateReason": "string",
  • "startDate": "2019-08-24T14:15:22Z",
  • "endDate": "2019-08-24T14:15:22Z",
  • "catalogId": "string",
  • "storeIds": [
    ],
  • "productIds": [
    ],
  • "parentProductIds": [
    ],
  • "publisherRefIds": [
    ],
  • "sources": [
    ],
  • "subscriptionId": "string",
  • "dynamicVariables": {
    },
  • "discountRate": 0,
  • "amountByCurrency": {
    },
  • "applyOnNetPrice": false,
  • "externalContext": "string",
  • "name": "string",
  • "localizedLabels": {
    },
  • "model": "COUPON",
  • "countries": [
    ],
  • "status": "ENABLED",
  • "maxUsages": 0,
  • "level": "PRODUCT",
  • "thresholds": {
    },
  • "endUserEmails": [
    ],
  • "endUserTypes": [
    ],
  • "endUserGroupIds": [
    ],
  • "buyerBehaviorTriggers": [
    ],
  • "used": 0,
  • "generated": 0,
  • "cumulative": true,
  • "weight": 100,
  • "maxUsePerStore": 1,
  • "maxUsePerEndUser": 1,
  • "codes": {
    }
}

Delete item

Authorizations:
Bearer
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{ }

Get distinct values for a given field

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "last": true,
  • "totalItems": 0,
  • "totalPages": 0,
  • "size": 0,
  • "number": 0
}

Get recap quantities for a given field

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "last": true,
  • "totalItems": 0,
  • "totalPages": 0,
  • "size": 0,
  • "number": 0
}

Search unwind for a given field

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "last": true,
  • "totalItems": 0,
  • "totalPages": 0,
  • "size": 0,
  • "number": 0
}

DiscountUsage

Get items

Authorizations:
Bearer
query Parameters
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

target
string

Return selected fields only (multiple occurrences allowed for selecting multiple fields)

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "last": true,
  • "totalItems": 0,
  • "totalPages": 0,
  • "size": 0,
  • "number": 0
}

Get distinct values for a given field

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "last": true,
  • "totalItems": 0,
  • "totalPages": 0,
  • "size": 0,
  • "number": 0
}

Get item

Authorizations:
Bearer
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "customerId": "string",
  • "enduserId": "string",
  • "createDate": "2019-08-24T14:15:22Z",
  • "updateDate": "2019-08-24T14:15:22Z",
  • "modelVersion": "string",
  • "dbVersion": 0,
  • "lastUpdateReason": "string",
  • "discountId": "string",
  • "discountCode": "string",
  • "orderId": "string",
  • "storeId": "string",
  • "endUserEmail": "string",
  • "useDate": "2019-08-24T14:15:22Z",
  • "used": true
}

Get recap quantities for a given field

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "last": true,
  • "totalItems": 0,
  • "totalPages": 0,
  • "size": 0,
  • "number": 0
}

Search unwind for a given field

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "last": true,
  • "totalItems": 0,
  • "totalPages": 0,
  • "size": 0,
  • "number": 0
}