-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.json
584 lines (584 loc) · 20.3 KB
/
schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "FINDOLOGIC Search API JSON response 1.0",
"description": "JSON format for search results, filters, and more.",
"definitions": {
"filterMetadata": {
"description": "Configured and computed data for individual filters.",
"type": "object",
"properties": {
"value": {
"description": "The filter value, as selected or suitable for visualization.",
"type": ["string", "object", "number"],
"minLength": 1
},
"min": {
"type": "number",
"description": "The absolute possible minimum value of the filter given present query and other filters."
},
"max": {
"type": "number",
"description": "The absolute possible maximum value of the filter given present query and other filters."
},
"selectedMin": {
"type": "number",
"description": "In case of a selected filter, the minimum value of the selected range."
},
"selectedMax": {
"type": "number",
"description": "In case of a selected filter, the maximum value of the selected range."
},
"weight": {
"description": "The numeric indicator of the impact the filter value has on the result. The higher, the more specific the results will be.",
"type": "number"
},
"frequency": {
"description": "The number of products matching a filter. Not supported in all configuration constellations.",
"type": ["number", "null"]
},
"frequencyType": {
"type": "string",
"enum": [
"additive",
"absolute"
],
"description": "In case of a selected-filter, this property indicates whether the frequency is the number of additional products you'll get after selecting the filter (additive), or whether it's the total number of results you'll have after selecting the filter (absolute)."
},
"color": {
"description": "For color filters, the hexadecimal code corresponding to the color. The filter's value is the configured color name in such a case.",
"type": "string",
"pattern": "^#[0-9A-Fa-f]{6}$"
},
"selected": {
"type": "boolean",
"description": "In available multi-select filters, this indicates filter values that have already been selected."
},
"image": {
"type": "string",
"description": "In case of an image-filter, this attribute contains a filter-URL "
},
"displayName": {
"type": "string",
"description": "Name of a category without the full path. This is the rightmost part of the path."
}
},
"additionalProperties": false
},
"filter": {
"description": "A selected value, with limited metadata as compared to available filters.",
"type": "object",
"properties": {
"name": {
"description": "The internal name of the filter (as exported).",
"type": "string",
"minLength": 1
},
"displayName": {
"description": "The configured display name of the filter.",
"type": "string",
"minLength": 1
},
"type": {
"description": "The configured filter type.",
"type": "string",
"enum": [
"select",
"range-slider",
"color",
"label",
"image"
]
},
"selectMode": {
"type": "string",
"enum": [
"single",
"multiple"
],
"description": "Whether one or more filter values can be selected at the same time."
},
"cssClass": {
"type": "string",
"minLength": 1,
"description": "Optionally configurable CSS class."
},
"noAvailableFiltersText": {
"type": "string",
"minLength": 1,
"description": "Optionally configurable text intended to be shown in case there are no more filter values available for selection."
},
"values": {
"type": "array",
"items": {
"$ref": "#/definitions/filterMetadata"
}
},
"pinnedFilterValueCount": {
"type": "integer",
"description": "This is the number of filter values that should always be shown, and any more values than that should be hidden, e.g. by putting them in a dropdown."
},
"combinationOperation": {
"type": "string",
"enum": [
"or",
"and"
],
"description": "This indicates whether multiple-filters are applied in a OR- or AND-condition and do only apply after a minimum of two filters have been selected. The AND-condition shrinks the result (A and B have to match), while the OR-condition makes it grow (A or B have to match)."
},
"totalRange": {
"description": "The usable range of a range slider.",
"properties": {
"min": {
"type": "number",
"description": "The minimum of the possible range."
},
"max": {
"type": "number",
"description": "The maximum of the possible range."
}
},
"additionalProperties": false,
"required": [
"min",
"max"
]
},
"selectedRange": {
"description": "The currently selected range of a range slider.",
"properties": {
"min": {
"type": "number",
"description": "The minimum of the selected range."
},
"max": {
"type": "number",
"description": "The maximum of the selected range."
}
},
"additionalProperties": false,
"required": [
"min",
"max"
]
},
"stepSize": {
"type": "number",
"description": "The step size for range filters."
},
"unit": {
"type": "string",
"description": "The unit for range filters."
}
},
"additionalProperties": false,
"required": [
"name",
"displayName",
"type"
]
},
"requiredUrl": {
"type": "string",
"pattern": "^(https?://.*)?$"
},
"nullableUrl": {
"type": ["string", "null"],
"pattern": "^https?://.*$"
},
"baseItem": {
"description": "Properties shared by parent- and child items.",
"type": "object",
"properties": {
"id": {
"description": "Item ID, as exported.",
"type": "string",
"minLength": 1
},
"ordernumbers": {
"description": "The item's ordernumbers. Currently, only the first exported one is available.",
"type": "array",
"items": {
"type": "string"
}
},
"matchingOrdernumber": {
"type": "string",
"minLength": 0
},
"score": {
"description": "Search score.",
"type": "number",
"min": 0
},
"properties": {
"description": "Non-searchable value exported as properties. Includes additional images, if applicable. The desired values have to be requested with the 'properties[]' parameter.",
"type": "object",
"properties": {
".*": {
"type": "string"
}
}
},
"attributes": {
"type": "object",
"description": "Attribute values that apply to an item, if the attribute was requested via outputAttrib.",
"patternProperties": {
"^.*$": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"minLength": 0
}
}
}
},
"additionalProperties": true,
"required": [
"id",
"score",
"ordernumbers",
"matchingOrdernumber",
"properties",
"attributes"
]
},
"parentItem": {
"description": "Top level item. In case the service supports variants, this may contain variants. Without variant support, this is just a regular item.",
"allOf": [
{"$ref": "#/definitions/baseItem"},
{
"properties": {
"name": {
"description": "Name of the item without any query-based highlighting.",
"type": "string",
"minLength": 0
},
"price": {
"description": "The item's price.",
"type": "number"
},
"summary": {
"description": "Exported short summary.",
"type": "string",
"minLength": 0
},
"url": {
"description": "Detail page URL.",
"$ref": "#/definitions/requiredUrl"
},
"imageUrl": {
"description": "Primary image URL. Additionally exported images can be accessed via the item's properties.",
"$ref": "#/definitions/requiredUrl"
},
"highlightedName": {
"description": "Name of the item with portions of it highlighted if matching the query. The matching part is wrapped in a <span class=\"flEmphasis\"> tag.",
"type": "string",
"minLength": 0
},
"productPlacement": {
"type": ["string", "null"],
"minLength": 1,
"description": "In case a Product Placement matches the product, this is its name."
},
"pushRules": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"description": "In one or more Push Rules match a product, these are the names."
},
"bestVariant": {
"description": "ID of the variant that best matches the user query. null if there is no clear best match.",
"type": ["string", "null"]
},
"variants": {
"type": "array",
"items": {"$ref": "#/definitions/variantItem"}
}
},
"required": ["name", "price", "summary", "url", "imageUrl", "highlightedName", "productPlacement", "pushRules"]
}
]
},
"variantItem": {
"description": "Variant item of a parent in case variants are supported by the service.",
"allOf": [
{"$ref": "#/definitions/baseItem"},
{
"properties": {
"name": {
"description": "Name of the item without any query-based highlighting.",
"type": ["string", "null"],
"minLength": 0
},
"price": {
"description": "The item's price.",
"type": "number"
},
"summary": {
"description": "Exported short summary.",
"type": ["string", "null"],
"minLength": 0
},
"url": {
"description": "Detail page URL.",
"$ref": "#/definitions/nullableUrl"
},
"imageUrl": {
"description": "Primary image URL. Additionally exported images can be accessed via the item's properties.",
"$ref": "#/definitions/nullableUrl"
}
},
"required": ["name", "price", "summary", "url", "imageUrl"]
}
]
}
},
"type": "object",
"properties": {
"request": {
"description": "Selection of mirrored request parameters, including defaults for some that weren't specified, if applicable.",
"type": "object",
"properties": {
"query": {
"type": "string",
"minLength": 0,
"description": "The search terms."
},
"first": {
"type": "integer",
"min": 0,
"description": "Pagination offset."
},
"count": {
"type": "integer",
"min": 0,
"description": "Items per page."
},
"serviceId": {
"description": "Mirrored from the required request parameter \"shopkey\".",
"type": "string",
"pattern": "^[0-9A-F]{32}$"
},
"usergroup": {
"type": ["string", "null"],
"minLength": 1,
"description": "In case usergroups are used and one is set in the query, the one that was used. Only relevant for services with XML export."
},
"groups": {
"type": "array",
"minLength": 0,
"items": {
"type": "string",
"minLength": 1
},
"description": "In case groups are used and one or more are set in the query, the ones being used. Only relevant for services with CSV export."
},
"userId": {
"type": ["string", "null"],
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
"description": "Anonymous ID of the searching user. Only set if provided."
},
"order": {
"description": "Sorting instructions for the results.",
"type": "object",
"properties": {
"field": {
"description": "Field to sort by if relevanceBased is false. Otherwise, numeric values from this field are used to influence the otherwise relevance-based score.",
"type": "string"
},
"relevanceBased": {
"description": "Whether products are sorted by relevance based on query matches, or if sorting should happen strictly by a numeric value.",
"type": "boolean"
},
"direction": {
"description": "Whether to sort products from lowest to highest or otherwise.",
"type": "string",
"enum": [
"ASC",
"DESC"
]
}
},
"additionalProperties": false,
"required": [
"field",
"relevanceBased",
"direction"
]
}
},
"additionalProperties": false,
"required": [
"query",
"first",
"count",
"serviceId",
"usergroup",
"order"
]
},
"result": {
"description": "Matching results, filters, and metadata about the result.",
"type": "object",
"properties": {
"metadata": {
"description": "Request metadata, including information on certain merchandising features, if they apply to the query.",
"type": "object",
"properties": {
"effectiveQuery": {
"type": "string",
"minLength": 0,
"description": "The query that was actually used to serve the results. Relevant for variants like Smart Did-You-Mean that may override the user query."
},
"currencySymbol": {
"type": "string",
"description": "The shop currency symbol"
},
"totalResults": {
"description": "The total number of matches, going beyond pagination limits.",
"type": "integer",
"min": 0
},
"requestId": {
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
"description": "Unique ID of the request that was processed for log correlation purposes."
},
"searchConcept": {
"type": ["string", "null"],
"minLength": 1,
"description": "In case the search triggers a Search Concept, this is its name."
},
"landingpage": {
"description": "In case the search triggers a Landingpage, this is its name and URL.",
"type": ["object", "null"],
"properties": {
"name": {
"description": "Name of the matching Landingpage, intended for display and tracking.",
"type": "string",
"minLength": 1
},
"url": {
"description": "URL or absolute path of the Landingpage, which should be either redirected to, or offered to the user as a link.",
"type": "string",
"pattern": "^(https?://|/).*$"
}
},
"additionalProperties": false,
"required": ["name", "url"]
},
"promotion": {
"description": "In case the search triggers a promotion, this is its name and URL.",
"type": ["object", "null"],
"properties": {
"name": {
"description": "Name of the matching promotion, intended for display and tracking.",
"type": "string",
"minLength": 1
},
"url": {
"description": "URL or absolute path of the page the promotion image should link to.",
"type": "string",
"pattern": "^(https?://|/).*$"
},
"imageUrl": {
"description": "URL of the image to use for displaying the promotion.",
"type": "string",
"pattern": "^https?://.*$"
}
},
"additionalProperties": false,
"required": ["name", "url"]
}
},
"additionalProperties": false,
"required": [
"landingpage",
"promotion",
"searchConcept",
"effectiveQuery",
"totalResults",
"currencySymbol"
]
},
"variant": {
"description": "Information on decisions a search logic variant made.",
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"description": "Name of the search logic variant in use."
},
"correctedQuery": {
"type": "string",
"minLength": 1,
"description": "In case of Smart Did-You-Mean, the correction of the user query."
},
"improvedQuery": {
"type": "string",
"minLength": 1,
"description": "In case of Smart Did-You-Mean, a query that was deemed more useful than the user query."
},
"didYouMeanQuery": {
"type": ["string", "null"],
"minLength": 1,
"description": "In case of Smart Did-You-Mean, a query related to the user query which one might also be interested in."
}
},
"additionalProperties": true,
"required": [
"name"
]
},
"items": {
"description": "The matching items, constraint by the pagination parameters. The values being shown respect the specified usergroup, if applicable.",
"type": "array",
"minLength": 0,
"items": {"$ref": "#/definitions/parentItem"}
},
"filters": {
"description": "Filters available based on the query, and as configured in the filter configuration. Does not include inactive filters.",
"type": "object",
"properties": {
"main": {
"description": "Filters configured for primary visibility.",
"type": "array",
"items": {
"$ref": "#/definitions/filter"
}
},
"other": {
"description": "Filters configured for secondary visibility. Should be initially hidden or collapsed.",
"type": "array",
"items": {
"$ref": "#/definitions/filter"
}
}
},
"additionalProperties": false,
"required": [
"main",
"other"
]
}
},
"additionalProperties": false,
"required": [
"metadata",
"variant",
"items",
"filters"
]
}
},
"additionalProperties": false,
"required": [
"request",
"result"
]
}