Skip to content

Commit 178cffb

Browse files
committed
Updated API from documentation release
1 parent 55686e5 commit 178cffb

File tree

5 files changed

+56
-1
lines changed

5 files changed

+56
-1
lines changed

api-specs/api/resources/cart-discounts.raml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ description:
1212
Cart discounts are used to change the prices of different elements within a
1313
cart.
1414
get:
15+
displayName: Query CartDiscounts
1516
securedBy:
1617
[
1718
oauth_2_0:
@@ -26,6 +27,7 @@ get:
2627
application/json:
2728
example: !include ../examples/cart-discounts.example.json
2829
head:
30+
displayName: Check if CartDiscount exists by Query Predicate
2931
securedBy:
3032
[
3133
oauth_2_0:
@@ -39,6 +41,7 @@ head:
3941
where?:
4042
type: QueryPredicate[]
4143
post:
44+
displayName: Create CartDiscount
4245
securedBy:
4346
[
4447
oauth_2_0:
@@ -67,6 +70,7 @@ post:
6770
resourceType: CartDiscount
6871
resourceUpdateType: CartDiscountUpdate
6972
get:
73+
displayName: Get CartDiscount by Key
7074
securedBy:
7175
[
7276
oauth_2_0:
@@ -81,6 +85,7 @@ post:
8185
application/json:
8286
example: !include ../examples/cart-discount.example.json
8387
head:
88+
displayName: Check if CartDiscount exists by Key
8489
securedBy:
8590
[
8691
oauth_2_0:
@@ -91,6 +96,7 @@ post:
9196
]
9297
description: Checks if a CartDiscount exists with the provided `key`. Returns a `200 OK` status if the CartDiscount exists or a `404 Not Found` otherwise.
9398
post:
99+
displayName: Update CartDiscount by Key
94100
securedBy:
95101
[
96102
oauth_2_0:
@@ -111,6 +117,7 @@ post:
111117
application/json:
112118
example: !include ../examples/cart-discount-updated.example.json
113119
delete:
120+
displayName: Delete CartDiscount by Key
114121
securedBy:
115122
[
116123
oauth_2_0:
@@ -136,6 +143,7 @@ post:
136143
resourceType: CartDiscount
137144
resourceUpdateType: CartDiscountUpdate
138145
get:
146+
displayName: Get CartDiscount by ID
139147
securedBy:
140148
[
141149
oauth_2_0:
@@ -150,6 +158,7 @@ post:
150158
application/json:
151159
example: !include ../examples/cart-discount.example.json
152160
head:
161+
displayName: Check if CartDiscount exists by ID
153162
securedBy:
154163
[
155164
oauth_2_0:
@@ -160,6 +169,7 @@ post:
160169
]
161170
description: Checks if a CartDiscount exists with the provided `id`. Returns a `200 OK` status if the CartDiscount exists or a `404 Not Found` otherwise.
162171
post:
172+
displayName: Update CartDiscount by ID
163173
securedBy:
164174
[
165175
oauth_2_0:
@@ -180,6 +190,7 @@ post:
180190
application/json:
181191
example: !include ../examples/cart-discount-updated.example.json
182192
delete:
193+
displayName: Delete CartDiscount by ID
183194
securedBy:
184195
[
185196
oauth_2_0:

api-specs/api/resources/discount-codes.raml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ description:
1212
Discount Codes can be added to a discount-code to enable certain discount-code
1313
discounts.
1414
get:
15+
displayName: Query DiscountCodes
1516
description: 'Deprecated OAuth 2.0 Scope: `view_orders:{projectKey}`'
1617
securedBy: [oauth_2_0: { scopes: ['view_discount_codes:{projectKey}'] }]
1718
responses:
@@ -20,12 +21,14 @@ get:
2021
application/json:
2122
example: !include ../examples/discount-codes.example.json
2223
head:
24+
displayName: Check if DiscountCode exists by Query Predicate
2325
securedBy: [oauth_2_0: { scopes: ['view_discount_codes:{projectKey}'] }]
2426
description: Checks if one or more DiscountCodes exist for the provided query predicate. Returns a `200 OK` status if any DiscountCodes match the query predicate, or a `404 Not Found` otherwise.
2527
queryParameters:
2628
where?:
2729
type: QueryPredicate[]
2830
post:
31+
displayName: Create DiscountCode
2932
description: |
3033
Creating a Discount Code produces the [DiscountCodeCreated](ctp:api:type:DiscountCodeCreatedMessage) Message.
3134
@@ -47,6 +50,7 @@ post:
4750
resourceType: DiscountCode
4851
resourceUpdateType: DiscountCodeUpdate
4952
get:
53+
displayName: Get DiscountCode by ID
5054
description: 'Deprecated OAuth 2.0 Scope: `view_orders:{projectKey}`'
5155
securedBy: [oauth_2_0: { scopes: [' view_discount_codes:{projectKey}'] }]
5256
responses:
@@ -55,9 +59,11 @@ post:
5559
application/json:
5660
example: !include ../examples/discount-code.example.json
5761
head:
62+
displayName: Check if DiscountCode exists by ID
5863
securedBy: [oauth_2_0: { scopes: ['view_discount_codes:{projectKey}'] }]
5964
description: Checks if a DiscountCode exists with the provided `id`. Returns a `200 OK` status if the DiscountCode exists or a `404 Not Found` otherwise.
6065
post:
66+
displayName: Update DiscountCode by ID
6167
description: 'Deprecated OAuth 2.0 Scope: `manage_orders:{projectKey}`'
6268
securedBy: [oauth_2_0: { scopes: ['manage_discount_codes:{projectKey}'] }]
6369
body:
@@ -69,6 +75,7 @@ post:
6975
application/json:
7076
example: !include ../examples/discount-code-updated.example.json
7177
delete:
78+
displayName: Delete DiscountCode by ID
7279
is:
7380
- dataErasure
7481
description: |
@@ -89,6 +96,7 @@ post:
8996
resourceType: DiscountCode
9097
resourceUpdateType: DiscountCodeUpdate
9198
get:
99+
displayName: Get DiscountCode by Key
92100
description: 'Deprecated OAuth 2.0 Scope: `view_orders:{projectKey}`'
93101
securedBy: [oauth_2_0: { scopes: [' view_discount_codes:{projectKey}'] }]
94102
responses:
@@ -97,9 +105,11 @@ post:
97105
application/json:
98106
example: !include ../examples/discount-code.example.json
99107
head:
108+
displayName: Check if DiscountCode exists by Key
100109
securedBy: [oauth_2_0: { scopes: ['view_discount_codes:{projectKey}'] }]
101110
description: Checks if a DiscountCode exists with the provided `key`. Returns a `200 OK` status if the DiscountCode exists or a `404 Not Found` otherwise.
102111
post:
112+
displayName: Update DiscountCode by Key
103113
description: 'Deprecated OAuth 2.0 Scope: `manage_orders:{projectKey}`'
104114
securedBy: [oauth_2_0: { scopes: ['manage_discount_codes:{projectKey}'] }]
105115
body:
@@ -111,6 +121,7 @@ post:
111121
application/json:
112122
example: !include ../examples/discount-code-updated.example.json
113123
delete:
124+
displayName: Delete DiscountCode by Key
114125
is:
115126
- dataErasure
116127
description: |

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2664,6 +2664,7 @@ uriParameters:
26642664
whereExample: isActive = true
26652665
sortExample: createdAt asc
26662666
get:
2667+
displayName: Query CartDiscounts in Store
26672668
securedBy:
26682669
[
26692670
oauth_2_0:
@@ -2683,6 +2684,7 @@ uriParameters:
26832684
application/json:
26842685
example: !include ../examples/cart-discounts.example.json
26852686
head:
2687+
displayName: Check if CartDiscount exists in Store by Query Predicate
26862688
securedBy:
26872689
[
26882690
oauth_2_0:
@@ -2701,6 +2703,7 @@ uriParameters:
27012703
where?:
27022704
type: QueryPredicate[]
27032705
post:
2706+
displayName: Create CartDiscount in Store
27042707
description: |
27052708
When using the endpoint, the Store specified in the path and the Stores specified in the payload's `stores` field are added to the CartDiscount.
27062709
@@ -2734,6 +2737,7 @@ uriParameters:
27342737
resourceType: CartDiscount
27352738
resourceUpdateType: CartDiscountUpdate
27362739
get:
2740+
displayName: Get CartDiscount in Store by Key
27372741
securedBy:
27382742
[
27392743
oauth_2_0:
@@ -2754,6 +2758,7 @@ uriParameters:
27542758
type: CartDiscount
27552759
example: !include ../examples/cart-discount.example.json
27562760
head:
2761+
displayName: Check if CartDiscount exists in Store by Key
27572762
securedBy:
27582763
[
27592764
oauth_2_0:
@@ -2769,6 +2774,7 @@ uriParameters:
27692774
]
27702775
description: Checks if a CartDiscount exists with the provided `key`. Returns a `200 OK` status if the CartDiscount exists or a `404 Not Found` otherwise.
27712776
post:
2777+
displayName: Update CartDiscount in Store by Key
27722778
description: |
27732779
To update a CartDiscount, you must have permissions for all Stores the CartDiscount is associated with, except when [removing a Store](ctp:api:type:CartDiscountRemoveStoreAction).
27742780
securedBy:
@@ -2794,6 +2800,7 @@ uriParameters:
27942800
type: CartDiscount
27952801
example: !include ../examples/cart-discount.example.json
27962802
delete:
2803+
displayName: Delete CartDiscount in Store by Key
27972804
description: |
27982805
To delete a CartDiscount, specify the `manage_cart_discounts:{projectKey}:{storeKey}` scope for all Stores associated with the CartDiscount.
27992806
@@ -2825,6 +2832,7 @@ uriParameters:
28252832
resourceType: CartDiscount
28262833
resourceUpdateType: CartDiscountUpdate
28272834
get:
2835+
displayName: Get CartDiscount in Store by ID
28282836
description: |
28292837
securedBy:
28302838
[
@@ -2846,6 +2854,7 @@ uriParameters:
28462854
type: CartDiscount
28472855
example: !include ../examples/cart-discount.example.json
28482856
head:
2857+
displayName: Check if CartDiscount exists in Store by ID
28492858
securedBy:
28502859
[
28512860
oauth_2_0:
@@ -2861,6 +2870,7 @@ uriParameters:
28612870
]
28622871
description: Checks if a CartDiscount exists with the provided `id`. Returns a `200 OK` status if the CartDiscount exists or a `404 Not Found` otherwise.
28632872
post:
2873+
displayName: Update CartDiscount in Store by ID
28642874
description: |
28652875
To update a CartDiscount, you must have permissions for all Stores the CartDiscount is associated with, except when [removing a Store](ctp:api:type:CartDiscountRemoveStoreAction).
28662876
securedBy:
@@ -2886,6 +2896,7 @@ uriParameters:
28862896
type: CartDiscount
28872897
example: !include ../examples/cart-discount.example.json
28882898
delete:
2899+
displayName: Delete CartDiscount in Store by ID
28892900
description: |
28902901
To delete a CartDiscount, specify the `manage_cart_discounts:{projectKey}:{storeKey}` scope for all Stores associated with the CartDiscount.
28912902

api-specs/api/resources/product-discounts.raml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,22 @@ type:
1010
(createable): ProductDiscountDraft
1111
description: Product discounts are used to change certain product prices.
1212
get:
13+
displayName: Query ProductDiscounts
1314
securedBy: [oauth_2_0: { scopes: ['view_products:{projectKey}'] }]
1415
responses:
1516
200:
1617
body:
1718
application/json:
1819
example: !include ../examples/product-discounts.example.json
1920
head:
21+
displayName: Check if ProductDiscount exists by Query Predicate
2022
securedBy: [oauth_2_0: { scopes: ['view_products:{projectKey}'] }]
2123
description: Checks if one or more ProductDiscounts exist for the provided query predicate. Returns a `200 OK` status if any ProductDiscounts match the query predicate, or a `404 Not Found` otherwise.
2224
queryParameters:
2325
where?:
2426
type: QueryPredicate[]
2527
post:
28+
displayName: Create ProductDiscount
2629
securedBy: [oauth_2_0: { scopes: ['manage_products:{projectKey}'] }]
2730
body:
2831
application/json:
@@ -35,7 +38,7 @@ post:
3538
/matching:
3639
type: base
3740
post:
38-
displayName: Get matching product discounts
41+
displayName: Get Matching ProductDiscount
3942
description: |
4043
This endpoint can be used to simulate which Product Discounts would be applied if a specified Product Variant had a specified Price.
4144
Given Product and Product Variant IDs and a Price, this endpoint will return the [ProductDiscount](ctp:api:type:ProductDiscount) that would have been applied to that Price.
@@ -65,16 +68,19 @@ post:
6568
resourceType: ProductDiscount
6669
resourceUpdateType: ProductDiscountUpdate
6770
get:
71+
displayName: Get ProductDiscount by Key
6872
securedBy: [oauth_2_0: { scopes: ['view_products:{projectKey}'] }]
6973
responses:
7074
200:
7175
body:
7276
application/json:
7377
example: !include ../examples/product-discount.example.json
7478
head:
79+
displayName: Check if ProductDiscount exists by Key
7580
securedBy: [oauth_2_0: { scopes: ['view_products:{projectKey}'] }]
7681
description: Checks if a ProductDiscount exists with the provided `key`. Returns a `200 OK` status if the ProductDiscount exists or a `404 Not Found` otherwise.
7782
post:
83+
displayName: Update ProductDiscount by Key
7884
securedBy: [oauth_2_0: { scopes: ['manage_products:{projectKey}'] }]
7985
body:
8086
application/json:
@@ -85,6 +91,7 @@ post:
8591
application/json:
8692
example: !include ../examples/product-discount-updated.example.json
8793
delete:
94+
displayName: Delete ProductDiscount by Key
8895
securedBy: [oauth_2_0: { scopes: ['manage_products:{projectKey}'] }]
8996
responses:
9097
200:
@@ -99,16 +106,19 @@ post:
99106
resourceType: ProductDiscount
100107
resourceUpdateType: ProductDiscountUpdate
101108
get:
109+
displayName: Get ProductDiscount by ID
102110
securedBy: [oauth_2_0: { scopes: ['view_products:{projectKey}'] }]
103111
responses:
104112
200:
105113
body:
106114
application/json:
107115
example: !include ../examples/product-discount.example.json
108116
head:
117+
displayName: Check if ProductDiscount exists by ID
109118
securedBy: [oauth_2_0: { scopes: ['view_products:{projectKey}'] }]
110119
description: Checks if a ProductDiscount exists with the provided `id`. Returns a `200 OK` status if the ProductDiscount exists or a `404 Not Found` otherwise.
111120
post:
121+
displayName: Update ProductDiscount by ID
112122
securedBy: [oauth_2_0: { scopes: ['manage_products:{projectKey}'] }]
113123
body:
114124
application/json:
@@ -119,6 +129,7 @@ post:
119129
application/json:
120130
example: !include ../examples/product-discount-updated.example.json
121131
delete:
132+
displayName: Delete ProductDiscount by ID
122133
securedBy: [oauth_2_0: { scopes: ['manage_products:{projectKey}'] }]
123134
responses:
124135
200:

0 commit comments

Comments
 (0)