diff --git a/docs/api/rest_api/rest_api_reference/input/examples/cart/POST/Cart.json.example b/docs/api/rest_api/rest_api_reference/input/examples/cart/POST/Cart.json.example
index 5dd41ab8e6..0e4ac28d97 100644
--- a/docs/api/rest_api/rest_api_reference/input/examples/cart/POST/Cart.json.example
+++ b/docs/api/rest_api/rest_api_reference/input/examples/cart/POST/Cart.json.example
@@ -1,22 +1,25 @@
{
"Cart": {
- "_media-type": "application/vnd.ibexa.api.Cart+json",
- "id": 12,
- "identifier": "fafccc4b-cce1-40d7-8d23-29ad41638581",
+ "_media-type": "application\/vnd.ibexa.api.Cart+json",
+ "id": 1,
+ "identifier": "e79b5dba-c701-4c64-8032-73719a513e50",
"name": "Default",
- "createdAt": "2023-10-12T10:02:51+00:00",
- "updatedAt": "2023-10-12T10:02:51+00:00",
+ "createdAt": "2024-09-26T09:16:56+00:00",
+ "updatedAt": "2024-09-26T09:16:56+00:00",
"owner": {
- "_media-type": "application/vnd.ibexa.api.User+json",
- "_href": "/api/ibexa/v2/user/users/14"
+ "_media-type": "application\/vnd.ibexa.api.User+json",
+ "_href": "\/api\/ibexa\/v2\/user\/users\/10"
},
"Currency": {
- "_media-type": "application/vnd.ibexa.api.Currency+json",
+ "_media-type": "application\/vnd.ibexa.api.Currency+json",
"id": 2,
"code": "EUR",
"subunits": 2,
"enabled": true
},
- "entries": []
+ "entries": [],
+ "context": {
+ "foo": "bar"
+ }
}
}
diff --git a/docs/api/rest_api/rest_api_reference/input/examples/cart/POST/Cart.xml.example b/docs/api/rest_api/rest_api_reference/input/examples/cart/POST/Cart.xml.example
new file mode 100644
index 0000000000..f3dcbb558c
--- /dev/null
+++ b/docs/api/rest_api/rest_api_reference/input/examples/cart/POST/Cart.xml.example
@@ -0,0 +1,15 @@
+
+
+ 1
+ e67d8f4c-95b5-423f-89d8-b2b81c37609b
+ Default
+ 2024-09-26T09:16:56+00:00
+ 2024-09-26T09:16:56+00:00
+
+
+ 2
+ EUR
+ 2
+ 1
+
+
diff --git a/docs/api/rest_api/rest_api_reference/input/examples/cart/POST/CartCreate.xml.example b/docs/api/rest_api/rest_api_reference/input/examples/cart/POST/CartCreate.xml.example
new file mode 100644
index 0000000000..035fbd1fad
--- /dev/null
+++ b/docs/api/rest_api/rest_api_reference/input/examples/cart/POST/CartCreate.xml.example
@@ -0,0 +1,4 @@
+
+ Default
+ EUR
+
diff --git a/docs/api/rest_api/rest_api_reference/input/examples/cart/authorize/Token.json.example b/docs/api/rest_api/rest_api_reference/input/examples/cart/authorize/Token.json.example
new file mode 100644
index 0000000000..9b93436da7
--- /dev/null
+++ b/docs/api/rest_api/rest_api_reference/input/examples/cart/authorize/Token.json.example
@@ -0,0 +1,6 @@
+{
+ "Token": {
+ "_media-type": "application\/vnd.ibexa.api.Token+json",
+ "value": "7b19308.RiDPaorwmJRyQoGajJiLMp843r30WaW-PH1CeH4oQyU.dkOXWOuFrvBfDPXY1t27YMx0hvyFH8fPUwoDNRl_D0sWDb4O3bb-20Q32A"
+ }
+}
diff --git a/docs/api/rest_api/rest_api_reference/input/examples/cart/authorize/Token.xml.example b/docs/api/rest_api/rest_api_reference/input/examples/cart/authorize/Token.xml.example
new file mode 100644
index 0000000000..de6ad2f334
--- /dev/null
+++ b/docs/api/rest_api/rest_api_reference/input/examples/cart/authorize/Token.xml.example
@@ -0,0 +1,4 @@
+
+
+ eff5.w9r2Ws_zpjcopNJ8FRNVaplGlx19y4Mp2QP-eQWZDKc.-pe4Pam133xKzKQZLCdiIMkj2EgQ5rMdtlGTEEPPaOyHv6Y1iKTsZ2_OtQ
+
diff --git a/docs/api/rest_api/rest_api_reference/input/examples/cart/identifier/validate/CartConstraintViolationList.json.example b/docs/api/rest_api/rest_api_reference/input/examples/cart/identifier/validate/CartConstraintViolationList.json.example
new file mode 100644
index 0000000000..156e10f5fd
--- /dev/null
+++ b/docs/api/rest_api/rest_api_reference/input/examples/cart/identifier/validate/CartConstraintViolationList.json.example
@@ -0,0 +1,6 @@
+{
+ "CartConstraintViolationList": {
+ "_media-type": "application\/vnd.ibexa.api.CartConstraintViolationList+json",
+ "violations": []
+ }
+}
diff --git a/docs/api/rest_api/rest_api_reference/input/examples/cart/identifier/validate/CartConstraintViolationList.xml.example b/docs/api/rest_api/rest_api_reference/input/examples/cart/identifier/validate/CartConstraintViolationList.xml.example
new file mode 100644
index 0000000000..1725f0a678
--- /dev/null
+++ b/docs/api/rest_api/rest_api_reference/input/examples/cart/identifier/validate/CartConstraintViolationList.xml.example
@@ -0,0 +1,2 @@
+
+
diff --git a/docs/api/rest_api/rest_api_reference/input/examples/cart/view/CartView.json.example b/docs/api/rest_api/rest_api_reference/input/examples/cart/view/CartView.json.example
new file mode 100644
index 0000000000..610f7a508f
--- /dev/null
+++ b/docs/api/rest_api/rest_api_reference/input/examples/cart/view/CartView.json.example
@@ -0,0 +1,38 @@
+{
+ "CartView": {
+ "_media-type": "application\/vnd.ibexa.api.CartView+json",
+ "identifier": "loadUserCarts",
+ "Result": {
+ "_media-type": "application\/vnd.ibexa.api.ViewResult+json",
+ "count": 1,
+ "CartList": {
+ "_media-type": "application\/vnd.ibexa.api.CartList+json",
+ "Cart": [
+ {
+ "_media-type": "application\/vnd.ibexa.api.Cart+json",
+ "id": 1,
+ "identifier": "e79b5dba-c701-4c64-8032-73719a513e50",
+ "name": "Default",
+ "createdAt": "2024-09-26T09:16:56+00:00",
+ "updatedAt": "2024-09-26T09:16:56+00:00",
+ "owner": {
+ "_media-type": "application\/vnd.ibexa.api.User+json",
+ "_href": "\/api\/ibexa\/v2\/user\/users\/10"
+ },
+ "Currency": {
+ "_media-type": "application\/vnd.ibexa.api.Currency+json",
+ "id": 2,
+ "code": "EUR",
+ "subunits": 2,
+ "enabled": true
+ },
+ "entries": [],
+ "context": {
+ "foo": "bar"
+ }
+ }
+ ]
+ }
+ }
+ }
+}
diff --git a/docs/api/rest_api/rest_api_reference/input/examples/cart/view/CartView.xml.example b/docs/api/rest_api/rest_api_reference/input/examples/cart/view/CartView.xml.example
new file mode 100644
index 0000000000..6837d7c230
--- /dev/null
+++ b/docs/api/rest_api/rest_api_reference/input/examples/cart/view/CartView.xml.example
@@ -0,0 +1,23 @@
+
+
+ loadUserCarts
+
+ 1
+
+
+ 1
+ e67d8f4c-95b5-423f-89d8-b2b81c37609b
+ Default
+ 2024-09-26T09:16:56+00:00
+ 2024-09-26T09:16:56+00:00
+
+
+ 2
+ EUR
+ 2
+ 1
+
+
+
+
+
diff --git a/docs/api/rest_api/rest_api_reference/input/examples/cart/view/CartViewInput.json.example b/docs/api/rest_api/rest_api_reference/input/examples/cart/view/CartViewInput.json.example
index 4d7e162e58..fa894ebe07 100644
--- a/docs/api/rest_api/rest_api_reference/input/examples/cart/view/CartViewInput.json.example
+++ b/docs/api/rest_api/rest_api_reference/input/examples/cart/view/CartViewInput.json.example
@@ -4,7 +4,7 @@
"CartQuery": {
"offset": 0,
"limit": 10,
- "ownerId": 123
+ "ownerId": 10
}
}
}
diff --git a/docs/api/rest_api/rest_api_reference/input/examples/cart/view/CartViewInput.xml.example b/docs/api/rest_api/rest_api_reference/input/examples/cart/view/CartViewInput.xml.example
new file mode 100644
index 0000000000..adf16db964
--- /dev/null
+++ b/docs/api/rest_api/rest_api_reference/input/examples/cart/view/CartViewInput.xml.example
@@ -0,0 +1,8 @@
+
+ loadUserCarts
+
+ 0
+ 10
+ 10
+
+
diff --git a/docs/api/rest_api/rest_api_reference/input/ibexa-cart.raml b/docs/api/rest_api/rest_api_reference/input/ibexa-cart.raml
index 97e733ad64..25c92d04c2 100644
--- a/docs/api/rest_api/rest_api_reference/input/ibexa-cart.raml
+++ b/docs/api/rest_api/rest_api_reference/input/ibexa-cart.raml
@@ -16,6 +16,7 @@ post:
body:
application/vnd.ibexa.api.CartCreate+xml:
type: CartCreate
+ example: !include examples/cart/POST/CartCreate.xml.example
application/vnd.ibexa.api.CartCreate+json:
type: CartCreateWrapper
example: !include examples/cart/POST/CartCreate.json.example
@@ -24,6 +25,7 @@ post:
body:
application/vnd.ibexa.api.Cart+xml:
type: Cart
+ example: !include examples/cart/POST/Cart.xml.example
application/vnd.ibexa.api.Cart+json:
type: CartWrapper
example: !include examples/cart/POST/Cart.json.example
@@ -47,6 +49,7 @@ post:
body:
application/vnd.ibexa.api.CartViewInput+xml:
type: CartViewInput
+ example: !include examples/cart/view/CartViewInput.xml.example
application/vnd.ibexa.api.CartViewInput+json:
type: CartViewInputWrapper
example: !include examples/cart/view/CartViewInput.json.example
@@ -58,6 +61,7 @@ post:
type: CartView
application/vnd.ibexa.api.CartView+json:
type: CartViewWrapper
+ example: !include examples/cart/view/CartView.json.example
/{identifier}:
get:
displayName: Get Cart
@@ -74,6 +78,7 @@ post:
body:
application/vnd.ibexa.api.Cart+xml:
type: Cart
+ example: !include examples/cart/POST/Cart.xml.example
application/vnd.ibexa.api.Cart+json:
type: CartWrapper
example: !include examples/cart/POST/Cart.json.example
@@ -165,3 +170,40 @@ post:
description: Error - The user is not authorized to read this Cart.
404:
description: Error - Cart not found.
+ /validate:
+ post:
+ displayName: Cart Validation
+ description: Validates a Cart against constraints
+ headers:
+ Accept:
+ description: If set, the Cart Constraint Violations are returned in XML or JSON format.
+ example: |
+ application/vnd.ibexa.api.CartConstraintViolationList+xml
+ application/vnd.ibexa.api.CartConstraintViolationList+json
+ responses:
+ 200:
+ body:
+ application/vnd.ibexa.api.CartConstraintViolationList+xml:
+ type: CartConstraintViolationList
+ example: !include examples/cart/identifier/validate/CartConstraintViolationList.xml.example
+ application/vnd.ibexa.api.CartConstraintViolationList+json:
+ type: CartConstraintViolationListWrapper
+ example: !include examples/cart/identifier/validate/CartConstraintViolationList.json.example
+/authorize:
+ post:
+ displayName: Cart Authorization
+ description: Returns the CSRF token required by anonymous user to interact with their own cart.
+ headers:
+ Accept:
+ example: |
+ application/vnd.ibexa.api.Token+xml
+ application/vnd.ibexa.api.Token+json
+ responses:
+ 200:
+ body:
+ application/vnd.ibexa.api.Token+xml:
+ type: Token
+ example: !include examples/cart/authorize/Token.xml.example
+ application/vnd.ibexa.api.CartConstraintViolationList+json:
+ type: Token
+ example: !include examples/cart/authorize/Token.json.example
diff --git a/docs/api/rest_api/rest_api_reference/input/ibexa-types.raml b/docs/api/rest_api/rest_api_reference/input/ibexa-types.raml
index 322512ef3d..f94892d447 100644
--- a/docs/api/rest_api/rest_api_reference/input/ibexa-types.raml
+++ b/docs/api/rest_api/rest_api_reference/input/ibexa-types.raml
@@ -3593,7 +3593,7 @@ CartListViewResult:
type: object
properties:
count: integer
- Result: CartList
+ CartList: CartList
CartList:
description: 'This class represents a cart list.'
@@ -3614,6 +3614,34 @@ CartMetadataUpdate:
names: Value[]
descriptions: Value[]
+CartConstraintViolationListWrapper:
+ description: 'JSON object with only a CartConstraintViolationList property.'
+ type: object
+ properties:
+ CartConstraintViolationList: CartConstraintViolationList
+
+CartConstraintViolationList:
+ description: 'This class represents a list of cart constraint violations.'
+ type: object
+ properties:
+ violations:
+ type: array
+ items: CartConstraintViolation
+
+CartConstraintViolation:
+ description: 'This class represents a cart constraint violation.'
+ type: object
+ properties:
+ code: string
+ propertyPath: string
+ message: string
+
+Token:
+ description: 'This class represents a CSRF token'
+ type: object
+ properties:
+ value: string
+
CatalogWrapper:
description: 'JSON object with only a Catalog property.'
type: object
diff --git a/docs/api/rest_api/rest_api_reference/rest_api_reference.html b/docs/api/rest_api/rest_api_reference/rest_api_reference.html
index 697d84f8a2..7eb1af191d 100644
--- a/docs/api/rest_api/rest_api_reference/rest_api_reference.html
+++ b/docs/api/rest_api/rest_api_reference/rest_api_reference.html
@@ -70055,12 +70055,22 @@
Types
Request
-
+ xml
+
+
+
+
+ aria-selected="false">
json
@@ -70068,7 +70078,28 @@ Types
-
+
+
+ file_copy
+
+
+
+ <CartCreate>
+ <name>Default</name>
+ <currencyCode>EUR</currencyCode>
+</CartCreate>
+
+
+
+
View more
+
+
@@ -70117,12 +70148,25 @@
Types
-
+ xml
+
+
+
+
+
+
+
+ aria-selected="false">
json
@@ -70134,6 +70178,27 @@
Types
+
+
+ file_copy
+
+
+
+ <CartCreate>
+ <name>Default</name>
+ <currencyCode>EUR</currencyCode>
+</CartCreate>
+
+
+
+
+
-
+
+
+ file_copy
+
+
+
+ <?xml version="1.0" encoding="UTF-8"?>
+<Cart media-type="application/vnd.ibexa.api.Cart+xml">
+ <id>1</id>
+ <identifier>e67d8f4c-95b5-423f-89d8-b2b81c37609b</identifier>
+ <name>Default</name>
+ <createdAt>2024-09-26T09:16:56+00:00</createdAt>
+ <updatedAt>2024-09-26T09:16:56+00:00</updatedAt>
+ <owner media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/10"/>
+ <Currency media-type="application/vnd.ibexa.api.Currency+xml">
+ <id>2</id>
+ <code>EUR</code>
+ <subunits>2</subunits>
+ <enabled>1</enabled>
+ </Currency>
+</Cart>
+
+
+
+
View more
+
+
@@ -70205,24 +70312,27 @@
Types
{
"Cart": {
- "_media-type": "application/vnd.ibexa.api.Cart+json",
- "id": 12,
- "identifier": "fafccc4b-cce1-40d7-8d23-29ad41638581",
+ "_media-type": "application\/vnd.ibexa.api.Cart+json",
+ "id": 1,
+ "identifier": "e79b5dba-c701-4c64-8032-73719a513e50",
"name": "Default",
- "createdAt": "2023-10-12T10:02:51+00:00",
- "updatedAt": "2023-10-12T10:02:51+00:00",
+ "createdAt": "2024-09-26T09:16:56+00:00",
+ "updatedAt": "2024-09-26T09:16:56+00:00",
"owner": {
- "_media-type": "application/vnd.ibexa.api.User+json",
- "_href": "/api/ibexa/v2/user/users/14"
+ "_media-type": "application\/vnd.ibexa.api.User+json",
+ "_href": "\/api\/ibexa\/v2\/user\/users\/10"
},
"Currency": {
- "_media-type": "application/vnd.ibexa.api.Currency+json",
+ "_media-type": "application\/vnd.ibexa.api.Currency+json",
"id": 2,
"code": "EUR",
"subunits": 2,
"enabled": true
},
- "entries": []
+ "entries": [],
+ "context": {
+ "foo": "bar"
+ }
}
}
@@ -70253,12 +70363,25 @@ Types
-
+ xml
+
+
+
+
+
+
+
+ aria-selected="false">
json
@@ -70273,6 +70396,38 @@
Types
+
+
+ file_copy
+
+
+
+ <?xml version="1.0" encoding="UTF-8"?>
+<Cart media-type="application/vnd.ibexa.api.Cart+xml">
+ <id>1</id>
+ <identifier>e67d8f4c-95b5-423f-89d8-b2b81c37609b</identifier>
+ <name>Default</name>
+ <createdAt>2024-09-26T09:16:56+00:00</createdAt>
+ <updatedAt>2024-09-26T09:16:56+00:00</updatedAt>
+ <owner media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/10"/>
+ <Currency media-type="application/vnd.ibexa.api.Currency+xml">
+ <id>2</id>
+ <code>EUR</code>
+ <subunits>2</subunits>
+ <enabled>1</enabled>
+ </Currency>
+</Cart>
+
+
+
+
+
@@ -70287,24 +70442,27 @@
Types
{
"Cart": {
- "_media-type": "application/vnd.ibexa.api.Cart+json",
- "id": 12,
- "identifier": "fafccc4b-cce1-40d7-8d23-29ad41638581",
+ "_media-type": "application\/vnd.ibexa.api.Cart+json",
+ "id": 1,
+ "identifier": "e79b5dba-c701-4c64-8032-73719a513e50",
"name": "Default",
- "createdAt": "2023-10-12T10:02:51+00:00",
- "updatedAt": "2023-10-12T10:02:51+00:00",
+ "createdAt": "2024-09-26T09:16:56+00:00",
+ "updatedAt": "2024-09-26T09:16:56+00:00",
"owner": {
- "_media-type": "application/vnd.ibexa.api.User+json",
- "_href": "/api/ibexa/v2/user/users/14"
+ "_media-type": "application\/vnd.ibexa.api.User+json",
+ "_href": "\/api\/ibexa\/v2\/user\/users\/10"
},
"Currency": {
- "_media-type": "application/vnd.ibexa.api.Currency+json",
+ "_media-type": "application\/vnd.ibexa.api.Currency+json",
"id": 2,
"code": "EUR",
"subunits": 2,
"enabled": true
},
- "entries": []
+ "entries": [],
+ "context": {
+ "foo": "bar"
+ }
}
}
@@ -70520,12 +70678,22 @@ Types
Request
-
+ xml
+
+
+
+
+ aria-selected="false">
json
@@ -70533,7 +70701,32 @@
Types
-
+
+
+ file_copy
+
+
+
+ <CartViewInput>
+ <identifier>loadUserCarts</identifier>
+ <CartQuery>
+ <offset>0</offset>
+ <limit>10</limit>
+ <ownerId>10</ownerId>
+ </CartQuery>
+</CartViewInput>
+
+
+
+
View more
+
+
@@ -70551,7 +70744,7 @@
Types
"CartQuery": {
"offset": 0,
"limit": 10,
- "ownerId": 123
+ "ownerId": 10
}
}
}
@@ -70583,12 +70776,25 @@
Types
-
+ xml
+
+
+
+
+
+
+
+ aria-selected="false">
json
@@ -70600,6 +70806,31 @@
Types
+
+
+ file_copy
+
+
+
+ <CartViewInput>
+ <identifier>loadUserCarts</identifier>
+ <CartQuery>
+ <offset>0</offset>
+ <limit>10</limit>
+ <ownerId>10</ownerId>
+ </CartQuery>
+</CartViewInput>
+
+
+
+
+
@@ -70618,7 +70849,7 @@
Types
"CartQuery": {
"offset": 0,
"limit": 10,
- "ownerId": 123
+ "ownerId": 10
}
}
}
@@ -70638,9 +70869,168 @@
Types
+
+ Responses
+
+
+
+ json
+
+
+
+
+ Code: 200
+
-
+
+
+
+
+
+ file_copy
+
+
+
+ {
+ "CartView": {
+ "_media-type": "application\/vnd.ibexa.api.CartView+json",
+ "identifier": "loadUserCarts",
+ "Result": {
+ "_media-type": "application\/vnd.ibexa.api.ViewResult+json",
+ "count": 1,
+ "CartList": {
+ "_media-type": "application\/vnd.ibexa.api.CartList+json",
+ "Cart": [
+ {
+ "_media-type": "application\/vnd.ibexa.api.Cart+json",
+ "id": 1,
+ "identifier": "e79b5dba-c701-4c64-8032-73719a513e50",
+ "name": "Default",
+ "createdAt": "2024-09-26T09:16:56+00:00",
+ "updatedAt": "2024-09-26T09:16:56+00:00",
+ "owner": {
+ "_media-type": "application\/vnd.ibexa.api.User+json",
+ "_href": "\/api\/ibexa\/v2\/user\/users\/10"
+ },
+ "
+
+
+
View more
+
+
+
+
+
+
+
+
+
+
+ -
+
+ Responses
+
+
+ -
+
+ json
+
+
+ -
+
+
+
+
+ Code: 200
+
+
+
+
+
+
+
+ file_copy
+
+
+
+ {
+ "CartView": {
+ "_media-type": "application\/vnd.ibexa.api.CartView+json",
+ "identifier": "loadUserCarts",
+ "Result": {
+ "_media-type": "application\/vnd.ibexa.api.ViewResult+json",
+ "count": 1,
+ "CartList": {
+ "_media-type": "application\/vnd.ibexa.api.CartList+json",
+ "Cart": [
+ {
+ "_media-type": "application\/vnd.ibexa.api.Cart+json",
+ "id": 1,
+ "identifier": "e79b5dba-c701-4c64-8032-73719a513e50",
+ "name": "Default",
+ "createdAt": "2024-09-26T09:16:56+00:00",
+ "updatedAt": "2024-09-26T09:16:56+00:00",
+ "owner": {
+ "_media-type": "application\/vnd.ibexa.api.User+json",
+ "_href": "\/api\/ibexa\/v2\/user\/users\/10"
+ },
+ "Currency": {
+ "_media-type": "application\/vnd.ibexa.api.Currency+json",
+ "id": 2,
+ "code": "EUR",
+ "subunits": 2,
+ "enabled": true
+ },
+ "entries": [],
+ "context": {
+ "foo": "bar"
+ }
+ }
+ ]
+ }
+ }
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
@@ -70823,12 +71213,22 @@
Types
Responses
-
+ xml
+
+
+
+
+ aria-selected="false">
json
@@ -70839,7 +71239,39 @@
Types
-
+
+
+ file_copy
+
+
+
+ <?xml version="1.0" encoding="UTF-8"?>
+<Cart media-type="application/vnd.ibexa.api.Cart+xml">
+ <id>1</id>
+ <identifier>e67d8f4c-95b5-423f-89d8-b2b81c37609b</identifier>
+ <name>Default</name>
+ <createdAt>2024-09-26T09:16:56+00:00</createdAt>
+ <updatedAt>2024-09-26T09:16:56+00:00</updatedAt>
+ <owner media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/10"/>
+ <Currency media-type="application/vnd.ibexa.api.Currency+xml">
+ <id>2</id>
+ <code>EUR</code>
+ <subunits>2</subunits>
+ <enabled>1</enabled>
+ </Currency>
+</Cart>
+
+
+
+
View more
+
+
@@ -70853,24 +71285,27 @@
Types
{
"Cart": {
- "_media-type": "application/vnd.ibexa.api.Cart+json",
- "id": 12,
- "identifier": "fafccc4b-cce1-40d7-8d23-29ad41638581",
+ "_media-type": "application\/vnd.ibexa.api.Cart+json",
+ "id": 1,
+ "identifier": "e79b5dba-c701-4c64-8032-73719a513e50",
"name": "Default",
- "createdAt": "2023-10-12T10:02:51+00:00",
- "updatedAt": "2023-10-12T10:02:51+00:00",
+ "createdAt": "2024-09-26T09:16:56+00:00",
+ "updatedAt": "2024-09-26T09:16:56+00:00",
"owner": {
- "_media-type": "application/vnd.ibexa.api.User+json",
- "_href": "/api/ibexa/v2/user/users/14"
+ "_media-type": "application\/vnd.ibexa.api.User+json",
+ "_href": "\/api\/ibexa\/v2\/user\/users\/10"
},
"Currency": {
- "_media-type": "application/vnd.ibexa.api.Currency+json",
+ "_media-type": "application\/vnd.ibexa.api.Currency+json",
"id": 2,
"code": "EUR",
"subunits": 2,
"enabled": true
},
- "entries": []
+ "entries": [],
+ "context": {
+ "foo": "bar"
+ }
}
}
@@ -70901,12 +71336,25 @@ Types
-
+ xml
+
+
+
+
+
+
+
+ aria-selected="false">
json
@@ -70921,6 +71369,38 @@
Types
+
+
+ file_copy
+
+
+
+ <?xml version="1.0" encoding="UTF-8"?>
+<Cart media-type="application/vnd.ibexa.api.Cart+xml">
+ <id>1</id>
+ <identifier>e67d8f4c-95b5-423f-89d8-b2b81c37609b</identifier>
+ <name>Default</name>
+ <createdAt>2024-09-26T09:16:56+00:00</createdAt>
+ <updatedAt>2024-09-26T09:16:56+00:00</updatedAt>
+ <owner media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/10"/>
+ <Currency media-type="application/vnd.ibexa.api.Currency+xml">
+ <id>2</id>
+ <code>EUR</code>
+ <subunits>2</subunits>
+ <enabled>1</enabled>
+ </Currency>
+</Cart>
+
+
+
+
+
@@ -70935,24 +71415,27 @@
Types
{
"Cart": {
- "_media-type": "application/vnd.ibexa.api.Cart+json",
- "id": 12,
- "identifier": "fafccc4b-cce1-40d7-8d23-29ad41638581",
+ "_media-type": "application\/vnd.ibexa.api.Cart+json",
+ "id": 1,
+ "identifier": "e79b5dba-c701-4c64-8032-73719a513e50",
"name": "Default",
- "createdAt": "2023-10-12T10:02:51+00:00",
- "updatedAt": "2023-10-12T10:02:51+00:00",
+ "createdAt": "2024-09-26T09:16:56+00:00",
+ "updatedAt": "2024-09-26T09:16:56+00:00",
"owner": {
- "_media-type": "application/vnd.ibexa.api.User+json",
- "_href": "/api/ibexa/v2/user/users/14"
+ "_media-type": "application\/vnd.ibexa.api.User+json",
+ "_href": "\/api\/ibexa\/v2\/user\/users\/10"
},
"Currency": {
- "_media-type": "application/vnd.ibexa.api.Currency+json",
+ "_media-type": "application\/vnd.ibexa.api.Currency+json",
"id": 2,
"code": "EUR",
"subunits": 2,
"enabled": true
},
- "entries": []
+ "entries": [],
+ "context": {
+ "foo": "bar"
+ }
}
}
@@ -72242,84 +72725,79 @@ Types
-
-
-
- eCommerce API (removed)
- ¶
-
-
-
/commerce/basket
-
-
+
-
/commerce/basket
+
/cart/{identifier}/validate
-
+
-
- Read list of baskets (removed)
- ¶
+ data-search="cart-validation">
+ Cart Validation
+ ¶
- GET
- /commerce/basket
+ POST
+ /cart/{identifier}/validate
-
Returns baskets for the current user. Only "storedBasket" and "wishList" types are handled. Others will return validation error.
-Removed as of Ibexa DXP 4.4.
+
Validates a Cart against constraints
-
-
Query parameters
-
-
-
-
- Property |
- Type |
- Value |
-
-
-
-
-
- type
- |
+ Header parameters
+
+
Accept
+
If set, the Cart Constraint Violations are returned in XML or JSON format.
+
+
+
+
+ Property |
+ Value |
+
+
+
+
+ Type |
-
-
+
+
string
-
-
-
- |
+
+
+
+
+
+
+ Examples |
- Either "storedBasket" or "wishList". "storedBasket" is assumed if not passed.
-
- |
+ application/vnd.ibexa.api.CartConstraintViolationList+xml
+application/vnd.ibexa.api.CartConstraintViolationList+json
+
+
-
-
-
-
+
+
+
+
+
+
Possible responses
@@ -72333,7 +72811,7 @@
Possible responses
-
200
@@ -72341,17 +72819,6 @@ Possible responses
|
|
-
-
-
-
- 400
-
- |
-
-
- |
@@ -72371,19 +72838,19 @@
Types
-
- BasketListResponseWrapper
+
+ CartConstraintViolationList
|
- JSON object with only a BasketListResponse property. |
+ This class represents a list of cart constraint violations. |
-
- ValidationResponse
+
+ CartConstraintViolationListWrapper
|
- Removed |
+ JSON object with only a CartConstraintViolationList property. |
@@ -72396,19 +72863,29 @@
Types
-
+
-
-
+
+
file_copy
-
+
+ <?xml version="1.0" encoding="UTF-8"?>
+<CartConstraintViolationList media-type="application/vnd.ibexa.api.CartConstraintViolationList+xml"/>
+
+
+
+
View more
+
+
+
+
+ file_copy
+
+
+
{
- "BasketListResponse": {
- "_media-type": "application\/vnd.ibexa.api.BasketListResponse+json",
- "basketList": [
- {
- "_media-type": "application\/vnd.ibexa.api.stdClass+json",
- "basketId": 5,
- "state": "new",
- "type": "storedBasket",
- "sessionId": "mrt02u8u2rbh6aeeibm7rj0i1j",
- "userId": 14,
- "basketName": "test",
- "dateCreated": {
- "_media-type": "application\/vnd.ibexa.api.DateTime+json"
- },
- "dateLastModified": {
- "_media-type": "application\/vnd.ibexa.api.DateTime+json"
- },
- "totals": [
- {
- "_media-type": "application\/vnd.ibexa.api.BasketTotals+json"
- },
- {
- "_media-type": "application\/vnd.ibexa.api.BasketTotals+json"
- }
- ],
- "totalsSum": {
- "_media-type": "application\/vnd.ibexa.api.BasketTotals+json"
- },
- "dateLastPriceCalculation": {
- "_media-type": "application
+ "CartConstraintViolationList": {
+ "_media-type": "application\/vnd.ibexa.api.CartConstraintViolationList+json",
+ "violations": []
+ }
+}
+
-
View more
+
View more
-
+
-
+
+ id="cart-identifier-validate-post-response-200-xml-modal" role="tabpanel"
+ aria-labelledby="cart-identifier-validate-post-response-200-xml-modal-tab">
file_copy
-
+
+ <?xml version="1.0" encoding="UTF-8"?>
+<CartConstraintViolationList media-type="application/vnd.ibexa.api.CartConstraintViolationList+xml"/>
+
+
+
+
+
+
+
+ file_copy
+
+
+
{
- "BasketListResponse": {
- "_media-type": "application\/vnd.ibexa.api.BasketListResponse+json",
- "basketList": [
- {
- "_media-type": "application\/vnd.ibexa.api.stdClass+json",
- "basketId": 5,
- "state": "new",
- "type": "storedBasket",
- "sessionId": "mrt02u8u2rbh6aeeibm7rj0i1j",
- "userId": 14,
- "basketName": "test",
- "dateCreated": {
- "_media-type": "application\/vnd.ibexa.api.DateTime+json"
- },
- "dateLastModified": {
- "_media-type": "application\/vnd.ibexa.api.DateTime+json"
- },
- "totals": [
- {
- "_media-type": "application\/vnd.ibexa.api.BasketTotals+json"
- },
- {
- "_media-type": "application\/vnd.ibexa.api.BasketTotals+json"
- }
- ],
- "totalsSum": {
- "_media-type": "application\/vnd.ibexa.api.BasketTotals+json"
- },
- "dateLastPriceCalculation": {
- "_media-type": "application\/vnd.ibexa.api.DateTime+json"
- },
- "allProductsAvailable": true,
- "dataMap": {
- "dateLastCatalogUpdate": {
- "_media-type": "application\/vnd.ibexa.api.DateTime+json",
- "date": "2021-03-10 11:11:06.291444",
- "timezone_type": 3,
- "timezone": "UTC"
- }
- }
- }
- ]
- }
+ "CartConstraintViolationList": {
+ "_media-type": "application\/vnd.ibexa.api.CartConstraintViolationList+json",
+ "violations": []
+ }
}
@@ -72577,48 +73042,707 @@
Types
-
-
+
+
/cart/authorize
+
+
-
/commerce/basket/current
+
/cart/authorize
-
+
-
- Get current basket (removed)
- ¶
+ data-search="cart-authorization">
+ Cart Authorization
+ ¶
- GET
- /commerce/basket/current
+ POST
+ /cart/authorize
-
Returns a Basket instance for the current session. If there isn't one, a new one will be created.
-Removed as of Ibexa DXP 4.4.
+
Returns the CSRF token required by anonymous user to interact with their own cart.
+
+
+
Header parameters
+
+
Accept
+
+
+
+
+
+ Property |
+ Value |
+
+
+
+
+ Type |
+
+
+
+ string
+
+
+
+
+ |
+
+
+ Examples |
+
+ application/vnd.ibexa.api.Token+xml
+application/vnd.ibexa.api.Token+json
+
+ |
+
+
+
+
+
+
+
+
+
+
Possible responses
+
+
+
+
+ Code |
+ Description |
+
+
+
+
+
+
+ 200
+
+ |
+
+
+ |
+
+
+
+
+
+
+
+
Types
+
+
+
+
+ Type |
+ Description |
+
+
+
+
+
+
+ Token
+
+ |
+ This class represents a CSRF token |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ file_copy
+
+
+
+ <?xml version="1.0" encoding="UTF-8"?>
+<Token media-type="application/vnd.ibexa.api.Token+xml">
+ <value>eff5.w9r2Ws_zpjcopNJ8FRNVaplGlx19y4Mp2QP-eQWZDKc.-pe4Pam133xKzKQZLCdiIMkj2EgQ5rMdtlGTEEPPaOyHv6Y1iKTsZ2_OtQ</value>
+</Token>
+
+
+
+
View more
+
+
+
+
+ file_copy
+
+
+
+ {
+ "Token": {
+ "_media-type": "application\/vnd.ibexa.api.Token+json",
+ "value": "7b19308.RiDPaorwmJRyQoGajJiLMp843r30WaW-PH1CeH4oQyU.dkOXWOuFrvBfDPXY1t27YMx0hvyFH8fPUwoDNRl_D0sWDb4O3bb-20Q32A"
+ }
+}
+
+
+
+
View more
+
+
+
+
+
+
+
+
+
+
+ -
+
+ Responses
+
+
+ -
+
+ xml
+
+
+ -
+
+
+ -
+
+ json
+
+
+ -
+
+
+
+
+ Code: 200
+
+
+
+
+
+
+
+ file_copy
+
+
+
+ <?xml version="1.0" encoding="UTF-8"?>
+<Token media-type="application/vnd.ibexa.api.Token+xml">
+ <value>eff5.w9r2Ws_zpjcopNJ8FRNVaplGlx19y4Mp2QP-eQWZDKc.-pe4Pam133xKzKQZLCdiIMkj2EgQ5rMdtlGTEEPPaOyHv6Y1iKTsZ2_OtQ</value>
+</Token>
+
+
+
+
+
+
+
+ file_copy
+
+
+
+ {
+ "Token": {
+ "_media-type": "application\/vnd.ibexa.api.Token+json",
+ "value": "7b19308.RiDPaorwmJRyQoGajJiLMp843r30WaW-PH1CeH4oQyU.dkOXWOuFrvBfDPXY1t27YMx0hvyFH8fPUwoDNRl_D0sWDb4O3bb-20Q32A"
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ eCommerce API (removed)
+ ¶
+
+
+
/commerce/basket
+
+
+
+
+
+
+ Read list of baskets (removed)
+ ¶
+
+
+
+
+ GET
+ /commerce/basket
+
+
Returns baskets for the current user. Only "storedBasket" and "wishList" types are handled. Others will return validation error.
+Removed as of Ibexa DXP 4.4.
+
+
+
+
Query parameters
+
+
+
+
+ Property |
+ Type |
+ Value |
+
+
+
+
+
+ type
+ |
+
+
+
+ string
+
+
+
+
+ |
+
+ Either "storedBasket" or "wishList". "storedBasket" is assumed if not passed.
+
+ |
+
+
+
+
+
+
+
+
Possible responses
+
+
+
+
+ Code |
+ Description |
+
+
+
+
+
+
+ 200
+
+ |
+
+
+ |
+
+
+
+
+ 400
+
+ |
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ file_copy
+
+
+
+ {
+ "BasketListResponse": {
+ "_media-type": "application\/vnd.ibexa.api.BasketListResponse+json",
+ "basketList": [
+ {
+ "_media-type": "application\/vnd.ibexa.api.stdClass+json",
+ "basketId": 5,
+ "state": "new",
+ "type": "storedBasket",
+ "sessionId": "mrt02u8u2rbh6aeeibm7rj0i1j",
+ "userId": 14,
+ "basketName": "test",
+ "dateCreated": {
+ "_media-type": "application\/vnd.ibexa.api.DateTime+json"
+ },
+ "dateLastModified": {
+ "_media-type": "application\/vnd.ibexa.api.DateTime+json"
+ },
+ "totals": [
+ {
+ "_media-type": "application\/vnd.ibexa.api.BasketTotals+json"
+ },
+ {
+ "_media-type": "application\/vnd.ibexa.api.BasketTotals+json"
+ }
+ ],
+ "totalsSum": {
+ "_media-type": "application\/vnd.ibexa.api.BasketTotals+json"
+ },
+ "dateLastPriceCalculation": {
+ "_media-type": "application
+
+
+
View more
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ file_copy
+
+
+
+ {
+ "BasketListResponse": {
+ "_media-type": "application\/vnd.ibexa.api.BasketListResponse+json",
+ "basketList": [
+ {
+ "_media-type": "application\/vnd.ibexa.api.stdClass+json",
+ "basketId": 5,
+ "state": "new",
+ "type": "storedBasket",
+ "sessionId": "mrt02u8u2rbh6aeeibm7rj0i1j",
+ "userId": 14,
+ "basketName": "test",
+ "dateCreated": {
+ "_media-type": "application\/vnd.ibexa.api.DateTime+json"
+ },
+ "dateLastModified": {
+ "_media-type": "application\/vnd.ibexa.api.DateTime+json"
+ },
+ "totals": [
+ {
+ "_media-type": "application\/vnd.ibexa.api.BasketTotals+json"
+ },
+ {
+ "_media-type": "application\/vnd.ibexa.api.BasketTotals+json"
+ }
+ ],
+ "totalsSum": {
+ "_media-type": "application\/vnd.ibexa.api.BasketTotals+json"
+ },
+ "dateLastPriceCalculation": {
+ "_media-type": "application\/vnd.ibexa.api.DateTime+json"
+ },
+ "allProductsAvailable": true,
+ "dataMap": {
+ "dateLastCatalogUpdate": {
+ "_media-type": "application\/vnd.ibexa.api.DateTime+json",
+ "date": "2021-03-10 11:11:06.291444",
+ "timezone_type": 3,
+ "timezone": "UTC"
+ }
+ }
+ }
+ ]
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/commerce/basket/current
+
+
+
+
+
+
+
+ Get current basket (removed)
+ ¶
+
+
+
+
+ GET
+ /commerce/basket/current
+
+
Returns a Basket instance for the current session. If there isn't one, a new one will be created.
+Removed as of Ibexa DXP 4.4.
Header parameters
@@ -148800,7 +149924,7 @@ Types
- Result
+ CartList
*
@@ -148964,6 +150088,195 @@ Types
+
+
+
+
+
+
+
+
+
+
+
+
+
CartConstraintViolationListWrapper
+
+
*
+
+(
object)
+ -
+
+ JSON object with only a CartConstraintViolationList property.
+
+
+
+
+ -
+ CartConstraintViolationList
+
+ *
+
+(CartConstraintViolationList)
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
CartConstraintViolationList
+
+
*
+
+(
object)
+ -
+
+ This class represents a list of cart constraint violations.
+
+
+
+
+ -
+ violations
+
+ *
+
+(CartConstraintViolation[]
+ )
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
CartConstraintViolation
+
+
*
+
+(
object)
+ -
+
+ This class represents a cart constraint violation.
+
+
+
+
+ -
+ code
+
+ *
+
+(string)
+ -
+
+
+
+
+
+ -
+ propertyPath
+
+ *
+
+(string)
+ -
+
+
+
+
+
+ -
+ message
+
+ *
+
+(string)
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Token
+
+
*
+
+(
object)
+ -
+
+ This class represents a CSRF token
+
+
+
+
+ -
+ value
+
+ *
+
+(string)
+ -
+
+
+
+