Create a discount

Request

POST https://api.nexway.store/discounts

Query parameters

Parameter name Value Description Additional
dryRun boolean

dryRun

Request body

The request body takes a complete Discount resource, containing the following writable properties:

{
    "amountByCurrency": {
        "<key>": "double"
    },
    "buyerBehaviorTriggers": [
        "string"
    ],
    "catalogId": "string",
    "countries": [
        "string"
    ],
    "createDate": "date-time",
    "customerId": "string",
    "dbVersion": "int64",
    "defaultLocale": "string",
    "discountRate": "double",
    "endDate": "string",
    "endUserEmails": [
        "string"
    ],
    "id": "string",
    "level": "string",
    "localizedLabels": {
        "<key>": "string"
    },
    "maxUsages": "int32",
    "model": "string",
    "name": "string",
    "parentProductIds": [
        "string"
    ],
    "productIds": [
        "string"
    ],
    "publisherRefIds": [
        "string"
    ],
    "startDate": "string",
    "status": "string",
    "storeIds": [
        "string"
    ],
    "thresholds": {
        "<key>": "double"
    },
    "updateDate": "date-time"
}

Properties

Name Type Description Additional
amountByCurrency object Optional
amountByCurrency.<key> map of double Optional
buyerBehaviorTriggers[] array of string

Possible values are:

  • RETAIN_BUYER
  • ABANDONED_CART
  • RENEWAL
Optional
catalogId string Optional
countries[] array of string Optional
createDate date-time Optional
customerId string Optional
dbVersion int64 Optional
defaultLocale string Optional
discountRate double Optional
endDate string Optional
endUserEmails[] array of string Optional
id string Optional
level string

Possible values are:

  • CART
  • PRODUCT
  • FORCED_CROSS_SALES
  • FORCED_CROSS_SELL
  • CROSS_SELL
  • UP_SELL
Optional
localizedLabels object Optional
localizedLabels.<key> map of string Optional
maxUsages int32 Optional
model string

Possible values are:

  • CAMPAIGN
  • COUPON
  • SINGLE_USE_CODE
Optional
name string Optional
parentProductIds[] array of string Optional
productIds[] array of string Optional
publisherRefIds[] array of string Optional
startDate string Optional
status string

Possible values are:

  • ENABLED
  • DISABLED
Optional
storeIds[] array of string Optional
thresholds object Optional
thresholds.<key> map of double Optional
updateDate date-time Optional

Authorisation

This request requires the use of one of following authorisation methods: OAuth2.

Response

The following HTTP status codes may be returned, optionally with a response resource.

Status code Description Resource
200 OK

Success

Discount
201 Created

Created

Created
401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

404 Not Found

Not Found

500 Internal Server Error

Failure

Example

{
    "endDate": "yyyy-MM-dd'T'HH:mm:ss'Z'",
    "startDate": "yyyy-MM-dd'T'HH:mm:ss'Z'"
}

Explore this API

dryRun

dryRun

discount

discount

Request Content-Type
Response Content-Type

Choose an authorisation method:

Access Token Access token to be used for request
Try it out!