Skip to content

Commit 09f7ffe

Browse files
committed
Updated API from documentation release
1 parent a80637e commit 09f7ffe

File tree

3 files changed

+62
-38
lines changed

3 files changed

+62
-38
lines changed

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
/matching-cart:
22
type: base
3-
description: Get ShippingMethods for a cart in a store
3+
description: Get matching ShippingMethods for a Cart in a Store
44
get:
5-
displayName: Get matching ShippingMethods for a Cart in Store
5+
displayName: Get matching ShippingMethods for a Cart in a Store
66
description: |
7-
Retrieves the active ShippingMethods that can ship to the shipping address of the given Cart in a given [Store](ctp:api:type:Store).
8-
Each ShippingMethod contains exactly one ShippingRate with the flag `isMatching` set to `true`.
9-
This ShippingRate is used when the ShippingMethod is [added to the Cart](ctp:api:type:CartSetShippingMethodAction).
7+
Retrieves the active ShippingMethods that can ship to the shipping address of the provided Cart in a [Store](ctp:api:type:Store).
8+
9+
Each ShippingMethod contains exactly one ShippingRate with the flag `isMatching` set to `true`. This ShippingRate is used when the ShippingMethod is [added to the Cart](ctp:api:type:CartSetShippingMethodAction).
10+
1011
If a matching ShippingMethod has `isDefault` set to `true`, it is returned as the first item in the array.
1112
is:
1213
- expandable
@@ -32,6 +33,7 @@
3233
example: !include ../../examples/shipping-methods.example.json
3334
head:
3435
displayName: Check if matching ShippingMethod exists for a Cart in Store
36+
description: Checks if an active ShippingMethod that can ship to the shipping address of the provided Cart exists in a [Store](ctp:api:type:Store). Returns a `200 OK` status if the ShippingMethod exists or a [Not Found](/../api/errors#404-not-found) error otherwise.
3537
securedBy:
3638
- oauth_2_0:
3739
scopes:
@@ -46,4 +48,3 @@
4648
type: string
4749
description: |
4850
ID of the Cart with a shipping address set.
49-
description: Checks if an active ShippingMethod that can ship to the shipping address of the given Cart exists in the given [Store](ctp:api:type:Store). Returns a `200` status if the ShippingMethod exists, or a `404` status otherwise.

api-specs/api/resources/shipping-methods.raml

Lines changed: 45 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,15 @@ get:
2323
],
2424
},
2525
]
26+
description: Retrieves all ShippingMethods in the Project.
2627
responses:
2728
200:
2829
body:
2930
application/json:
3031
example: !include ../examples/shipping-methods.example.json
3132
head:
3233
displayName: Check if ShippingMethod exists by Query Predicate
34+
description: Checks if one or more ShippingMethods exist for the provided query predicate. Returns a `200 OK` status if any ShippingMethods match the query predicate or a [Not Found](/../api/errors#404-not-found) error otherwise.
3335
securedBy:
3436
[
3537
oauth_2_0:
@@ -42,12 +44,12 @@ head:
4244
],
4345
},
4446
]
45-
description: Checks if one or more ShippingMethods exist for the provided query predicate. Returns a `200` status if any ShippingMethods match the query predicate, or a `404` status otherwise.
4647
queryParameters:
4748
where?:
4849
type: QueryPredicate[]
4950
post:
5051
displayName: Create ShippingMethod
52+
description: Creates a ShippingMethod in the Project.
5153
securedBy:
5254
[
5355
oauth_2_0:
@@ -76,6 +78,7 @@ post:
7678
resourceUpdateType: ShippingMethodUpdate
7779
get:
7880
displayName: Get ShippingMethod by Key
81+
description: Retrieves a ShippingMethod with the provided `key`.
7982
securedBy:
8083
[
8184
oauth_2_0:
@@ -95,6 +98,7 @@ post:
9598
example: !include ../examples/shipping-method.example.json
9699
head:
97100
displayName: Check if ShippingMethod exists by Key
101+
description: Checks if a ShippingMethod exists with the provided `key`. Returns a `200 OK` status if the ShippingMethod exists or a [Not Found](/../api/errors#404-not-found) error otherwise.
98102
securedBy:
99103
[
100104
oauth_2_0:
@@ -107,9 +111,9 @@ post:
107111
],
108112
},
109113
]
110-
description: Checks if a ShippingMethod exists with the provided `key`. Returns a `200` status if the ShippingMethod exists, or a `404` status otherwise.
111114
post:
112115
displayName: Update ShippingMethod by Key
116+
description: Updates a ShippingMethod in the Project using one or more [update actions](/../api/projects/shippingMethods#update-actions).
113117
securedBy:
114118
[
115119
oauth_2_0:
@@ -131,6 +135,7 @@ post:
131135
example: !include ../examples/shipping-method.example.json
132136
delete:
133137
displayName: Delete ShippingMethod by Key
138+
description: Deletes a ShippingMethod in the Project.
134139
securedBy:
135140
[
136141
oauth_2_0:
@@ -149,13 +154,14 @@ post:
149154
example: !include ../examples/shipping-method.example.json
150155
/matching-cart:
151156
type: base
152-
description: Get ShippingMethods for a Cart
157+
description: Get matching ShippingMethods for a Cart
153158
get:
154-
displayName: Get ShippingMethods for a Cart
159+
displayName: Get matching ShippingMethods for a Cart
155160
description: |
156-
Retrieves the active ShippingMethods that can ship to the shipping address of the given Cart.
157-
Each ShippingMethod contains exactly one ShippingRate with the flag `isMatching` set to `true`.
158-
This ShippingRate is used when the ShippingMethod is [added to the Cart](ctp:api:type:CartSetShippingMethodAction).
161+
Retrieves the active ShippingMethods that can ship to the shipping address of the provided Cart.
162+
163+
Each ShippingMethod contains exactly one ShippingRate with the flag `isMatching` set to `true`. This ShippingRate is used when the ShippingMethod is [added to the Cart](ctp:api:type:CartSetShippingMethodAction).
164+
159165
If a matching ShippingMethod has `isDefault` set to `true`, it is returned as the first item in the array.
160166
is:
161167
- expandable
@@ -184,6 +190,7 @@ post:
184190
example: !include ../examples/shipping-methods.example.json
185191
head:
186192
displayName: Check if matching ShippingMethod exists for a Cart
193+
description: Checks if an active ShippingMethod exists for the provided Cart. Returns a `200 OK` status if the ShippingMethod exists or a [Not Found](/../api/errors#404-not-found) error otherwise.
187194
securedBy:
188195
[
189196
oauth_2_0:
@@ -201,17 +208,17 @@ post:
201208
type: string
202209
description: |
203210
ID of the Cart with a shipping address set.
204-
description: Checks if an active ShippingMethod exists for the given Cart. If a matching ShippingMethod has `isDefault` set to `true`, it is returned as the first item in the array. Returns a `200` status if the ShippingMethod exists, or a `404` status otherwise.
205211
/matching-cart-location:
206212
type: base
207-
description: Get ShippingMethods for a Cart and Location
213+
description: Get matching ShippingMethods for a Cart and Location
208214
get:
209-
displayName: Get ShippingMethods for a Cart and Location
215+
displayName: Get matching ShippingMethods for a Cart and Location
210216
description: |
211-
Retrieves the active ShippingMethods that can ship to the given [Location](ctp:api:type:Location)
212-
with a `predicate` that matches the given Cart.
213-
Each ShippingMethod contains exactly one ShippingRate with the flag `isMatching` set to `true`.
214-
This ShippingRate is used when the ShippingMethod is [added to the Cart](ctp:api:type:CartSetShippingMethodAction).
217+
Retrieves the active ShippingMethods that can ship to the provided [Location](ctp:api:type:Location)
218+
with a `predicate` that matches the provided Cart.
219+
220+
Each ShippingMethod contains exactly one ShippingRate with the flag `isMatching` set to `true`. This ShippingRate is used when the ShippingMethod is [added to the Cart](ctp:api:type:CartSetShippingMethodAction).
221+
215222
If a matching ShippingMethod has `isDefault` set to `true`, it is returned as the first item in the array.
216223
is:
217224
- expandable
@@ -248,6 +255,7 @@ post:
248255
example: !include ../examples/shipping-methods.example.json
249256
head:
250257
displayName: Check if matching ShippingMethod exists for a Cart and Location
258+
description: Checks if an active ShippingMethod that can ship to the provided [Location](ctp:api:type:Location) exists for the provided Cart. Returns a `200 OK` status if the ShippingMethod exists or a [Not Found](/../api/errors#404-not-found) error otherwise.
251259
securedBy:
252260
[
253261
oauth_2_0:
@@ -273,15 +281,16 @@ post:
273281
type: string
274282
description: |
275283
ID of the Cart.
276-
description: Checks if an active ShippingMethod that can ship to the given [Location](ctp:api:type:Location) exists for the given Cart. Returns a `200` status if the ShippingMethod exists, or a `404` status otherwise.
277284
/matching-orderedit:
278285
type: base
279-
description: Get ShippingMethods for an Order Edit
286+
description: Get matching ShippingMethods for an OrderEdit
280287
get:
281-
displayName: Get ShippingMethods for an Order Edit
288+
displayName: Get matching ShippingMethods for an OrderEdit
282289
description: |
283-
Retrieves the active ShippingMethods that can ship to the given [Location](ctp:api:type:Location) for an [OrderEdit](ctp:api:type:OrderEdit).
290+
Retrieves the active ShippingMethods that can ship to the provided [Location](ctp:api:type:Location) for an [OrderEdit](ctp:api:type:OrderEdit).
291+
284292
If a matching ShippingMethod has `isDefault` set to `true`, it is returned as the first item in the array.
293+
285294
If the OrderEdit preview cannot be generated, an [EditPreviewFailed](ctp:api:type:EditPreviewFailedError) error is returned.
286295
securedBy:
287296
[
@@ -314,6 +323,7 @@ post:
314323
example: !include ../examples/shipping-methods.example.json
315324
head:
316325
displayName: Check if matching ShippingMethod exists for an Order Edit
326+
description: Checks if an active ShippingMethod that can ship to the provided [Location](ctp:api:type:Location) exists for the provided [OrderEdit](ctp:api:type:OrderEdit). Returns a `200 OK` status if the ShippingMethod exists or a [Not Found](/../api/errors#404-not-found) error otherwise.
317327
securedBy:
318328
[
319329
oauth_2_0:
@@ -337,19 +347,22 @@ post:
337347
type: string
338348
description: |
339349
Name of the state, for example, Colorado.
340-
description: Checks if an active ShippingMethod that can ship to the given [Location](ctp:api:type:Location) exists for the given [OrderEdit](ctp:api:type:OrderEdit). Returns a `200` status if the ShippingMethod exists, or a `404` status otherwise.
341350
/matching-location:
342351
type: base
343-
description: Get ShippingMethods for a Location
352+
description: Get matching ShippingMethods for a Location
344353
get:
345-
displayName: Get ShippingMethods for a Location
354+
displayName: Get matching ShippingMethods for a Location
346355
description: |
347-
Retrieves the active ShippingMethods that can ship to the given [Location](/projects/zones#location).
348-
ShippingMethods that have a `predicate` defined are automatically disqualified.
349-
If the `currency` parameter is given, then the ShippingMethods must also have a rate defined in the specified currency.
350-
Each ShippingMethod contains at least one ShippingRate with the flag `isMatching` set to `true`.
351-
If the `currency` parameter is given, exactly one ShippingRate will contain it.
352-
If a matching ShippingMethod has `isDefault` set to `true`, it is returned as the first item in the array.
356+
Retrieves the active ShippingMethods that can ship to the provided [Location](/projects/zones#location).
357+
358+
The following applies:
359+
360+
- ShippingMethods that have a `predicate` defined are automatically disqualified.
361+
- If the `currency` parameter is provided, then the ShippingMethods must also have a rate defined in the specified currency.
362+
- Each ShippingMethod contains at least one ShippingRate with the flag `isMatching` set to `true`.
363+
- If the `currency` parameter is provided, exactly one ShippingRate will contain it.
364+
- If a matching ShippingMethod has `isDefault` set to `true`, it is returned as the first item in the array.
365+
353366
is:
354367
- expandable
355368
- sortable
@@ -386,6 +399,7 @@ post:
386399
example: !include ../examples/shipping-methods.example.json
387400
head:
388401
displayName: Check if matching ShippingMethod exists for a Location
402+
description: Checks if an active ShippingMethod that can ship to the provided [Location](ctp:api:type:Location) exists. Returns a `200 OK` status if the ShippingMethod exists or a [Not Found](/../api/errors#404-not-found) error otherwise.
389403
securedBy:
390404
[
391405
oauth_2_0:
@@ -411,7 +425,6 @@ post:
411425
type: string
412426
description: |
413427
The currency code compliant to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).
414-
description: Checks if an active ShippingMethod that can ship to the given [Location](ctp:api:type:Location) exists. Returns a `200` status if the ShippingMethod exists, or a `404` status otherwise.
415428
/{ID}:
416429
(methodName): withId
417430
type:
@@ -421,6 +434,7 @@ post:
421434
resourceUpdateType: ShippingMethodUpdate
422435
get:
423436
displayName: Get ShippingMethod by ID
437+
description: Retrieves a ShippingMethod with the provided `id`.
424438
securedBy:
425439
[
426440
oauth_2_0:
@@ -440,6 +454,7 @@ post:
440454
example: !include ../examples/shipping-method.example.json
441455
head:
442456
displayName: Check if ShippingMethod exists by ID
457+
description: Checks if a ShippingMethod exists with the provided `id`. Returns a `200 OK` status if the ShippingMethod exists or a [Not Found](/../api/errors#404-not-found) error otherwise.
443458
securedBy:
444459
[
445460
oauth_2_0:
@@ -452,9 +467,9 @@ post:
452467
],
453468
},
454469
]
455-
description: Checks if a ShippingMethod exists with the provided `id`. Returns a `200` status if the ShippingMethod exists, or a `404` status otherwise.
456470
post:
457471
displayName: Update ShippingMethod by ID
472+
description: Updates a ShippingMethod in the Project using one or more [update actions](/../api/projects/shippingMethods#update-actions).
458473
securedBy:
459474
[
460475
oauth_2_0:
@@ -476,6 +491,7 @@ post:
476491
example: !include ../examples/shipping-method.example.json
477492
delete:
478493
displayName: Delete ShippingMethod by ID
494+
description: Deletes a ShippingMethod in the Project.
479495
securedBy:
480496
[
481497
oauth_2_0:

api-specs/api/resources/zones.raml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ type:
1111
description: Zones allow defining ShippingRates for specific Locations.
1212
get:
1313
displayName: Query Zones
14+
description: Retrieves all Zones in the Project.
1415
securedBy: [oauth_2_0: { scopes: ['view_orders:{projectKey}'] }]
1516
responses:
1617
200:
@@ -19,13 +20,14 @@ get:
1920
example: !include ../examples/zones.example.json
2021
head:
2122
displayName: Check if Zone exists by Query Predicate
23+
description: Checks if one or more Zones exist for the provided query predicate. Returns a `200 OK` status if any Zones match the query predicate, or a [Not Found](/../api/errors#404-not-found) error otherwise.
2224
securedBy: [oauth_2_0: { scopes: ['view_orders:{projectKey}'] }]
23-
description: Checks if one or more Zones exist for the provided query predicate. Returns a `200` status if any Zones match the query predicate, or a `404` status otherwise.
2425
queryParameters:
2526
where?:
2627
type: QueryPredicate[]
2728
post:
2829
displayName: Create Zone
30+
description: Creates a Zone in the Project.
2931
securedBy: [oauth_2_0: { scopes: ['manage_orders:{projectKey}'] }]
3032
body:
3133
application/json:
@@ -44,6 +46,7 @@ post:
4446
resourceUpdateType: ZoneUpdate
4547
get:
4648
displayName: Get Zone by Key
49+
description: Retrieves a Zone with the provided `key`.
4750
securedBy: [oauth_2_0: { scopes: ['view_orders:{projectKey}'] }]
4851
responses:
4952
200:
@@ -52,10 +55,11 @@ post:
5255
example: !include ../examples/zone.example.json
5356
head:
5457
displayName: Check if Zone exists by Key
58+
description: Checks if a Zone exists with the provided `key`. Returns a `200 OK` status if the Zone exists or a [Not Found](/../api/errors#404-not-found) error otherwise.
5559
securedBy: [oauth_2_0: { scopes: ['view_orders:{projectKey}'] }]
56-
description: Checks if a Zone exists with the provided `key`. Returns a `200` status if the Zone exists, or a `404` status otherwise.
5760
post:
5861
displayName: Update Zone by Key
62+
description: Updates a Zone in the Project using one or more [update actions](/../api/projects/zones#update-actions).
5963
securedBy: [oauth_2_0: { scopes: ['manage_orders:{projectKey}'] }]
6064
body:
6165
application/json:
@@ -67,6 +71,7 @@ post:
6771
example: !include ../examples/zone.example.json
6872
delete:
6973
displayName: Delete Zone by Key
74+
description: Deletes a Zone in the Project.
7075
securedBy: [oauth_2_0: { scopes: ['manage_orders:{projectKey}'] }]
7176
responses:
7277
200:
@@ -82,6 +87,7 @@ post:
8287
resourceUpdateType: ZoneUpdate
8388
get:
8489
displayName: Get Zone by ID
90+
description: Retrieves a Zone with the provided `id`.
8591
securedBy: [oauth_2_0: { scopes: ['view_orders:{projectKey}'] }]
8692
responses:
8793
200:
@@ -90,8 +96,8 @@ post:
9096
example: !include ../examples/zone.example.json
9197
head:
9298
displayName: Check if Zone exists by ID
99+
description: Checks if a Zone exists with the provided `id`. Returns a `200 OK` status if the Zone exists or a [Not Found](/../api/errors#404-not-found) error otherwise.
93100
securedBy: [oauth_2_0: { scopes: ['view_orders:{projectKey}'] }]
94-
description: Checks if a Zone exists with the provided `id`. Returns a `200` status if the Zone exists, or a `404` status otherwise.
95101
post:
96102
displayName: Update Zone by ID
97103
securedBy: [oauth_2_0: { scopes: ['manage_orders:{projectKey}'] }]
@@ -105,6 +111,7 @@ post:
105111
example: !include ../examples/zone.example.json
106112
delete:
107113
displayName: Delete Zone by ID
114+
description: Deletes a Zone in the Project.
108115
securedBy: [oauth_2_0: { scopes: ['manage_orders:{projectKey}'] }]
109116
responses:
110117
200:

0 commit comments

Comments
 (0)