Apply discounts on a product

Request

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

Query parameters

Parameter name Value Description Additional
storeId string

storeId

discounts array of string, multiple occurances

discounts

locale string

locale

retainBuyer boolean
abandonedCart boolean
renewal boolean

Request body

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

{
    "crossSellBy": "string",
    "customerId": "string",
    "discountsStatus": [
        {
            "discount": "string",
            "discountLabel": "string",
            "status": "string"
        }
    ],
    "forcedBy": "string",
    "fullPrice": {
        "currency": "string",
        "discountedPrice": {
            "discountCode": "string",
            "discountId": "string",
            "discountLabel": "string",
            "discountRate": "double",
            "discountedGrossPrice": "double",
            "discountedNetPrice": "double",
            "grossPriceDiscountAmount": "double",
            "netPriceDiscountAmount": "double",
            "signedDiscount": "string",
            "vatDiscountAmount": "double"
        },
        "grossPrice": "double",
        "netPrice": "double",
        "vatAmount": "double",
        "vatRate": "double"
    },
    "id": "string",
    "price": {
        "currency": "string",
        "discountedPrice": {
            "discountCode": "string",
            "discountId": "string",
            "discountLabel": "string",
            "discountRate": "double",
            "discountedGrossPrice": "double",
            "discountedNetPrice": "double",
            "grossPriceDiscountAmount": "double",
            "netPriceDiscountAmount": "double",
            "signedDiscount": "string",
            "vatDiscountAmount": "double"
        },
        "grossPrice": "double",
        "netPrice": "double",
        "vatAmount": "double",
        "vatRate": "double"
    },
    "publisherRefId": "string",
    "quantity": "double",
    "unitPrice": {
        "currency": "string",
        "discountedPrice": {
            "discountCode": "string",
            "discountId": "string",
            "discountLabel": "string",
            "discountRate": "double",
            "discountedGrossPrice": "double",
            "discountedNetPrice": "double",
            "grossPriceDiscountAmount": "double",
            "netPriceDiscountAmount": "double",
            "signedDiscount": "string",
            "vatDiscountAmount": "double"
        },
        "grossPrice": "double",
        "netPrice": "double",
        "vatAmount": "double",
        "vatRate": "double"
    },
    "upSellBy": "string",
    "variantOf": "string"
}

Properties

Name Type Description Additional
crossSellBy string

Cross-sell product by this product ID

Optional
customerId string

Customer ID of the product

Optional
discountsStatus[] array

List of discounts status

Optional
discountsStatus[].discount string Optional
discountsStatus[].discountLabel string Optional
discountsStatus[].status string

Possible values are:

  • INVALID
  • NOT_APPLICABLE
  • APPLIED
  • OVERLAPPING
  • OVERUSED
Optional
forcedBy string

Forced by this product ID

Optional
fullPrice object FullPrice Optional
fullPrice.currency string

Amount currency (ISO-4217)

Optional
fullPrice.discountedPrice object DiscountedPrice Optional
fullPrice.discountedPrice.discountCode string

Discount promo code

Optional
fullPrice.discountedPrice.discountId string

Discount ID

Optional
fullPrice.discountedPrice.discountLabel string

Discount label

fullPrice.discountedPrice.discountRate double

Discount rate

fullPrice.discountedPrice.discountedGrossPrice double

Discounted cost of product with taxes included

fullPrice.discountedPrice.discountedNetPrice double

Discounted cost of product without taxes included

fullPrice.discountedPrice.grossPriceDiscountAmount double

Gross price discount amount

fullPrice.discountedPrice.netPriceDiscountAmount double

Net price discount amount

fullPrice.discountedPrice.signedDiscount string

Signed discount

Optional
fullPrice.discountedPrice.vatDiscountAmount double

VAT discount amount

fullPrice.grossPrice double

Cost of product with taxes included.

Optional
fullPrice.netPrice double

Net price

Optional
fullPrice.vatAmount double

The VAT amount (amount - netAmount)

Optional
fullPrice.vatRate double

Sales tax rate

Optional
id string Optional
price object FullPrice Optional
price.currency string

Amount currency (ISO-4217)

Optional
price.discountedPrice object DiscountedPrice Optional
price.discountedPrice.discountCode string

Discount promo code

Optional
price.discountedPrice.discountId string

Discount ID

Optional
price.discountedPrice.discountLabel string

Discount label

price.discountedPrice.discountRate double

Discount rate

price.discountedPrice.discountedGrossPrice double

Discounted cost of product with taxes included

price.discountedPrice.discountedNetPrice double

Discounted cost of product without taxes included

price.discountedPrice.grossPriceDiscountAmount double

Gross price discount amount

price.discountedPrice.netPriceDiscountAmount double

Net price discount amount

price.discountedPrice.signedDiscount string

Signed discount

Optional
price.discountedPrice.vatDiscountAmount double

VAT discount amount

price.grossPrice double

Cost of product with taxes included.

Optional
price.netPrice double

Net price

Optional
price.vatAmount double

The VAT amount (amount - netAmount)

Optional
price.vatRate double

Sales tax rate

Optional
publisherRefId string

Publisher reference of the product

Optional
quantity double

Quantity

Optional
unitPrice object FullPrice Optional
unitPrice.currency string

Amount currency (ISO-4217)

Optional
unitPrice.discountedPrice object DiscountedPrice Optional
unitPrice.discountedPrice.discountCode string

Discount promo code

Optional
unitPrice.discountedPrice.discountId string

Discount ID

Optional
unitPrice.discountedPrice.discountLabel string

Discount label

unitPrice.discountedPrice.discountRate double

Discount rate

unitPrice.discountedPrice.discountedGrossPrice double

Discounted cost of product with taxes included

unitPrice.discountedPrice.discountedNetPrice double

Discounted cost of product without taxes included

unitPrice.discountedPrice.grossPriceDiscountAmount double

Gross price discount amount

unitPrice.discountedPrice.netPriceDiscountAmount double

Net price discount amount

unitPrice.discountedPrice.signedDiscount string

Signed discount

Optional
unitPrice.discountedPrice.vatDiscountAmount double

VAT discount amount

unitPrice.grossPrice double

Cost of product with taxes included.

Optional
unitPrice.netPrice double

Net price

Optional
unitPrice.vatAmount double

The VAT amount (amount - netAmount)

Optional
unitPrice.vatRate double

Sales tax rate

Optional
upSellBy string

Upsell product by this product ID

Optional
variantOf string

Variant of

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

Product
401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

404 Not Found

Not Found

500 Internal Server Error

Failure

Example

{
    "fullPrice": {
        "discountedPrice": {}
    },
    "price": {
        "discountedPrice": {}
    },
    "unitPrice": {
        "discountedPrice": {}
    }
}

Explore this API

storeId

storeId

discounts

discounts

locale

locale

retainBuyer
abandonedCart
renewal
product

product

Request Content-Type
Response Content-Type

Choose an authorisation method:

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