You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: api-specs/api/resources/product-projections-search.raml
+87-30Lines changed: 87 additions & 30 deletions
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,10 @@
1
1
type: base
2
2
displayName: Product Projection Search
3
-
description: |
4
-
This endpoint provides high performance search queries over ProductProjections. The query result contains the
5
-
ProductProjections for which at least one ProductVariant matches the search query. This means that variants can
6
-
be included in the result also for which the search query does not match. To determine which ProductVariants match
7
-
the search query, the returned ProductProjections include the additional field isMatchingVariant.
8
3
post:
9
-
displayName: Search Products by post
4
+
displayName: Search Products by POST
5
+
description: |
6
+
For implementing funnel search on Product Listing Pages where users select multiple filters, use this POST method.
7
+
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.
The maximum allowed URL length is 8192 characters.
33
+
Exceeding this limit will result in URL truncation, potentially leading to unexpected results.
34
+
For funnel searches on Product Listing Pages, where users select multiple filters, we recommend the [POST](ctp:api:endpoint:/{projectKey}/product-projections/search:POST) method which passes the query parameters within the request body, avoiding URL length restrictions.
34
35
queryParameters:
36
+
markMatchingVariants?:
37
+
type: boolean
38
+
default: false
39
+
description: |
40
+
Set to `true` to mark [matching variants](/../api/projects/products-search#matching-variants) in the search result.
41
+
#TODO clarify correct syntax
42
+
/text\.[a-z]{2}(-[A-Z]{2})?/:
43
+
(placeholderParam):
44
+
paramName: text
45
+
template: text.<locale>
46
+
placeholder: locale
47
+
type: string[]
48
+
required: false
49
+
description: |
50
+
The text to analyze and search for, for example as supplied by a user through a search input field.
51
+
The parameter must include the language in form of a [Locale](ctp:api:type:Locale).
52
+
The content to search in, that means the full-text search, is only performed in the localized Product content of the specified language.
35
53
fuzzy?:
36
54
type: boolean
37
-
description: Whether to apply fuzzy search on the text to analyze.
55
+
default: false
56
+
description: |
57
+
Set to `true` to apply [fuzzy search](#fuzzy-search) on the `text` to analyze.
38
58
fuzzyLevel?:
39
59
type: number
40
60
format: int32
41
61
minimum: 0
42
62
maximum: 2
43
63
description: |
44
-
The fuzzy level desired, if fuzzy is enabled. This value cannot exceed the default value that is calculated based on the length of the searched text.
45
-
markMatchingVariants?:
46
-
type: boolean
47
-
default: false
64
+
Set this parameter to overwrite the default fuzzy level.
65
+
Only applicable if `fuzzy` is `true`.
66
+
67
+
- `0` for `text` with 1-2 characters
68
+
- `1` for `text` with 3-5 characters
69
+
- `2` for `text` with more than 5 characters
70
+
71
+
If the provided value exceeds the default value, the API responds with an [InvalidInput](/../api/errors#invalidinput) error.
72
+
filter.query?:
73
+
type: string[]
48
74
description: |
49
-
If `markMatchingVariants` parameter is `true`, those ProductVariants that match the search query have the additional
50
-
field `isMatchingVariant` set to `true`. For the other variants in the same product projection, this field is set to `false`.
75
+
Applies a [filter](/../api/projects/products-search#filters) to the [query results](/../api/projects/products-search#query-results) before [facets](/../api/projects/products-search#facets) are calculated.
76
+
This parameter has an impact on facet counts.
77
+
If you don't use the `facet` parameter in the same request, use this parameter instead of `filter`.
51
78
filter?:
52
79
type: string[]
53
-
filter.facets?:
80
+
description: |
81
+
Applies a [filter](/../api/projects/products-search#filters) to the query results after facets are calculated.
82
+
This parameter does not have an impact on facet counts.
83
+
Use this parameter in combination with the `facet` and `filter.facets` parameters for multi-select faceting.
84
+
facet?:
54
85
type: string[]
55
-
filter.query?:
86
+
description: |
87
+
Requests calculation of [facets](/../api/projects/products-search#facets).
88
+
filter.facets?:
56
89
type: string[]
57
-
facet?:
90
+
description: |
91
+
Applies a [filter](/../api/projects/products-search#filters) to the calculated [facet results](/../api/projects/products-search#facet-results), not to the Products returned with the [query results](/../api/projects/products-search#query-results).
92
+
A facet's own aggregation is not filtered by its corresponding `filter.facets` criteria.
93
+
Use this parameter in combination with the `facet` and `filter` parameters for multi-select faceting.
94
+
expand?:
58
95
type: string[]
59
-
#TODO clarify correct syntax
60
-
/text\.[a-z]{2}(-[A-Z]{2})?/:
61
-
(placeholderParam):
62
-
paramName: text
63
-
template: text.<locale>
64
-
placeholder: locale
96
+
description: |
97
+
Enables server-side expansion of [References](ctp:api:type:Reference). For details, see [Reference Expansion](/../api/general-concepts#reference-expansion).
98
+
sort?:
65
99
type: string[]
66
-
required: false
100
+
description: |
101
+
Controls [sorting](/../api/projects/products-search#sorting) of results.
102
+
Use this parameter multiple times to sort by multiple fields.
103
+
104
+
* When `text` is provided, but no sort parameter is given, the results are returned in descending order of relevance (equivalent to `score desc`).
105
+
* When neither `text` nor a sort parameter is given, the sort order is nondeterministic.
106
+
limit?:
107
+
type: number
108
+
format: int32
109
+
default: 20
110
+
minimum: 0
111
+
maximum: 500
112
+
description: |
113
+
The maximum number of results returned on a [page](/../api/projects/products-search#pagination).
114
+
offset?:
115
+
type: number
116
+
format: int32
117
+
default: 0
118
+
minimum: 0
119
+
maximum: 10000
120
+
description: |
121
+
The starting point for retrieving [paginated](/../api/projects/products-search#pagination) results.
122
+
staged?:
123
+
type: boolean
124
+
description: |
125
+
Whether to search in the current or staged Product Projections.
126
+
127
+
For API Clients with the `view_published_products`, but not the `view_products` [OAuth scope](/../api/scopes#products), `true` leads to a [403 Forbidden](/../api/errors#403-forbidden) error.
Copy file name to clipboardExpand all lines: api-specs/api/traits/price-selecting.raml
+9-5Lines changed: 9 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -3,21 +3,25 @@ queryParameters:
3
3
priceCurrency?:
4
4
type: CurrencyCode
5
5
description: |
6
-
The currency used for [Product price selection](/../api/pricing-and-discounts-overview#product-price-selection).
6
+
Enables [Product price selection](/../api/pricing-and-discounts-overview#product-price-selection) and [Scoped Price Search](/../api/pricing-and-discounts-overview#scoped-price-search).
7
7
priceCountry?:
8
8
type: CountryCode
9
9
description: |
10
-
The country used for [Product price selection](/../api/pricing-and-discounts-overview#product-price-selection). It can be used only *in conjunction with* the `priceCurrency` parameter.
10
+
Enables [Product price selection](/../api/pricing-and-discounts-overview#product-price-selection) and [Scoped Price Search](/../api/pricing-and-discounts-overview#scoped-price-search).
11
+
It can be used only *in conjunction with* the `priceCurrency` parameter.
11
12
priceCustomerGroup?:
12
13
type: string
13
14
description: |
14
-
`id` of an existing [CustomerGroup](ctp:api:type:CustomerGroup) used for [Product price selection](/../api/pricing-and-discounts-overview#product-price-selection). It can be used only *in conjunction with* the `priceCurrency` parameter.
15
+
`id` of an existing [CustomerGroup](ctp:api:type:CustomerGroup) used for [Product price selection](/../api/pricing-and-discounts-overview#product-price-selection).
16
+
It can be used only *in conjunction with* the `priceCurrency` parameter.
15
17
priceCustomerGroupAssignments?:
16
18
type: string[]
17
19
(beta): true
18
20
description: |
19
-
IDs of existing [CustomerGroups](ctp:api:type:CustomerGroup) used for [Product price selection](/../api/pricing-and-discounts-overview#product-price-selection), when using [multiple Customer Groups](/../api/customers-overview#customer-groups). It can be used only *in conjunction with* the `priceCurrency` parameter.
21
+
IDs of existing [CustomerGroups](ctp:api:type:CustomerGroup) used for [Product price selection](/../api/pricing-and-discounts-overview#product-price-selection), when using [multiple Customer Groups](/../api/customers-overview#customer-groups).
22
+
It can be used only *in conjunction with* the `priceCurrency` parameter.
20
23
priceChannel?:
21
24
type: string
22
25
description: |
23
-
`id` of an existing [Channel](ctp:api:type:Channel) used for [Product price selection](/../api/pricing-and-discounts-overview#product-price-selection). It can be used only *in conjunction with* the `priceCurrency` parameter.
26
+
`id` of an existing [Channel](ctp:api:type:Channel) used for [Product price selection](/../api/pricing-and-discounts-overview#product-price-selection).
27
+
It can be used only *in conjunction with* the `priceCurrency` parameter.
Copy file name to clipboardExpand all lines: api-specs/api/types/PagedQueryResponse.raml
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,9 @@
3
3
4
4
displayName: PagedQueryResponse
5
5
type: object
6
+
description: |
7
+
Each query endpoint returns a paged query response containing the actual resources matching the query predicate plus information about [pagination](#paging).
8
+
This documents the fields all query responses have in common, for specific response types, see the respective API reference pages.
6
9
properties:
7
10
limit:
8
11
type: number
@@ -18,6 +21,7 @@ properties:
18
21
description: |
19
22
Number of [elements skipped](/../api/general-concepts#offset).
20
23
default: 0
24
+
minimum: 0
21
25
maximum: 10000
22
26
count:
23
27
type: number
@@ -35,5 +39,10 @@ properties:
35
39
When the results are filtered with a [Query Predicate](/../api/predicates/query), `total` is subject to a [limit](/../api/limits#queries).
36
40
results:
37
41
type: BaseResource[]
42
+
description: |
43
+
The resources matching the query predicate.
44
+
Each query endpoint returns resources of its specific type.
38
45
meta?:
39
46
type: object
47
+
description: |
48
+
Object containing supplementary information about the results.
Copy file name to clipboardExpand all lines: api-specs/api/types/common/Sort.raml
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -3,4 +3,5 @@
3
3
displayName: Sort
4
4
type: string
5
5
description: |
6
-
Enables server-side expansion of [References](ctp:api:type:Reference). For details, see [Reference Expansion](/../api/general-concepts#reference-expansion).
6
+
Controls [sorting](/../api//general-concepts#sorting) of query results.
7
+
Use this parameter multiple times to sort by multiple fields.
0 commit comments