Skip to content

Commit 5d1789f

Browse files
committed
Updated API from documentation release
1 parent bcde7bb commit 5d1789f

10 files changed

+90
-6
lines changed

api-specs/api/resources/categories.raml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ type:
1010
(createable): CategoryDraft
1111
description: Categories are used to organize products in a hierarchical structure.
1212
get:
13+
displayName: Query Categories
1314
description: |
1415
Either the [scope](/../api/scopes) `view_products:{projectKey}` or `view_categories:{projectKey}` is required.
1516
securedBy:
@@ -26,6 +27,7 @@ get:
2627
application/json:
2728
example: !include ../examples/categories.example.json
2829
head:
30+
displayName: Check if Category exists by Query Predicate
2931
securedBy:
3032
[
3133
oauth_2_0:
@@ -44,6 +46,7 @@ head:
4446
[Number](ctp:api:type:AttributeNumberType), [Date](ctp:api:type:AttributeDateType),
4547
[Time](ctp:api:type:AttributeTimeType), and [DateTime](ctp:api:type:AttributeDateTimeType) attribute types.
4648
post:
49+
displayName: Create Category
4750
description: |
4851
Either the [scope](/../api/scopes) `manage_products:{projectKey}` or `manage_categories:{projectKey}` is required.
4952
@@ -72,6 +75,7 @@ post:
7275
resourceType: Category
7376
resourceUpdateType: CategoryUpdate
7477
get:
78+
displayName: Get Category by Key
7579
description: |
7680
Either the [scope](/../api/scopes) `view_products:{projectKey}` or `view_categories:{projectKey}` is required.
7781
securedBy:
@@ -88,6 +92,7 @@ post:
8892
application/json:
8993
example: !include ../examples/category.example.json
9094
head:
95+
displayName: Check if Category exists by Key
9196
securedBy:
9297
[
9398
oauth_2_0:
@@ -98,6 +103,7 @@ post:
98103
]
99104
description: Checks if a Category exists with the provided `key`. Returns a `200 OK` status if the Category exists or a `404 Not Found` otherwise.
100105
post:
106+
displayName: Update Category by Key
101107
description: |
102108
Either the [scope](/../api/scopes) `manage_products:{projectKey}` or `manage_categories:{projectKey}` is required.
103109
securedBy:
@@ -120,6 +126,7 @@ post:
120126
application/json:
121127
example: !include ../examples/category.example.json
122128
delete:
129+
displayName: Delete Category by Key
123130
description: |
124131
Either the [scope](/../api/scopes) `manage_products:{projectKey}` or `manage_categories:{projectKey}` is required.
125132
securedBy:
@@ -146,6 +153,7 @@ post:
146153
resourceType: Category
147154
resourceUpdateType: CategoryUpdate
148155
get:
156+
displayName: Get Category by ID
149157
description: |
150158
Either the [scope](/../api/scopes) `view_products:{projectKey}` or `view_categories:{projectKey}` is required.
151159
securedBy:
@@ -162,6 +170,7 @@ post:
162170
application/json:
163171
example: !include ../examples/category.example.json
164172
head:
173+
displayName: Check if Category exists by ID
165174
securedBy:
166175
[
167176
oauth_2_0:
@@ -172,6 +181,7 @@ post:
172181
]
173182
description: Checks if a Category exists with the provided `id`. Returns a `200 OK` status if the Category exists or a `404 Not Found` otherwise.
174183
post:
184+
displayName: Update Category by ID
175185
description: |
176186
Either the [scope](/../api/scopes) `manage_products:{projectKey}` or `manage_categories:{projectKey}` is required.
177187
securedBy:
@@ -194,6 +204,7 @@ post:
194204
application/json:
195205
example: !include ../examples/category.example.json
196206
delete:
207+
displayName: Delete Category by ID
197208
description: |
198209
Either the [scope](/../api/scopes) `manage_products:{projectKey}` or `manage_categories:{projectKey}` is required.
199210
securedBy:

api-specs/api/resources/inventory.raml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@ type:
1010
(createable): InventoryEntryDraft
1111
description: Inventory allows you to track stock quantities.
1212
get:
13+
displayName: Query InventoryEntries
1314
securedBy: [oauth_2_0: { scopes: ['view_products:{projectKey}'] }]
1415
responses:
1516
200:
1617
body:
1718
application/json:
1819
example: !include ../examples/inventories.example.json
1920
head:
21+
displayName: Check if InventoryEntry exists by Query Predicate
2022
securedBy: [oauth_2_0: { scopes: ['view_products:{projectKey}'] }]
2123
description: Checks if one or more InventoryEntries exist for the provided query predicate. Returns a `200 OK` status if any Inventory Entries match the Query Predicate, a `404 Not Found` otherwise.
2224
queryParameters:
@@ -28,6 +30,7 @@ head:
2830
[Number](ctp:api:type:AttributeNumberType), [Date](ctp:api:type:AttributeDateType),
2931
[Time](ctp:api:type:AttributeTimeType), and [DateTime](ctp:api:type:AttributeDateTimeType) attribute types.
3032
post:
33+
displayName: Create InventoryEntry
3134
description: Produces the [InventoryEntryCreated](ctp:api:type:InventoryEntryCreatedMessage) Message.
3235
securedBy: [oauth_2_0: { scopes: ['manage_products:{projectKey}'] }]
3336
body:
@@ -46,16 +49,19 @@ post:
4649
resourceType: InventoryEntry
4750
resourceUpdateType: InventoryEntryUpdate
4851
get:
52+
displayName: Get InventoryEntry by ID
4953
securedBy: [oauth_2_0: { scopes: ['view_products:{projectKey}'] }]
5054
responses:
5155
200:
5256
body:
5357
application/json:
5458
example: !include ../examples/inventory.example.json
5559
head:
60+
displayName: Check if InventoryEntry exists by ID
5661
securedBy: [oauth_2_0: { scopes: ['view_products:{projectKey}'] }]
5762
description: Checks if an InventoryEntry exists with the provided `id`. Returns a `200 OK` status if the InventoryEntry exists or a `404 Not Found` otherwise.
5863
post:
64+
displayName: Update InventoryEntry by ID
5965
securedBy: [oauth_2_0: { scopes: ['manage_products:{projectKey}'] }]
6066
body:
6167
application/json:
@@ -66,6 +72,7 @@ post:
6672
application/json:
6773
example: !include ../examples/inventory.example.json
6874
delete:
75+
displayName: Delete InventoryEntry by ID
6976
description: Produces the [InventoryEntryDeleted](ctp:api:type:InventoryEntryDeletedMessage) Message.
7077
securedBy: [oauth_2_0: { scopes: ['manage_products:{projectKey}'] }]
7178
responses:
@@ -81,16 +88,19 @@ post:
8188
resourceType: InventoryEntry
8289
resourceUpdateType: InventoryEntryUpdate
8390
get:
91+
displayName: Get InventoryEntry by Key
8492
securedBy: [oauth_2_0: { scopes: ['view_products:{projectKey}'] }]
8593
responses:
8694
200:
8795
body:
8896
application/json:
8997
example: !include ../examples/inventory.example.json
9098
head:
99+
displayName: Check if InventoryEntry exists by Key
91100
securedBy: [oauth_2_0: { scopes: ['view_products:{projectKey}'] }]
92101
description: Checks if an InventoryEntry exists with the provided `key`. Returns a `200 OK` status if the InventoryEntry exists or a `404 Not Found` otherwise.
93102
post:
103+
displayName: Update InventoryEntry by Key
94104
securedBy: [oauth_2_0: { scopes: ['manage_products:{projectKey}'] }]
95105
body:
96106
application/json:
@@ -101,6 +111,7 @@ post:
101111
application/json:
102112
example: !include ../examples/inventory.example.json
103113
delete:
114+
displayName: Delete InventoryEntry by Key
104115
description: Produces the [InventoryEntryDeleted](ctp:api:type:InventoryEntryDeletedMessage) Message.
105116
securedBy: [oauth_2_0: { scopes: ['manage_products:{projectKey}'] }]
106117
responses:

api-specs/api/resources/product-projections-search.raml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
type: base
22
displayName: Product Projection Search
33
post:
4-
displayName: Search Products by POST
4+
displayName: Product Projection Search with POST
55
description: |
66
For implementing funnel search on Product Listing Pages where users select multiple filters, use this POST method.
77
To avoid URL length restrictions, this method passes the same query parameters as defined in the [GET](ctp:api:endpoint:/{projectKey}/product-projections/search:GET) method, within the request body in URL-encoded format.
@@ -26,7 +26,7 @@ post:
2626
example: !include ../examples/product-projections-search.example.json
2727
type: ProductProjectionPagedSearchResponse
2828
get:
29-
displayName: Search Products by GET
29+
displayName: Product Projection Search with GET
3030
description: |
3131
This method appends query parameters to the URL.
3232
The maximum allowed URL length is 8192 characters.

api-specs/api/resources/product-projections-suggest.raml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
type: base
2-
displayName: Product Projection Suggestion
2+
displayName: Search Term Suggestions
33
description: The source of data for suggestions is the searchKeyword field in a product
44
get:
5-
displayName: Get suggestion keywords
5+
displayName: Query Suggestions
66
queryParameters:
77
/searchKeywords\.[a-z]{2}(-[A-Z]{2})?/:
88
type: string[]

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ description: |
99
A projected representation of a product shows the product with its current or staged data. The current or staged
1010
representation of a product in a catalog is called a product projection.
1111
get:
12+
displayName: Query ProductProjections
1213
securedBy:
1314
[
1415
oauth_2_0:
@@ -35,6 +36,7 @@ get:
3536
application/json:
3637
example: !include ../examples/product-projections.example.json
3738
head:
39+
displayName: Check if ProductProjection exists by Query Predicate
3840
securedBy:
3941
[
4042
oauth_2_0:
@@ -59,6 +61,7 @@ head:
5961
uriParameterName: key
6062
resourceType: ProductProjection
6163
get:
64+
displayName: Get ProductProjection by Key
6265
securedBy:
6366
[
6467
oauth_2_0:
@@ -85,6 +88,7 @@ head:
8588
application/json:
8689
example: !include ../examples/product-projection.example.json
8790
head:
91+
displayName: Check if ProductProjection exists by Key
8892
securedBy:
8993
[
9094
oauth_2_0:
@@ -104,6 +108,7 @@ head:
104108
uriParameterName: ID
105109
resourceType: ProductProjection
106110
get:
111+
displayName: Get ProductProjection by ID
107112
securedBy:
108113
[
109114
oauth_2_0:
@@ -128,6 +133,7 @@ head:
128133
application/json:
129134
example: !include ../examples/product-projection.example.json
130135
head:
136+
displayName: Check if ProductProjection exists by ID
131137
securedBy:
132138
[
133139
oauth_2_0:

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,22 @@ description: |
1717
1818
As a good practice, we recommend first creating Products in the project, and then creating Product Selection.
1919
get:
20+
displayName: Query ProductSelections
2021
securedBy: [oauth_2_0: { scopes: ['view_product_selections:{projectKey}'] }]
2122
responses:
2223
200:
2324
body:
2425
application/json:
2526
example: !include ../examples/product-selections.example.json
2627
head:
28+
displayName: Check if ProductSelection exists by Query Predicate
2729
securedBy: [oauth_2_0: { scopes: ['view_product_selections:{projectKey}'] }]
2830
description: Checks if one or more ProductSelections exist for the provided query predicate. Returns a `200 OK` status if any ProductSelections match the query predicate, or a `404 Not Found` otherwise.
2931
queryParameters:
3032
where?:
3133
type: QueryPredicate[]
3234
post:
35+
displayName: Create ProductSelection
3336
securedBy: [oauth_2_0: { scopes: ['manage_product_selections:{projectKey}'] }]
3437
body:
3538
application/json:
@@ -47,16 +50,19 @@ post:
4750
resourceType: ProductSelection
4851
resourceUpdateType: ProductSelectionUpdate
4952
get:
53+
displayName: Get ProductSelection by Key
5054
securedBy: [oauth_2_0: { scopes: ['view_product_selections:{projectKey}'] }]
5155
responses:
5256
200:
5357
body:
5458
application/json:
5559
example: !include ../examples/product-selection.example.json
5660
head:
61+
displayName: Check if ProductSelection exists by Key
5762
securedBy: [oauth_2_0: { scopes: ['view_product_selections:{projectKey}'] }]
5863
description: Checks if a ProductSelection exists with the provided `key`. Returns a `200 OK` status if the ProductSelection exists or a `404 Not Found` otherwise.
5964
post:
65+
displayName: Update ProductSelection by Key
6066
securedBy:
6167
[oauth_2_0: { scopes: ['manage_product_selections:{projectKey}'] }]
6268
body:
@@ -68,6 +74,7 @@ post:
6874
application/json:
6975
example: !include ../examples/product-selection.example.json
7076
delete:
77+
displayName: Delete ProductSelection by Key
7178
securedBy:
7279
[oauth_2_0: { scopes: ['manage_product_selections:{projectKey}'] }]
7380
description: Deletion will only succeed if the Product Selection is not assigned to any [Store](ctp:api:type:Store).
@@ -79,6 +86,7 @@ post:
7986
/products:
8087
type: base
8188
get:
89+
displayName: Query Products in ProductSelection by Key
8290
description:
8391
queryParameters:
8492
where?:
@@ -109,16 +117,19 @@ post:
109117
resourceType: ProductSelection
110118
resourceUpdateType: ProductSelectionUpdate
111119
get:
120+
displayName: Get ProductSelection by ID
112121
securedBy: [oauth_2_0: { scopes: ['view_product_selections:{projectKey}'] }]
113122
responses:
114123
200:
115124
body:
116125
application/json:
117126
example: !include ../examples/product-selection.example.json
118127
head:
128+
displayName: Check if ProductSelection exists by ID
119129
securedBy: [oauth_2_0: { scopes: ['view_product_selections:{projectKey}'] }]
120130
description: Checks if a ProductSelection exists with the provided `id`. Returns a `200 OK` status if the ProductSelection exists or a `404 Not Found` otherwise.
121131
post:
132+
displayName: Update ProductSelection by ID
122133
securedBy:
123134
[oauth_2_0: { scopes: ['manage_product_selections:{projectKey}'] }]
124135
body:
@@ -130,6 +141,7 @@ post:
130141
application/json:
131142
example: !include ../examples/product-selection.example.json
132143
delete:
144+
displayName: Delete ProductSelection by ID
133145
securedBy:
134146
[oauth_2_0: { scopes: ['manage_product_selections:{projectKey}'] }]
135147
description: Deletion will only succeed if the Product Selection is not assigned to any [Store](ctp:api:type:Store).
@@ -141,6 +153,7 @@ post:
141153
/products:
142154
type: base
143155
get:
156+
displayName: Query Products in ProductSelection by ID
144157
description:
145158
queryParameters:
146159
where?:

0 commit comments

Comments
 (0)