Skip to content

Commit abbf4db

Browse files
committed
Updated API from documentation release
1 parent 23bdca9 commit abbf4db

File tree

3 files changed

+48
-3
lines changed

3 files changed

+48
-3
lines changed

api-specs/api/resources/carts.raml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ type:
1010
(createable): CartDraft
1111
description: A shopping cart holds product variants and can be ordered.
1212
get:
13+
displayName: Query Carts
1314
securedBy: [oauth_2_0: { scopes: ['view_orders:{projectKey}'] }]
1415
description: Retrieves Carts in the Project.
1516
responses:
@@ -18,13 +19,14 @@ get:
1819
application/json:
1920
example: !include ../examples/carts.example.json
2021
head:
22+
displayName: Check if Cart exists by Query Predicate
2123
securedBy: [oauth_2_0: { scopes: ['view_orders:{projectKey}'] }]
22-
displayName: Check if a Cart exists by Query Predicate
2324
description: Checks if one or more Carts exist for the provided query predicate. Returns a `200 OK` status if any Carts match the query predicate, or [Not Found](/../api/errors#404-not-found) otherwise.
2425
queryParameters:
2526
where?:
2627
type: QueryPredicate[]
2728
post:
29+
displayName: Create Cart
2830
securedBy: [oauth_2_0: { scopes: ['manage_orders:{projectKey}'] }]
2931
description: |
3032
@@ -87,6 +89,7 @@ post:
8789
uriParameterName: customerId
8890
resourceType: Cart
8991
get:
92+
displayName: Get Cart by Customer ID
9093
securedBy: [oauth_2_0: { scopes: ['view_orders:{projectKey}'] }]
9194
description: |
9295
Retrieves the most recently modified active Cart of a Customer with [CartOrigin](ctp:api:type:CartOrigin) `Customer`. If no active Cart exists, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
@@ -98,6 +101,7 @@ post:
98101
application/json:
99102
example: !include ../examples/cart.example.json
100103
head:
104+
displayName: Check if Cart exists by Customer ID
101105
securedBy: [oauth_2_0: { scopes: ['view_orders:{projectKey}'] }]
102106
description: Checks if a Cart exists for a Customer. Returns a `200 OK` status if the Cart exists or [Not Found](/../api/errors#404-not-found) otherwise.
103107
/key={key}:
@@ -108,6 +112,7 @@ post:
108112
resourceType: Cart
109113
resourceUpdateType: CartUpdate
110114
get:
115+
displayName: Get Cart by Key
111116
securedBy: [oauth_2_0: { scopes: ['view_orders:{projectKey}'] }]
112117
description: |
113118
Retrieves a Cart with the provided `key`.
@@ -118,9 +123,11 @@ post:
118123
application/json:
119124
example: !include ../examples/cart.example.json
120125
head:
126+
displayName: Check if Cart exists by Key
121127
securedBy: [oauth_2_0: { scopes: ['view_orders:{projectKey}'] }]
122128
description: Checks if a Cart exists with the provided `key`. Returns a `200 OK` status if the Cart exists or [Not Found](/../api/errors#404-not-found) otherwise.
123129
post:
130+
displayName: Update Cart by Key
124131
description: Updates a Cart in the Project using one or more [update actions](/../api/projects/carts#update-actions).
125132
securedBy: [oauth_2_0: { scopes: ['manage_orders:{projectKey}'] }]
126133
body:
@@ -132,6 +139,7 @@ post:
132139
application/json:
133140
example: !include ../examples/cart.example.json
134141
delete:
142+
displayName: Delete Cart by Key
135143
is:
136144
- dataErasure
137145
securedBy: [oauth_2_0: { scopes: ['manage_orders:{projectKey}'] }]
@@ -149,6 +157,7 @@ post:
149157
resourceType: Cart
150158
resourceUpdateType: CartUpdate
151159
get:
160+
displayName: Get Cart by ID
152161
securedBy: [oauth_2_0: { scopes: ['view_orders:{projectKey}'] }]
153162
description: |
154163
Retrieves a Cart with the provided `id`.
@@ -159,9 +168,11 @@ post:
159168
application/json:
160169
example: !include ../examples/cart.example.json
161170
head:
171+
displayName: Check if Cart exists by ID
162172
securedBy: [oauth_2_0: { scopes: ['view_orders:{projectKey}'] }]
163173
description: Checks if a Cart exists for the provided `id`. Returns a `200 OK` status if the Cart exists or [Not Found](/../api/errors#404-not-found) otherwise.
164174
post:
175+
displayName: Update Cart by ID
165176
securedBy: [oauth_2_0: { scopes: ['manage_orders:{projectKey}'] }]
166177
description: Updates a Cart in the Project using one or more [update actions](/../api/projects/carts#update-actions).
167178
body:
@@ -173,6 +184,7 @@ post:
173184
application/json:
174185
example: !include ../examples/cart.example.json
175186
delete:
187+
displayName: Delete Cart by ID
176188
is:
177189
- dataErasure
178190
securedBy: [oauth_2_0: { scopes: ['manage_orders:{projectKey}'] }]

api-specs/api/resources/orders.raml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ description:
1212
An order can be created from a order, usually after a checkout process has
1313
been completed.
1414
get:
15+
displayName: Query Orders
1516
securedBy: [oauth_2_0: { scopes: ['view_orders:{projectKey}'] }]
1617
description: Retrieves Orders in the Project.
1718
responses:
@@ -20,12 +21,14 @@ get:
2021
application/json:
2122
example: !include ../examples/orders.example.json
2223
head:
24+
displayName: Check if Order exists by Query Predicate
2325
securedBy: [oauth_2_0: { scopes: ['view_orders:{projectKey}'] }]
2426
description: Checks if one or more Orders exist for the provided query predicate. Returns a `200 OK` status if any Orders match the query predicate, or a `404 Not Found` otherwise.
2527
queryParameters:
2628
where?:
2729
type: QueryPredicate[]
2830
post:
31+
displayName: Create Order
2932
securedBy: [oauth_2_0: { scopes: ['manage_orders:{projectKey}'] }]
3033
is:
3134
- conflicting
@@ -64,7 +67,7 @@ post:
6467
type: base
6568
displayName: import orders
6669
post:
67-
displayName: Create an Order by Import
70+
displayName: Create Order by Import
6871
description: |
6972
Creates an Order without needing to create a Cart first.
7073
Importing an Order produces the [Order Imported](ctp:api:type:OrderImportedMessage) Message.
@@ -89,7 +92,7 @@ post:
8992
type: base
9093
displayName: Order from Quote
9194
post:
92-
displayName: Create an Order from a Quote
95+
displayName: Create Order from Quote
9396
description: |
9497
9598
Creates an Order from a Quote. The referenced Quote must have the `Pending` [state](ctp:api:type:QuoteState) and must be valid (not past the `validTo` date); otherwise, an [InvalidOperation](ctp:api:type:InvalidOperationError) error is returned.
@@ -126,6 +129,7 @@ post:
126129
resourceType: Order
127130
resourceUpdateType: OrderUpdate
128131
get:
132+
displayName: Get Order by OrderNumber
129133
securedBy: [oauth_2_0: { scopes: ['view_orders:{projectKey}'] }]
130134
description: Retrieves an Order with the provided `orderNumber`.
131135
responses:
@@ -134,9 +138,11 @@ post:
134138
application/json:
135139
example: !include ../examples/order.example.json
136140
head:
141+
displayName: Check if Order exists by OrderNumber
137142
securedBy: [oauth_2_0: { scopes: ['view_orders:{projectKey}'] }]
138143
description: Checks if an Order exists with the provided `orderNumber`. Returns a `200 OK` status if the Order exists or a `404 Not Found` otherwise.
139144
post:
145+
displayName: Update Order by OrderNumber
140146
securedBy: [oauth_2_0: { scopes: ['manage_orders:{projectKey}'] }]
141147
description: Updates an Order in the Project using one or more [update actions](/../api/projects/orders#update-actions).
142148
body:
@@ -148,6 +154,7 @@ post:
148154
application/json:
149155
example: !include ../examples/order.example.json
150156
delete:
157+
displayName: Delete Order by OrderNumber
151158
description: |
152159
Deletes an Order in the Project.
153160
Deleting an Order produces the [OrderDeleted](ctp:api:type:OrderDeletedMessage) Message.
@@ -174,6 +181,7 @@ post:
174181
OrderEdit are containers for financial changes after an Order has been
175182
placed.
176183
get:
184+
displayName: Query OrderEdits
177185
securedBy: [oauth_2_0: { scopes: ['view_order_edits:{projectKey}'] }]
178186
description: Retrieves OrderEdits in the Project.
179187
responses:
@@ -182,12 +190,14 @@ post:
182190
application/json:
183191
example: !include ../examples/order-edits-query.example.json
184192
head:
193+
displayName: Check if OrderEdit exists by Query Predicate
185194
securedBy: [oauth_2_0: { scopes: ['view_order_edits:{projectKey}'] }]
186195
description: Checks if one or more OrderEdits exist for the provided query predicate. Returns a `200 OK` status if any OrderEdits match the query predicate, or a `404 Not Found` otherwise.
187196
queryParameters:
188197
where?:
189198
type: QueryPredicate[]
190199
post:
200+
displayName: Create OrderEdit
191201
description: |
192202
Creates an OrderEdit in the Project.
193203
You can either create multiple Order Edits for an Order and apply them sequentially to an Order, or create multiple Order Edits parallelly (as alternatives to each other) and apply one of them to the Order.
@@ -213,6 +223,7 @@ post:
213223
resourceType: OrderEdit
214224
resourceUpdateType: OrderEditUpdate
215225
get:
226+
displayName: Get OrderEdit by Key
216227
securedBy: [oauth_2_0: { scopes: ['view_order_edits:{projectKey}'] }]
217228
description: Retrieves an OrderEdit with the provided `key`.
218229
responses:
@@ -221,9 +232,11 @@ post:
221232
application/json:
222233
example: !include ../examples/order-edits.example.json
223234
head:
235+
displayName: Check if OrderEdit exists by Key
224236
securedBy: [oauth_2_0: { scopes: ['view_order_edits:{projectKey}'] }]
225237
description: Checks if an OrderEdit exists with the provided `key`. Returns a `200 OK` status if the OrderEdit exists or a `404 Not Found` otherwise.
226238
post:
239+
displayName: Update OrderEdit by Key
227240
securedBy: [oauth_2_0: { scopes: ['manage_order_edits:{projectKey}'] }]
228241
description: Updates an OrderEdit in the Project using one or more [update actions](/../api/projects/order-edits#update-actions).
229242
body:
@@ -235,6 +248,7 @@ post:
235248
application/json:
236249
example: !include ../examples/order-edits.example.json
237250
delete:
251+
displayName: Delete OrderEdit by Key
238252
securedBy: [oauth_2_0: { scopes: ['manage_order_edits:{projectKey}'] }]
239253
description: Deletes an OrderEdit in the Project.
240254
responses:
@@ -250,6 +264,7 @@ post:
250264
resourceType: OrderEdit
251265
resourceUpdateType: OrderEditUpdate
252266
get:
267+
displayName: Get OrderEdit by ID
253268
securedBy: [oauth_2_0: { scopes: ['view_order_edits:{projectKey}'] }]
254269
description: Retrieves an OrderEdit with the provided `id`.
255270
responses:
@@ -258,9 +273,11 @@ post:
258273
application/json:
259274
example: !include ../examples/order-edits.example.json
260275
head:
276+
displayName: Check if OrderEdit exists by ID
261277
securedBy: [oauth_2_0: { scopes: ['view_order_edits:{projectKey}'] }]
262278
description: Checks if an OrderEdit exists with the provided `id`. Returns a `200 OK` status if the OrderEdit exists or a `404 Not Found` otherwise.
263279
post:
280+
displayName: Update OrderEdit by ID
264281
securedBy: [oauth_2_0: { scopes: ['manage_order_edits:{projectKey}'] }]
265282
description: Updates an OrderEdit in the Project using one or more [update actions](/../api/projects/order-edits#update-actions).
266283
body:
@@ -272,6 +289,7 @@ post:
272289
application/json:
273290
example: !include ../examples/order-edits.example.json
274291
delete:
292+
displayName: Delete OrderEdit by ID
275293
securedBy: [oauth_2_0: { scopes: ['manage_order_edits:{projectKey}'] }]
276294
description: Deletes an OrderEdit in the Project.
277295
responses:
@@ -303,6 +321,7 @@ post:
303321
resourceType: Order
304322
resourceUpdateType: OrderUpdate
305323
get:
324+
displayName: Get Order by ID
306325
securedBy: [oauth_2_0: { scopes: ['view_orders:{projectKey}'] }]
307326
description: Retrieves an Order with the provided `id`.
308327
responses:
@@ -311,9 +330,11 @@ post:
311330
application/json:
312331
example: !include ../examples/order.example.json
313332
head:
333+
displayName: Check if Order exists by ID
314334
securedBy: [oauth_2_0: { scopes: ['view_orders:{projectKey}'] }]
315335
description: Checks if an Order exists with the provided `id`. Returns a `200 OK` status if the Order exists or a `404 Not Found` otherwise.
316336
post:
337+
displayName: Update Order by ID
317338
securedBy: [oauth_2_0: { scopes: ['manage_orders:{projectKey}'] }]
318339
description: Updates an Order in the Project using one or more [update actions](/../api/projects/orders#update-actions).
319340
body:
@@ -325,6 +346,7 @@ post:
325346
application/json:
326347
example: !include ../examples/order.example.json
327348
delete:
349+
displayName: Delete Order by ID
328350
description: |
329351
Deletes an Order in the Project.
330352
Deleting an Order produces the [OrderDeleted](ctp:api:type:OrderDeletedMessage) Message.

api-specs/api/resources/shopping-lists.raml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ type:
1010
(createable): ShoppingListDraft
1111
description: shopping-lists e.g. for wishlist support
1212
get:
13+
displayName: Query ShoppingLists
1314
securedBy: [oauth_2_0: { scopes: ['view_shopping_lists:{projectKey}'] }]
1415
queryParameters:
1516
expand:
@@ -24,12 +25,14 @@ get:
2425
application/json:
2526
example: !include ../examples/shopping-lists.example.json
2627
head:
28+
displayName: Check if ShoppingList exists by Query Predicate
2729
securedBy: [oauth_2_0: { scopes: ['view_shopping_lists:{projectKey}'] }]
2830
description: Checks if one or more ShoppingLists exist for the provided query predicate. Returns a `200 OK` status if any ShoppingLists match the query predicate, or a `404 Not Found` otherwise.
2931
queryParameters:
3032
where?:
3133
type: QueryPredicate[]
3234
post:
35+
displayName: Create ShoppingList
3336
securedBy: [oauth_2_0: { scopes: ['manage_shopping_lists:{projectKey}'] }]
3437
description: Create a ShoppingList in the Project.
3538
queryParameters:
@@ -54,6 +57,7 @@ post:
5457
resourceType: ShoppingList
5558
resourceUpdateType: ShoppingListUpdate
5659
get:
60+
displayName: Get ShoppingList by Key
5761
securedBy: [oauth_2_0: { scopes: ['view_shopping_lists:{projectKey}'] }]
5862
queryParameters:
5963
expand:
@@ -68,9 +72,11 @@ post:
6872
application/json:
6973
example: !include ../examples/shopping-list.example.json
7074
head:
75+
displayName: Check if ShoppingList exists by Key
7176
securedBy: [oauth_2_0: { scopes: ['view_shopping_lists:{projectKey}'] }]
7277
description: Checks if a ShoppingList exists with the provided `key`. Returns a `200 OK` status if the ShoppingList exists, or [Not Found](/../api/errors#404-not-found) otherwise.
7378
post:
79+
displayName: Update ShoppingList by Key
7480
securedBy: [oauth_2_0: { scopes: ['manage_shopping_lists:{projectKey}'] }]
7581
queryParameters:
7682
expand:
@@ -88,6 +94,7 @@ post:
8894
application/json:
8995
example: !include ../examples/shopping-list.example.json
9096
delete:
97+
displayName: Delete ShoppingList by Key
9198
is:
9299
- dataErasure
93100
securedBy: [oauth_2_0: { scopes: ['manage_shopping_lists:{projectKey}'] }]
@@ -111,6 +118,7 @@ post:
111118
resourceType: ShoppingList
112119
resourceUpdateType: ShoppingListUpdate
113120
get:
121+
displayName: Get ShoppingList by ID
114122
securedBy: [oauth_2_0: { scopes: ['view_shopping_lists:{projectKey}'] }]
115123
queryParameters:
116124
expand:
@@ -125,9 +133,11 @@ post:
125133
application/json:
126134
example: !include ../examples/shopping-list.example.json
127135
head:
136+
displayName: Check if ShoppingList exists by ID
128137
securedBy: [oauth_2_0: { scopes: ['view_shopping_lists:{projectKey}'] }]
129138
description: Checks if a ShoppingList exists with the provided `id`. Returns a `200 OK` status if the ShoppingList exists, or [Not Found](/../api/errors#404-not-found) otherwise.
130139
post:
140+
displayName: Update ShoppingList by ID
131141
securedBy: [oauth_2_0: { scopes: ['manage_shopping_lists:{projectKey}'] }]
132142
queryParameters:
133143
expand:
@@ -145,6 +155,7 @@ post:
145155
application/json:
146156
example: !include ../examples/shopping-list.example.json
147157
delete:
158+
displayName: Delete ShoppingList by ID
148159
is:
149160
- dataErasure
150161
securedBy: [oauth_2_0: { scopes: ['manage_shopping_lists:{projectKey}'] }]

0 commit comments

Comments
 (0)