Skip to content

Commit a4fe92e

Browse files
committed
Updated API from documentation release
1 parent dfc5b97 commit a4fe92e

12 files changed

+58
-17
lines changed

api-specs/api/api.raml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@ traits:
3333
versioned: !include traits/versioned.raml
3434
priceSelecting: !include traits/price-selecting.raml
3535
projectionSelecting: !include traits/projection-selecting.raml
36+
projectionSelectingTailoring: !include traits/projection-selecting-tailoring.raml
3637
localeProjecting: !include traits/locale-projecting.raml
3738
storeProjecting: !include traits/store-projecting.raml
39+
storeProjectingTailoring: !include traits/store-projecting-tailoring.raml
3840
dataErasure: !include traits/data-erasure.raml
3941
types: !include types/types.raml
4042
mediaType: application/json

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2518,9 +2518,11 @@ uriParameters:
25182518
25192519
If [ProductSelection](ctp:api:type:ProductSelection) is used, it affects the [availability of the Product](/projects/stores#products-available-in-store) in the specified Store.
25202520
2521+
If a [ProductTailoring](ctp:api:type:ProductTailoring) exists for the Product with the given `key` and the given Store, this endpoint returns the ProductProjection with tailored data.
2522+
25212523
When used with an API Client that has the `view_published_products:{projectKey}` scope, this endpoint only returns published (current) Product Projections.
25222524
is:
2523-
- projectionSelecting
2525+
- projectionSelectingTailoring
25242526
- priceSelecting
25252527
- localeProjecting
25262528
head:
@@ -2563,9 +2565,11 @@ uriParameters:
25632565
25642566
If [ProductSelection](ctp:api:type:ProductSelection) is used, it affects the [availability of the Product](/projects/stores#products-available-in-store) in the specified Store.
25652567
2568+
If a [ProductTailoring](ctp:api:type:ProductTailoring) exists for the Product with the given `id` and the given Store, this endpoint returns the ProductProjection with tailored data.
2569+
25662570
When used with an API Client that has the `view_published_products:{projectKey}` scope, this endpoint only returns published (current) Product Projections.
25672571
is:
2568-
- projectionSelecting
2572+
- projectionSelectingTailoring
25692573
- priceSelecting
25702574
- localeProjecting
25712575
head:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ get:
7171
- projectionSelecting
7272
- priceSelecting
7373
- localeProjecting
74-
- storeProjecting
74+
- storeProjectingTailoring
7575
- expandable
7676
securedBy:
7777
[

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ get:
2828
- projectionSelecting
2929
- priceSelecting
3030
- localeProjecting
31-
- storeProjecting
31+
- storeProjectingTailoring
3232
responses:
3333
200:
3434
body:
@@ -78,7 +78,7 @@ head:
7878
- projectionSelecting
7979
- priceSelecting
8080
- localeProjecting
81-
- storeProjecting
81+
- storeProjectingTailoring
8282
responses:
8383
200:
8484
body:
@@ -121,7 +121,7 @@ head:
121121
- projectionSelecting
122122
- priceSelecting
123123
- localeProjecting
124-
- storeProjecting
124+
- storeProjectingTailoring
125125
responses:
126126
200:
127127
body:
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#%RAML 1.0 Trait
2+
3+
queryParameters:
4+
staged?:
5+
type: boolean
6+
default: false
7+
description: |
8+
If `false`,
9+
10+
* this endpoint returns the [current](/projects/productProjections#current--staged) Product Projection if the Product is published, a [ResourceNotFound](/errors#resourcenotfound) error otherwise.
11+
12+
* this endpoint returns the ProductProjection with **tailored** Product information (if a [ProductTailoring](ctp:api:type:ProductTailoring) exists for the Product) when the ProductTailoring's `published` is `true`.
13+
* this endpoint returns the ProductProjection with **original** Product information when the ProductTailoring's `published` is `false`.
14+
15+
If `true`,
16+
17+
* this endpoint returns the [staged](/projects/productProjections#current--staged) Product Projection (only for API Clients that have the `view_products:{projectKey}` scope).
18+
19+
* this endpoint returns the ProductProjection with **tailored** Product information (if a ProductTailoring exists for the Product) when either the ProductTailoring's `published` or the [ProductCatalogData](ctp:api:type:ProductCatalogData) `published` is `true`.
20+
If `published` is `false` for both ProductTailoring and ProductCatalogData, the ProductProjection contains **original** Product information.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#%RAML 1.0 Trait
2+
queryParameters:
3+
storeProjection:
4+
type: string
5+
required: false
6+
description: |
7+
`key` of an existing [Store](ctp:api:type:Store).
8+
If the Store has defined `languages`, `countries`, `distributionChannels`, or `supplyChannels`,
9+
they are used for projections based on [locale](ctp:api:type:ProductProjectionLocales), [price](ctp:api:type:ProductProjectionPrices),
10+
and [inventory](ctp:api:type:ProductProjectionInventoryEntries).
11+
If [Product Selections](/../api/projects/product-selections) are used, the API does not take the [availability of the Product in the specified Store](/../api/projects/stores#products-available-in-store) into account.
12+
[Product Tailoring](/../api/projects/product-tailoring) modifies the product information returned in API responses, but evaluating [Query Predicates](/../api/predicates/query) is restricted to the original product information.
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
#%RAML 1.0 Trait
2-
32
queryParameters:
43
storeProjection:
54
type: string
65
required: false
76
description: |
87
`key` of an existing [Store](ctp:api:type:Store).
9-
If the Store has defined some languages, countries, distribution or supply Channels,
8+
If the Store has defined `languages`, `countries`, `distributionChannels`, or `supplyChannels`,
109
they are used for projections based on [locale](ctp:api:type:ProductProjectionLocales), [price](ctp:api:type:ProductProjectionPrices),
1110
and [inventory](ctp:api:type:ProductProjectionInventoryEntries).
12-
If the Store has defined [Product Selections](ctp:api:type:ProductSelection), they have no effect on the results of this query.
11+
For Projects with active [Product Selections](/../api/projects/product-selections), the API does not take the [availability of the Product in the specified Store](/../api/projects/stores#products-available-in-store) into account.

api-specs/api/types/product-search/ProductSearchProjectionParams.raml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ properties:
3939
type: string
4040
description: |
4141
`key` of an existing [Store](ctp:api:type:Store).
42-
If the Store has defined some languages, countries, distribution or supply Channels,
42+
If the Store has defined `languages`, `countries`, `distributionChannels`, or `supplyChannels`,
4343
they are used for projections based on [locale](ctp:api:type:ProductProjectionLocales), [price](ctp:api:type:ProductProjectionPrices),
4444
and [inventory](ctp:api:type:ProductProjectionInventoryEntries).
45-
If the Store has defined [Product Selections](ctp:api:type:ProductSelection) or [Product Tailoring](ctp:api:type:ProductTailoring), they have no effect on the results of this query.
45+
For Projects with active [Product Selections](/../api/projects/product-selections), the API does not take the [availability of the Product in the specified Store](/../api/projects/stores#products-available-in-store) into account.
46+
[Product Tailoring](/../api/projects/product-tailoring) modifies the product information returned in API responses, but evaluating [query expressions](/../api/search-query-language#simple-expressions) is restricted to the original product information.

api-specs/api/types/product-tailoring/ProductTailoring.raml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ displayName: ProductTailoring
44
type: BaseResource
55
(updateType): ProductTailoringUpdate
66
description: |
7-
A single ProductTailoring representation contains the _current_ and the _staged_ representation of its product data tailored per Store.
7+
A single ProductTailoring representation contains the _current_ and the _staged_ representation of its product information tailored per Store.
88
example: !include ../../examples/product-tailoring.example.json
99
properties:
1010
id:
@@ -49,7 +49,9 @@ properties:
4949
published:
5050
type: boolean
5151
description: |
52-
`true` if the ProductTailoring is published.
52+
If `true`, the tailored information contained in the `current` [ProductTailoringData](ctp:api:type:ProductTailoringData) is provided when [retrieving the ProductProjection in Store](/../api/projects/product-tailoring#retrieve-product-projection-with-tailored-information).
53+
For information not part of the ProductTailoringData, the original information contained in the [ProductData](ctp:api:type:ProductData) is provided.
54+
If `false`, only the original information contained in the ProductData is provided.
5355
current:
5456
type: ProductTailoringData
5557
description: |

api-specs/api/types/product-tailoring/ProductTailoringData.raml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
displayName: ProductTailoringData
44
type: object
55
description: |
6-
Contains all the tailored data of a Product.
6+
Contains all the tailored information of a Product.
77
properties:
88
name?:
99
type: LocalizedString

0 commit comments

Comments
 (0)