Skip to content

Commit e259461

Browse files
committed
Updated API from documentation release
1 parent 14b5b0c commit e259461

File tree

3 files changed

+36
-13
lines changed

3 files changed

+36
-13
lines changed

api-specs/api/resources/as-associate.raml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ type: base
255255
displayName: Create cart in business unit
256256
securedBy: [oauth_2_0: { scopes: ['manage_orders:{projectKey}'] }]
257257
description: |
258-
Creates a [Cart](ctp:api:type:Cart) in the [BusinessUnit](ctp:api:type:BusinessUnit) referenced by `businessUnitKey`. As such, the `businessUnit` field on [CartDraft](ctp:api:type:CartDraft) is ignored for this request.
258+
Creates a Cart in the [BusinessUnit](ctp:api:type:BusinessUnit) referenced by `businessUnitKey`. As such, the `businessUnit` field on [CartDraft](ctp:api:type:CartDraft) is ignored for this request.
259259
Creating a Cart can fail with an [InvalidOperation](ctp:api:type:InvalidOperationError) if the referenced [ShippingMethod](ctp:api:type:ShippingMethod) in the [CartDraft](ctp:api:type:CartDraft) has a predicate that does not match the Cart.
260260
261261
Specific Error Codes:

api-specs/api/resources/carts.raml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,25 @@ type:
1111
description: A shopping cart holds product variants and can be ordered.
1212
get:
1313
securedBy: [oauth_2_0: { scopes: ['view_orders:{projectKey}'] }]
14+
description: Retrieves all Carts in the Project.
1415
responses:
1516
200:
1617
body:
1718
application/json:
1819
example: !include ../examples/carts.example.json
1920
head:
2021
securedBy: [oauth_2_0: { scopes: ['view_orders:{projectKey}'] }]
21-
description: Checks if a Cart exists for a given Query Predicate. Returns a `200 OK` status if any Carts match the Query Predicate, or a `404 Not Found` otherwise.
22+
displayName: Check if a Cart exists by Query Predicate
23+
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 a `404 Not Found` otherwise.
2224
queryParameters:
2325
where?:
2426
type: QueryPredicate[]
2527
post:
2628
securedBy: [oauth_2_0: { scopes: ['manage_orders:{projectKey}'] }]
2729
description: |
30+
31+
Creates a Cart in the Project.
32+
2833
If the referenced [ShippingMethod](ctp:api:type:ShippingMethod) in the [CartDraft](ctp:api:type:CartDraft) has a predicate that does not match, or if the Shipping Method is not active, an [InvalidOperation](ctp:api:type:InvalidOperationError) error is returned.
2934
3035
Specific Error Codes:
@@ -87,7 +92,7 @@ post:
8792
example: !include ../examples/cart.example.json
8893
head:
8994
securedBy: [oauth_2_0: { scopes: ['view_orders:{projectKey}'] }]
90-
description: Checks if a Cart of a Customer exists. Returns a `200 OK` status if the Cart exists or a `404 Not Found` otherwise.
95+
description: Checks if a Cart exists for a Customer. Returns a `200 OK` status if the Cart exists or a `404 Not Found` otherwise.
9196
/key={key}:
9297
(methodName): withKey
9398
type:
@@ -98,6 +103,7 @@ post:
98103
get:
99104
securedBy: [oauth_2_0: { scopes: ['view_orders:{projectKey}'] }]
100105
description: |
106+
Retrieves a Cart with the provided `key`.
101107
To ensure the Cart is up-to-date with current values (such as Prices and Discounts), use the [Recalculate](ctp:api:type:CartRecalculateAction) update action.
102108
responses:
103109
200:
@@ -106,8 +112,9 @@ post:
106112
example: !include ../examples/cart.example.json
107113
head:
108114
securedBy: [oauth_2_0: { scopes: ['view_orders:{projectKey}'] }]
109-
description: Checks if a Cart exists for a given `key`. Returns a `200 OK` status if the Cart exists or a `404 Not Found` otherwise.
115+
description: Checks if a Cart exists for the provided `key`. Returns a `200 OK` status if the Cart exists or a `404 Not Found` otherwise.
110116
post:
117+
description: Updates a Cart in the Project using one or more [update actions](/../projects/carts#update-actions).
111118
securedBy: [oauth_2_0: { scopes: ['manage_orders:{projectKey}'] }]
112119
body:
113120
application/json:
@@ -121,6 +128,7 @@ post:
121128
is:
122129
- dataErasure
123130
securedBy: [oauth_2_0: { scopes: ['manage_orders:{projectKey}'] }]
131+
description: Deletes a Cart in the Project.
124132
responses:
125133
200:
126134
body:
@@ -136,6 +144,7 @@ post:
136144
get:
137145
securedBy: [oauth_2_0: { scopes: ['view_orders:{projectKey}'] }]
138146
description: |
147+
Retrieves a Cart with the provided `id`.
139148
To ensure the Cart is up-to-date with current values (such as Prices and Discounts), use the [Recalculate](ctp:api:type:CartRecalculateAction) update action.
140149
responses:
141150
200:
@@ -144,9 +153,10 @@ post:
144153
example: !include ../examples/cart.example.json
145154
head:
146155
securedBy: [oauth_2_0: { scopes: ['view_orders:{projectKey}'] }]
147-
description: Checks if a Cart exists for a given `id`. Returns a `200 OK` status if the Cart exists or a `404 Not Found` otherwise.
156+
description: Checks if a Cart exists for the provided `id`. Returns a `200 OK` status if the Cart exists or a `404 Not Found` otherwise.
148157
post:
149158
securedBy: [oauth_2_0: { scopes: ['manage_orders:{projectKey}'] }]
159+
description: Updates a Cart in the Project using one or more [update actions](/../projects/carts#update-actions).
150160
body:
151161
application/json:
152162
example: !include ../examples/cart-update.example.json
@@ -159,6 +169,7 @@ post:
159169
is:
160170
- dataErasure
161171
securedBy: [oauth_2_0: { scopes: ['manage_orders:{projectKey}'] }]
172+
description: Deletes a Cart in the Project.
162173
responses:
163174
200:
164175
body:

api-specs/api/resources/in-store.raml

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ uriParameters:
2828
},
2929
]
3030
displayName: Query Carts in Store
31-
description: Queries Carts in a specific [Store](ctp:api:type:Store).
31+
description: Retrieves all Carts in a [Store](ctp:api:type:Store).
3232
responses:
3333
200:
3434
body:
@@ -47,12 +47,11 @@ uriParameters:
4747
],
4848
},
4949
]
50-
description: Checks if a Cart exists for a given Query Predicate. Returns a `200 OK` status if any Carts match the Query Predicate or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise.
50+
description: Checks if one or more Carts exist for the provided query predicate in a [Store](ctp:api:type:Store). Returns a `200 OK` status if any Carts match the query predicate or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise.
5151
queryParameters:
5252
where?:
5353
type: QueryPredicate[]
5454
post:
55-
displayName: Create Cart in Store
5655
securedBy:
5756
[
5857
oauth_2_0:
@@ -64,8 +63,9 @@ uriParameters:
6463
],
6564
},
6665
]
66+
displayName: Create Cart in Store
6767
description: |
68-
Creates a [Cart](ctp:api:type:Cart) in the [Store](ctp:api:type:Store) specified by `storeKey`.
68+
Creates a Cart in a [Store](ctp:api:type:Store).
6969
7070
If the referenced [ShippingMethod](ctp:api:type:ShippingMethod) in the [CartDraft](ctp:api:type:CartDraft) has a predicate that does not match, or if the Shipping Method is not active, an [InvalidOperation](ctp:api:type:InvalidOperationError) error is returned.
7171
@@ -128,7 +128,7 @@ uriParameters:
128128
],
129129
},
130130
]
131-
description: Checks if a Cart of a Customer exists. Returns a `200 OK` status if the Cart exists or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise.
131+
description: Checks if one or more Carts exist for a Customer in a [Store](ctp:api:type:Store). Returns a `200 OK` status if the Cart exists or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise.
132132
/key={key}:
133133
(methodName): withKey
134134
type:
@@ -150,6 +150,9 @@ uriParameters:
150150
},
151151
]
152152
description: |
153+
154+
Retrieves a Cart with the provided `key` in a [Store](ctp:api:type:Store).
155+
153156
If the Cart exists in the Project but does not have a `store` specified, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
154157
155158
To ensure the Cart is up-to-date with current values (such as Prices and Discounts), use the [Recalculate](ctp:api:type:CartRecalculateAction) update action.
@@ -171,7 +174,7 @@ uriParameters:
171174
],
172175
},
173176
]
174-
description: Checks if a Cart exists for a given `key`. Returns a `200 OK` status if the Cart exists or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise.
177+
description: Checks if a Cart exists for the provided `key` in a [Store](ctp:api:type:Store). Returns a `200 OK` status if the Cart exists or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise.
175178
post:
176179
displayName: Update Cart in Store by Key
177180
securedBy:
@@ -186,6 +189,8 @@ uriParameters:
186189
},
187190
]
188191
description: |
192+
Updates a Cart in a [Store](ctp:api:type:Store) using one or more [update actions](/../projects/carts#update-actions).
193+
189194
If the Cart exists in the Project but does not have a `store` specified, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
190195
body:
191196
application/json:
@@ -198,6 +203,8 @@ uriParameters:
198203
delete:
199204
displayName: Delete Cart in Store by Key
200205
description: |
206+
Deletes a Cart in a [Store](ctp:api:type:Store).
207+
201208
If the Cart exists in the Project but does not have a `store` specified, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
202209
is:
203210
- dataErasure
@@ -274,6 +281,8 @@ uriParameters:
274281
},
275282
]
276283
description: |
284+
Retrieves a Cart with the provided `id` in a [Store](ctp:api:type:Store).
285+
277286
If the Cart exists in the Project but does not have a `store` specified, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
278287
279288
To ensure the Cart is up-to-date with current values (such as Prices and Discounts), use the [Recalculate](ctp:api:type:CartRecalculateAction) update action.
@@ -295,7 +304,7 @@ uriParameters:
295304
],
296305
},
297306
]
298-
description: Checks if a Cart exists for a given `id`. Returns a `200 OK` status if the Cart exists or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise.
307+
description: Checks if a Cart exists for the provided `id` in a Store. Returns a `200 OK` status if the Cart exists or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise.
299308
post:
300309
displayName: Update Cart in Store by ID
301310
securedBy:
@@ -310,7 +319,8 @@ uriParameters:
310319
},
311320
]
312321
description: |
313-
Updates a [Cart](ctp:api:type:Cart) in the [Store](ctp:api:type:Store) specified by `storeKey`.
322+
Updates a Cart in a [Store](ctp:api:type:Store) using one or more [update actions](/../projects/carts#update-actions).
323+
314324
If the Cart exists in the Project but does not have a `store` specified, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
315325
body:
316326
application/json:
@@ -323,6 +333,8 @@ uriParameters:
323333
delete:
324334
displayName: Delete Cart in Store by ID
325335
description: |
336+
Deletes a Cart in a [Store](ctp:api:type:Store).
337+
326338
If the Cart exists in the Project but does not have a `store` specified, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
327339
is:
328340
- dataErasure

0 commit comments

Comments
 (0)