diff --git a/api-specs/api/examples/CartDiscount/CartDiscountChangeCartPredicateAction.json b/api-specs/api/examples/CartDiscount/CartDiscountChangeCartPredicateAction.json index 43869bc49..a0064f376 100644 --- a/api-specs/api/examples/CartDiscount/CartDiscountChangeCartPredicateAction.json +++ b/api-specs/api/examples/CartDiscount/CartDiscountChangeCartPredicateAction.json @@ -1,4 +1,4 @@ { "action": "changeCartPredicate", - "cartPredicate": "cartPredicateString" -} \ No newline at end of file + "cartPredicate": "shippingInfo.taxRate.country = \"DE\"" +} diff --git a/api-specs/api/examples/CartDiscount/CartDiscountChangeNameAction.json b/api-specs/api/examples/CartDiscount/CartDiscountChangeNameAction.json index 5c46714a4..64fef1296 100644 --- a/api-specs/api/examples/CartDiscount/CartDiscountChangeNameAction.json +++ b/api-specs/api/examples/CartDiscount/CartDiscountChangeNameAction.json @@ -1,7 +1,7 @@ { "action": "changeName", "name": { - "en": "NewNameEN", - "de": "NewNameDE" + "en": "New name", + "de": "Neuer Name" } -} \ No newline at end of file +} diff --git a/api-specs/api/examples/CartDiscount/CartDiscountChangeRequiresDiscountCodeAction.json b/api-specs/api/examples/CartDiscount/CartDiscountChangeRequiresDiscountCodeAction.json index 835e55d21..0f0d81f08 100644 --- a/api-specs/api/examples/CartDiscount/CartDiscountChangeRequiresDiscountCodeAction.json +++ b/api-specs/api/examples/CartDiscount/CartDiscountChangeRequiresDiscountCodeAction.json @@ -1,4 +1,4 @@ { "action": "changeRequiresDiscountCode", - "requiresDiscountCode": true -} \ No newline at end of file + "requiresDiscountCode": false +} diff --git a/api-specs/api/examples/CartDiscount/CartDiscountChangeSortOrderAction.json b/api-specs/api/examples/CartDiscount/CartDiscountChangeSortOrderAction.json index 4561c1cb5..4c865aa09 100644 --- a/api-specs/api/examples/CartDiscount/CartDiscountChangeSortOrderAction.json +++ b/api-specs/api/examples/CartDiscount/CartDiscountChangeSortOrderAction.json @@ -1,4 +1,4 @@ { "action": "changeSortOrder", - "sortOrder": "0.2" -} \ No newline at end of file + "sortOrder": "0.1" +} diff --git a/api-specs/api/examples/CartDiscount/CartDiscountChangeStackingModeAction.json b/api-specs/api/examples/CartDiscount/CartDiscountChangeStackingModeAction.json index f649416c8..ee05f337c 100644 --- a/api-specs/api/examples/CartDiscount/CartDiscountChangeStackingModeAction.json +++ b/api-specs/api/examples/CartDiscount/CartDiscountChangeStackingModeAction.json @@ -1,4 +1,4 @@ { "action": "changeStackingMode", - "stackingMode": "Stacking" -} \ No newline at end of file + "stackingMode": "StopAfterThisDiscount" +} diff --git a/api-specs/api/examples/CartDiscount/CartDiscountCustomLineItemsTarget.json b/api-specs/api/examples/CartDiscount/CartDiscountCustomLineItemsTarget.json new file mode 100644 index 000000000..494280aa3 --- /dev/null +++ b/api-specs/api/examples/CartDiscount/CartDiscountCustomLineItemsTarget.json @@ -0,0 +1,4 @@ +{ + "type": "customLineItems", + "predicate": "customLineItemTotal(1 = 1) = \"20.00 EUR\"" +} diff --git a/api-specs/api/examples/CartDiscount/CartDiscountLineItemsTarget.json b/api-specs/api/examples/CartDiscount/CartDiscountLineItemsTarget.json new file mode 100644 index 000000000..b49ed09f1 --- /dev/null +++ b/api-specs/api/examples/CartDiscount/CartDiscountLineItemsTarget.json @@ -0,0 +1,4 @@ +{ + "type": "lineItems", + "predicate": "shippingInfo.price = \"50.00 EUR\"" +} diff --git a/api-specs/api/examples/CartDiscount/CartDiscountMultiBuyCustomLineItemsTarget.json b/api-specs/api/examples/CartDiscount/CartDiscountMultiBuyCustomLineItemsTarget.json new file mode 100644 index 000000000..ca2fc1d3f --- /dev/null +++ b/api-specs/api/examples/CartDiscount/CartDiscountMultiBuyCustomLineItemsTarget.json @@ -0,0 +1,8 @@ +{ + "type": "multiBuyCustomLineItems", + "predicate": "taxedPrice.gross = \"200.00 EUR\"", + "triggerQuantity": 2, + "discountedQuantity": 1, + "maxOccurrence": 5, + "selectionMode": "MostExpensive" +} diff --git a/api-specs/api/examples/CartDiscount/CartDiscountMultiBuyLineItemsTarget.json b/api-specs/api/examples/CartDiscount/CartDiscountMultiBuyLineItemsTarget.json new file mode 100644 index 000000000..740e6576b --- /dev/null +++ b/api-specs/api/examples/CartDiscount/CartDiscountMultiBuyLineItemsTarget.json @@ -0,0 +1,8 @@ +{ + "type": "multiBuyLineItems", + "predicate": "taxedPrice.gross = \"200.00 EUR\"", + "triggerQuantity": 5, + "discountedQuantity": 2, + "maxOccurrence": 10, + "selectionMode": "Cheapest" +} diff --git a/api-specs/api/examples/CartDiscount/CartDiscountSetDescriptionAction.json b/api-specs/api/examples/CartDiscount/CartDiscountSetDescriptionAction.json index 263de7c28..3e0153f05 100644 --- a/api-specs/api/examples/CartDiscount/CartDiscountSetDescriptionAction.json +++ b/api-specs/api/examples/CartDiscount/CartDiscountSetDescriptionAction.json @@ -1,7 +1,7 @@ { "action": "setDescription", "description": { - "en": "New Description EN", - "de": "New Description DE" + "en": "New description", + "de": "neue Beschreibung" } -} \ No newline at end of file +} diff --git a/api-specs/api/examples/CartDiscount/CartDiscountSetValidFromAction.json b/api-specs/api/examples/CartDiscount/CartDiscountSetValidFromAction.json index 5903c218e..3756eca24 100644 --- a/api-specs/api/examples/CartDiscount/CartDiscountSetValidFromAction.json +++ b/api-specs/api/examples/CartDiscount/CartDiscountSetValidFromAction.json @@ -1,4 +1,4 @@ { "action": "setValidFrom", - "validFrom": "2017-10-15T15:00:00.000Z" -} \ No newline at end of file + "validFrom": "2025-10-15T15:00:00.000Z" +} diff --git a/api-specs/api/examples/CartDiscount/CartDiscountSetValidFromAndUntilAction.json b/api-specs/api/examples/CartDiscount/CartDiscountSetValidFromAndUntilAction.json index c2b6080e8..9e18252ff 100644 --- a/api-specs/api/examples/CartDiscount/CartDiscountSetValidFromAndUntilAction.json +++ b/api-specs/api/examples/CartDiscount/CartDiscountSetValidFromAndUntilAction.json @@ -1,5 +1,5 @@ { "action": "setValidFromAndUntil", - "validFrom": "2017-10-15T15:00:00.000Z", - "validUntil": "2017-10-15T15:05:00.000Z" -} \ No newline at end of file + "validFrom": "2025-10-15T15:00:00.000Z", + "validUntil": "2025-11-15T15:05:00.000Z" +} diff --git a/api-specs/api/examples/CartDiscount/CartDiscountSetValidUntilAction.json b/api-specs/api/examples/CartDiscount/CartDiscountSetValidUntilAction.json index fa9e919bd..19597edbf 100644 --- a/api-specs/api/examples/CartDiscount/CartDiscountSetValidUntilAction.json +++ b/api-specs/api/examples/CartDiscount/CartDiscountSetValidUntilAction.json @@ -1,4 +1,4 @@ { "action": "setValidUntil", - "validUntil": "2017-10-15T20:00:00.000Z" -} \ No newline at end of file + "validUntil": "2025-11-15T20:00:00.000Z" +} diff --git a/api-specs/api/examples/CartDiscount/CartDiscountShippingCostTarget.json b/api-specs/api/examples/CartDiscount/CartDiscountShippingCostTarget.json new file mode 100644 index 000000000..5a393d5a6 --- /dev/null +++ b/api-specs/api/examples/CartDiscount/CartDiscountShippingCostTarget.json @@ -0,0 +1,3 @@ +{ + "type": "shipping" +} diff --git a/api-specs/api/examples/CartDiscount/CartDiscountTotalPriceTarget.json b/api-specs/api/examples/CartDiscount/CartDiscountTotalPriceTarget.json new file mode 100644 index 000000000..14072e835 --- /dev/null +++ b/api-specs/api/examples/CartDiscount/CartDiscountTotalPriceTarget.json @@ -0,0 +1,3 @@ +{ + "type": "totalPrice" +} diff --git a/api-specs/api/examples/CartDiscount/CartDiscountValueAbsolute.json b/api-specs/api/examples/CartDiscount/CartDiscountValueAbsolute.json new file mode 100644 index 000000000..e07eeccd2 --- /dev/null +++ b/api-specs/api/examples/CartDiscount/CartDiscountValueAbsolute.json @@ -0,0 +1,10 @@ +{ + "type": "absolute", + "money": { + "centAmount": 2000, + "currencyCode": "EUR", + "type": "centPrecision", + "fractionDigits": 2 + }, + "applicationMode": "IndividualApplication" +} diff --git a/api-specs/api/examples/CartDiscount/CartDiscountValueAbsoluteDraft.json b/api-specs/api/examples/CartDiscount/CartDiscountValueAbsoluteDraft.json new file mode 100644 index 000000000..0c05939f4 --- /dev/null +++ b/api-specs/api/examples/CartDiscount/CartDiscountValueAbsoluteDraft.json @@ -0,0 +1,8 @@ +{ + "type": "absolute", + "money": { + "centAmount": 2000, + "currencyCode": "EUR" + }, + "applicationMode": "IndividualApplication" +} diff --git a/api-specs/api/examples/CartDiscount/CartDiscountValueFixed.json b/api-specs/api/examples/CartDiscount/CartDiscountValueFixed.json new file mode 100644 index 000000000..ecef4216b --- /dev/null +++ b/api-specs/api/examples/CartDiscount/CartDiscountValueFixed.json @@ -0,0 +1,9 @@ +{ + "type": "fixed", + "money": { + "centAmount": 2000, + "currencyCode": "EUR", + "type": "centPrecision", + "fractionDigits": 2 + } +} diff --git a/api-specs/api/examples/CartDiscount/CartDiscountValueFixedDraft.json b/api-specs/api/examples/CartDiscount/CartDiscountValueFixedDraft.json new file mode 100644 index 000000000..22523c2cc --- /dev/null +++ b/api-specs/api/examples/CartDiscount/CartDiscountValueFixedDraft.json @@ -0,0 +1,7 @@ +{ + "type": "fixed", + "money": { + "centAmount": 2000, + "currencyCode": "EUR" + } +} diff --git a/api-specs/api/examples/CartDiscount/CartDiscountValueGiftLineItem.json b/api-specs/api/examples/CartDiscount/CartDiscountValueGiftLineItem.json new file mode 100644 index 000000000..26ba1ac0c --- /dev/null +++ b/api-specs/api/examples/CartDiscount/CartDiscountValueGiftLineItem.json @@ -0,0 +1,12 @@ +{ + "type": "giftLineItem", + "product": { + "id": "{{product-id}}", + "typeId" : "product" + }, + "variantId": 1, + "distributionChannel": { + "id": "{{channel-id}}", + "typeId" : "channel" + } +} diff --git a/api-specs/api/examples/CartDiscount/CartDiscountValueRelative.json b/api-specs/api/examples/CartDiscount/CartDiscountValueRelative.json new file mode 100644 index 000000000..fb5f72167 --- /dev/null +++ b/api-specs/api/examples/CartDiscount/CartDiscountValueRelative.json @@ -0,0 +1,4 @@ +{ + "type": "relative", + "permyriad": 1000 +} diff --git a/api-specs/api/examples/DiscountCode/DiscountCodeSetDescriptionAction.json b/api-specs/api/examples/DiscountCode/DiscountCodeSetDescriptionAction.json index 263de7c28..1e0e36d57 100644 --- a/api-specs/api/examples/DiscountCode/DiscountCodeSetDescriptionAction.json +++ b/api-specs/api/examples/DiscountCode/DiscountCodeSetDescriptionAction.json @@ -1,7 +1,7 @@ { "action": "setDescription", "description": { - "en": "New Description EN", - "de": "New Description DE" + "en": "New description", + "de": "Neue Beschreibung" } -} \ No newline at end of file +} diff --git a/api-specs/api/examples/DiscountCode/DiscountCodeSetMaxApplicationsAction.json b/api-specs/api/examples/DiscountCode/DiscountCodeSetMaxApplicationsAction.json index 39df6d578..febe10d03 100644 --- a/api-specs/api/examples/DiscountCode/DiscountCodeSetMaxApplicationsAction.json +++ b/api-specs/api/examples/DiscountCode/DiscountCodeSetMaxApplicationsAction.json @@ -1,4 +1,4 @@ { "action": "setMaxApplications", - "maxApplications": 100 -} \ No newline at end of file + "maxApplications": 150 +} diff --git a/api-specs/api/examples/DiscountCode/DiscountCodeSetNameAction.json b/api-specs/api/examples/DiscountCode/DiscountCodeSetNameAction.json index f50a5fb5d..d69e91d46 100644 --- a/api-specs/api/examples/DiscountCode/DiscountCodeSetNameAction.json +++ b/api-specs/api/examples/DiscountCode/DiscountCodeSetNameAction.json @@ -1,7 +1,7 @@ { "action": "setName", "name": { - "en": "New Name EN", - "de": "New Name DE" + "en": "New name", + "de": "Neuer Name" } -} \ No newline at end of file +} diff --git a/api-specs/api/examples/DiscountCode/DiscountCodeSetValidFromAction.json b/api-specs/api/examples/DiscountCode/DiscountCodeSetValidFromAction.json index e679e2bc5..b29be64a4 100644 --- a/api-specs/api/examples/DiscountCode/DiscountCodeSetValidFromAction.json +++ b/api-specs/api/examples/DiscountCode/DiscountCodeSetValidFromAction.json @@ -1,4 +1,4 @@ { "action": "setValidFrom", - "validFrom": "2018-10-12T14:00:00.000Z" + "validFrom": "2025-10-12T14:00:00.000Z" } diff --git a/api-specs/api/examples/DiscountCode/DiscountCodeSetValidFromAndUntilAction.json b/api-specs/api/examples/DiscountCode/DiscountCodeSetValidFromAndUntilAction.json index 6f941c886..a23ed90ee 100644 --- a/api-specs/api/examples/DiscountCode/DiscountCodeSetValidFromAndUntilAction.json +++ b/api-specs/api/examples/DiscountCode/DiscountCodeSetValidFromAndUntilAction.json @@ -1,5 +1,5 @@ { "action": "setValidFromAndUntil", - "validFrom": "2018-10-12T14:00:00.000Z", - "validUntil": "2018-10-12T14:05:00.000Z" + "validFrom": "2025-10-12T14:00:00.000Z", + "validUntil": "2025-11-12T14:05:00.000Z" } diff --git a/api-specs/api/examples/DiscountCode/DiscountCodeSetValidUntilAction.json b/api-specs/api/examples/DiscountCode/DiscountCodeSetValidUntilAction.json index c7f1188ae..651c7626e 100644 --- a/api-specs/api/examples/DiscountCode/DiscountCodeSetValidUntilAction.json +++ b/api-specs/api/examples/DiscountCode/DiscountCodeSetValidUntilAction.json @@ -1,4 +1,4 @@ { "action": "setValidUntil", - "validUntil": "2018-10-12T14:00:00.000Z" + "validUntil": "2025-11-12T14:00:00.000Z" } diff --git a/api-specs/api/examples/ProductDiscount/ProductDiscountChangeNameAction.json b/api-specs/api/examples/ProductDiscount/ProductDiscountChangeNameAction.json index 8f747709c..b773def31 100644 --- a/api-specs/api/examples/ProductDiscount/ProductDiscountChangeNameAction.json +++ b/api-specs/api/examples/ProductDiscount/ProductDiscountChangeNameAction.json @@ -1,7 +1,7 @@ { "action": "changeName", "name": { - "de": "NewProductDiscountDE", - "en": "NewProductDiscountEN" + "de": "Neuer Rabatt", + "en": "New discount" } } diff --git a/api-specs/api/examples/ProductDiscount/ProductDiscountMatchQuery.json b/api-specs/api/examples/ProductDiscount/ProductDiscountMatchQuery.json new file mode 100644 index 000000000..67b241fa2 --- /dev/null +++ b/api-specs/api/examples/ProductDiscount/ProductDiscountMatchQuery.json @@ -0,0 +1,26 @@ +{ + "productId": "{{product-id}}", + "variantId": 1, + "staged": false, + "price": { + "id": "{{price-id}}", + "value": { + "currencyCode": "EUR", + "centAmount": 10000 + }, + "country": "DE", + "customerGroup": { + "typeId": "customer-group", + "id": "{{customer-group-id}}" + }, + "tiers": [ + { + "minimumQuantity": 10, + "value": { + "currencyCode": "EUR", + "centAmount": 9000 + } + } + ] + } +} diff --git a/api-specs/api/examples/ProductDiscount/ProductDiscountQueryPrice.json b/api-specs/api/examples/ProductDiscount/ProductDiscountQueryPrice.json new file mode 100644 index 000000000..0ba579714 --- /dev/null +++ b/api-specs/api/examples/ProductDiscount/ProductDiscountQueryPrice.json @@ -0,0 +1,21 @@ +{ + "id": "{{price-id}}", + "value": { + "currencyCode": "EUR", + "centAmount": 10000 + }, + "country": "DE", + "customerGroup": { + "typeId": "customer-group", + "id": "{{customer-group-id}}" + }, + "tiers": [ + { + "minimumQuantity": 10, + "value": { + "currencyCode": "EUR", + "centAmount": 9000 + } + } + ] +} diff --git a/api-specs/api/examples/ProductDiscount/ProductDiscountSetDescriptionAction.json b/api-specs/api/examples/ProductDiscount/ProductDiscountSetDescriptionAction.json index 17358b879..06ff76c94 100644 --- a/api-specs/api/examples/ProductDiscount/ProductDiscountSetDescriptionAction.json +++ b/api-specs/api/examples/ProductDiscount/ProductDiscountSetDescriptionAction.json @@ -1,7 +1,7 @@ { "action": "setDescription", "description": { - "de": "New Product Discount Description DE", - "en": "New Product Discount Description EN" + "de": "Neue Beschreibung", + "en": "New description" } -} \ No newline at end of file +} diff --git a/api-specs/api/examples/ProductDiscount/ProductDiscountSetValidFromAction.json b/api-specs/api/examples/ProductDiscount/ProductDiscountSetValidFromAction.json index 238b8253a..994b097f7 100644 --- a/api-specs/api/examples/ProductDiscount/ProductDiscountSetValidFromAction.json +++ b/api-specs/api/examples/ProductDiscount/ProductDiscountSetValidFromAction.json @@ -1,4 +1,4 @@ { "action": "setValidFrom", - "validFrom": "2018-10-12T14:05:00.000Z" + "validFrom": "2025-10-12T14:05:00.000Z" } diff --git a/api-specs/api/examples/ProductDiscount/ProductDiscountSetValidFromAndUntilAction.json b/api-specs/api/examples/ProductDiscount/ProductDiscountSetValidFromAndUntilAction.json index 6f941c886..a23ed90ee 100644 --- a/api-specs/api/examples/ProductDiscount/ProductDiscountSetValidFromAndUntilAction.json +++ b/api-specs/api/examples/ProductDiscount/ProductDiscountSetValidFromAndUntilAction.json @@ -1,5 +1,5 @@ { "action": "setValidFromAndUntil", - "validFrom": "2018-10-12T14:00:00.000Z", - "validUntil": "2018-10-12T14:05:00.000Z" + "validFrom": "2025-10-12T14:00:00.000Z", + "validUntil": "2025-11-12T14:05:00.000Z" } diff --git a/api-specs/api/examples/ProductDiscount/ProductDiscountSetValidUntilAction.json b/api-specs/api/examples/ProductDiscount/ProductDiscountSetValidUntilAction.json index 69e393efe..7cabf7a96 100644 --- a/api-specs/api/examples/ProductDiscount/ProductDiscountSetValidUntilAction.json +++ b/api-specs/api/examples/ProductDiscount/ProductDiscountSetValidUntilAction.json @@ -1,4 +1,4 @@ { "action": "setValidUntil", - "validUntil": "2018-10-12T14:05:00.000Z" + "validUntil": "2025-11-12T14:05:00.000Z" } diff --git a/api-specs/api/examples/ProductDiscount/ProductDiscountValueAbsolute.json b/api-specs/api/examples/ProductDiscount/ProductDiscountValueAbsolute.json new file mode 100644 index 000000000..6b38a6285 --- /dev/null +++ b/api-specs/api/examples/ProductDiscount/ProductDiscountValueAbsolute.json @@ -0,0 +1,11 @@ +{ + "type": "absolute", + "money": [ + { + "type": "centPrecision", + "currencyCode": "EUR", + "centAmount": 100, + "fractionDigits": 2 + } + ] +} diff --git a/api-specs/api/examples/ProductDiscount/ProductDiscountValueAbsoluteDraft.json b/api-specs/api/examples/ProductDiscount/ProductDiscountValueAbsoluteDraft.json new file mode 100644 index 000000000..824ebf91b --- /dev/null +++ b/api-specs/api/examples/ProductDiscount/ProductDiscountValueAbsoluteDraft.json @@ -0,0 +1,9 @@ +{ + "type": "absolute", + "money": [ + { + "currencyCode": "EUR", + "centAmount": 100 + } + ] +} diff --git a/api-specs/api/examples/ProductDiscount/ProductDiscountValueExternal.json b/api-specs/api/examples/ProductDiscount/ProductDiscountValueExternal.json new file mode 100644 index 000000000..3463661d7 --- /dev/null +++ b/api-specs/api/examples/ProductDiscount/ProductDiscountValueExternal.json @@ -0,0 +1,3 @@ +{ + "type": "external" +} diff --git a/api-specs/api/examples/ProductDiscount/ProductDiscountValueRelative.json b/api-specs/api/examples/ProductDiscount/ProductDiscountValueRelative.json new file mode 100644 index 000000000..fb5f72167 --- /dev/null +++ b/api-specs/api/examples/ProductDiscount/ProductDiscountValueRelative.json @@ -0,0 +1,4 @@ +{ + "type": "relative", + "permyriad": 1000 +} diff --git a/api-specs/api/examples/StandalonePrice/StandalonePriceChangeValueAction.json b/api-specs/api/examples/StandalonePrice/StandalonePriceChangeValueAction.json index 38ec552ac..0a44a8d24 100644 --- a/api-specs/api/examples/StandalonePrice/StandalonePriceChangeValueAction.json +++ b/api-specs/api/examples/StandalonePrice/StandalonePriceChangeValueAction.json @@ -3,6 +3,6 @@ "staged" : false, "value": { "currencyCode": "EUR", - "centAmount": 10000 + "centAmount": 20000 } } diff --git a/api-specs/api/examples/StandalonePrice/StandalonePriceSetDiscountedPriceAction.json b/api-specs/api/examples/StandalonePrice/StandalonePriceSetDiscountedPriceAction.json index 0fdf21a1a..c8f24d75a 100644 --- a/api-specs/api/examples/StandalonePrice/StandalonePriceSetDiscountedPriceAction.json +++ b/api-specs/api/examples/StandalonePrice/StandalonePriceSetDiscountedPriceAction.json @@ -12,4 +12,4 @@ "id": "{{product-discount-id}}" } } -} \ No newline at end of file +} diff --git a/api-specs/api/examples/StandalonePrice/StandalonePriceSetPriceTiersAction.json b/api-specs/api/examples/StandalonePrice/StandalonePriceSetPriceTiersAction.json index f9fefe6f1..906f163f7 100644 --- a/api-specs/api/examples/StandalonePrice/StandalonePriceSetPriceTiersAction.json +++ b/api-specs/api/examples/StandalonePrice/StandalonePriceSetPriceTiersAction.json @@ -10,7 +10,7 @@ } }, { - "minimumQuantity": 1000, + "minimumQuantity": 150, "value": { "centAmount": 4000, "currencyCode": "EUR", diff --git a/api-specs/api/examples/StandalonePrice/StandalonePriceSetValidFromAction.json b/api-specs/api/examples/StandalonePrice/StandalonePriceSetValidFromAction.json index 04bddec77..8ce128cb5 100644 --- a/api-specs/api/examples/StandalonePrice/StandalonePriceSetValidFromAction.json +++ b/api-specs/api/examples/StandalonePrice/StandalonePriceSetValidFromAction.json @@ -1,4 +1,4 @@ { "action": "setValidFrom", - "validFrom": "2019-03-30T20:30:00.000Z" -} \ No newline at end of file + "validFrom": "2025-03-30T20:30:00.000Z" +} diff --git a/api-specs/api/examples/StandalonePrice/StandalonePriceSetValidFromAndUntilAction.json b/api-specs/api/examples/StandalonePrice/StandalonePriceSetValidFromAndUntilAction.json index a11b8b49e..cbbc33315 100644 --- a/api-specs/api/examples/StandalonePrice/StandalonePriceSetValidFromAndUntilAction.json +++ b/api-specs/api/examples/StandalonePrice/StandalonePriceSetValidFromAndUntilAction.json @@ -1,5 +1,5 @@ { "action": "setValidFromAndUntil", - "validFrom": "2019-03-30T20:30:00.000Z", - "validUntil": "2019-04-21T20:30:00.000Z" -} \ No newline at end of file + "validFrom": "2025-03-30T20:30:00.000Z", + "validUntil": "2025-04-21T20:30:00.000Z" +} diff --git a/api-specs/api/examples/StandalonePrice/StandalonePriceSetValidUntilAction.json b/api-specs/api/examples/StandalonePrice/StandalonePriceSetValidUntilAction.json index e21b878e3..4679d52bf 100644 --- a/api-specs/api/examples/StandalonePrice/StandalonePriceSetValidUntilAction.json +++ b/api-specs/api/examples/StandalonePrice/StandalonePriceSetValidUntilAction.json @@ -1,4 +1,4 @@ { "action": "setValidUntil", - "validUntil": "2019-04-21T20:30:00.000Z" -} \ No newline at end of file + "validUntil": "2025-04-21T20:30:00.000Z" +} diff --git a/api-specs/api/examples/cart-discount-create.example.json b/api-specs/api/examples/cart-discount-create.example.json index 4a9007c9a..bbb4a6a43 100644 --- a/api-specs/api/examples/cart-discount-create.example.json +++ b/api-specs/api/examples/cart-discount-create.example.json @@ -1,22 +1,28 @@ { + "key": "black-friday-sale", "name": { - "en": "Summer Sale" + "en": "Black Friday Sale" + }, + "description": { + "en": "10% discount on all items in cart" }, "value": { "type": "relative", "permyriad": 1000 }, - "cartPredicate": "1=1", + "cartPredicate": "lineItemTotal(true = true) >= \"500.00 USD\"", "target": { "type": "lineItems", - "predicate": "1=1" + "predicate": "categories.id = (\"{{category-id}}\")" }, - "sortOrder": "0.1", + "sortOrder": "0.01", "stores": [ { - "key": "{{store-key}}" + "key": "europe", + "typeId": "store" } ], "isActive": true, - "requiresDiscountCode": false + "requiresDiscountCode": true, + "stackingMode": "Stacking" } diff --git a/api-specs/api/examples/cart-discount-update.example.json b/api-specs/api/examples/cart-discount-update.example.json index 1d6f7f2dd..e96eecbdd 100644 --- a/api-specs/api/examples/cart-discount-update.example.json +++ b/api-specs/api/examples/cart-discount-update.example.json @@ -4,7 +4,7 @@ "action": "changeValue", "value": { "type": "relative", - "permyriad": 1000 + "permyriad": 1500 } }] } diff --git a/api-specs/api/examples/cart-discount-updated.example.json b/api-specs/api/examples/cart-discount-updated.example.json new file mode 100644 index 000000000..bc7d569a4 --- /dev/null +++ b/api-specs/api/examples/cart-discount-updated.example.json @@ -0,0 +1,46 @@ +{ + "id": "{{cart-discount-id}}", + "version": 2, + "key": "black-friday-sale", + "name": { + "en": "Black Friday Sale" + }, + "description": { + "en": "10% discount on all items in cart" + }, + "value": { + "type": "relative", + "permyriad": 1500 + }, + "cartPredicate": "lineItemTotal(true = true) >= \"500.00 USD\"", + "target": { + "type": "lineItems", + "predicate": "categories.id = (\"{{category-id}}\")" + }, + "sortOrder": "0.01", + "stores": [ + { + "typeId": "store", + "key": "europe" + } + ], + "isActive": true, + "references": [ + { + "typeId": "category", + "id": "{{category-id}}" + } + ], + "stackingMode": "Stacking", + "requiresDiscountCode": true, + "createdAt": "2024-11-21T13:08:15.962Z", + "lastModifiedAt": "2024-12-21T13:08:15.962Z", + "lastModifiedBy": { + "clientId": "{{client-id}}", + "isPlatformClient": false + }, + "createdBy": { + "clientId": "{{client-id}}", + "isPlatformClient": false + } +} diff --git a/api-specs/api/examples/cart-discount.example.json b/api-specs/api/examples/cart-discount.example.json index f25be8914..2d4dfaea4 100644 --- a/api-specs/api/examples/cart-discount.example.json +++ b/api-specs/api/examples/cart-discount.example.json @@ -1,29 +1,46 @@ { - "id": "c2f93298-c967-44af-8c2a-d2220bf39eb2", + "id": "{{cart-discount-id}}", "version": 1, - "createdAt": "1970-01-01T00:00:00.001Z", - "lastModifiedAt": "1970-01-01T00:00:00.001Z", + "key": "black-friday-sale", "name": { - "en": "Summer Sale" + "en": "Black Friday Sale" + }, + "description": { + "en": "10% discount on all items in cart" }, "value": { "type": "relative", "permyriad": 1000 }, - "cartPredicate": "1=1", + "cartPredicate": "lineItemTotal(true = true) >= \"500.00 USD\"", "target": { "type": "lineItems", - "predicate": "1=1" + "predicate": "categories.id = (\"{{category-id}}\")" }, - "sortOrder": "0.1", + "sortOrder": "0.01", "stores": [ { - "key": "{{store-key}}", - "typeId": "store" + "typeId": "store", + "key": "europe" } ], "isActive": true, - "requiresDiscountCode": false, - "references": [], - "stackingMode": "Stacking" + "references": [ + { + "typeId": "category", + "id": "{{category-id}}" + } + ], + "stackingMode": "Stacking", + "requiresDiscountCode": true, + "createdAt": "2024-11-21T13:08:15.962Z", + "lastModifiedAt": "2024-11-21T13:08:15.962Z", + "lastModifiedBy": { + "clientId": "{{client-id}}", + "isPlatformClient": false + }, + "createdBy": { + "clientId": "{{client-id}}", + "isPlatformClient": false + } } diff --git a/api-specs/api/examples/cart-discounts.example.json b/api-specs/api/examples/cart-discounts.example.json index 1b338672f..d7c99a71f 100644 --- a/api-specs/api/examples/cart-discounts.example.json +++ b/api-specs/api/examples/cart-discounts.example.json @@ -5,33 +5,50 @@ "total": 1, "results": [ { - "id": "c2f93298-c967-44af-8c2a-d2220bf39eb2", + "id": "{{cart-discount-id}}", "version": 1, - "createdAt": "1970-01-01T00:00:00.001Z", - "lastModifiedAt": "1970-01-01T00:00:00.001Z", + "key": "black-friday-sale", "name": { - "en": "Summer Sale" + "en": "Black Friday Sale" + }, + "description": { + "en": "10% discount on all items in cart" }, "value": { "type": "relative", "permyriad": 1000 }, - "cartPredicate": "1=1", + "cartPredicate": "lineItemTotal(true = true) >= \"500.00 USD\"", "target": { "type": "lineItems", - "predicate": "1=1" + "predicate": "categories.id = (\"{{category-id}}\")" }, - "sortOrder": "0.1", + "sortOrder": "0.01", "stores": [ { - "key": "{{store-key}}", - "typeId": "store" + "typeId": "store", + "key": "europe" } ], "isActive": true, - "requiresDiscountCode": false, - "references": [], - "stackingMode": "Stacking" + "references": [ + { + "typeId": "category", + "id": "{{category-id}}" + } + ], + "stackingMode": "Stacking", + "requiresDiscountCode": true, + "createdAt": "2024-11-21T13:08:15.962Z", + "lastModifiedAt": "2024-11-21T13:08:15.962Z", + "lastModifiedBy": { + "clientId": "{{client-id}}", + "isPlatformClient": false + }, + "createdBy": { + "clientId": "{{client-id}}", + "isPlatformClient": false + } } ] } diff --git a/api-specs/api/examples/discount-code-create.example.json b/api-specs/api/examples/discount-code-create.example.json index 3d6d9b8bb..52799c51a 100644 --- a/api-specs/api/examples/discount-code-create.example.json +++ b/api-specs/api/examples/discount-code-create.example.json @@ -1,14 +1,23 @@ { - "code": "SAVE10", + "key": "save10_code", "name": { "en": "Save10" }, + "description": { + "en": "Save 10% using this code" + }, + "code": "SAVE10", "cartDiscounts": [ { "typeId": "cart-discount", - "id": "fdbaf4ea-fbc9-4fea-bac4-1d7e6c1995b3" + "id": "{{cart-discount-id}}" } ], + "cartPredicate": "customer.email = \"john.doe@example.com\" and customer.customerGroup.id = \"{{customer-group-id}}\"", "isActive": true, - "cartPredicate": "1=1" + "maxApplications": 100, + "maxApplicationsPerCustomer": 2, + "groups": [ + "new customers" + ] } diff --git a/api-specs/api/examples/discount-code-update.example.json b/api-specs/api/examples/discount-code-update.example.json index f04710fc9..19952d28c 100644 --- a/api-specs/api/examples/discount-code-update.example.json +++ b/api-specs/api/examples/discount-code-update.example.json @@ -1,9 +1,9 @@ { "version": 1, - "actions": [{ - "action": "setName", - "name": { - "en": "New Name" + "actions": [ + { + "action": "setMaxApplicationsPerCustomer", + "maxApplicationsPerCustomer": 5 } - }] + ] } diff --git a/api-specs/api/examples/discount-code-updated.example.json b/api-specs/api/examples/discount-code-updated.example.json new file mode 100644 index 000000000..ffb8ddde7 --- /dev/null +++ b/api-specs/api/examples/discount-code-updated.example.json @@ -0,0 +1,41 @@ +{ + "id": "{{discount-code-id}}", + "version": 2, + "code": "SAVE10", + "name": { + "en": "Save10" + }, + "key": "save10_code", + "description": { + "en": "Save 10% using this code" + }, + "cartDiscounts": [ + { + "typeId": "cart-discount", + "id": "{{cart-discount-id}}" + } + ], + "isActive": true, + "maxApplications": 100, + "maxApplicationsPerCustomer": 5, + "cartPredicate": "customer.email = \"john.doe@example.com\" and customer.customerGroup.id = \"{{customer-group-id}}\"", + "references": [ + { + "typeId": "customer-group", + "id": "{{customer-group-id}}" + } + ], + "groups": [ + "new customers" + ], + "createdAt": "2024-11-21T08:36:25.991Z", + "lastModifiedAt": "2024-12-21T08:36:25.991Z", + "lastModifiedBy": { + "clientId": "{{client-id}}", + "isPlatformClient": false + }, + "createdBy": { + "clientId": "{{client-id}}", + "isPlatformClient": false + } +} diff --git a/api-specs/api/examples/discount-code.example.json b/api-specs/api/examples/discount-code.example.json index f1d0c19f2..5d1235816 100644 --- a/api-specs/api/examples/discount-code.example.json +++ b/api-specs/api/examples/discount-code.example.json @@ -1,20 +1,41 @@ { - "id": "3b3327a4-06c2-4129-8d87-83d5ce53e038", - "version": 2, + "id": "{{discount-code-id}}", + "version": 1, "code": "SAVE10", "name": { "en": "Save10" }, + "key": "save10_code", + "description": { + "en": "Save 10% using this code" + }, "cartDiscounts": [ { "typeId": "cart-discount", - "id": "fdbaf4ea-fbc9-4fea-bac4-1d7e6c1995b3" + "id": "{{cart-discount-id}}" } ], "isActive": true, - "cartPredicate": "1=1", - "references": [], - "groups": [], - "createdAt": "2015-09-15T09:02:29.323Z", - "lastModifiedAt": "2015-09-15T09:04:06.910Z" + "maxApplications": 100, + "maxApplicationsPerCustomer": 2, + "cartPredicate": "customer.email = \"john.doe@example.com\" and customer.customerGroup.id = \"{{customer-group-id}}\"", + "references": [ + { + "typeId": "customer-group", + "id": "{{customer-group-id}}" + } + ], + "groups": [ + "new customers" + ], + "createdAt": "2024-11-21T08:36:25.991Z", + "lastModifiedAt": "2024-11-21T08:36:25.991Z", + "lastModifiedBy": { + "clientId": "{{client-id}}", + "isPlatformClient": false + }, + "createdBy": { + "clientId": "{{client-id}}", + "isPlatformClient": false + } } diff --git a/api-specs/api/examples/discount-codes.example.json b/api-specs/api/examples/discount-codes.example.json index 8fa3eebd0..5a9ad3a0c 100644 --- a/api-specs/api/examples/discount-codes.example.json +++ b/api-specs/api/examples/discount-codes.example.json @@ -5,28 +5,45 @@ "total": 1, "results": [ { - "id": "3b3327a4-06c2-4129-8d87-83d5ce53e038", - "version": 2, + "id": "{{discount-code-id}}", + "version": 1, "code": "SAVE10", "name": { "en": "Save10" }, + "key": "save10_code", + "description": { + "en": "Save 10% using this code" + }, "cartDiscounts": [ { "typeId": "cart-discount", - "id": "fdbaf4ea-fbc9-4fea-bac4-1d7e6c1995b3" + "id": "{{cart-discount-id}}" } ], "isActive": true, - "cartPredicate": "1=1", - "references": [], - "groups": [], - "attributeTypes": {}, - "cartFieldTypes": {}, - "lineItemFieldTypes": {}, - "customLineItemFieldTypes": {}, - "createdAt": "2015-09-15T09:02:29.323Z", - "lastModifiedAt": "2015-09-15T09:04:06.910Z" + "maxApplications": 100, + "maxApplicationsPerCustomer": 2, + "cartPredicate": "customer.email = \"john.doe@example.com\" and customer.customerGroup.id = \"{{customer-group-id}}\"", + "references": [ + { + "typeId": "customer-group", + "id": "{{customer-group-id}}" + } + ], + "groups": [ + "new customers" + ], + "createdAt": "2024-11-21T08:36:25.991Z", + "lastModifiedAt": "2024-11-21T08:36:25.991Z", + "lastModifiedBy": { + "clientId": "{{client-id}}", + "isPlatformClient": false + }, + "createdBy": { + "clientId": "{{client-id}}", + "isPlatformClient": false + } } ] } diff --git a/api-specs/api/examples/product-discount-create.example.json b/api-specs/api/examples/product-discount-create.example.json index 14c91a7aa..3917a9795 100644 --- a/api-specs/api/examples/product-discount-create.example.json +++ b/api-specs/api/examples/product-discount-create.example.json @@ -1,4 +1,11 @@ { + "key": "summer-sale", + "name": { + "en": "Summer Sale" + }, + "description": { + "en": "1€ off all products" + }, "value": { "type": "absolute", "money": [ @@ -8,13 +15,7 @@ } ] }, - "predicate": "1=1", - "name": { - "en": "test-discount1" - }, - "description": { - "en": "test-discount1" - }, - "isActive": false, - "sortOrder": "0.9534" + "predicate": "(product.id = \"{{product-id}}\" and variant.id = 1) or variant.key = \"{{product-variant-key}}\"", + "sortOrder": "0.9534", + "isActive": true } diff --git a/api-specs/api/examples/product-discount-update.example.json b/api-specs/api/examples/product-discount-update.example.json index 037581ae6..5172f9747 100644 --- a/api-specs/api/examples/product-discount-update.example.json +++ b/api-specs/api/examples/product-discount-update.example.json @@ -7,7 +7,7 @@ "money": [ { "currencyCode": "EUR", - "centAmount": 100 + "centAmount": 200 } ] } diff --git a/api-specs/api/examples/product-discount-updated.example.json b/api-specs/api/examples/product-discount-updated.example.json new file mode 100644 index 000000000..b0a73eddd --- /dev/null +++ b/api-specs/api/examples/product-discount-updated.example.json @@ -0,0 +1,41 @@ +{ + "id": "{{product-discount-id}}", + "version": 2, + "key": "summer-sale", + "name": { + "en": "Summer Sale" + }, + "description": { + "en": "1€ off all products" + }, + "value": { + "type": "absolute", + "money": [ + { + "type": "centPrecision", + "currencyCode": "EUR", + "centAmount": 200, + "fractionDigits": 2 + } + ] + }, + "predicate": "(product.id = \"{{product-id}}\" and variant.id = 1) or variant.key = \"{{product-variant-key}}\"", + "sortOrder": "0.9534", + "isActive": true, + "references": [ + { + "typeId": "product", + "id": "464af704-78f7-4d39-9a1c-d00a6f3234b3" + } + ], + "createdAt": "2024-11-21T10:44:07.587Z", + "lastModifiedAt": "2024-12-21T10:44:07.587Z", + "lastModifiedBy": { + "clientId": "{{client-id}}", + "isPlatformClient": false + }, + "createdBy": { + "clientId": "{{client-id}}", + "isPlatformClient": false + } +} diff --git a/api-specs/api/examples/product-discount.example.json b/api-specs/api/examples/product-discount.example.json index 630c82d96..b29ef6786 100644 --- a/api-specs/api/examples/product-discount.example.json +++ b/api-specs/api/examples/product-discount.example.json @@ -1,28 +1,41 @@ { - "id": "d7a204f9-7746-4857-b17e-71f1235a691a", - "version": 2, + "id": "{{product-discount-id}}", + "version": 1, + "key": "summer-sale", + "name": { + "en": "Summer Sale" + }, + "description": { + "en": "1€ off all products" + }, "value": { "type": "absolute", "money": [ { "type": "centPrecision", - "fractionDigits": 2, "currencyCode": "EUR", - "centAmount": 100 + "centAmount": 100, + "fractionDigits": 2 } - ], - "id": "3544d4a3-1279-443c-8699-4220753bf6f5" + ] }, - "predicate": "1=1", - "name": { - "en": "test-discount1" - }, - "description": { - "en": "test-discount1" - }, - "isActive": false, + "predicate": "(product.id = \"{{product-id}}\" and variant.id = 1) or variant.key = \"{{product-variant-key}}\"", "sortOrder": "0.9534", - "references": [], - "createdAt": "2016-02-24T09:44:57.858Z", - "lastModifiedAt": "2016-02-24T09:44:57.939Z" + "isActive": true, + "references": [ + { + "typeId": "product", + "id": "{{product-id}}" + } + ], + "createdAt": "2024-11-21T10:44:07.587Z", + "lastModifiedAt": "2024-11-21T10:44:07.587Z", + "lastModifiedBy": { + "clientId": "{{client-id}}", + "isPlatformClient": false + }, + "createdBy": { + "clientId": "{{client-id}}", + "isPlatformClient": false + } } diff --git a/api-specs/api/examples/product-discounts.example.json b/api-specs/api/examples/product-discounts.example.json index 1c59345c9..36c528317 100644 --- a/api-specs/api/examples/product-discounts.example.json +++ b/api-specs/api/examples/product-discounts.example.json @@ -1,62 +1,49 @@ { "limit": 20, "offset": 0, - "count": 2, - "total": 2, + "count": 1, + "total": 1, "results": [ { - "id": "d7a204f9-7746-4857-b17e-71f1235a691a", - "version": 2, - "value": { - "type": "absolute", - "money": [ - { - "type": "centPrecision", - "fractionDigits": 2, - "currencyCode": "EUR", - "centAmount": 100 - } - ] - }, - "predicate": "1=1", + "id": "{{product-discount-id}}", + "version": 1, + "key": "summer-sale", "name": { - "en": "test-discount1" + "en": "Summer Sale" }, "description": { - "en": "test-discount1" + "en": "1€ off all products" }, - "isActive": false, - "sortOrder": "0.9534", - "references": [], - "createdAt": "2016-02-24T09:44:57.858Z", - "lastModifiedAt": "2016-02-24T09:44:57.939Z" - }, - { - "id": "29cc032d-8ee3-4763-b2ab-3fe0dda22a2d", - "version": 2, "value": { "type": "absolute", "money": [ { "type": "centPrecision", - "fractionDigits": 2, "currencyCode": "EUR", - "centAmount": 100 + "centAmount": 100, + "fractionDigits": 2 } ] }, - "predicate": "1=1", - "name": { - "en": "test-discount2" - }, - "description": { - "en": "test-discount2" + "predicate": "(product.id = \"{{product-id}}\" and variant.id = 1) or variant.key = \"{{product-variant-key}}\"", + "sortOrder": "0.9534", + "isActive": true, + "references": [ + { + "typeId": "product", + "id": "464af704-78f7-4d39-9a1c-d00a6f3234b3" + } + ], + "createdAt": "2024-11-21T10:44:07.587Z", + "lastModifiedAt": "2024-11-21T10:44:07.587Z", + "lastModifiedBy": { + "clientId": "{{client-id}}", + "isPlatformClient": false }, - "isActive": false, - "sortOrder": "0.9478", - "references": [], - "createdAt": "2016-02-24T10:25:04.206Z", - "lastModifiedAt": "2016-02-24T10:25:04.295Z" + "createdBy": { + "clientId": "{{client-id}}", + "isPlatformClient": false + } } ] } diff --git a/api-specs/api/examples/standalone-price-create.example.json b/api-specs/api/examples/standalone-price-create.example.json index 8b60a75f7..63cb3024e 100644 --- a/api-specs/api/examples/standalone-price-create.example.json +++ b/api-specs/api/examples/standalone-price-create.example.json @@ -1,7 +1,23 @@ { - "sku": "PT974SKT", + "key": "red-jacket-de-price", + "sku": "A0E200000002E49", "value": { "currencyCode": "EUR", "centAmount": 10000 - } + }, + "country": "DE", + "customerGroup": { + "typeId": "customer-group", + "id": "{{customer-group-id}}" + }, + "tiers": [ + { + "minimumQuantity": 10, + "value": { + "currencyCode": "EUR", + "centAmount": 9000 + } + } + ], + "active": true } diff --git a/api-specs/api/examples/standalone-price-update.example.json b/api-specs/api/examples/standalone-price-update.example.json index fbe43a9ff..4689564ef 100644 --- a/api-specs/api/examples/standalone-price-update.example.json +++ b/api-specs/api/examples/standalone-price-update.example.json @@ -4,7 +4,7 @@ "action": "changeValue", "value": { "currencyCode": "EUR", - "centAmount": 10000 + "centAmount": 15000 } }] } diff --git a/api-specs/api/examples/standalone-price-updated.example.json b/api-specs/api/examples/standalone-price-updated.example.json new file mode 100644 index 000000000..e8945da62 --- /dev/null +++ b/api-specs/api/examples/standalone-price-updated.example.json @@ -0,0 +1,39 @@ +{ + "id": "{{standalone-price-id}}", + "version": 2, + "key": "red-jacket-de-price", + "sku": "A0E200000002E49", + "value": { + "type": "centPrecision", + "currencyCode": "EUR", + "centAmount": 15000, + "fractionDigits": 2 + }, + "country": "DE", + "customerGroup": { + "typeId": "customer-group", + "id": "{{customer-group-id}}" + }, + "tiers": [ + { + "minimumQuantity": 10, + "value": { + "type": "centPrecision", + "currencyCode": "EUR", + "centAmount": 9000, + "fractionDigits": 2 + } + } + ], + "active": true, + "createdAt": "2024-11-21T14:37:09.288Z", + "lastModifiedAt": "2024-11-21T14:37:09.288Z", + "lastModifiedBy": { + "clientId": "{{client-id}}", + "isPlatformClient": false + }, + "createdBy": { + "clientId": "{{client-id}}", + "isPlatformClient": false + } +} diff --git a/api-specs/api/examples/standalone-price.example.json b/api-specs/api/examples/standalone-price.example.json index e7237f8b4..df4ce8613 100644 --- a/api-specs/api/examples/standalone-price.example.json +++ b/api-specs/api/examples/standalone-price.example.json @@ -1,22 +1,39 @@ { - "id": "3f8812c6-88e8-11ec-a8a3-0242ac120002", + "id": "{{standalone-price-id}}", "version": 1, - "sku": "PT974SKT", + "key": "red-jacket-de-price", + "sku": "A0E200000002E49", "value": { - "type": "centPrecision", - "currencyCode": "EUR", - "centAmount": 10000, - "fractionDigits": 2 - }, - "staged": { - "value": { "type": "centPrecision", "currencyCode": "EUR", - "centAmount": 20000, + "centAmount": 10000, "fractionDigits": 2 - } }, + "country": "DE", + "customerGroup": { + "typeId": "customer-group", + "id": "{{customer-group-id}}" + }, + "tiers": [ + { + "minimumQuantity": 10, + "value": { + "type": "centPrecision", + "currencyCode": "EUR", + "centAmount": 9000, + "fractionDigits": 2 + } + } + ], "active": true, - "createdAt": "2022-05-09T08:29:13.253Z", - "lastModifiedAt": "2022-05-09T12:36:55.401Z" + "createdAt": "2024-11-21T14:37:09.288Z", + "lastModifiedAt": "2024-11-21T14:37:09.288Z", + "lastModifiedBy": { + "clientId": "{{client-id}}", + "isPlatformClient": false + }, + "createdBy": { + "clientId": "{{client-id}}", + "isPlatformClient": false + } } diff --git a/api-specs/api/examples/standalone-prices.example.json b/api-specs/api/examples/standalone-prices.example.json index 6dd473161..a9655a8a0 100644 --- a/api-specs/api/examples/standalone-prices.example.json +++ b/api-specs/api/examples/standalone-prices.example.json @@ -1,46 +1,47 @@ { "limit": 20, "offset": 0, - "count": 2, - "total": 2, + "count": 1, + "total": 1, "results": [ { - "id": "3f8812c6-88e8-11ec-a8a3-0242ac120002", + "id": "{{standalone-price-id}}", "version": 1, - "sku": "PT974SKT", + "key": "red-jacket-de-price", + "sku": "A0E200000002E49", "value": { "type": "centPrecision", "currencyCode": "EUR", "centAmount": 10000, "fractionDigits": 2 }, - "active": true, - "createdAt": "2022-05-09T08:29:13.253Z", - "lastModifiedAt": "2022-05-09T12:36:55.401Z" - }, - { - "id": "9d73608c-88ea-11ec-a8a3-0242ac120002", - "version": 1, - "key": "random-key-12345", - "sku": "PT562ZTB", - "value": { - "type": "centPrecision", - "currencyCode": "USD", - "centAmount": 15000, - "fractionDigits": 2 - }, "country": "DE", - "channel": { - "typeId": "channel", - "id": "2ae21284-88ea-11ec-a8a3-0242ac120002" - }, "customerGroup": { - "typeId": "customer-group", - "id": "15a1678a-88ea-11ec-a8a3-0242ac120002" + "typeId": "customer-group" , + "id" : "{{customer-group-id}}" }, + "tiers": [ + { + "minimumQuantity": 10, + "value": { + "type": "centPrecision", + "currencyCode": "EUR", + "centAmount": 9000, + "fractionDigits": 2 + } + } + ], "active": true, - "createdAt": "2022-05-09T09:29:13.253Z", - "lastModifiedAt": "2022-05-09T10:36:55.401Z" + "createdAt": "2024-11-21T14:37:09.288Z", + "lastModifiedAt": "2024-11-21T14:37:09.288Z", + "lastModifiedBy": { + "clientId": "{{client-id}}", + "isPlatformClient": false + }, + "createdBy": { + "clientId": "{{client-id}}", + "isPlatformClient": false + } } ] } diff --git a/api-specs/api/resources/cart-discounts.raml b/api-specs/api/resources/cart-discounts.raml index 736a52e46..1968d4060 100644 --- a/api-specs/api/resources/cart-discounts.raml +++ b/api-specs/api/resources/cart-discounts.raml @@ -109,7 +109,7 @@ post: 200: body: application/json: - example: !include ../examples/cart-discount.example.json + example: !include ../examples/cart-discount-updated.example.json delete: securedBy: [ @@ -178,7 +178,7 @@ post: 200: body: application/json: - example: !include ../examples/cart-discount.example.json + example: !include ../examples/cart-discount-updated.example.json delete: securedBy: [ diff --git a/api-specs/api/resources/discount-codes.raml b/api-specs/api/resources/discount-codes.raml index 1d33fd54c..62e387368 100644 --- a/api-specs/api/resources/discount-codes.raml +++ b/api-specs/api/resources/discount-codes.raml @@ -67,7 +67,7 @@ post: 200: body: application/json: - example: !include ../examples/discount-code.example.json + example: !include ../examples/discount-code-updated.example.json delete: is: - dataErasure @@ -109,7 +109,7 @@ post: 200: body: application/json: - example: !include ../examples/discount-code.example.json + example: !include ../examples/discount-code-updated.example.json delete: is: - dataErasure diff --git a/api-specs/api/resources/product-discounts.raml b/api-specs/api/resources/product-discounts.raml index adcf2cd37..eb55252f4 100644 --- a/api-specs/api/resources/product-discounts.raml +++ b/api-specs/api/resources/product-discounts.raml @@ -45,18 +45,7 @@ post: body: application/json: type: ProductDiscountMatchQuery - example: | - { - "productId": "123456", - "variantId": 1, - "staged": false, - "price": { - "value": { - "centAmount": 100, - "currencyCode": "EUR" - } - } - } + example: !include ../examples/ProductDiscount/ProductDiscountMatchQuery.json responses: 200: body: @@ -94,7 +83,7 @@ post: 200: body: application/json: - example: !include ../examples/product-discount.example.json + example: !include ../examples/product-discount-updated.example.json delete: securedBy: [oauth_2_0: { scopes: ['manage_products:{projectKey}'] }] responses: @@ -128,7 +117,7 @@ post: 200: body: application/json: - example: !include ../examples/product-discount.example.json + example: !include ../examples/product-discount-updated.example.json delete: securedBy: [oauth_2_0: { scopes: ['manage_products:{projectKey}'] }] responses: diff --git a/api-specs/api/resources/standalone-prices.raml b/api-specs/api/resources/standalone-prices.raml index 6deec7de0..a1e18306e 100644 --- a/api-specs/api/resources/standalone-prices.raml +++ b/api-specs/api/resources/standalone-prices.raml @@ -66,7 +66,7 @@ post: 200: body: application/json: - example: !include ../examples/standalone-price.example.json + example: !include ../examples/standalone-price-updated.example.json delete: description: | Produces the [StandalonePriceDeleted](ctp:api:type:StandalonePriceDeletedMessage) Message. @@ -104,7 +104,7 @@ post: 200: body: application/json: - example: !include ../examples/standalone-price.example.json + example: !include ../examples/standalone-price-updated.example.json delete: description: | Produces the [StandalonePriceDeleted](ctp:api:type:StandalonePriceDeletedMessage) Message. diff --git a/api-specs/api/types/cart-discount/CartDiscount.raml b/api-specs/api/types/cart-discount/CartDiscount.raml index 56fec671a..f7eddb9f6 100644 --- a/api-specs/api/types/cart-discount/CartDiscount.raml +++ b/api-specs/api/types/cart-discount/CartDiscount.raml @@ -3,6 +3,7 @@ displayName: CartDiscount (updateType): CartDiscountUpdate type: BaseResource +example: !include ../../examples/cart-discount.example.json properties: id: (identifier): true diff --git a/api-specs/api/types/cart-discount/CartDiscountCustomLineItemsTarget.raml b/api-specs/api/types/cart-discount/CartDiscountCustomLineItemsTarget.raml index da874a286..cabd14bdd 100644 --- a/api-specs/api/types/cart-discount/CartDiscountCustomLineItemsTarget.raml +++ b/api-specs/api/types/cart-discount/CartDiscountCustomLineItemsTarget.raml @@ -3,6 +3,7 @@ type: CartDiscountTarget displayName: CartDiscountCustomLineItemsTarget discriminatorValue: customLineItems +example: !include ../../examples/CartDiscount/CartDiscountCustomLineItemsTarget.json description: | Discount is applied to [CustomLineItems](ctp:api:type:CustomLineItem) matching the `predicate`. properties: diff --git a/api-specs/api/types/cart-discount/CartDiscountDraft.raml b/api-specs/api/types/cart-discount/CartDiscountDraft.raml index 56e32ab2d..71056288e 100644 --- a/api-specs/api/types/cart-discount/CartDiscountDraft.raml +++ b/api-specs/api/types/cart-discount/CartDiscountDraft.raml @@ -2,6 +2,7 @@ (package): CartDiscount displayName: CartDiscountDraft type: object +example: !include ../../examples/cart-discount-create.example.json properties: name: type: LocalizedString diff --git a/api-specs/api/types/cart-discount/CartDiscountLineItemsTarget.raml b/api-specs/api/types/cart-discount/CartDiscountLineItemsTarget.raml index c8d97d74e..62028e4b0 100644 --- a/api-specs/api/types/cart-discount/CartDiscountLineItemsTarget.raml +++ b/api-specs/api/types/cart-discount/CartDiscountLineItemsTarget.raml @@ -3,6 +3,7 @@ type: CartDiscountTarget displayName: CartDiscountLineItemsTarget discriminatorValue: lineItems +example: !include ../../examples/CartDiscount/CartDiscountLineItemsTarget.json description: | Discount is applied to [LineItems](ctp:api:type:LineItem) matching the `predicate`. properties: diff --git a/api-specs/api/types/cart-discount/CartDiscountShippingCostTarget.raml b/api-specs/api/types/cart-discount/CartDiscountShippingCostTarget.raml index ad49573ae..169a89536 100644 --- a/api-specs/api/types/cart-discount/CartDiscountShippingCostTarget.raml +++ b/api-specs/api/types/cart-discount/CartDiscountShippingCostTarget.raml @@ -3,5 +3,6 @@ type: CartDiscountTarget displayName: CartDiscountShippingCostTarget discriminatorValue: shipping +example: !include ../../examples/CartDiscount/CartDiscountShippingCostTarget.json description: | Discount is applied to the shipping costs of the [Cart](ctp:api:type:Cart). diff --git a/api-specs/api/types/cart-discount/CartDiscountTotalPriceTarget.raml b/api-specs/api/types/cart-discount/CartDiscountTotalPriceTarget.raml index 6a383ac40..725053233 100644 --- a/api-specs/api/types/cart-discount/CartDiscountTotalPriceTarget.raml +++ b/api-specs/api/types/cart-discount/CartDiscountTotalPriceTarget.raml @@ -3,5 +3,6 @@ type: CartDiscountTarget displayName: CartDiscountTotalPriceTarget discriminatorValue: totalPrice +example: !include ../../examples/CartDiscount/CartDiscountTotalPriceTarget.json description: | Discount is applied to the total price of the [Cart](ctp:api:type:Cart). diff --git a/api-specs/api/types/cart-discount/CartDiscountValueAbsolute.raml b/api-specs/api/types/cart-discount/CartDiscountValueAbsolute.raml index 2028a6a62..30704724c 100644 --- a/api-specs/api/types/cart-discount/CartDiscountValueAbsolute.raml +++ b/api-specs/api/types/cart-discount/CartDiscountValueAbsolute.raml @@ -3,6 +3,7 @@ type: CartDiscountValue displayName: CartDiscountValueAbsolute discriminatorValue: absolute +example: !include ../../examples/CartDiscount/CartDiscountValueAbsolute.json description: | Discounts the [CartDiscountTarget](ctp:api:type:CartDiscountTarget) by an absolute amount (not allowed for [MultiBuyLineItemsTarget](ctp:api:type:MultiBuyLineItemsTarget) and [MultiBuyCustomLineItemsTarget](ctp:api:type:MultiBuyCustomLineItemsTarget)). properties: diff --git a/api-specs/api/types/cart-discount/CartDiscountValueAbsoluteDraft.raml b/api-specs/api/types/cart-discount/CartDiscountValueAbsoluteDraft.raml index 6b39554f1..ab46469b1 100644 --- a/api-specs/api/types/cart-discount/CartDiscountValueAbsoluteDraft.raml +++ b/api-specs/api/types/cart-discount/CartDiscountValueAbsoluteDraft.raml @@ -3,6 +3,7 @@ type: CartDiscountValueDraft displayName: CartDiscountValueAbsoluteDraft discriminatorValue: absolute +example: !include ../../examples/CartDiscount/CartDiscountValueAbsoluteDraft.json properties: money: type: Money[] diff --git a/api-specs/api/types/cart-discount/CartDiscountValueFixed.raml b/api-specs/api/types/cart-discount/CartDiscountValueFixed.raml index 66f9b2db0..e41f05753 100644 --- a/api-specs/api/types/cart-discount/CartDiscountValueFixed.raml +++ b/api-specs/api/types/cart-discount/CartDiscountValueFixed.raml @@ -3,6 +3,7 @@ type: CartDiscountValue displayName: CartDiscountValueFixed discriminatorValue: fixed +example: !include ../../examples/CartDiscount/CartDiscountValueFixed.json description: | Sets the [DiscountedLineItemPrice](ctp:api:type:DiscountedLineItemPrice) of the [CartDiscountLineItemsTarget](ctp:api:type:CartDiscountLineItemsTarget) or [CartDiscountCustomLineItemsTarget](ctp:api:type:CartDiscountCustomLineItemsTarget) to the value specified in the `money` field, if it is lower than the current Line Item price for the same currency. If the Line Item price is already discounted to a price equal to or lower than the respective price in the `money` field, this Discount is not applied. If the `quantity` of the Line Item eligible for the Discount is greater than `1`, the fixed price discount is only applied to the Line Item portion for which the `money` value is lesser than their current price. properties: diff --git a/api-specs/api/types/cart-discount/CartDiscountValueFixedDraft.raml b/api-specs/api/types/cart-discount/CartDiscountValueFixedDraft.raml index 21a07730f..f4e163e3f 100644 --- a/api-specs/api/types/cart-discount/CartDiscountValueFixedDraft.raml +++ b/api-specs/api/types/cart-discount/CartDiscountValueFixedDraft.raml @@ -3,6 +3,7 @@ type: CartDiscountValueDraft displayName: CartDiscountValueFixedDraft discriminatorValue: fixed +example: !include ../../examples/CartDiscount/CartDiscountValueFixedDraft.json description: | Sets the [DiscountedLineItemPrice](ctp:api:type:DiscountedLineItemPrice) of the [CartDiscountLineItemsTarget](ctp:api:type:CartDiscountLineItemsTarget) or [CartDiscountCustomLineItemsTarget](ctp:api:type:CartDiscountCustomLineItemsTarget) to the value specified in the `money` field, if it is lower than the current Line Item price for the same currency. If the Line Item price is already discounted to a price equal to or lower than the respective price in the `money` field, this Discount is not applied. properties: diff --git a/api-specs/api/types/cart-discount/CartDiscountValueGiftLineItem.raml b/api-specs/api/types/cart-discount/CartDiscountValueGiftLineItem.raml index 34c177e43..898326cf5 100644 --- a/api-specs/api/types/cart-discount/CartDiscountValueGiftLineItem.raml +++ b/api-specs/api/types/cart-discount/CartDiscountValueGiftLineItem.raml @@ -3,6 +3,7 @@ type: CartDiscountValue displayName: CartDiscountValueGiftLineItem discriminatorValue: giftLineItem +example: !include ../../examples/CartDiscount/CartDiscountValueGiftLineItem.json properties: product: type: ProductReference diff --git a/api-specs/api/types/cart-discount/CartDiscountValueGiftLineItemDraft.raml b/api-specs/api/types/cart-discount/CartDiscountValueGiftLineItemDraft.raml index ec2212be9..9e5c12fcb 100644 --- a/api-specs/api/types/cart-discount/CartDiscountValueGiftLineItemDraft.raml +++ b/api-specs/api/types/cart-discount/CartDiscountValueGiftLineItemDraft.raml @@ -3,6 +3,7 @@ type: CartDiscountValueDraft displayName: CartDiscountValueGiftLineItemDraft discriminatorValue: giftLineItem +example: !include ../../examples/CartDiscount/CartDiscountValueGiftLineItem.json description: | Can only be used in a [CartDiscountDraft](ctp:api:type:CartDiscountDraft) with no `target` specified. Hence, this type can not be used in the [Change Value](ctp:api:type:CartDiscountChangeValueAction) update action. diff --git a/api-specs/api/types/cart-discount/CartDiscountValueRelative.raml b/api-specs/api/types/cart-discount/CartDiscountValueRelative.raml index f2c2aab00..ae19d46e2 100644 --- a/api-specs/api/types/cart-discount/CartDiscountValueRelative.raml +++ b/api-specs/api/types/cart-discount/CartDiscountValueRelative.raml @@ -3,6 +3,7 @@ type: CartDiscountValue displayName: CartDiscountValueRelative discriminatorValue: relative +example: !include ../../examples/CartDiscount/CartDiscountValueRelative.json description: | Discounts the [CartDiscountTarget](ctp:api:type:CartDiscountTarget) relative to its price. properties: diff --git a/api-specs/api/types/cart-discount/CartDiscountValueRelativeDraft.raml b/api-specs/api/types/cart-discount/CartDiscountValueRelativeDraft.raml index ca115aa40..1706badc6 100644 --- a/api-specs/api/types/cart-discount/CartDiscountValueRelativeDraft.raml +++ b/api-specs/api/types/cart-discount/CartDiscountValueRelativeDraft.raml @@ -3,6 +3,7 @@ type: CartDiscountValueDraft displayName: CartDiscountValueRelativeDraft discriminatorValue: relative +example: !include ../../examples/CartDiscount/CartDiscountValueRelative.json properties: permyriad: type: number diff --git a/api-specs/api/types/cart-discount/MultiBuyCustomLineItemsTarget.raml b/api-specs/api/types/cart-discount/MultiBuyCustomLineItemsTarget.raml index 78c48b7a8..c568c0028 100644 --- a/api-specs/api/types/cart-discount/MultiBuyCustomLineItemsTarget.raml +++ b/api-specs/api/types/cart-discount/MultiBuyCustomLineItemsTarget.raml @@ -3,6 +3,7 @@ type: CartDiscountTarget displayName: MultiBuyCustomLineItemsTarget discriminatorValue: multiBuyCustomLineItems +example: !include ../../examples/CartDiscount/CartDiscountMultiBuyCustomLineItemsTarget.json description: | This Discount target is similar to `MultiBuyLineItems`, but is applied on Custom Line Items instead of Line Items. properties: diff --git a/api-specs/api/types/cart-discount/MultiBuyLineItemsTarget.raml b/api-specs/api/types/cart-discount/MultiBuyLineItemsTarget.raml index 3f5e746a8..b10c97cc0 100644 --- a/api-specs/api/types/cart-discount/MultiBuyLineItemsTarget.raml +++ b/api-specs/api/types/cart-discount/MultiBuyLineItemsTarget.raml @@ -3,6 +3,7 @@ type: CartDiscountTarget displayName: MultiBuyLineItemsTarget discriminatorValue: multiBuyLineItems +example: !include ../../examples/CartDiscount/CartDiscountMultiBuyLineItemsTarget.json properties: predicate: type: string diff --git a/api-specs/api/types/common/QueryPrice.raml b/api-specs/api/types/common/QueryPrice.raml index b009b3e07..0731fcb23 100644 --- a/api-specs/api/types/common/QueryPrice.raml +++ b/api-specs/api/types/common/QueryPrice.raml @@ -3,6 +3,7 @@ displayName: QueryPrice type: object (expandable): true +example: !include ../../examples/ProductDiscount/ProductDiscountQueryPrice.json properties: id?: type: string diff --git a/api-specs/api/types/discount-code/DiscountCode.raml b/api-specs/api/types/discount-code/DiscountCode.raml index cca8bda39..3588d0419 100644 --- a/api-specs/api/types/discount-code/DiscountCode.raml +++ b/api-specs/api/types/discount-code/DiscountCode.raml @@ -3,6 +3,7 @@ type: BaseResource displayName: DiscountCode (updateType): DiscountCodeUpdate +example: !include ../../examples/discount-code.example.json properties: id: (identifier): true diff --git a/api-specs/api/types/discount-code/DiscountCodeDraft.raml b/api-specs/api/types/discount-code/DiscountCodeDraft.raml index 5d8f35d08..a39953428 100644 --- a/api-specs/api/types/discount-code/DiscountCodeDraft.raml +++ b/api-specs/api/types/discount-code/DiscountCodeDraft.raml @@ -2,6 +2,7 @@ (package): DiscountCode type: object displayName: DiscountCodeDraft +example: !include ../../examples/discount-code-create.example.json properties: key?: type: string diff --git a/api-specs/api/types/product-discount/ProductDiscountMatchQuery.raml b/api-specs/api/types/product-discount/ProductDiscountMatchQuery.raml index ce37040c2..b0c064fd9 100644 --- a/api-specs/api/types/product-discount/ProductDiscountMatchQuery.raml +++ b/api-specs/api/types/product-discount/ProductDiscountMatchQuery.raml @@ -2,6 +2,7 @@ (package): ProductDiscount type: object displayName: ProductDiscountMatchQuery +example: !include ../../examples/ProductDiscount/ProductDiscountMatchQuery.json properties: productId: type: string diff --git a/api-specs/api/types/product-discount/ProductDiscountPagedQueryResponse.raml b/api-specs/api/types/product-discount/ProductDiscountPagedQueryResponse.raml index 775c5a046..996c3ba0f 100644 --- a/api-specs/api/types/product-discount/ProductDiscountPagedQueryResponse.raml +++ b/api-specs/api/types/product-discount/ProductDiscountPagedQueryResponse.raml @@ -2,7 +2,6 @@ (package): ProductDiscount displayName: ProductDiscountPagedQueryResponse type: object -example: !include ../../examples/product-discounts.example.json description: | [PagedQueryResult](/../api/general-concepts#pagedqueryresult) with results containing an array of [ProductDiscount](ctp:api:type:ProductDiscount). properties: diff --git a/api-specs/api/types/product-discount/ProductDiscountValueAbsolute.raml b/api-specs/api/types/product-discount/ProductDiscountValueAbsolute.raml index 89addaa05..ca4ec0865 100644 --- a/api-specs/api/types/product-discount/ProductDiscountValueAbsolute.raml +++ b/api-specs/api/types/product-discount/ProductDiscountValueAbsolute.raml @@ -3,6 +3,7 @@ type: ProductDiscountValue displayName: ProductDiscountValueAbsolute discriminatorValue: absolute +example: !include ../../examples/ProductDiscount/ProductDiscountValueAbsolute.json description: Discounts the Product's Price by a fixed amount, defined by the `money` field. properties: money: diff --git a/api-specs/api/types/product-discount/ProductDiscountValueAbsoluteDraft.raml b/api-specs/api/types/product-discount/ProductDiscountValueAbsoluteDraft.raml index 15897d0f4..5a0e9d2aa 100644 --- a/api-specs/api/types/product-discount/ProductDiscountValueAbsoluteDraft.raml +++ b/api-specs/api/types/product-discount/ProductDiscountValueAbsoluteDraft.raml @@ -3,6 +3,7 @@ type: ProductDiscountValueDraft displayName: ProductDiscountValueAbsoluteDraft discriminatorValue: absolute +example: !include ../../examples/ProductDiscount/ProductDiscountValueAbsoluteDraft.json description: | Discounts the Product Price by a fixed amount, defined by the `money` field. properties: diff --git a/api-specs/api/types/product-discount/ProductDiscountValueExternal.raml b/api-specs/api/types/product-discount/ProductDiscountValueExternal.raml index 9a33b96a9..58b742f5d 100644 --- a/api-specs/api/types/product-discount/ProductDiscountValueExternal.raml +++ b/api-specs/api/types/product-discount/ProductDiscountValueExternal.raml @@ -2,6 +2,7 @@ (package): ProductDiscount type: ProductDiscountValue displayName: ProductDiscountValueExternal +example: !include ../../examples/ProductDiscount/ProductDiscountValueExternal.json discriminatorValue: external description: | Discounts the Product Price by allowing the client to explicitly [set a discounted value](ctp:api:type:ProductSetDiscountedPriceAction). diff --git a/api-specs/api/types/product-discount/ProductDiscountValueExternalDraft.raml b/api-specs/api/types/product-discount/ProductDiscountValueExternalDraft.raml index d7e5e94c3..5add50fe9 100644 --- a/api-specs/api/types/product-discount/ProductDiscountValueExternalDraft.raml +++ b/api-specs/api/types/product-discount/ProductDiscountValueExternalDraft.raml @@ -3,6 +3,7 @@ type: ProductDiscountValueDraft displayName: ProductDiscountValueExternalDraft discriminatorValue: external +example: !include ../../examples/ProductDiscount/ProductDiscountValueExternal.json description: | Discounts the Product Price by allowing the client to explicitly [set a discounted value](ctp:api:type:ProductSetDiscountedPriceAction). Use this when setting discounts using an external service. diff --git a/api-specs/api/types/product-discount/ProductDiscountValueRelative.raml b/api-specs/api/types/product-discount/ProductDiscountValueRelative.raml index 00e97b028..77b0e9cf2 100644 --- a/api-specs/api/types/product-discount/ProductDiscountValueRelative.raml +++ b/api-specs/api/types/product-discount/ProductDiscountValueRelative.raml @@ -3,6 +3,7 @@ type: ProductDiscountValue displayName: ProductDiscountValueRelative discriminatorValue: relative +example: !include ../../examples/ProductDiscount/ProductDiscountValueRelative.json description: Discounts the product price by a percentage, defined by the `permyriad` field. properties: permyriad: diff --git a/api-specs/api/types/product-discount/ProductDiscountValueRelativeDraft.raml b/api-specs/api/types/product-discount/ProductDiscountValueRelativeDraft.raml index 9e9800db3..4bc4d8ba8 100644 --- a/api-specs/api/types/product-discount/ProductDiscountValueRelativeDraft.raml +++ b/api-specs/api/types/product-discount/ProductDiscountValueRelativeDraft.raml @@ -3,6 +3,7 @@ type: ProductDiscountValueDraft displayName: ProductDiscountValueRelativeDraft discriminatorValue: relative +example: !include ../../examples/ProductDiscount/ProductDiscountValueRelative.json description: | Discounts the Product Price by a percentage, defined by the `permyriad` field. properties: diff --git a/api-specs/api/types/standalone-price/StandalonePrice.raml b/api-specs/api/types/standalone-price/StandalonePrice.raml index 5c6d2d906..51562aa5b 100644 --- a/api-specs/api/types/standalone-price/StandalonePrice.raml +++ b/api-specs/api/types/standalone-price/StandalonePrice.raml @@ -3,6 +3,7 @@ type: BaseResource displayName: StandalonePrice (updateType): StandalonePriceUpdate +example: !include ../../examples/standalone-price.example.json properties: id: (identifier): true diff --git a/api-specs/api/types/standalone-price/StandalonePriceDraft.raml b/api-specs/api/types/standalone-price/StandalonePriceDraft.raml index 5c2a33cc9..6ad77f680 100644 --- a/api-specs/api/types/standalone-price/StandalonePriceDraft.raml +++ b/api-specs/api/types/standalone-price/StandalonePriceDraft.raml @@ -2,6 +2,7 @@ (package): StandalonePrice displayName: StandalonePriceDraft type: object +example: !include ../../examples/standalone-price-create.example.json properties: key?: type: string