Skip to content
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
4a7ede4
[PHP API] Discounts (#2763)
mnocon Jun 9, 2025
874c51f
Discount product guide
mnocon Jun 3, 2025
71a691a
Fixed links and navigation
mnocon Jun 4, 2025
a347f04
Removed nav
mnocon Jun 4, 2025
5291573
Fixed links
mnocon Jun 4, 2025
b1f437e
Fixed typo
mnocon Jun 4, 2025
32ed031
Fixed badges
mnocon Jun 4, 2025
093336d
Removed whitespace
mnocon Jun 4, 2025
e37ffdc
Fixes before review
mnocon Jun 4, 2025
6ad81e4
After review fixes
mnocon Jun 9, 2025
89bfa6d
Currency remark
mnocon Jun 9, 2025
80fbf92
Discount migrations (#2768)
mnocon Jun 9, 2025
2194538
Applied suggestions from code review (#2767)
mnocon Jun 10, 2025
36a061d
[Discounts] Search overview (#2773)
mnocon Jun 11, 2025
c83a365
[Discounts] Event reference (#2776)
mnocon Jun 11, 2025
df345d6
[Discounts] Mentioned discounts in pricing and customer groups (#2775)
mnocon Jun 11, 2025
d290ecd
[Discounts] Discount policies (#2771)
mnocon Jun 11, 2025
478faec
Discounts update (#2774)
mnocon Jun 11, 2025
ec4df5b
Discount codes
mnocon Jun 10, 2025
23e31e3
[Discounts] REST API Reference
mnocon Jun 10, 2025
bed2686
Selfreview
mnocon Jun 10, 2025
dbe237f
Update docs/api/rest_api/rest_api_reference/input/ibexa-discounts.raml
mnocon Jun 11, 2025
01e4593
Regenerated
mnocon Jun 11, 2025
5378b3b
Merge remote-tracking branch 'origin/4.6' into discounts-rest
mnocon Jun 11, 2025
4d2f690
Review fixes
mnocon Jun 15, 2025
ce8fbc5
Merge branch '4.6' into discounts-rest
adriendupuis Jun 16, 2025
6e427e6
ibexa_dxp_v4.6.md: Link to Discounts REST API Ref
adriendupuis Jun 16, 2025
a26ec1f
Merge remote-tracking branch 'origin/discounts-rest' into discounts-rest
adriendupuis Jun 16, 2025
9526b85
Generate REST API ref
adriendupuis Jun 16, 2025
ca47e18
[Discounts] Described Discounts API (#2783)
mnocon Jun 16, 2025
78781df
[Discounts] Configuration (#2781)
mnocon Jun 16, 2025
946e27b
discounts.md: Change cards layout
adriendupuis Jun 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"DiscountCode": {
"code": "summer10"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"DiscountCode": {
"_media-type": "application\/vnd.ibexa.api.DiscountCode+json",
"id": 1,
"code": "summer10",
"created_at": {
"date": "2025-06-10 14:14:06.000000",
"timezone_type": 3,
"timezone": "UTC"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"Discount": {
"_media-type": "application/vnd.ibexa.api.Discount+json",
"id": 1,
"identifier": "summersale2025",
"name": "SummerSale2025",
"type": "catalog",
"label": "Summer Sale 2025",
"labelDescription": "Summer Sale 2025",
"priority": 1,
"isEnabled": true,
"createdAt": "2025-06-10T09:43:42+00:00",
"updatedAt": "2025-06-10T09:48:23+00:00",
"startDate": "2025-07-01T09:34:19+00:00",
"endDate": "2025-07-31T12:00:00+00:00",
"DiscountExpressionAware": {
"_media-type": "application/vnd.ibexa.api.DiscountExpressionAware+json",
"expressionValues": {
"discount_amount": "10"
}
},
"DiscountConditions": [
{
"_media-type": "application/vnd.ibexa.api.DiscountExpressionAware+json",
"expressionValues": {
"currency_code": "USD"
}
}
],
"DiscountTranslations": [
{
"_media-type": "application/vnd.ibexa.api.DiscountTranslation+json",
"languageCode": {},
"name": "SummerSale2025",
"description": null,
"label": "Summer Sale 2025",
"labelDescription": "Summer Sale 2025"
}
]
},
"isDiscountCodeAware": {
"_media-type": "application/vnd.ibexa.api.isDiscountCodeAware+json",
"isDiscountCodeAware": false
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
{
"DiscountList": {
"_media-type": "application/vnd.ibexa.api.DiscountList+json",
"Discount": [
{
"_media-type": "application/vnd.ibexa.api.Discount+json",
"id": 1,
"identifier": "summersale2025",
"name": "SummerSale2025",
"type": "catalog",
"label": "Summer Sale 2025",
"labelDescription": "Summer Sale 2025",
"priority": 1,
"isEnabled": true,
"createdAt": "2025-06-10T09:43:42+00:00",
"updatedAt": "2025-06-10T09:48:23+00:00",
"startDate": "2025-07-01T09:34:19+00:00",
"endDate": "2025-07-31T12:00:00+00:00",
"DiscountExpressionAware": {
"_media-type": "application/vnd.ibexa.api.DiscountExpressionAware+json",
"expressionValues": {
"discount_amount": "10"
}
},
"DiscountConditions": [
{
"_media-type": "application/vnd.ibexa.api.DiscountExpressionAware+json",
"expressionValues": {
"currency_code": "USD"
}
}
],
"DiscountTranslations": [
{
"_media-type": "application/vnd.ibexa.api.DiscountTranslation+json",
"languageCode": {},
"name": "SummerSale2025",
"description": null,
"label": "Summer Sale 2025",
"labelDescription": "Summer Sale 2025"
}
]
},
{
"_media-type": "application/vnd.ibexa.api.isDiscountCodeAware+json",
"isDiscountCodeAware": false
},
{
"_media-type": "application/vnd.ibexa.api.Discount+json",
"id": 2,
"identifier": "my_discount",
"name": "Another discount",
"type": "cart",
"label": "another",
"labelDescription": "another label description",
"priority": 10,
"isEnabled": false,
"createdAt": "2025-06-10T11:03:37+00:00",
"updatedAt": "2025-06-10T14:14:06+00:00",
"startDate": "2025-04-01T12:12:12+00:00",
"DiscountExpressionAware": {
"_media-type": "application/vnd.ibexa.api.DiscountExpressionAware+json",
"expressionValues": {
"discount_percentage": "10"
}
},
"DiscountConditions": [
{
"_media-type": "application/vnd.ibexa.api.DiscountExpressionAware+json",
"expressionValues": {
"discount_code": "my_secret_code",
"usage_count": 1
}
},
{
"_media-type": "application/vnd.ibexa.api.DiscountExpressionAware+json",
"expressionValues": {
"categories": [
1,
3
]
}
}
],
"DiscountTranslations": [
{
"_media-type": "application/vnd.ibexa.api.DiscountTranslation+json",
"languageCode": {},
"name": "Another discount",
"description": "another great discount",
"label": "another",
"labelDescription": "another label description"
}
]
},
{
"_media-type": "application/vnd.ibexa.api.isDiscountCodeAware+json",
"isDiscountCodeAware": true
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"DiscountCreate": {
"identifier": "my_discount",
"type": "cart",
"priority": 10,
"isEnabled": true,
"userId": 14,
"rule": {
"type": "percentage",
"amount": 10
},
"startDate": "2025-04-01 12:12:12",
"translations": [
{
"languageCode": "eng-GB",
"name": "Another discount",
"description": "another great discount",
"label": "another",
"labelDescription": "another label description"
}
],
"conditions": [
{
"class": "Ibexa\\Discounts\\Value\\DiscountCondition\\IsInCategory",
"parameters": [["1", "2"]]
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"Discount": {
"_media-type": "application/vnd.ibexa.api.Discount+json",
"id": 2,
"identifier": "my_discount",
"name": "Another discount",
"type": "cart",
"label": "another",
"labelDescription": "another label description",
"priority": 10,
"isEnabled": true,
"createdAt": "2025-06-10T11:03:37+00:00",
"updatedAt": "2025-06-10T11:03:37+00:00",
"startDate": "2025-04-01T12:12:12+00:00",
"DiscountExpressionAware": {
"_media-type": "application/vnd.ibexa.api.DiscountExpressionAware+json",
"expressionValues": {
"discount_percentage": "10"
}
},
"DiscountConditions": [
{
"_media-type": "application/vnd.ibexa.api.DiscountExpressionAware+json",
"expressionValues": {
"categories": [
"1",
"2"
]
}
}
],
"DiscountTranslations": [
{
"_media-type": "application/vnd.ibexa.api.DiscountTranslation+json",
"languageCode": {},
"name": "Another discount",
"description": "another great discount",
"label": "another",
"labelDescription": "another label description"
}
]
},
"isDiscountCodeAware": {
"_media-type": "application/vnd.ibexa.api.isDiscountCodeAware+json",
"isDiscountCodeAware": false
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"DiscountUpdate": {
"identifier": "my_discount",
"conditions": [
{
"class": "Ibexa\\Discounts\\Value\\DiscountCondition\\IsInCategory",
"parameters": [["1", "3"]]
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"Discount": {
"_media-type": "application/vnd.ibexa.api.Discount+json",
"id": 2,
"identifier": "my_discount",
"name": "Another discount",
"type": "cart",
"label": "another",
"labelDescription": "another label description",
"priority": 10,
"isEnabled": false,
"createdAt": "2025-06-10T11:03:37+00:00",
"updatedAt": "2025-06-10T13:05:56+00:00",
"startDate": "2025-04-01T12:12:12+00:00",
"DiscountExpressionAware": {
"_media-type": "application/vnd.ibexa.api.DiscountExpressionAware+json",
"expressionValues": {
"discount_percentage": "10"
}
},
"DiscountConditions": [
{
"_media-type": "application/vnd.ibexa.api.DiscountExpressionAware+json",
"expressionValues": {
"categories": [
"1",
"3"
]
}
}
],
"DiscountTranslations": [
{
"_media-type": "application/vnd.ibexa.api.DiscountTranslation+json",
"languageCode": {},
"name": "Another discount",
"description": "another great discount",
"label": "another",
"labelDescription": "another label description"
}
]
},
"isDiscountCodeAware": {
"_media-type": "application/vnd.ibexa.api.isDiscountCodeAware+json",
"isDiscountCodeAware": false
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
displayName: Discount Codes
/{cartIdentifier}:
/apply:
post:
displayName: Apply discount to cart
description: Applies a discount associated with given discount code
headers:
Accept:
description: Specifies the expected response type. Only JSON is supported.
example: |
application/vnd.ibexa.api.DiscountCode+json
Content-Type:
description: Specifies the input type.
example: |
application/vnd.ibexa.api.DiscountCode+json
body:
application/vnd.ibexa.api.DiscountCode+json:
type: DiscountCodeWrapper
example: !include examples/discount_codes/apply/POST/DiscountCode.json.example
responses:
200:
description: Discount applied successfully
body:
application/vnd.ibexa.api.DiscountCode+json:
type: DiscountCodeWrapper
example: !include examples/discount_codes/apply/POST/DiscountCodeResponse.json.example
400:
description: Error - the request is invalid.
404:
description: Error - the given cart identifier was not found, or the discount code does not exist.
429:
description: Error - the request was throttled due to too many requests in a short time.

/drop:
post:
displayName: Remove discount from cart
description: Removes the discount associated with given discount code from the cart
headers:
Accept:
description: Specifies the expected response type. Only JSON is supported.
example: |
application/vnd.ibexa.api.DiscountCode+json
Content-Type:
description: Specifies the input type. Only JSON is supported.
example: |
application/vnd.ibexa.api.DiscountCode+json
body:
application/vnd.ibexa.api.DiscountCode+json:
type: DiscountCodeWrapper
example: !include examples/discount_codes/apply/POST/DiscountCode.json.example
responses:
204:
description: Discount code with given discount code was removed from the cart.
400:
description: Error - the request is invalid.
404:
description: Error - the given cart identifier was not found
Loading