@algolia/n8n-nodes-algolia 0.4.4 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +80 -8
- package/dist/nodes/Algolia/Algolia.node.js +17957 -531
- package/dist/nodes/Algolia/Algolia.node.json +16 -19
- package/dist/nodes/Algolia/specs/abtesting-v3.json +1701 -0
- package/dist/nodes/Algolia/specs/abtesting.json +1580 -0
- package/dist/nodes/Algolia/specs/advanced-personalization.json +1667 -0
- package/dist/nodes/Algolia/specs/analytics.json +3138 -0
- package/dist/nodes/Algolia/specs/composition.json +4193 -0
- package/dist/nodes/Algolia/specs/crawler.json +3354 -0
- package/dist/nodes/Algolia/specs/ingestion.json +6368 -0
- package/dist/nodes/Algolia/specs/insights.json +1843 -0
- package/dist/nodes/Algolia/specs/monitoring.json +1263 -0
- package/dist/nodes/Algolia/specs/personalization.json +716 -0
- package/dist/nodes/Algolia/specs/query-suggestions.json +1143 -0
- package/dist/nodes/Algolia/specs/recommend.json +3681 -0
- package/dist/nodes/Algolia/specs/search.json +9458 -0
- package/package.json +13 -4
|
@@ -0,0 +1,1843 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.0.2",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "Insights API",
|
|
5
|
+
"description": "The Insights API lets you collect events related to your search and discovery experience.\nEvents represent user interactions with your app or website.\nThey unlock powerful features, such as recommendations, personalization, smarter search results,\nand analytics that help you optimize your user experience.\n\n## Client libraries\n\nUse Algolia's API clients, libraries, and integrations to collect events from your UI and send them to the Insights API.\nSee: [Algolia's ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/).\n\n## Base URLs\n\nThe base URLs for making requests to the Insights API are:\n\n- `https://insights.us.algolia.io`\n- `https://insights.de.algolia.io`\n- `https//insights.algolia.io` (routes requests to the closest of the above servers, based on your geographical location)\n\n**All requests must use HTTPS.**\n\n## Authentication\n\nTo authenticate your API requests, add these headers:\n\n- `x-algolia-application-id`. Your Algolia application ID.\n- `x-algolia-api-key`. An API key with the necessary permissions to make the request.\n The required access control list (ACL) to make a request is listed in each endpoint's reference.\n\nYou can find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account).\n\n## Request format\n\nRequest bodies must be JSON objects.\n\n## Response status and errors\n\nResponse bodies are JSON objects.\nDeleting a user token returns an empty response body with rate-limiting information as headers.\n\nSuccessful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are indicated by a `5xx` status.\nError responses have a `message` property with more information.\n\nThe Insights API doesn't validate if the event parameters such as `indexName`, `objectIDs`, or `userToken`,\ncorrespond to anything in the Search API. It just checks if they're formatted correctly.\nCheck the [Events](https://dashboard.algolia.com/events/health) health section,\nwhether your events can be used for Algolia features such as Analytics, or Dynamic Re-Ranking.\n\n## Version\n\nThe current version of the Insights API is version 1, as indicated by the `/1/` in each endpoint's URL.\n",
|
|
6
|
+
"version": "1.0.0"
|
|
7
|
+
},
|
|
8
|
+
"servers": [
|
|
9
|
+
{
|
|
10
|
+
"url": "https://insights.{region}.algolia.io",
|
|
11
|
+
"variables": {
|
|
12
|
+
"region": {
|
|
13
|
+
"description": "The region where your Algolia application is hosted.",
|
|
14
|
+
"enum": [
|
|
15
|
+
"us",
|
|
16
|
+
"de"
|
|
17
|
+
],
|
|
18
|
+
"default": "us"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"url": "https://insights.algolia.io"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"security": [
|
|
27
|
+
{
|
|
28
|
+
"applicationId": [],
|
|
29
|
+
"apiKey": []
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"tags": [
|
|
33
|
+
{
|
|
34
|
+
"name": "events",
|
|
35
|
+
"x-displayName": "Events",
|
|
36
|
+
"description": "Events represent user interactions with your website or app. They include details like the event's name, type, a timestamp, or a user token."
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "usertokens",
|
|
40
|
+
"x-displayName": "User tokens",
|
|
41
|
+
"description": "Delete events related to a specific user token.\n"
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"externalDocs": {
|
|
45
|
+
"url": "https://www.algolia.com/doc/guides/sending-events/getting-started/",
|
|
46
|
+
"description": "Events"
|
|
47
|
+
},
|
|
48
|
+
"paths": {
|
|
49
|
+
"/{path}": {
|
|
50
|
+
"get": {
|
|
51
|
+
"operationId": "customGet",
|
|
52
|
+
"summary": "Send requests to the Algolia REST API",
|
|
53
|
+
"description": "This method lets you send requests to the Algolia REST API.",
|
|
54
|
+
"parameters": [
|
|
55
|
+
{
|
|
56
|
+
"$ref": "#/components/parameters/PathInPath"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"$ref": "#/components/parameters/Parameters"
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"responses": {
|
|
63
|
+
"200": {
|
|
64
|
+
"description": "OK",
|
|
65
|
+
"content": {
|
|
66
|
+
"application/json": {
|
|
67
|
+
"schema": {
|
|
68
|
+
"type": "object"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"400": {
|
|
74
|
+
"$ref": "#/components/responses/BadRequest"
|
|
75
|
+
},
|
|
76
|
+
"402": {
|
|
77
|
+
"$ref": "#/components/responses/FeatureNotEnabled"
|
|
78
|
+
},
|
|
79
|
+
"403": {
|
|
80
|
+
"$ref": "#/components/responses/MethodNotAllowed"
|
|
81
|
+
},
|
|
82
|
+
"404": {
|
|
83
|
+
"$ref": "#/components/responses/IndexNotFound"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"post": {
|
|
88
|
+
"operationId": "customPost",
|
|
89
|
+
"requestBody": {
|
|
90
|
+
"description": "Parameters to send with the custom request.",
|
|
91
|
+
"content": {
|
|
92
|
+
"application/json": {
|
|
93
|
+
"schema": {
|
|
94
|
+
"type": "object"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"summary": "Send requests to the Algolia REST API",
|
|
100
|
+
"description": "This method lets you send requests to the Algolia REST API.",
|
|
101
|
+
"parameters": [
|
|
102
|
+
{
|
|
103
|
+
"$ref": "#/components/parameters/PathInPath"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"$ref": "#/components/parameters/Parameters"
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"responses": {
|
|
110
|
+
"200": {
|
|
111
|
+
"description": "OK",
|
|
112
|
+
"content": {
|
|
113
|
+
"application/json": {
|
|
114
|
+
"schema": {
|
|
115
|
+
"type": "object"
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"400": {
|
|
121
|
+
"$ref": "#/components/responses/BadRequest"
|
|
122
|
+
},
|
|
123
|
+
"402": {
|
|
124
|
+
"$ref": "#/components/responses/FeatureNotEnabled"
|
|
125
|
+
},
|
|
126
|
+
"403": {
|
|
127
|
+
"$ref": "#/components/responses/MethodNotAllowed"
|
|
128
|
+
},
|
|
129
|
+
"404": {
|
|
130
|
+
"$ref": "#/components/responses/IndexNotFound"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"put": {
|
|
135
|
+
"operationId": "customPut",
|
|
136
|
+
"requestBody": {
|
|
137
|
+
"description": "Parameters to send with the custom request.",
|
|
138
|
+
"content": {
|
|
139
|
+
"application/json": {
|
|
140
|
+
"schema": {
|
|
141
|
+
"type": "object"
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"summary": "Send requests to the Algolia REST API",
|
|
147
|
+
"description": "This method lets you send requests to the Algolia REST API.",
|
|
148
|
+
"parameters": [
|
|
149
|
+
{
|
|
150
|
+
"$ref": "#/components/parameters/PathInPath"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"$ref": "#/components/parameters/Parameters"
|
|
154
|
+
}
|
|
155
|
+
],
|
|
156
|
+
"responses": {
|
|
157
|
+
"200": {
|
|
158
|
+
"description": "OK",
|
|
159
|
+
"content": {
|
|
160
|
+
"application/json": {
|
|
161
|
+
"schema": {
|
|
162
|
+
"type": "object"
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"400": {
|
|
168
|
+
"$ref": "#/components/responses/BadRequest"
|
|
169
|
+
},
|
|
170
|
+
"402": {
|
|
171
|
+
"$ref": "#/components/responses/FeatureNotEnabled"
|
|
172
|
+
},
|
|
173
|
+
"403": {
|
|
174
|
+
"$ref": "#/components/responses/MethodNotAllowed"
|
|
175
|
+
},
|
|
176
|
+
"404": {
|
|
177
|
+
"$ref": "#/components/responses/IndexNotFound"
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"delete": {
|
|
182
|
+
"operationId": "customDelete",
|
|
183
|
+
"summary": "Send requests to the Algolia REST API",
|
|
184
|
+
"description": "This method lets you send requests to the Algolia REST API.",
|
|
185
|
+
"parameters": [
|
|
186
|
+
{
|
|
187
|
+
"$ref": "#/components/parameters/PathInPath"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"$ref": "#/components/parameters/Parameters"
|
|
191
|
+
}
|
|
192
|
+
],
|
|
193
|
+
"responses": {
|
|
194
|
+
"200": {
|
|
195
|
+
"description": "OK",
|
|
196
|
+
"content": {
|
|
197
|
+
"application/json": {
|
|
198
|
+
"schema": {
|
|
199
|
+
"type": "object"
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"400": {
|
|
205
|
+
"$ref": "#/components/responses/BadRequest"
|
|
206
|
+
},
|
|
207
|
+
"402": {
|
|
208
|
+
"$ref": "#/components/responses/FeatureNotEnabled"
|
|
209
|
+
},
|
|
210
|
+
"403": {
|
|
211
|
+
"$ref": "#/components/responses/MethodNotAllowed"
|
|
212
|
+
},
|
|
213
|
+
"404": {
|
|
214
|
+
"$ref": "#/components/responses/IndexNotFound"
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"/1/events": {
|
|
220
|
+
"post": {
|
|
221
|
+
"tags": [
|
|
222
|
+
"events"
|
|
223
|
+
],
|
|
224
|
+
"operationId": "pushEvents",
|
|
225
|
+
"summary": "Send events",
|
|
226
|
+
"x-acl": [
|
|
227
|
+
"search"
|
|
228
|
+
],
|
|
229
|
+
"description": "Sends a list of events to the Insights API.\n\nYou can include up to 1,000 events in a single request,\nbut the request body must be smaller than 2 MB.\n",
|
|
230
|
+
"requestBody": {
|
|
231
|
+
"required": true,
|
|
232
|
+
"content": {
|
|
233
|
+
"application/json": {
|
|
234
|
+
"schema": {
|
|
235
|
+
"title": "insightsEvents",
|
|
236
|
+
"type": "object",
|
|
237
|
+
"additionalProperties": false,
|
|
238
|
+
"required": [
|
|
239
|
+
"events"
|
|
240
|
+
],
|
|
241
|
+
"properties": {
|
|
242
|
+
"events": {
|
|
243
|
+
"type": "array",
|
|
244
|
+
"description": "Click and conversion events.\n\n**All** events must be valid, otherwise the API returns an error.\n",
|
|
245
|
+
"minItems": 1,
|
|
246
|
+
"maxItems": 1000,
|
|
247
|
+
"items": {
|
|
248
|
+
"$ref": "#/components/schemas/EventsItems"
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
"examples": {
|
|
254
|
+
"ClickObjectIDsAfterSearch": {
|
|
255
|
+
"summary": "Click event after search requests",
|
|
256
|
+
"value": {
|
|
257
|
+
"events": [
|
|
258
|
+
{
|
|
259
|
+
"eventName": "Products Clicked",
|
|
260
|
+
"eventType": "click",
|
|
261
|
+
"index": "test-index",
|
|
262
|
+
"userToken": "anonymous-user-1",
|
|
263
|
+
"authenticatedUserToken": "user-1",
|
|
264
|
+
"objectIDs": [
|
|
265
|
+
"object-1"
|
|
266
|
+
],
|
|
267
|
+
"positions": [
|
|
268
|
+
1
|
|
269
|
+
],
|
|
270
|
+
"queryID": "7dfe2ada7bca48bdd0629649df0bee07"
|
|
271
|
+
}
|
|
272
|
+
]
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
"ConversionObjectIDsAfterSearch": {
|
|
276
|
+
"summary": "Conversion event after search or browse requests",
|
|
277
|
+
"value": {
|
|
278
|
+
"events": [
|
|
279
|
+
{
|
|
280
|
+
"eventName": "Articles Liked",
|
|
281
|
+
"eventType": "conversion",
|
|
282
|
+
"index": "test-index",
|
|
283
|
+
"userToken": "anonymous-user-1",
|
|
284
|
+
"authenticatedUserToken": "user-1",
|
|
285
|
+
"objectIDs": [
|
|
286
|
+
"article-1"
|
|
287
|
+
],
|
|
288
|
+
"queryID": "7dfe2ada7bca48bdd0629649df0bee07"
|
|
289
|
+
}
|
|
290
|
+
]
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
"AddedToCartAfterSearch": {
|
|
294
|
+
"summary": "Add-to-cart event after search or browse requests",
|
|
295
|
+
"value": {
|
|
296
|
+
"events": [
|
|
297
|
+
{
|
|
298
|
+
"eventName": "Products Added To Cart",
|
|
299
|
+
"eventType": "conversion",
|
|
300
|
+
"eventSubtype": "addToCart",
|
|
301
|
+
"index": "test-index",
|
|
302
|
+
"userToken": "anonymous-user-1",
|
|
303
|
+
"authenticatedUserToken": "user-1",
|
|
304
|
+
"objectIDs": [
|
|
305
|
+
"product-1"
|
|
306
|
+
],
|
|
307
|
+
"objectData": [
|
|
308
|
+
{
|
|
309
|
+
"price": 50,
|
|
310
|
+
"quantity": 1
|
|
311
|
+
}
|
|
312
|
+
],
|
|
313
|
+
"currency": "USD",
|
|
314
|
+
"queryID": "7dfe2ada7bca48bdd0629649df0bee07"
|
|
315
|
+
}
|
|
316
|
+
]
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
"PurchasedAfterSearch": {
|
|
320
|
+
"summary": "Purchase event after search or browse requests",
|
|
321
|
+
"value": {
|
|
322
|
+
"events": [
|
|
323
|
+
{
|
|
324
|
+
"eventName": "Products Purchased",
|
|
325
|
+
"eventType": "conversion",
|
|
326
|
+
"eventSubtype": "purchase",
|
|
327
|
+
"index": "test-index",
|
|
328
|
+
"userToken": "anonymous-user-1",
|
|
329
|
+
"authenticatedUserToken": "user-1",
|
|
330
|
+
"objectIDs": [
|
|
331
|
+
"product-1",
|
|
332
|
+
"product-2"
|
|
333
|
+
],
|
|
334
|
+
"objectData": [
|
|
335
|
+
{
|
|
336
|
+
"price": 49.99,
|
|
337
|
+
"discount": 1.99,
|
|
338
|
+
"quantity": 1,
|
|
339
|
+
"queryID": "7dfe2ada7bca48bdd0629649df0bee07"
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
"price": 9.99,
|
|
343
|
+
"discount": 0,
|
|
344
|
+
"quantity": 2,
|
|
345
|
+
"queryID": "54ed4c9d94050a25e4e5ccf5d256ca42"
|
|
346
|
+
}
|
|
347
|
+
],
|
|
348
|
+
"value": 69.97,
|
|
349
|
+
"currency": "USD"
|
|
350
|
+
}
|
|
351
|
+
]
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
"ClickObjectIDs": {
|
|
355
|
+
"summary": "Click event",
|
|
356
|
+
"value": {
|
|
357
|
+
"events": [
|
|
358
|
+
{
|
|
359
|
+
"eventName": "Products Clicked",
|
|
360
|
+
"eventType": "click",
|
|
361
|
+
"index": "test-index",
|
|
362
|
+
"userToken": "anonymous-user-1",
|
|
363
|
+
"authenticatedUserToken": "user-1",
|
|
364
|
+
"objectIDs": [
|
|
365
|
+
"object-1"
|
|
366
|
+
]
|
|
367
|
+
}
|
|
368
|
+
]
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
"ConversionObjectIDs": {
|
|
372
|
+
"summary": "Conversion event",
|
|
373
|
+
"value": {
|
|
374
|
+
"events": [
|
|
375
|
+
{
|
|
376
|
+
"eventName": "Products Added To Cart",
|
|
377
|
+
"eventType": "conversion",
|
|
378
|
+
"index": "test-index",
|
|
379
|
+
"userToken": "anonymous-user-1",
|
|
380
|
+
"authenticatedUserToken": "user-1",
|
|
381
|
+
"objectIDs": [
|
|
382
|
+
"object-1"
|
|
383
|
+
]
|
|
384
|
+
}
|
|
385
|
+
]
|
|
386
|
+
}
|
|
387
|
+
},
|
|
388
|
+
"AddedToCart": {
|
|
389
|
+
"summary": "Add-to-cart event",
|
|
390
|
+
"value": {
|
|
391
|
+
"events": [
|
|
392
|
+
{
|
|
393
|
+
"eventName": "Products Added To Cart",
|
|
394
|
+
"eventType": "conversion",
|
|
395
|
+
"eventSubtype": "addToCart",
|
|
396
|
+
"index": "test-index",
|
|
397
|
+
"userToken": "anonymous-user-1",
|
|
398
|
+
"authenticatedUserToken": "user-1",
|
|
399
|
+
"objectIDs": [
|
|
400
|
+
"product-1"
|
|
401
|
+
],
|
|
402
|
+
"objectData": [
|
|
403
|
+
{
|
|
404
|
+
"price": 19.99,
|
|
405
|
+
"quantity": 1
|
|
406
|
+
}
|
|
407
|
+
],
|
|
408
|
+
"currency": "EUR"
|
|
409
|
+
}
|
|
410
|
+
]
|
|
411
|
+
}
|
|
412
|
+
},
|
|
413
|
+
"Purchased": {
|
|
414
|
+
"summary": "Purchase event",
|
|
415
|
+
"value": {
|
|
416
|
+
"events": [
|
|
417
|
+
{
|
|
418
|
+
"eventName": "Products Purchased",
|
|
419
|
+
"eventType": "conversion",
|
|
420
|
+
"eventSubtype": "purchase",
|
|
421
|
+
"index": "test-index",
|
|
422
|
+
"userToken": "anonymous-user-1",
|
|
423
|
+
"authenticatedUserToken": "user-1",
|
|
424
|
+
"objectIDs": [
|
|
425
|
+
"product-1",
|
|
426
|
+
"product-2"
|
|
427
|
+
],
|
|
428
|
+
"objectData": [
|
|
429
|
+
{
|
|
430
|
+
"price": 49.99,
|
|
431
|
+
"quantity": 1
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
"price": 9.99,
|
|
435
|
+
"quantity": 2
|
|
436
|
+
}
|
|
437
|
+
],
|
|
438
|
+
"currency": "USD",
|
|
439
|
+
"value": 69.97
|
|
440
|
+
}
|
|
441
|
+
]
|
|
442
|
+
}
|
|
443
|
+
},
|
|
444
|
+
"ClickFilter": {
|
|
445
|
+
"summary": "Click event with filters",
|
|
446
|
+
"value": {
|
|
447
|
+
"events": [
|
|
448
|
+
{
|
|
449
|
+
"eventName": "Category Clicked",
|
|
450
|
+
"eventType": "click",
|
|
451
|
+
"index": "test-index",
|
|
452
|
+
"userToken": "anonymous-user-1",
|
|
453
|
+
"authenticatedUserToken": "user-1",
|
|
454
|
+
"filters": [
|
|
455
|
+
"category:books"
|
|
456
|
+
]
|
|
457
|
+
}
|
|
458
|
+
]
|
|
459
|
+
}
|
|
460
|
+
},
|
|
461
|
+
"ConversionFilter": {
|
|
462
|
+
"summary": "Conversion event with filters",
|
|
463
|
+
"value": {
|
|
464
|
+
"events": [
|
|
465
|
+
{
|
|
466
|
+
"eventName": "Category Converted",
|
|
467
|
+
"eventType": "conversion",
|
|
468
|
+
"index": "test-index",
|
|
469
|
+
"userToken": "anonymous-user-1",
|
|
470
|
+
"authenticatedUserToken": "user-1",
|
|
471
|
+
"filters": [
|
|
472
|
+
"category:books"
|
|
473
|
+
]
|
|
474
|
+
}
|
|
475
|
+
]
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
"ViewObjectIDs": {
|
|
479
|
+
"summary": "View event",
|
|
480
|
+
"value": {
|
|
481
|
+
"events": [
|
|
482
|
+
{
|
|
483
|
+
"eventName": "Products Viewed",
|
|
484
|
+
"eventType": "view",
|
|
485
|
+
"index": "test-index",
|
|
486
|
+
"userToken": "anonymous-user-1",
|
|
487
|
+
"authenticatedUserToken": "user-1",
|
|
488
|
+
"objectIDs": [
|
|
489
|
+
"object-1"
|
|
490
|
+
]
|
|
491
|
+
}
|
|
492
|
+
]
|
|
493
|
+
}
|
|
494
|
+
},
|
|
495
|
+
"ViewFilters": {
|
|
496
|
+
"summary": "View event with filters",
|
|
497
|
+
"value": {
|
|
498
|
+
"events": [
|
|
499
|
+
{
|
|
500
|
+
"eventName": "Category Viewed",
|
|
501
|
+
"eventType": "view",
|
|
502
|
+
"index": "test-index",
|
|
503
|
+
"userToken": "anonymous-user-1",
|
|
504
|
+
"authenticatedUserToken": "user-1",
|
|
505
|
+
"filters": [
|
|
506
|
+
"category:books"
|
|
507
|
+
]
|
|
508
|
+
}
|
|
509
|
+
]
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
},
|
|
516
|
+
"responses": {
|
|
517
|
+
"200": {
|
|
518
|
+
"description": "OK",
|
|
519
|
+
"content": {
|
|
520
|
+
"application/json": {
|
|
521
|
+
"schema": {
|
|
522
|
+
"$ref": "#/components/schemas/EventsResponse"
|
|
523
|
+
},
|
|
524
|
+
"examples": {
|
|
525
|
+
"Success": {
|
|
526
|
+
"summary": "Events successfully sent to the Insights API",
|
|
527
|
+
"description": "Success indicates that the Insights API received the events correctly, and that event properties are formatted correctly. Success doesn't imply that the event can be used by any Algolia feature. For example, the Insights API doesn't check if the index name you provided exists, or if the object IDs exist in your index.",
|
|
528
|
+
"value": {
|
|
529
|
+
"status": 200,
|
|
530
|
+
"message": "OK"
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
},
|
|
537
|
+
"400": {
|
|
538
|
+
"description": "Bad Request.",
|
|
539
|
+
"content": {
|
|
540
|
+
"text/html": {
|
|
541
|
+
"schema": {
|
|
542
|
+
"type": "string",
|
|
543
|
+
"title": "HTML"
|
|
544
|
+
},
|
|
545
|
+
"examples": {
|
|
546
|
+
"BadRequest": {
|
|
547
|
+
"summary": "Bad request",
|
|
548
|
+
"description": "This error doesn't return a JSON object, but HTML.",
|
|
549
|
+
"value": "Error: Bad Request. Your client has issued a malformed or illegal request."
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
},
|
|
555
|
+
"401": {
|
|
556
|
+
"description": "Unauthorized",
|
|
557
|
+
"content": {
|
|
558
|
+
"application/json": {
|
|
559
|
+
"schema": {
|
|
560
|
+
"$ref": "#/components/schemas/EventsResponse"
|
|
561
|
+
},
|
|
562
|
+
"examples": {
|
|
563
|
+
"Unauthorized": {
|
|
564
|
+
"summary": "Invalid credentials",
|
|
565
|
+
"description": "You need to provide your application ID using the `X-Algolia-Application-ID` header and your (search) API key with the `X-Algolia-API-Key` header.",
|
|
566
|
+
"value": {
|
|
567
|
+
"status": 401,
|
|
568
|
+
"message": "Invalid credentials"
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
},
|
|
575
|
+
"404": {
|
|
576
|
+
"description": "Not Found.",
|
|
577
|
+
"content": {
|
|
578
|
+
"application/json": {
|
|
579
|
+
"schema": {
|
|
580
|
+
"$ref": "#/components/schemas/EventsResponse"
|
|
581
|
+
},
|
|
582
|
+
"examples": {
|
|
583
|
+
"NotFound": {
|
|
584
|
+
"summary": "Unsupported operation",
|
|
585
|
+
"description": "Check that you're using the correct URL.",
|
|
586
|
+
"value": {
|
|
587
|
+
"status": 404,
|
|
588
|
+
"message": "Path not supported by Insights REST API. Please have a look at [https://www.algolia.com/doc/rest-api/insights/](https://www.algolia.com/doc/rest-api/insights/) for the list of valid commands."
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
},
|
|
595
|
+
"405": {
|
|
596
|
+
"description": "Method Not Allowed.",
|
|
597
|
+
"content": {
|
|
598
|
+
"application/json": {
|
|
599
|
+
"schema": {
|
|
600
|
+
"$ref": "#/components/schemas/EventsResponse"
|
|
601
|
+
},
|
|
602
|
+
"examples": {
|
|
603
|
+
"MethodNotAllowed": {
|
|
604
|
+
"summary": "Method not allowed",
|
|
605
|
+
"description": "Check, that you send events with the `POST` method.",
|
|
606
|
+
"value": {
|
|
607
|
+
"status": 405,
|
|
608
|
+
"message": "Method Not Allowed"
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
},
|
|
615
|
+
"413": {
|
|
616
|
+
"description": "Payload Too Large.",
|
|
617
|
+
"content": {
|
|
618
|
+
"application/json": {
|
|
619
|
+
"schema": {
|
|
620
|
+
"$ref": "#/components/schemas/EventsResponse"
|
|
621
|
+
},
|
|
622
|
+
"examples": {
|
|
623
|
+
"PayloadTooLarge": {
|
|
624
|
+
"summary": "Request body larger than 2 MB",
|
|
625
|
+
"value": {
|
|
626
|
+
"status": 413,
|
|
627
|
+
"message": "Request Entity Too Large"
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
},
|
|
634
|
+
"422": {
|
|
635
|
+
"description": "Unprocessable Entity.",
|
|
636
|
+
"content": {
|
|
637
|
+
"application/json": {
|
|
638
|
+
"schema": {
|
|
639
|
+
"$ref": "#/components/schemas/EventsResponse"
|
|
640
|
+
},
|
|
641
|
+
"examples": {
|
|
642
|
+
"InvalidPayload": {
|
|
643
|
+
"summary": "Incorrect event object",
|
|
644
|
+
"value": {
|
|
645
|
+
"status": 422,
|
|
646
|
+
"message": "Invalid payload"
|
|
647
|
+
}
|
|
648
|
+
},
|
|
649
|
+
"NoEvents": {
|
|
650
|
+
"summary": "No events",
|
|
651
|
+
"description": "This can happen if you're sending an empty `events` array, or if you try to send a single event object instead of the `events` array.",
|
|
652
|
+
"value": {
|
|
653
|
+
"status": 422,
|
|
654
|
+
"message": "No events to process"
|
|
655
|
+
}
|
|
656
|
+
},
|
|
657
|
+
"NoEventsField": {
|
|
658
|
+
"summary": "Missing events attribute",
|
|
659
|
+
"description": "This can happen if you try to send an array of events directly instead of using the `events` attribute.",
|
|
660
|
+
"value": {
|
|
661
|
+
"status": 422,
|
|
662
|
+
"message": "Invalid type for field : expected insights.PublicEventsBatch, got array"
|
|
663
|
+
}
|
|
664
|
+
},
|
|
665
|
+
"EventNameRequired": {
|
|
666
|
+
"summary": "Missing eventName attribute",
|
|
667
|
+
"value": {
|
|
668
|
+
"status": 422,
|
|
669
|
+
"message": "EventName is required"
|
|
670
|
+
}
|
|
671
|
+
},
|
|
672
|
+
"WrongEventName": {
|
|
673
|
+
"summary": "Event name too long or wrong characters",
|
|
674
|
+
"value": {
|
|
675
|
+
"status": 422,
|
|
676
|
+
"message": "EventName must contain only visible ASCII characters, and be between 1 and 64 characters long"
|
|
677
|
+
}
|
|
678
|
+
},
|
|
679
|
+
"EventTypeRequired": {
|
|
680
|
+
"summary": "Missing eventType attribute",
|
|
681
|
+
"value": {
|
|
682
|
+
"status": 422,
|
|
683
|
+
"message": "EventType is required"
|
|
684
|
+
}
|
|
685
|
+
},
|
|
686
|
+
"WrongEventType": {
|
|
687
|
+
"summary": "Wrong event type",
|
|
688
|
+
"value": {
|
|
689
|
+
"status": 422,
|
|
690
|
+
"message": "EventType must be one of \"click\", \"conversion\" or \"view\""
|
|
691
|
+
}
|
|
692
|
+
},
|
|
693
|
+
"IndexRequired": {
|
|
694
|
+
"summary": "Missing index attribute",
|
|
695
|
+
"value": {
|
|
696
|
+
"status": 422,
|
|
697
|
+
"message": "The index field is required"
|
|
698
|
+
}
|
|
699
|
+
},
|
|
700
|
+
"UserTokenRequired": {
|
|
701
|
+
"summary": "Missing userToken attribute",
|
|
702
|
+
"value": {
|
|
703
|
+
"status": 422,
|
|
704
|
+
"message": "The userToken field is required"
|
|
705
|
+
}
|
|
706
|
+
},
|
|
707
|
+
"WrongUserToken": {
|
|
708
|
+
"summary": "Malformed user token",
|
|
709
|
+
"value": {
|
|
710
|
+
"status": 422,
|
|
711
|
+
"message": "UserToken must contain only alphanumeric, equal, plus, slash, hyphen, or underscore characters, and be between 1 and 128 characters long"
|
|
712
|
+
}
|
|
713
|
+
},
|
|
714
|
+
"NoObjectIDsOrFilters": {
|
|
715
|
+
"summary": "Missing objectIDs or filters attribute",
|
|
716
|
+
"description": "Each event must include either the `objectIDs` or `filters` attribute.",
|
|
717
|
+
"value": {
|
|
718
|
+
"status": 422,
|
|
719
|
+
"message": "Event should specify either some ObjectIDs or some Filters"
|
|
720
|
+
}
|
|
721
|
+
},
|
|
722
|
+
"BothDefined": {
|
|
723
|
+
"summary": "Both objectIDs and filters attributes defined",
|
|
724
|
+
"value": {
|
|
725
|
+
"status": 422,
|
|
726
|
+
"message": "Event should specify ObjectIDs or Filters, but not both"
|
|
727
|
+
}
|
|
728
|
+
},
|
|
729
|
+
"PositionsOnWrongEventType": {
|
|
730
|
+
"summary": "Wrong combination of positions and eventType attributes",
|
|
731
|
+
"value": {
|
|
732
|
+
"status": 422,
|
|
733
|
+
"message": "Only event of type click should specify the positions attribute"
|
|
734
|
+
}
|
|
735
|
+
},
|
|
736
|
+
"PositionsWithoutQueryID": {
|
|
737
|
+
"summary": "Positions attribute without queryID",
|
|
738
|
+
"description": "Click events with the `positions` attribute require the `queryID` attribute.",
|
|
739
|
+
"value": {
|
|
740
|
+
"status": 422,
|
|
741
|
+
"message": "Event of type click with positions should specify a queryID"
|
|
742
|
+
}
|
|
743
|
+
},
|
|
744
|
+
"WrongPositionsValue": {
|
|
745
|
+
"summary": "Wrong value in positions array",
|
|
746
|
+
"description": "Any value in the `positions` array must be greater than 0.",
|
|
747
|
+
"value": {
|
|
748
|
+
"status": 422,
|
|
749
|
+
"message": "Event of type click may only have strictly positive positions"
|
|
750
|
+
}
|
|
751
|
+
},
|
|
752
|
+
"WrongPositionsItems": {
|
|
753
|
+
"summary": "Wrong number of items in positions array",
|
|
754
|
+
"description": "For click events with the `queryID` and `objectIDs` attributes, you must include the `positions` attribute with the same number of items as the `objectIDs` attribute.",
|
|
755
|
+
"value": {
|
|
756
|
+
"status": 422,
|
|
757
|
+
"message": "Event of type click should have the same number of ObjectIDs and Positions"
|
|
758
|
+
}
|
|
759
|
+
},
|
|
760
|
+
"WrongQueryID": {
|
|
761
|
+
"summary": "Malformed query ID",
|
|
762
|
+
"value": {
|
|
763
|
+
"status": 422,
|
|
764
|
+
"message": "Query ID must be a search query ID (32 characters hexadecimal string)"
|
|
765
|
+
}
|
|
766
|
+
},
|
|
767
|
+
"InvalidDataType": {
|
|
768
|
+
"summary": "Wrong data type",
|
|
769
|
+
"description": "This can happen if one or more attribute is a number instead of a string.",
|
|
770
|
+
"value": {
|
|
771
|
+
"status": 422,
|
|
772
|
+
"message": "Invalid type for field events: expected string, got number"
|
|
773
|
+
}
|
|
774
|
+
},
|
|
775
|
+
"InvalidTimestamp": {
|
|
776
|
+
"summary": "Timestamp too old",
|
|
777
|
+
"value": {
|
|
778
|
+
"status": 422,
|
|
779
|
+
"message": "The timestamp must be at most 4 days in the past"
|
|
780
|
+
}
|
|
781
|
+
},
|
|
782
|
+
"TooManyEvents": {
|
|
783
|
+
"summary": "Too many events",
|
|
784
|
+
"description": "You can include up to 1,000 events in a single API request.",
|
|
785
|
+
"value": {
|
|
786
|
+
"status": 422,
|
|
787
|
+
"message": "Cannot process more than 1000 events in a batch"
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
},
|
|
797
|
+
"/1/usertokens/{userToken}": {
|
|
798
|
+
"delete": {
|
|
799
|
+
"tags": [
|
|
800
|
+
"usertokens"
|
|
801
|
+
],
|
|
802
|
+
"operationId": "deleteUserToken",
|
|
803
|
+
"summary": "Delete user token",
|
|
804
|
+
"description": "Deletes all events related to the specified user token from events metrics and analytics.\nThe deletion is asynchronous, and processed within 48 hours.\nTo delete a personalization user profile, see `Delete a user profile` in the Personalization API.\n",
|
|
805
|
+
"x-acl": [
|
|
806
|
+
"deleteObject"
|
|
807
|
+
],
|
|
808
|
+
"parameters": [
|
|
809
|
+
{
|
|
810
|
+
"name": "userToken",
|
|
811
|
+
"in": "path",
|
|
812
|
+
"description": "User token for which to delete all associated events.",
|
|
813
|
+
"required": true,
|
|
814
|
+
"schema": {
|
|
815
|
+
"$ref": "#/components/schemas/userToken"
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
],
|
|
819
|
+
"responses": {
|
|
820
|
+
"204": {
|
|
821
|
+
"description": "No content.",
|
|
822
|
+
"headers": {
|
|
823
|
+
"x-ratelimit-limit": {
|
|
824
|
+
"$ref": "#/components/headers/x-ratelimit-limit"
|
|
825
|
+
},
|
|
826
|
+
"x-ratelimit-remaining": {
|
|
827
|
+
"$ref": "#/components/headers/x-ratelimit-remaining"
|
|
828
|
+
},
|
|
829
|
+
"x-ratelimit-reset": {
|
|
830
|
+
"$ref": "#/components/headers/x-ratelimit-reset"
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
},
|
|
834
|
+
"422": {
|
|
835
|
+
"description": "Unprocessable Entity.",
|
|
836
|
+
"content": {
|
|
837
|
+
"application/json": {
|
|
838
|
+
"schema": {
|
|
839
|
+
"$ref": "#/components/schemas/EventsResponse"
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
},
|
|
844
|
+
"429": {
|
|
845
|
+
"description": "Too Many Requests. This operation is rate-limited. Check the `x-ratelimit-limit` and `x-ratelimit-reset` headers of the response.\n",
|
|
846
|
+
"content": {
|
|
847
|
+
"application/json": {
|
|
848
|
+
"schema": {
|
|
849
|
+
"$ref": "#/components/schemas/EventsResponse"
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
},
|
|
857
|
+
"/setClientApiKey": {
|
|
858
|
+
"get": {
|
|
859
|
+
"x-helper": true,
|
|
860
|
+
"x-asynchronous-helper": false,
|
|
861
|
+
"tags": [
|
|
862
|
+
"Api Key"
|
|
863
|
+
],
|
|
864
|
+
"operationId": "setClientApiKey",
|
|
865
|
+
"summary": "Switch the API key used to authenticate requests",
|
|
866
|
+
"description": "Switch the API key used to authenticate requests.\n",
|
|
867
|
+
"parameters": [
|
|
868
|
+
{
|
|
869
|
+
"in": "query",
|
|
870
|
+
"name": "apiKey",
|
|
871
|
+
"description": "API key to be used from now on.",
|
|
872
|
+
"required": true,
|
|
873
|
+
"schema": {
|
|
874
|
+
"type": "string"
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
],
|
|
878
|
+
"responses": {
|
|
879
|
+
"204": {
|
|
880
|
+
"description": "No content."
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
},
|
|
886
|
+
"components": {
|
|
887
|
+
"securitySchemes": {
|
|
888
|
+
"applicationId": {
|
|
889
|
+
"type": "apiKey",
|
|
890
|
+
"in": "header",
|
|
891
|
+
"name": "x-algolia-application-id",
|
|
892
|
+
"description": "Your Algolia application ID."
|
|
893
|
+
},
|
|
894
|
+
"apiKey": {
|
|
895
|
+
"type": "apiKey",
|
|
896
|
+
"in": "header",
|
|
897
|
+
"name": "x-algolia-api-key",
|
|
898
|
+
"description": "Your Algolia API key with the necessary permissions to make the request.\nPermissions are controlled through access control lists (ACL) and access restrictions.\nThe required ACL to make a request is listed in each endpoint's reference.\n"
|
|
899
|
+
}
|
|
900
|
+
},
|
|
901
|
+
"parameters": {
|
|
902
|
+
"PathInPath": {
|
|
903
|
+
"name": "path",
|
|
904
|
+
"in": "path",
|
|
905
|
+
"description": "Path of the endpoint, for example `1/newFeature`.",
|
|
906
|
+
"required": true,
|
|
907
|
+
"schema": {
|
|
908
|
+
"type": "string",
|
|
909
|
+
"example": "/keys"
|
|
910
|
+
}
|
|
911
|
+
},
|
|
912
|
+
"Parameters": {
|
|
913
|
+
"name": "parameters",
|
|
914
|
+
"in": "query",
|
|
915
|
+
"description": "Query parameters to apply to the current query.",
|
|
916
|
+
"schema": {
|
|
917
|
+
"type": "object",
|
|
918
|
+
"additionalProperties": true
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
},
|
|
922
|
+
"schemas": {
|
|
923
|
+
"ErrorBase": {
|
|
924
|
+
"description": "Error.",
|
|
925
|
+
"type": "object",
|
|
926
|
+
"x-keep-model": true,
|
|
927
|
+
"additionalProperties": true,
|
|
928
|
+
"properties": {
|
|
929
|
+
"message": {
|
|
930
|
+
"type": "string",
|
|
931
|
+
"example": "Invalid Application-Id or API-Key"
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
},
|
|
935
|
+
"eventName": {
|
|
936
|
+
"type": "string",
|
|
937
|
+
"minLength": 1,
|
|
938
|
+
"maxLength": 64,
|
|
939
|
+
"pattern": "[\\x20-\\x7E]{1,64}",
|
|
940
|
+
"description": "Event name, up to 64 ASCII characters.\n\nConsider naming events consistently—for example, by adopting Segment's\n[object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework)\nframework.\n"
|
|
941
|
+
},
|
|
942
|
+
"ClickEvent": {
|
|
943
|
+
"type": "string",
|
|
944
|
+
"enum": [
|
|
945
|
+
"click"
|
|
946
|
+
]
|
|
947
|
+
},
|
|
948
|
+
"index": {
|
|
949
|
+
"type": "string",
|
|
950
|
+
"description": "Index name (case-sensitive) to which the event's items belong.",
|
|
951
|
+
"example": "ALGOLIA_INDEX_NAME"
|
|
952
|
+
},
|
|
953
|
+
"objectIDs": {
|
|
954
|
+
"type": "array",
|
|
955
|
+
"description": "Object IDs of the records that are part of the event.",
|
|
956
|
+
"items": {
|
|
957
|
+
"type": "string"
|
|
958
|
+
},
|
|
959
|
+
"minItems": 1,
|
|
960
|
+
"maxItems": 20,
|
|
961
|
+
"example": [
|
|
962
|
+
"object-1",
|
|
963
|
+
"object-2",
|
|
964
|
+
"object-3"
|
|
965
|
+
]
|
|
966
|
+
},
|
|
967
|
+
"positions": {
|
|
968
|
+
"type": "array",
|
|
969
|
+
"items": {
|
|
970
|
+
"type": "integer"
|
|
971
|
+
},
|
|
972
|
+
"minimum": 1,
|
|
973
|
+
"minItems": 1,
|
|
974
|
+
"maxItems": 20,
|
|
975
|
+
"description": "Position of the clicked item the search results.\n\nYou must provide 1 `position` for each `objectID`.\n",
|
|
976
|
+
"example": [
|
|
977
|
+
1,
|
|
978
|
+
2,
|
|
979
|
+
5
|
|
980
|
+
]
|
|
981
|
+
},
|
|
982
|
+
"queryID": {
|
|
983
|
+
"type": "string",
|
|
984
|
+
"pattern": "[0-9a-f]{32}",
|
|
985
|
+
"minLength": 32,
|
|
986
|
+
"maxLength": 32,
|
|
987
|
+
"description": "Unique identifier for a search query.\n\nThe query ID is required for events related to search or browse requests.\nIf you add `clickAnalytics: true` as a search request parameter, the query ID is included in the API response.\n",
|
|
988
|
+
"example": "3e48cd0616e466948dd85abf5c3fbbe2"
|
|
989
|
+
},
|
|
990
|
+
"userToken": {
|
|
991
|
+
"type": "string",
|
|
992
|
+
"minLength": 1,
|
|
993
|
+
"maxLength": 129,
|
|
994
|
+
"pattern": "[a-zA-Z0-9_=/+-]{1,129}",
|
|
995
|
+
"description": "Anonymous or pseudonymous user identifier.\n\nDon't use personally identifiable information in user tokens.\nFor more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).\n",
|
|
996
|
+
"example": "test-user-1"
|
|
997
|
+
},
|
|
998
|
+
"authenticatedUserToken": {
|
|
999
|
+
"type": "string",
|
|
1000
|
+
"minLength": 1,
|
|
1001
|
+
"maxLength": 129,
|
|
1002
|
+
"pattern": "[a-zA-Z0-9_=/+-]{1,129}",
|
|
1003
|
+
"description": "Identifier for authenticated users.\n\nWhen the user signs in, you can get an identifier from your system and send it as `authenticatedUserToken`.\nThis lets you keep using the `userToken` from before the user signed in, while providing a reliable way to identify users across sessions.\nDon't use personally identifiable information in user tokens.\nFor more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).\n",
|
|
1004
|
+
"example": "c6a52c02-d0c7-4b53-8ce3-2b8fd202f3f9"
|
|
1005
|
+
},
|
|
1006
|
+
"timestamp": {
|
|
1007
|
+
"type": "integer",
|
|
1008
|
+
"format": "int64",
|
|
1009
|
+
"description": "Timestamp of the event, measured in milliseconds since the Unix epoch.\nBy default, the Insights API uses the time it receives an event as its timestamp.\n",
|
|
1010
|
+
"example": 1687193127
|
|
1011
|
+
},
|
|
1012
|
+
"ClickedObjectIDsAfterSearch": {
|
|
1013
|
+
"type": "object",
|
|
1014
|
+
"title": "Clicked object IDs after search",
|
|
1015
|
+
"description": "Click event after an Algolia request.\n\nUse this event to track when users click items in the search results.\nIf you're building your category pages with Algolia,\nyou'll also use this event.\n",
|
|
1016
|
+
"additionalProperties": false,
|
|
1017
|
+
"properties": {
|
|
1018
|
+
"eventName": {
|
|
1019
|
+
"$ref": "#/components/schemas/eventName"
|
|
1020
|
+
},
|
|
1021
|
+
"eventType": {
|
|
1022
|
+
"$ref": "#/components/schemas/ClickEvent"
|
|
1023
|
+
},
|
|
1024
|
+
"index": {
|
|
1025
|
+
"$ref": "#/components/schemas/index"
|
|
1026
|
+
},
|
|
1027
|
+
"objectIDs": {
|
|
1028
|
+
"$ref": "#/components/schemas/objectIDs"
|
|
1029
|
+
},
|
|
1030
|
+
"positions": {
|
|
1031
|
+
"$ref": "#/components/schemas/positions"
|
|
1032
|
+
},
|
|
1033
|
+
"queryID": {
|
|
1034
|
+
"$ref": "#/components/schemas/queryID"
|
|
1035
|
+
},
|
|
1036
|
+
"userToken": {
|
|
1037
|
+
"$ref": "#/components/schemas/userToken"
|
|
1038
|
+
},
|
|
1039
|
+
"authenticatedUserToken": {
|
|
1040
|
+
"$ref": "#/components/schemas/authenticatedUserToken"
|
|
1041
|
+
},
|
|
1042
|
+
"timestamp": {
|
|
1043
|
+
"$ref": "#/components/schemas/timestamp"
|
|
1044
|
+
}
|
|
1045
|
+
},
|
|
1046
|
+
"required": [
|
|
1047
|
+
"eventName",
|
|
1048
|
+
"eventType",
|
|
1049
|
+
"index",
|
|
1050
|
+
"objectIDs",
|
|
1051
|
+
"positions",
|
|
1052
|
+
"queryID",
|
|
1053
|
+
"userToken"
|
|
1054
|
+
],
|
|
1055
|
+
"x-discriminator-fields": [
|
|
1056
|
+
"positions",
|
|
1057
|
+
"queryID",
|
|
1058
|
+
"eventType"
|
|
1059
|
+
]
|
|
1060
|
+
},
|
|
1061
|
+
"ConversionEvent": {
|
|
1062
|
+
"type": "string",
|
|
1063
|
+
"enum": [
|
|
1064
|
+
"conversion"
|
|
1065
|
+
]
|
|
1066
|
+
},
|
|
1067
|
+
"AddToCartEvent": {
|
|
1068
|
+
"type": "string",
|
|
1069
|
+
"enum": [
|
|
1070
|
+
"addToCart"
|
|
1071
|
+
]
|
|
1072
|
+
},
|
|
1073
|
+
"currency": {
|
|
1074
|
+
"type": "string",
|
|
1075
|
+
"description": "Three-letter [currency code](https://www.iso.org/iso-4217-currency-codes.html).",
|
|
1076
|
+
"example": "EUR"
|
|
1077
|
+
},
|
|
1078
|
+
"price": {
|
|
1079
|
+
"description": "Final price of a single product, including any discounts, in units of `currency`.",
|
|
1080
|
+
"oneOf": [
|
|
1081
|
+
{
|
|
1082
|
+
"type": "number",
|
|
1083
|
+
"format": "double",
|
|
1084
|
+
"example": 9.99
|
|
1085
|
+
},
|
|
1086
|
+
{
|
|
1087
|
+
"type": "string",
|
|
1088
|
+
"example": "9.99"
|
|
1089
|
+
}
|
|
1090
|
+
]
|
|
1091
|
+
},
|
|
1092
|
+
"quantity": {
|
|
1093
|
+
"type": "integer",
|
|
1094
|
+
"format": "int32",
|
|
1095
|
+
"example": 2,
|
|
1096
|
+
"description": "Quantity of a product that has been purchased or added to the cart.\nThe total purchase value is the sum of `quantity` multiplied with the `price` for each purchased item.\n"
|
|
1097
|
+
},
|
|
1098
|
+
"discount": {
|
|
1099
|
+
"description": "Absolute value of the discount for this product, in units of `currency`.",
|
|
1100
|
+
"oneOf": [
|
|
1101
|
+
{
|
|
1102
|
+
"type": "number",
|
|
1103
|
+
"format": "double",
|
|
1104
|
+
"example": 20
|
|
1105
|
+
},
|
|
1106
|
+
{
|
|
1107
|
+
"type": "string",
|
|
1108
|
+
"example": "20"
|
|
1109
|
+
}
|
|
1110
|
+
]
|
|
1111
|
+
},
|
|
1112
|
+
"objectDataAfterSearch": {
|
|
1113
|
+
"type": "object",
|
|
1114
|
+
"additionalProperties": false,
|
|
1115
|
+
"properties": {
|
|
1116
|
+
"queryID": {
|
|
1117
|
+
"type": "string",
|
|
1118
|
+
"pattern": "[0-9a-f]{32}",
|
|
1119
|
+
"minLength": 32,
|
|
1120
|
+
"maxLength": 32,
|
|
1121
|
+
"description": "Unique identifier for a search query, used to track purchase events with multiple records that originate from different searches.",
|
|
1122
|
+
"example": "3e48cd0616e466948dd85abf5c3fbbe2"
|
|
1123
|
+
},
|
|
1124
|
+
"price": {
|
|
1125
|
+
"$ref": "#/components/schemas/price"
|
|
1126
|
+
},
|
|
1127
|
+
"quantity": {
|
|
1128
|
+
"$ref": "#/components/schemas/quantity"
|
|
1129
|
+
},
|
|
1130
|
+
"discount": {
|
|
1131
|
+
"$ref": "#/components/schemas/discount"
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
},
|
|
1135
|
+
"objectDataAfterSearchList": {
|
|
1136
|
+
"type": "array",
|
|
1137
|
+
"description": "Extra information about the records involved in a purchase or add-to-cart events.\n\nIf provided, it must be the same length as `objectIDs`.\n",
|
|
1138
|
+
"items": {
|
|
1139
|
+
"$ref": "#/components/schemas/objectDataAfterSearch"
|
|
1140
|
+
},
|
|
1141
|
+
"minItems": 1,
|
|
1142
|
+
"maxItems": 20
|
|
1143
|
+
},
|
|
1144
|
+
"value": {
|
|
1145
|
+
"description": "Total monetary value of this event in units of `currency`.\nThis should be equal to the sum of `price` times `quantity`.\n",
|
|
1146
|
+
"oneOf": [
|
|
1147
|
+
{
|
|
1148
|
+
"type": "number",
|
|
1149
|
+
"format": "double",
|
|
1150
|
+
"example": 1000
|
|
1151
|
+
},
|
|
1152
|
+
{
|
|
1153
|
+
"type": "string",
|
|
1154
|
+
"example": "1000.00"
|
|
1155
|
+
}
|
|
1156
|
+
]
|
|
1157
|
+
},
|
|
1158
|
+
"AddedToCartObjectIDsAfterSearch": {
|
|
1159
|
+
"type": "object",
|
|
1160
|
+
"title": "Added to cart object IDs after search",
|
|
1161
|
+
"description": "Use this event to track when users add items to their shopping cart after a previous Algolia request.\nIf you're building your category pages with Algolia, you'll also use this event.\n",
|
|
1162
|
+
"additionalProperties": false,
|
|
1163
|
+
"properties": {
|
|
1164
|
+
"eventName": {
|
|
1165
|
+
"$ref": "#/components/schemas/eventName"
|
|
1166
|
+
},
|
|
1167
|
+
"eventType": {
|
|
1168
|
+
"$ref": "#/components/schemas/ConversionEvent"
|
|
1169
|
+
},
|
|
1170
|
+
"eventSubtype": {
|
|
1171
|
+
"$ref": "#/components/schemas/AddToCartEvent"
|
|
1172
|
+
},
|
|
1173
|
+
"index": {
|
|
1174
|
+
"$ref": "#/components/schemas/index"
|
|
1175
|
+
},
|
|
1176
|
+
"queryID": {
|
|
1177
|
+
"$ref": "#/components/schemas/queryID"
|
|
1178
|
+
},
|
|
1179
|
+
"objectIDs": {
|
|
1180
|
+
"$ref": "#/components/schemas/objectIDs"
|
|
1181
|
+
},
|
|
1182
|
+
"userToken": {
|
|
1183
|
+
"$ref": "#/components/schemas/userToken"
|
|
1184
|
+
},
|
|
1185
|
+
"authenticatedUserToken": {
|
|
1186
|
+
"$ref": "#/components/schemas/authenticatedUserToken"
|
|
1187
|
+
},
|
|
1188
|
+
"currency": {
|
|
1189
|
+
"$ref": "#/components/schemas/currency"
|
|
1190
|
+
},
|
|
1191
|
+
"objectData": {
|
|
1192
|
+
"$ref": "#/components/schemas/objectDataAfterSearchList"
|
|
1193
|
+
},
|
|
1194
|
+
"timestamp": {
|
|
1195
|
+
"$ref": "#/components/schemas/timestamp"
|
|
1196
|
+
},
|
|
1197
|
+
"value": {
|
|
1198
|
+
"$ref": "#/components/schemas/value"
|
|
1199
|
+
}
|
|
1200
|
+
},
|
|
1201
|
+
"required": [
|
|
1202
|
+
"eventName",
|
|
1203
|
+
"eventType",
|
|
1204
|
+
"eventSubtype",
|
|
1205
|
+
"queryID",
|
|
1206
|
+
"index",
|
|
1207
|
+
"objectIDs",
|
|
1208
|
+
"userToken"
|
|
1209
|
+
],
|
|
1210
|
+
"x-discriminator-fields": [
|
|
1211
|
+
"eventType",
|
|
1212
|
+
"eventSubtype",
|
|
1213
|
+
"queryID",
|
|
1214
|
+
"objectIDs"
|
|
1215
|
+
]
|
|
1216
|
+
},
|
|
1217
|
+
"PurchaseEvent": {
|
|
1218
|
+
"type": "string",
|
|
1219
|
+
"enum": [
|
|
1220
|
+
"purchase"
|
|
1221
|
+
]
|
|
1222
|
+
},
|
|
1223
|
+
"PurchasedObjectIDsAfterSearch": {
|
|
1224
|
+
"type": "object",
|
|
1225
|
+
"title": "Purchased object IDs after search",
|
|
1226
|
+
"description": "Use this event to track when users make a purchase after a previous Algolia request.\nIf you're building your category pages with Algolia, you'll also use this event.\n",
|
|
1227
|
+
"additionalProperties": false,
|
|
1228
|
+
"properties": {
|
|
1229
|
+
"eventName": {
|
|
1230
|
+
"$ref": "#/components/schemas/eventName"
|
|
1231
|
+
},
|
|
1232
|
+
"eventType": {
|
|
1233
|
+
"$ref": "#/components/schemas/ConversionEvent"
|
|
1234
|
+
},
|
|
1235
|
+
"eventSubtype": {
|
|
1236
|
+
"$ref": "#/components/schemas/PurchaseEvent"
|
|
1237
|
+
},
|
|
1238
|
+
"index": {
|
|
1239
|
+
"$ref": "#/components/schemas/index"
|
|
1240
|
+
},
|
|
1241
|
+
"objectIDs": {
|
|
1242
|
+
"$ref": "#/components/schemas/objectIDs"
|
|
1243
|
+
},
|
|
1244
|
+
"userToken": {
|
|
1245
|
+
"$ref": "#/components/schemas/userToken"
|
|
1246
|
+
},
|
|
1247
|
+
"authenticatedUserToken": {
|
|
1248
|
+
"$ref": "#/components/schemas/authenticatedUserToken"
|
|
1249
|
+
},
|
|
1250
|
+
"currency": {
|
|
1251
|
+
"$ref": "#/components/schemas/currency"
|
|
1252
|
+
},
|
|
1253
|
+
"objectData": {
|
|
1254
|
+
"$ref": "#/components/schemas/objectDataAfterSearchList"
|
|
1255
|
+
},
|
|
1256
|
+
"timestamp": {
|
|
1257
|
+
"$ref": "#/components/schemas/timestamp"
|
|
1258
|
+
},
|
|
1259
|
+
"value": {
|
|
1260
|
+
"$ref": "#/components/schemas/value"
|
|
1261
|
+
}
|
|
1262
|
+
},
|
|
1263
|
+
"required": [
|
|
1264
|
+
"eventName",
|
|
1265
|
+
"eventType",
|
|
1266
|
+
"eventSubtype",
|
|
1267
|
+
"index",
|
|
1268
|
+
"objectIDs",
|
|
1269
|
+
"userToken",
|
|
1270
|
+
"objectData"
|
|
1271
|
+
],
|
|
1272
|
+
"x-discriminator-fields": [
|
|
1273
|
+
"eventType",
|
|
1274
|
+
"eventSubtype",
|
|
1275
|
+
"objectIDs",
|
|
1276
|
+
"objectData"
|
|
1277
|
+
]
|
|
1278
|
+
},
|
|
1279
|
+
"ConvertedObjectIDsAfterSearch": {
|
|
1280
|
+
"type": "object",
|
|
1281
|
+
"title": "Converted object IDs after search",
|
|
1282
|
+
"description": "Use this event to track when users convert after a previous Algolia request.\nFor example, a user clicks on an item in the search results to view the product detail page.\nThen, the user adds the item to their shopping cart.\n\nIf you're building your category pages with Algolia,\nyou'll also use this event.\n",
|
|
1283
|
+
"additionalProperties": false,
|
|
1284
|
+
"properties": {
|
|
1285
|
+
"eventName": {
|
|
1286
|
+
"$ref": "#/components/schemas/eventName"
|
|
1287
|
+
},
|
|
1288
|
+
"eventType": {
|
|
1289
|
+
"$ref": "#/components/schemas/ConversionEvent"
|
|
1290
|
+
},
|
|
1291
|
+
"index": {
|
|
1292
|
+
"$ref": "#/components/schemas/index"
|
|
1293
|
+
},
|
|
1294
|
+
"objectIDs": {
|
|
1295
|
+
"$ref": "#/components/schemas/objectIDs"
|
|
1296
|
+
},
|
|
1297
|
+
"queryID": {
|
|
1298
|
+
"$ref": "#/components/schemas/queryID"
|
|
1299
|
+
},
|
|
1300
|
+
"userToken": {
|
|
1301
|
+
"$ref": "#/components/schemas/userToken"
|
|
1302
|
+
},
|
|
1303
|
+
"authenticatedUserToken": {
|
|
1304
|
+
"$ref": "#/components/schemas/authenticatedUserToken"
|
|
1305
|
+
},
|
|
1306
|
+
"timestamp": {
|
|
1307
|
+
"$ref": "#/components/schemas/timestamp"
|
|
1308
|
+
}
|
|
1309
|
+
},
|
|
1310
|
+
"required": [
|
|
1311
|
+
"eventName",
|
|
1312
|
+
"eventType",
|
|
1313
|
+
"index",
|
|
1314
|
+
"objectIDs",
|
|
1315
|
+
"queryID",
|
|
1316
|
+
"userToken"
|
|
1317
|
+
],
|
|
1318
|
+
"x-discriminator-fields": [
|
|
1319
|
+
"queryID",
|
|
1320
|
+
"eventType"
|
|
1321
|
+
]
|
|
1322
|
+
},
|
|
1323
|
+
"ClickedObjectIDs": {
|
|
1324
|
+
"type": "object",
|
|
1325
|
+
"title": "Clicked object IDs",
|
|
1326
|
+
"description": "Use this event to track when users click items unrelated to a previous Algolia request.\nFor example, if you don't use Algolia to build your category pages, use this event.\n\nTo track click events related to Algolia requests, use the \"Clicked object IDs after search\" event.\n",
|
|
1327
|
+
"additionalProperties": false,
|
|
1328
|
+
"properties": {
|
|
1329
|
+
"eventName": {
|
|
1330
|
+
"$ref": "#/components/schemas/eventName"
|
|
1331
|
+
},
|
|
1332
|
+
"eventType": {
|
|
1333
|
+
"$ref": "#/components/schemas/ClickEvent"
|
|
1334
|
+
},
|
|
1335
|
+
"index": {
|
|
1336
|
+
"$ref": "#/components/schemas/index"
|
|
1337
|
+
},
|
|
1338
|
+
"objectIDs": {
|
|
1339
|
+
"$ref": "#/components/schemas/objectIDs"
|
|
1340
|
+
},
|
|
1341
|
+
"userToken": {
|
|
1342
|
+
"$ref": "#/components/schemas/userToken"
|
|
1343
|
+
},
|
|
1344
|
+
"authenticatedUserToken": {
|
|
1345
|
+
"$ref": "#/components/schemas/authenticatedUserToken"
|
|
1346
|
+
},
|
|
1347
|
+
"timestamp": {
|
|
1348
|
+
"$ref": "#/components/schemas/timestamp"
|
|
1349
|
+
}
|
|
1350
|
+
},
|
|
1351
|
+
"required": [
|
|
1352
|
+
"eventName",
|
|
1353
|
+
"eventType",
|
|
1354
|
+
"index",
|
|
1355
|
+
"objectIDs",
|
|
1356
|
+
"userToken"
|
|
1357
|
+
],
|
|
1358
|
+
"x-discriminator-fields": [
|
|
1359
|
+
"eventType",
|
|
1360
|
+
"objectIDs"
|
|
1361
|
+
]
|
|
1362
|
+
},
|
|
1363
|
+
"objectData": {
|
|
1364
|
+
"type": "object",
|
|
1365
|
+
"additionalProperties": false,
|
|
1366
|
+
"properties": {
|
|
1367
|
+
"price": {
|
|
1368
|
+
"$ref": "#/components/schemas/price"
|
|
1369
|
+
},
|
|
1370
|
+
"quantity": {
|
|
1371
|
+
"$ref": "#/components/schemas/quantity"
|
|
1372
|
+
},
|
|
1373
|
+
"discount": {
|
|
1374
|
+
"$ref": "#/components/schemas/discount"
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
},
|
|
1378
|
+
"objectDataList": {
|
|
1379
|
+
"type": "array",
|
|
1380
|
+
"description": "Extra information about the records involved in a purchase or add-to-cart event.\n\nIf specified, it must have the same length as `objectIDs`.\n",
|
|
1381
|
+
"items": {
|
|
1382
|
+
"$ref": "#/components/schemas/objectData"
|
|
1383
|
+
},
|
|
1384
|
+
"minItems": 1,
|
|
1385
|
+
"maxItems": 20
|
|
1386
|
+
},
|
|
1387
|
+
"PurchasedObjectIDs": {
|
|
1388
|
+
"type": "object",
|
|
1389
|
+
"title": "Purchased object IDs",
|
|
1390
|
+
"description": "Use this event to track when users make a purchase unrelated to a previous Algolia request. For example, if you don't use Algolia to build your category pages, use this event.\n\nTo track purchase events related to Algolia requests, use the \"Purchased object IDs after search\" event.\n",
|
|
1391
|
+
"additionalProperties": false,
|
|
1392
|
+
"properties": {
|
|
1393
|
+
"eventName": {
|
|
1394
|
+
"$ref": "#/components/schemas/eventName"
|
|
1395
|
+
},
|
|
1396
|
+
"eventType": {
|
|
1397
|
+
"$ref": "#/components/schemas/ConversionEvent"
|
|
1398
|
+
},
|
|
1399
|
+
"eventSubtype": {
|
|
1400
|
+
"$ref": "#/components/schemas/PurchaseEvent"
|
|
1401
|
+
},
|
|
1402
|
+
"index": {
|
|
1403
|
+
"$ref": "#/components/schemas/index"
|
|
1404
|
+
},
|
|
1405
|
+
"objectIDs": {
|
|
1406
|
+
"$ref": "#/components/schemas/objectIDs"
|
|
1407
|
+
},
|
|
1408
|
+
"userToken": {
|
|
1409
|
+
"$ref": "#/components/schemas/userToken"
|
|
1410
|
+
},
|
|
1411
|
+
"authenticatedUserToken": {
|
|
1412
|
+
"$ref": "#/components/schemas/authenticatedUserToken"
|
|
1413
|
+
},
|
|
1414
|
+
"currency": {
|
|
1415
|
+
"$ref": "#/components/schemas/currency"
|
|
1416
|
+
},
|
|
1417
|
+
"objectData": {
|
|
1418
|
+
"$ref": "#/components/schemas/objectDataList"
|
|
1419
|
+
},
|
|
1420
|
+
"timestamp": {
|
|
1421
|
+
"$ref": "#/components/schemas/timestamp"
|
|
1422
|
+
},
|
|
1423
|
+
"value": {
|
|
1424
|
+
"$ref": "#/components/schemas/value"
|
|
1425
|
+
}
|
|
1426
|
+
},
|
|
1427
|
+
"required": [
|
|
1428
|
+
"eventName",
|
|
1429
|
+
"eventType",
|
|
1430
|
+
"eventSubtype",
|
|
1431
|
+
"index",
|
|
1432
|
+
"objectIDs",
|
|
1433
|
+
"userToken"
|
|
1434
|
+
],
|
|
1435
|
+
"x-discriminator-fields": [
|
|
1436
|
+
"eventType",
|
|
1437
|
+
"eventSubtype",
|
|
1438
|
+
"objectIDs"
|
|
1439
|
+
]
|
|
1440
|
+
},
|
|
1441
|
+
"AddedToCartObjectIDs": {
|
|
1442
|
+
"type": "object",
|
|
1443
|
+
"title": "Added to cart object IDs",
|
|
1444
|
+
"description": "Use this event to track when users add items to their shopping cart unrelated to a previous Algolia request. For example, if you don't use Algolia to build your category pages, use this event.\n\nTo track add-to-cart events related to Algolia requests, use the \"Added to cart object IDs after search\" event.\n",
|
|
1445
|
+
"additionalProperties": false,
|
|
1446
|
+
"properties": {
|
|
1447
|
+
"eventName": {
|
|
1448
|
+
"$ref": "#/components/schemas/eventName"
|
|
1449
|
+
},
|
|
1450
|
+
"eventType": {
|
|
1451
|
+
"$ref": "#/components/schemas/ConversionEvent"
|
|
1452
|
+
},
|
|
1453
|
+
"eventSubtype": {
|
|
1454
|
+
"$ref": "#/components/schemas/AddToCartEvent"
|
|
1455
|
+
},
|
|
1456
|
+
"index": {
|
|
1457
|
+
"$ref": "#/components/schemas/index"
|
|
1458
|
+
},
|
|
1459
|
+
"objectIDs": {
|
|
1460
|
+
"$ref": "#/components/schemas/objectIDs"
|
|
1461
|
+
},
|
|
1462
|
+
"userToken": {
|
|
1463
|
+
"$ref": "#/components/schemas/userToken"
|
|
1464
|
+
},
|
|
1465
|
+
"authenticatedUserToken": {
|
|
1466
|
+
"$ref": "#/components/schemas/authenticatedUserToken"
|
|
1467
|
+
},
|
|
1468
|
+
"currency": {
|
|
1469
|
+
"$ref": "#/components/schemas/currency"
|
|
1470
|
+
},
|
|
1471
|
+
"objectData": {
|
|
1472
|
+
"$ref": "#/components/schemas/objectDataList"
|
|
1473
|
+
},
|
|
1474
|
+
"timestamp": {
|
|
1475
|
+
"$ref": "#/components/schemas/timestamp"
|
|
1476
|
+
},
|
|
1477
|
+
"value": {
|
|
1478
|
+
"$ref": "#/components/schemas/value"
|
|
1479
|
+
}
|
|
1480
|
+
},
|
|
1481
|
+
"required": [
|
|
1482
|
+
"eventName",
|
|
1483
|
+
"eventType",
|
|
1484
|
+
"eventSubtype",
|
|
1485
|
+
"index",
|
|
1486
|
+
"objectIDs",
|
|
1487
|
+
"userToken"
|
|
1488
|
+
],
|
|
1489
|
+
"x-discriminator-fields": [
|
|
1490
|
+
"eventType",
|
|
1491
|
+
"eventSubtype",
|
|
1492
|
+
"objectIDs"
|
|
1493
|
+
]
|
|
1494
|
+
},
|
|
1495
|
+
"ConvertedObjectIDs": {
|
|
1496
|
+
"type": "object",
|
|
1497
|
+
"title": "Converted object IDs",
|
|
1498
|
+
"description": "Use this event to track when users convert on items unrelated to a previous Algolia request.\nFor example, if you don't use Algolia to build your category pages, use this event.\n\nTo track conversion events related to Algolia requests, use the \"Converted object IDs after search\" event.\n",
|
|
1499
|
+
"additionalProperties": false,
|
|
1500
|
+
"properties": {
|
|
1501
|
+
"eventName": {
|
|
1502
|
+
"$ref": "#/components/schemas/eventName"
|
|
1503
|
+
},
|
|
1504
|
+
"eventType": {
|
|
1505
|
+
"$ref": "#/components/schemas/ConversionEvent"
|
|
1506
|
+
},
|
|
1507
|
+
"index": {
|
|
1508
|
+
"$ref": "#/components/schemas/index"
|
|
1509
|
+
},
|
|
1510
|
+
"objectIDs": {
|
|
1511
|
+
"$ref": "#/components/schemas/objectIDs"
|
|
1512
|
+
},
|
|
1513
|
+
"userToken": {
|
|
1514
|
+
"$ref": "#/components/schemas/userToken"
|
|
1515
|
+
},
|
|
1516
|
+
"authenticatedUserToken": {
|
|
1517
|
+
"$ref": "#/components/schemas/authenticatedUserToken"
|
|
1518
|
+
},
|
|
1519
|
+
"timestamp": {
|
|
1520
|
+
"$ref": "#/components/schemas/timestamp"
|
|
1521
|
+
}
|
|
1522
|
+
},
|
|
1523
|
+
"required": [
|
|
1524
|
+
"eventName",
|
|
1525
|
+
"eventType",
|
|
1526
|
+
"index",
|
|
1527
|
+
"objectIDs",
|
|
1528
|
+
"userToken"
|
|
1529
|
+
],
|
|
1530
|
+
"x-discriminator-fields": [
|
|
1531
|
+
"eventType",
|
|
1532
|
+
"objectIDs"
|
|
1533
|
+
]
|
|
1534
|
+
},
|
|
1535
|
+
"filters": {
|
|
1536
|
+
"type": "array",
|
|
1537
|
+
"description": "Applied facet filters.\n\nFacet filters are `facet:value` pairs.\nFacet values must be URL-encoded, such as, `discount:10%25`.\n",
|
|
1538
|
+
"items": {
|
|
1539
|
+
"type": "string"
|
|
1540
|
+
},
|
|
1541
|
+
"minItems": 1,
|
|
1542
|
+
"maxItems": 20,
|
|
1543
|
+
"example": [
|
|
1544
|
+
"brand:apple"
|
|
1545
|
+
]
|
|
1546
|
+
},
|
|
1547
|
+
"ClickedFilters": {
|
|
1548
|
+
"type": "object",
|
|
1549
|
+
"title": "Clicked filters",
|
|
1550
|
+
"description": "Use this event to track when users click facet filters in your user interface.",
|
|
1551
|
+
"additionalProperties": false,
|
|
1552
|
+
"properties": {
|
|
1553
|
+
"eventName": {
|
|
1554
|
+
"$ref": "#/components/schemas/eventName"
|
|
1555
|
+
},
|
|
1556
|
+
"eventType": {
|
|
1557
|
+
"$ref": "#/components/schemas/ClickEvent"
|
|
1558
|
+
},
|
|
1559
|
+
"index": {
|
|
1560
|
+
"$ref": "#/components/schemas/index"
|
|
1561
|
+
},
|
|
1562
|
+
"filters": {
|
|
1563
|
+
"$ref": "#/components/schemas/filters"
|
|
1564
|
+
},
|
|
1565
|
+
"userToken": {
|
|
1566
|
+
"$ref": "#/components/schemas/userToken"
|
|
1567
|
+
},
|
|
1568
|
+
"authenticatedUserToken": {
|
|
1569
|
+
"$ref": "#/components/schemas/authenticatedUserToken"
|
|
1570
|
+
},
|
|
1571
|
+
"timestamp": {
|
|
1572
|
+
"$ref": "#/components/schemas/timestamp"
|
|
1573
|
+
}
|
|
1574
|
+
},
|
|
1575
|
+
"required": [
|
|
1576
|
+
"eventName",
|
|
1577
|
+
"eventType",
|
|
1578
|
+
"index",
|
|
1579
|
+
"filters",
|
|
1580
|
+
"userToken"
|
|
1581
|
+
],
|
|
1582
|
+
"x-discriminator-fields": [
|
|
1583
|
+
"eventType",
|
|
1584
|
+
"filters"
|
|
1585
|
+
]
|
|
1586
|
+
},
|
|
1587
|
+
"ConvertedFilters": {
|
|
1588
|
+
"type": "object",
|
|
1589
|
+
"title": "Converted filters",
|
|
1590
|
+
"additionalProperties": false,
|
|
1591
|
+
"properties": {
|
|
1592
|
+
"eventName": {
|
|
1593
|
+
"$ref": "#/components/schemas/eventName"
|
|
1594
|
+
},
|
|
1595
|
+
"eventType": {
|
|
1596
|
+
"$ref": "#/components/schemas/ConversionEvent"
|
|
1597
|
+
},
|
|
1598
|
+
"index": {
|
|
1599
|
+
"$ref": "#/components/schemas/index"
|
|
1600
|
+
},
|
|
1601
|
+
"filters": {
|
|
1602
|
+
"$ref": "#/components/schemas/filters"
|
|
1603
|
+
},
|
|
1604
|
+
"userToken": {
|
|
1605
|
+
"$ref": "#/components/schemas/userToken"
|
|
1606
|
+
},
|
|
1607
|
+
"authenticatedUserToken": {
|
|
1608
|
+
"$ref": "#/components/schemas/authenticatedUserToken"
|
|
1609
|
+
},
|
|
1610
|
+
"timestamp": {
|
|
1611
|
+
"$ref": "#/components/schemas/timestamp"
|
|
1612
|
+
}
|
|
1613
|
+
},
|
|
1614
|
+
"required": [
|
|
1615
|
+
"eventName",
|
|
1616
|
+
"eventType",
|
|
1617
|
+
"index",
|
|
1618
|
+
"filters",
|
|
1619
|
+
"userToken"
|
|
1620
|
+
],
|
|
1621
|
+
"x-discriminator-fields": [
|
|
1622
|
+
"eventType",
|
|
1623
|
+
"filters"
|
|
1624
|
+
]
|
|
1625
|
+
},
|
|
1626
|
+
"ViewEvent": {
|
|
1627
|
+
"type": "string",
|
|
1628
|
+
"enum": [
|
|
1629
|
+
"view"
|
|
1630
|
+
]
|
|
1631
|
+
},
|
|
1632
|
+
"ViewedObjectIDs": {
|
|
1633
|
+
"type": "object",
|
|
1634
|
+
"title": "Viewed object IDs",
|
|
1635
|
+
"description": "Use this event to track when users viewed items in the search results.",
|
|
1636
|
+
"additionalProperties": false,
|
|
1637
|
+
"properties": {
|
|
1638
|
+
"eventName": {
|
|
1639
|
+
"$ref": "#/components/schemas/eventName"
|
|
1640
|
+
},
|
|
1641
|
+
"eventType": {
|
|
1642
|
+
"$ref": "#/components/schemas/ViewEvent"
|
|
1643
|
+
},
|
|
1644
|
+
"index": {
|
|
1645
|
+
"$ref": "#/components/schemas/index"
|
|
1646
|
+
},
|
|
1647
|
+
"objectIDs": {
|
|
1648
|
+
"$ref": "#/components/schemas/objectIDs"
|
|
1649
|
+
},
|
|
1650
|
+
"userToken": {
|
|
1651
|
+
"$ref": "#/components/schemas/userToken"
|
|
1652
|
+
},
|
|
1653
|
+
"authenticatedUserToken": {
|
|
1654
|
+
"$ref": "#/components/schemas/authenticatedUserToken"
|
|
1655
|
+
},
|
|
1656
|
+
"timestamp": {
|
|
1657
|
+
"$ref": "#/components/schemas/timestamp"
|
|
1658
|
+
}
|
|
1659
|
+
},
|
|
1660
|
+
"required": [
|
|
1661
|
+
"eventName",
|
|
1662
|
+
"eventType",
|
|
1663
|
+
"index",
|
|
1664
|
+
"objectIDs",
|
|
1665
|
+
"userToken"
|
|
1666
|
+
],
|
|
1667
|
+
"x-discriminator-fields": [
|
|
1668
|
+
"eventType",
|
|
1669
|
+
"objectIDs"
|
|
1670
|
+
]
|
|
1671
|
+
},
|
|
1672
|
+
"ViewedFilters": {
|
|
1673
|
+
"type": "object",
|
|
1674
|
+
"title": "Viewed filters",
|
|
1675
|
+
"description": "Use this method to capture active filters.\nFor example, when browsing a category page,\nusers see content filtered on that specific category.\n",
|
|
1676
|
+
"additionalProperties": false,
|
|
1677
|
+
"properties": {
|
|
1678
|
+
"eventName": {
|
|
1679
|
+
"$ref": "#/components/schemas/eventName"
|
|
1680
|
+
},
|
|
1681
|
+
"eventType": {
|
|
1682
|
+
"$ref": "#/components/schemas/ViewEvent"
|
|
1683
|
+
},
|
|
1684
|
+
"index": {
|
|
1685
|
+
"$ref": "#/components/schemas/index"
|
|
1686
|
+
},
|
|
1687
|
+
"filters": {
|
|
1688
|
+
"$ref": "#/components/schemas/filters"
|
|
1689
|
+
},
|
|
1690
|
+
"userToken": {
|
|
1691
|
+
"$ref": "#/components/schemas/userToken"
|
|
1692
|
+
},
|
|
1693
|
+
"authenticatedUserToken": {
|
|
1694
|
+
"$ref": "#/components/schemas/authenticatedUserToken"
|
|
1695
|
+
},
|
|
1696
|
+
"timestamp": {
|
|
1697
|
+
"$ref": "#/components/schemas/timestamp"
|
|
1698
|
+
}
|
|
1699
|
+
},
|
|
1700
|
+
"required": [
|
|
1701
|
+
"eventName",
|
|
1702
|
+
"eventType",
|
|
1703
|
+
"index",
|
|
1704
|
+
"filters",
|
|
1705
|
+
"userToken"
|
|
1706
|
+
],
|
|
1707
|
+
"x-discriminator-fields": [
|
|
1708
|
+
"eventType",
|
|
1709
|
+
"filters"
|
|
1710
|
+
]
|
|
1711
|
+
},
|
|
1712
|
+
"EventsItems": {
|
|
1713
|
+
"oneOf": [
|
|
1714
|
+
{
|
|
1715
|
+
"$ref": "#/components/schemas/ClickedObjectIDsAfterSearch"
|
|
1716
|
+
},
|
|
1717
|
+
{
|
|
1718
|
+
"$ref": "#/components/schemas/AddedToCartObjectIDsAfterSearch"
|
|
1719
|
+
},
|
|
1720
|
+
{
|
|
1721
|
+
"$ref": "#/components/schemas/PurchasedObjectIDsAfterSearch"
|
|
1722
|
+
},
|
|
1723
|
+
{
|
|
1724
|
+
"$ref": "#/components/schemas/ConvertedObjectIDsAfterSearch"
|
|
1725
|
+
},
|
|
1726
|
+
{
|
|
1727
|
+
"$ref": "#/components/schemas/ClickedObjectIDs"
|
|
1728
|
+
},
|
|
1729
|
+
{
|
|
1730
|
+
"$ref": "#/components/schemas/PurchasedObjectIDs"
|
|
1731
|
+
},
|
|
1732
|
+
{
|
|
1733
|
+
"$ref": "#/components/schemas/AddedToCartObjectIDs"
|
|
1734
|
+
},
|
|
1735
|
+
{
|
|
1736
|
+
"$ref": "#/components/schemas/ConvertedObjectIDs"
|
|
1737
|
+
},
|
|
1738
|
+
{
|
|
1739
|
+
"$ref": "#/components/schemas/ClickedFilters"
|
|
1740
|
+
},
|
|
1741
|
+
{
|
|
1742
|
+
"$ref": "#/components/schemas/ConvertedFilters"
|
|
1743
|
+
},
|
|
1744
|
+
{
|
|
1745
|
+
"$ref": "#/components/schemas/ViewedObjectIDs"
|
|
1746
|
+
},
|
|
1747
|
+
{
|
|
1748
|
+
"$ref": "#/components/schemas/ViewedFilters"
|
|
1749
|
+
}
|
|
1750
|
+
]
|
|
1751
|
+
},
|
|
1752
|
+
"EventsResponse": {
|
|
1753
|
+
"type": "object",
|
|
1754
|
+
"description": "The response of the Insights API.",
|
|
1755
|
+
"additionalProperties": false,
|
|
1756
|
+
"properties": {
|
|
1757
|
+
"message": {
|
|
1758
|
+
"type": "string",
|
|
1759
|
+
"description": "Details about the response, such as error messages."
|
|
1760
|
+
},
|
|
1761
|
+
"status": {
|
|
1762
|
+
"type": "integer",
|
|
1763
|
+
"description": "The HTTP status code of the response."
|
|
1764
|
+
}
|
|
1765
|
+
}
|
|
1766
|
+
}
|
|
1767
|
+
},
|
|
1768
|
+
"responses": {
|
|
1769
|
+
"BadRequest": {
|
|
1770
|
+
"description": "Bad request or request arguments.",
|
|
1771
|
+
"content": {
|
|
1772
|
+
"application/json": {
|
|
1773
|
+
"schema": {
|
|
1774
|
+
"$ref": "#/components/schemas/ErrorBase"
|
|
1775
|
+
}
|
|
1776
|
+
}
|
|
1777
|
+
}
|
|
1778
|
+
},
|
|
1779
|
+
"FeatureNotEnabled": {
|
|
1780
|
+
"description": "This feature is not enabled on your Algolia account.",
|
|
1781
|
+
"content": {
|
|
1782
|
+
"application/json": {
|
|
1783
|
+
"schema": {
|
|
1784
|
+
"$ref": "#/components/schemas/ErrorBase"
|
|
1785
|
+
}
|
|
1786
|
+
}
|
|
1787
|
+
}
|
|
1788
|
+
},
|
|
1789
|
+
"MethodNotAllowed": {
|
|
1790
|
+
"description": "Method not allowed with this API key.",
|
|
1791
|
+
"content": {
|
|
1792
|
+
"application/json": {
|
|
1793
|
+
"schema": {
|
|
1794
|
+
"$ref": "#/components/schemas/ErrorBase"
|
|
1795
|
+
}
|
|
1796
|
+
}
|
|
1797
|
+
}
|
|
1798
|
+
},
|
|
1799
|
+
"IndexNotFound": {
|
|
1800
|
+
"description": "Index not found.",
|
|
1801
|
+
"content": {
|
|
1802
|
+
"application/json": {
|
|
1803
|
+
"schema": {
|
|
1804
|
+
"$ref": "#/components/schemas/ErrorBase"
|
|
1805
|
+
}
|
|
1806
|
+
}
|
|
1807
|
+
}
|
|
1808
|
+
}
|
|
1809
|
+
},
|
|
1810
|
+
"headers": {
|
|
1811
|
+
"x-ratelimit-limit": {
|
|
1812
|
+
"description": "Number of allowed requests per one minute.",
|
|
1813
|
+
"example": 100,
|
|
1814
|
+
"schema": {
|
|
1815
|
+
"type": "integer"
|
|
1816
|
+
}
|
|
1817
|
+
},
|
|
1818
|
+
"x-ratelimit-remaining": {
|
|
1819
|
+
"description": "Number of remaining requests in the current period.",
|
|
1820
|
+
"example": 99,
|
|
1821
|
+
"schema": {
|
|
1822
|
+
"type": "integer"
|
|
1823
|
+
}
|
|
1824
|
+
},
|
|
1825
|
+
"x-ratelimit-reset": {
|
|
1826
|
+
"description": "Timstamp when the rate limit will reset, measured in seconds since the Unix epoch.",
|
|
1827
|
+
"example": 1710682486,
|
|
1828
|
+
"schema": {
|
|
1829
|
+
"type": "integer"
|
|
1830
|
+
}
|
|
1831
|
+
}
|
|
1832
|
+
}
|
|
1833
|
+
},
|
|
1834
|
+
"x-tagGroups": [
|
|
1835
|
+
{
|
|
1836
|
+
"name": "General",
|
|
1837
|
+
"tags": [
|
|
1838
|
+
"events",
|
|
1839
|
+
"usertokens"
|
|
1840
|
+
]
|
|
1841
|
+
}
|
|
1842
|
+
]
|
|
1843
|
+
}
|