Skip to content

Commit d9f10b7

Browse files
committedMar 17, 2025·
REST API Ref: Add responses to POST /cart/{identifier}/entry
1 parent b82d11e commit d9f10b7

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed
 

‎docs/api/rest_api/rest_api_reference/input/ibexa-cart.raml

+20-3
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ post:
9999
application/vnd.ibexa.api.CartMetadataUpdate+xml
100100
application/vnd.ibexa.api.CartMetadataUpdate+json
101101
Accept:
102-
description: The Cart is returned in XML or JSON format.
102+
description: The updated Cart is returned in XML or JSON format.
103103
example: |
104104
application/vnd.ibexa.api.Cart+xml
105105
application/vnd.ibexa.api.Cart+json
@@ -114,10 +114,8 @@ post:
114114
body:
115115
application/vnd.ibexa.api.Cart+xml:
116116
type: Cart
117-
example: !include examples/cart/POST/Cart.xml.example
118117
application/vnd.ibexa.api.Cart+json:
119118
type: CartWrapper
120-
example: !include examples/cart/POST/Cart.json.example
121119
400:
122120
description: Error - the input doesn't match the input schema definition.
123121
401:
@@ -134,12 +132,31 @@ post:
134132
example: |
135133
application/vnd.ibexa.api.CartEntryAdd+xml
136134
application/vnd.ibexa.api.CartEntryAdd+json
135+
Accept:
136+
description: The updated Cart is returned in XML or JSON format.
137+
example: |
138+
application/vnd.ibexa.api.Cart+xml
139+
application/vnd.ibexa.api.Cart+json
137140
body:
138141
application/vnd.ibexa.api.CartEntryAdd+xml:
139142
type: CartEntryAdd
140143
application/vnd.ibexa.api.CartEntryAdd+json:
141144
type: CartEntryAddWrapper
142145
example: !include examples/cart/entry/POST/CartEntryAdd.json.example
146+
responses:
147+
200:
148+
description: OK - return the updated cart
149+
body:
150+
application/vnd.ibexa.api.Cart+xml:
151+
type: Cart
152+
application/vnd.ibexa.api.Cart+json:
153+
type: CartWrapper
154+
400:
155+
description: Error - the input doesn't match the input schema definition.
156+
401:
157+
description: Error - the user is not authorized to add an entry to this cart.
158+
404:
159+
description: Error - the identifier doesn't match any cart.
143160
/{entryId}:
144161
delete:
145162
displayName: Remove Entry from Cart

0 commit comments

Comments
 (0)
Please sign in to comment.