Skip to main content

SKU (Stock Keeping Unit)

The SKU represents the minimum sellable unit and is trackable in inventory. While the Variant defines a category (e.g., "Nike Pegasus Green"), the SKU defines the specific and final combination ready for purchase (e.g., "Nike Pegasus Green, Size 42").

The options themselves provide the specificity for each SKU.

SKU Definition

PropertyTypeDescription
idstring (UUID)Unique identifier of the SKU in the system.
skustringCommercial identification code (e.g., "NIK-A6B512-283BBA").
quantitynumberQuantity currently available in stock.
allowBackorderbooleanIf true, allows purchase even if stock is exhausted.
backorderDaysnumberEstimated days for restocking in case of backorder.
isFavouritebooleanIndicates if this SKU is the one selected by default in the variant.
maxOrderQuantitynumberMaximum limit of items purchasable in a single order.
optionsObjectMap of selected options (e.g., {"OPTION_ID": "OPTION_VALUE_ID"}).
pricesPrice[]Array of prices applicable to this specific SKU.
allowFreeShippingbooleanIndicates if the SKU is eligible for free shipping according to general rules.
forceFreeShippingbooleanIf true, forces free shipping regardless of cart rules.
ean / mpnstringInternational standard codes (EAN, Barcode, Manufacturer Part Number).

Object example

{
"allowFreeShipping": false,
"backorderDays": 0,
"quantity": 8,
"allowBackorder": false,
"mpn": "",
"ean": "",
"forceFreeShipping": false,
"options": {
"2d395c94-552a-4dbf-95de-230f94e0844c": "eccd7e69-2aa2-4bbc-92ef-75a07f0a01e6"
},
"purchaseRestock": false,
"sku": "NIK-E172D4-FAE227",
"prices": [
{
"amount": 140,
"isDefault": true,
"comparePrice": 0,
"quantityTable": null,
"externalId": null,
"id": "d6b5e7a9-d202-4e25-a579-e4875c2ca3b8",
"currencyCode": "EUR",
"cadence": "once",
"netAmount": 140,
"grossAmount": 170.79999999999998,
"rate": 22,
"netCompare": 0,
"grossCompare": 0
}
],
"isFavourite": false,
"maxOrderQuantity": 30,
"id": "9fd983d3-17f0-409c-b29e-f51188be51c3"
}

Price

Represents the specific price of the SKU. Unlike the variant's PriceRange, here the values are defined individually.

PropertyTypeDescription
idstring (UUID)Unique identifier for the price.
amountnumberNominal value of the price.
netAmountnumberUnit net price.
grossAmountnumberUnit gross price (including tax).
netComparenumberNet comparison price (original price).
grossComparenumberGross comparison price (original price including tax).
currencyCodestringCurrency code (e.g., EUR).
cadencestringPayment frequency (e.g., once).
isDefaultbooleanIndicates if this is the primary price for the current currency.
quantityTableQuantityTable | nullTable for quantity-based discounts (tier pricing).

Object example

{
"amount": 140,
"isDefault": true,
"comparePrice": 0,
"quantityTable": null,
"externalId": null,
"id": "d6b5e7a9-d202-4e25-a579-e4875c2ca3b8",
"currencyCode": "EUR",
"cadence": "once",
"netAmount": 140,
"grossAmount": 170.79999999999998,
"rate": 22,
"netCompare": 0,
"grossCompare": 0
}
SKU Selection

In a checkout interface, the correct SKU is typically identified by matching the user's selections (the options) with the skus array contained within the selected variant.


QuantityTable (Tier Pricing)

The quantityTable allows you to define automatic discounts based on the quantity of items added to the cart. It is an array of objects that define price thresholds (tiers).

Tier Definition

PropertyTypeDescription
minnumberMinimum quantity to activate the tier.
maxnumber | nullMaximum quantity for the tier (null indicates "infinite").
discountTypestringType of discount applied: percentage, fixed.
discountValuenumberThe discount value to be subtracted from the base price.
roundingstring | nullRounding rule for the resulting price (e.g., 99 for .99€).

Application Example

In the following example, the discount increases progressively as the number of items increases:

  • From 1 to 4 items: 5% discount and rounding to .00.
  • From 5 to 9 items: 10% discount and rounding to .00.
  • Over 10 items: 20% discount and rounding to .99.
[
{
"min": 1,
"max": 4,
"discountType": "percentage",
"discountValue": 5,
"rounding": "00"
},
{
"min": 5,
"max": 9,
"discountType": "percentage",
"discountValue": 10,
"rounding": "00"
},
{
"min": 10,
"max": null,
"discountType": "percentage",
"discountValue": 20,
"rounding": "99"
}
]

Price Calculation

The webround.com SDK automatically calculates the final price by applying the discount tier corresponding to the SKU's amount (or grossAmount). If the quantity in the cart changes, the unit price is recalculated in real time.