@omni-commerce/sdk 0.3.0 → 0.5.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/dist/index.cjs +471 -56
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2729 -194
- package/dist/index.d.ts +2729 -194
- package/dist/index.js +471 -56
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -125,7 +125,11 @@ type OperationBody<Op> = RequestBodyContent<Op> extends never ? undefined : Requ
|
|
|
125
125
|
"application/x-www-form-urlencoded": infer U;
|
|
126
126
|
} ? U : RequestBodyContent<Op> extends {
|
|
127
127
|
"multipart/form-data": infer M;
|
|
128
|
-
} ? M
|
|
128
|
+
} ? MultipartFields<M> : undefined;
|
|
129
|
+
/** Multipart fields: a binary (string) field also takes a Blob or File. */
|
|
130
|
+
type MultipartFields<T> = {
|
|
131
|
+
[K in keyof T]: T[K] extends string ? T[K] | Blob : T[K];
|
|
132
|
+
};
|
|
129
133
|
type FlattenedRequest<Op> = OperationPath<Op> & OperationQuery<Op> & (OperationBody<Op> extends undefined ? Record<string, never> : OperationBody<Op>);
|
|
130
134
|
|
|
131
135
|
declare class OmniError extends Error {
|
|
@@ -191,7 +195,49 @@ declare class JobFailedError extends OmniError {
|
|
|
191
195
|
*/
|
|
192
196
|
|
|
193
197
|
interface paths {
|
|
194
|
-
"/api": {
|
|
198
|
+
"/api/v1/agents/general/invoke": {
|
|
199
|
+
parameters: {
|
|
200
|
+
query?: never;
|
|
201
|
+
header?: never;
|
|
202
|
+
path?: never;
|
|
203
|
+
cookie?: never;
|
|
204
|
+
};
|
|
205
|
+
get?: never;
|
|
206
|
+
put?: never;
|
|
207
|
+
/**
|
|
208
|
+
* Invoke the Omni agent
|
|
209
|
+
* @description Run the general Omni agent and wait until it completes, pauses for approval, or fails. Requires `agents:invoke`.
|
|
210
|
+
*
|
|
211
|
+
* A waiting call can take several minutes; raise the client timeout. Send `decisions` with the same `thread_id` to approve or reject a paused run. Omit `config.enabled_tools` to use the organization's agent tools. Attach images on the latest user message as `{ type: "image", url }` HTTP(S) URLs.
|
|
212
|
+
*/
|
|
213
|
+
post: operations["post_v1_agents_general_invoke"];
|
|
214
|
+
delete?: never;
|
|
215
|
+
options?: never;
|
|
216
|
+
head?: never;
|
|
217
|
+
patch?: never;
|
|
218
|
+
trace?: never;
|
|
219
|
+
};
|
|
220
|
+
"/api/v1/agents/general/runs": {
|
|
221
|
+
parameters: {
|
|
222
|
+
query?: never;
|
|
223
|
+
header?: never;
|
|
224
|
+
path?: never;
|
|
225
|
+
cookie?: never;
|
|
226
|
+
};
|
|
227
|
+
get?: never;
|
|
228
|
+
put?: never;
|
|
229
|
+
/**
|
|
230
|
+
* Start an Omni agent run
|
|
231
|
+
* @description Queue the general Omni agent and return immediately with the run in `queued` state. Poll the URL in the `Location` header (`GET /api/v1/agents/general/runs/{runId}`), honoring `Retry-After`. Requires `agents:invoke`. The request body matches invoke.
|
|
232
|
+
*/
|
|
233
|
+
post: operations["post_v1_agents_general_runs"];
|
|
234
|
+
delete?: never;
|
|
235
|
+
options?: never;
|
|
236
|
+
head?: never;
|
|
237
|
+
patch?: never;
|
|
238
|
+
trace?: never;
|
|
239
|
+
};
|
|
240
|
+
"/api/v1/agents/general/runs/{runId}": {
|
|
195
241
|
parameters: {
|
|
196
242
|
query?: never;
|
|
197
243
|
header?: never;
|
|
@@ -199,10 +245,10 @@ interface paths {
|
|
|
199
245
|
cookie?: never;
|
|
200
246
|
};
|
|
201
247
|
/**
|
|
202
|
-
*
|
|
203
|
-
* @description
|
|
248
|
+
* Get an Omni agent run
|
|
249
|
+
* @description Read a queued, running, completed, paused, or failed Omni agent run. Requires `agents:invoke`.
|
|
204
250
|
*/
|
|
205
|
-
get: operations["
|
|
251
|
+
get: operations["get_v1_agents_general_runs_by_runid"];
|
|
206
252
|
put?: never;
|
|
207
253
|
post?: never;
|
|
208
254
|
delete?: never;
|
|
@@ -211,7 +257,7 @@ interface paths {
|
|
|
211
257
|
patch?: never;
|
|
212
258
|
trace?: never;
|
|
213
259
|
};
|
|
214
|
-
"/api/v1": {
|
|
260
|
+
"/api/v1/analytics/ads": {
|
|
215
261
|
parameters: {
|
|
216
262
|
query?: never;
|
|
217
263
|
header?: never;
|
|
@@ -219,10 +265,12 @@ interface paths {
|
|
|
219
265
|
cookie?: never;
|
|
220
266
|
};
|
|
221
267
|
/**
|
|
222
|
-
*
|
|
223
|
-
* @description
|
|
268
|
+
* Get Ads Analytics
|
|
269
|
+
* @description Ad spend, attributed sales, ROAS, and ACOS over the last 28 days, and per-product sales and ad metrics for today, yesterday, 7-day and 28-day averages, and the same day one and four weeks ago. Matches the Ads page. Requires `analytics:read`.
|
|
270
|
+
*
|
|
271
|
+
* Amounts are in `data.filters.currency`. The periods count back from the end of the range.
|
|
224
272
|
*/
|
|
225
|
-
get: operations["
|
|
273
|
+
get: operations["get_v1_analytics_ads"];
|
|
226
274
|
put?: never;
|
|
227
275
|
post?: never;
|
|
228
276
|
delete?: never;
|
|
@@ -231,49 +279,117 @@ interface paths {
|
|
|
231
279
|
patch?: never;
|
|
232
280
|
trace?: never;
|
|
233
281
|
};
|
|
234
|
-
"/api/v1/
|
|
282
|
+
"/api/v1/analytics/ai-traffic": {
|
|
235
283
|
parameters: {
|
|
236
284
|
query?: never;
|
|
237
285
|
header?: never;
|
|
238
286
|
path?: never;
|
|
239
287
|
cookie?: never;
|
|
240
288
|
};
|
|
241
|
-
|
|
289
|
+
/**
|
|
290
|
+
* Get AI Traffic Analytics
|
|
291
|
+
* @description Visits and crawls from AI assistants and search engines: totals, a daily trend, breakdowns by source, route, country, and product, and recent events. Matches the AI Traffic page. Requires `analytics:read`.
|
|
292
|
+
*
|
|
293
|
+
* A range covers at most 365 days; a longer one is shortened to the last 365 days. Read the applied range from `data.filters`.
|
|
294
|
+
*/
|
|
295
|
+
get: operations["get_v1_analytics_ai_traffic"];
|
|
296
|
+
put?: never;
|
|
297
|
+
post?: never;
|
|
298
|
+
delete?: never;
|
|
299
|
+
options?: never;
|
|
300
|
+
head?: never;
|
|
301
|
+
patch?: never;
|
|
302
|
+
trace?: never;
|
|
303
|
+
};
|
|
304
|
+
"/api/v1/analytics/content": {
|
|
305
|
+
parameters: {
|
|
306
|
+
query?: never;
|
|
307
|
+
header?: never;
|
|
308
|
+
path?: never;
|
|
309
|
+
cookie?: never;
|
|
310
|
+
};
|
|
311
|
+
/**
|
|
312
|
+
* Get Video and LIVE Analytics
|
|
313
|
+
* @description Views, product clicks, orders, and GMV from shoppable videos and LIVE streams, by day, by content type, and per video. Matches the Video / LIVE page. Requires `analytics:read`.
|
|
314
|
+
*
|
|
315
|
+
* Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
|
|
316
|
+
*/
|
|
317
|
+
get: operations["get_v1_analytics_content"];
|
|
242
318
|
put?: never;
|
|
319
|
+
post?: never;
|
|
320
|
+
delete?: never;
|
|
321
|
+
options?: never;
|
|
322
|
+
head?: never;
|
|
323
|
+
patch?: never;
|
|
324
|
+
trace?: never;
|
|
325
|
+
};
|
|
326
|
+
"/api/v1/analytics/orders": {
|
|
327
|
+
parameters: {
|
|
328
|
+
query?: never;
|
|
329
|
+
header?: never;
|
|
330
|
+
path?: never;
|
|
331
|
+
cookie?: never;
|
|
332
|
+
};
|
|
243
333
|
/**
|
|
244
|
-
*
|
|
245
|
-
* @description
|
|
334
|
+
* Get Order Analytics
|
|
335
|
+
* @description Order KPIs with their change against the previous period, a daily trend, sales by order status and by marketplace, and the top products by net sales. Repeat buyers are counted but not listed. Matches the Orders analysis page. Requires `analytics:read`.
|
|
246
336
|
*
|
|
247
|
-
*
|
|
337
|
+
* Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
|
|
248
338
|
*/
|
|
249
|
-
|
|
339
|
+
get: operations["get_v1_analytics_orders"];
|
|
340
|
+
put?: never;
|
|
341
|
+
post?: never;
|
|
250
342
|
delete?: never;
|
|
251
343
|
options?: never;
|
|
252
344
|
head?: never;
|
|
253
345
|
patch?: never;
|
|
254
346
|
trace?: never;
|
|
255
347
|
};
|
|
256
|
-
"/api/v1/
|
|
348
|
+
"/api/v1/analytics/overview": {
|
|
257
349
|
parameters: {
|
|
258
350
|
query?: never;
|
|
259
351
|
header?: never;
|
|
260
352
|
path?: never;
|
|
261
353
|
cookie?: never;
|
|
262
354
|
};
|
|
263
|
-
|
|
355
|
+
/**
|
|
356
|
+
* Get Growth Overview
|
|
357
|
+
* @description Sales, traffic, and profit KPIs with their change against the previous period, a daily trend, the traffic funnel, sales by channel, top and lagging products, and ranked next actions. Matches the Growth Intelligence overview page. Requires `analytics:read`.
|
|
358
|
+
*
|
|
359
|
+
* Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
|
|
360
|
+
*/
|
|
361
|
+
get: operations["get_v1_analytics_overview"];
|
|
264
362
|
put?: never;
|
|
363
|
+
post?: never;
|
|
364
|
+
delete?: never;
|
|
365
|
+
options?: never;
|
|
366
|
+
head?: never;
|
|
367
|
+
patch?: never;
|
|
368
|
+
trace?: never;
|
|
369
|
+
};
|
|
370
|
+
"/api/v1/analytics/pricing": {
|
|
371
|
+
parameters: {
|
|
372
|
+
query?: never;
|
|
373
|
+
header?: never;
|
|
374
|
+
path?: never;
|
|
375
|
+
cookie?: never;
|
|
376
|
+
};
|
|
265
377
|
/**
|
|
266
|
-
*
|
|
267
|
-
* @description
|
|
378
|
+
* Get Pricing Analytics
|
|
379
|
+
* @description Selling products with their margin, velocity, stock cover, prices, competitor median, and a pricing recommendation. Matches the Pricing page. Requires `analytics:read`.
|
|
380
|
+
*
|
|
381
|
+
* Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
|
|
268
382
|
*/
|
|
269
|
-
|
|
383
|
+
get: operations["get_v1_analytics_pricing"];
|
|
384
|
+
put?: never;
|
|
385
|
+
post?: never;
|
|
270
386
|
delete?: never;
|
|
271
387
|
options?: never;
|
|
272
388
|
head?: never;
|
|
273
389
|
patch?: never;
|
|
274
390
|
trace?: never;
|
|
275
391
|
};
|
|
276
|
-
"/api/v1/
|
|
392
|
+
"/api/v1/analytics/products": {
|
|
277
393
|
parameters: {
|
|
278
394
|
query?: never;
|
|
279
395
|
header?: never;
|
|
@@ -281,10 +397,78 @@ interface paths {
|
|
|
281
397
|
cookie?: never;
|
|
282
398
|
};
|
|
283
399
|
/**
|
|
284
|
-
* Get
|
|
285
|
-
* @description
|
|
400
|
+
* Get Product Analytics
|
|
401
|
+
* @description Per-product sales, traffic, price, stock, profit, and ad performance, ranked by net sales, with ranked insights. Pass `productId` for specific products, for example on a product page. Matches the Products page. Requires `analytics:read`.
|
|
402
|
+
*
|
|
403
|
+
* Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
|
|
286
404
|
*/
|
|
287
|
-
get: operations["
|
|
405
|
+
get: operations["get_v1_analytics_products"];
|
|
406
|
+
put?: never;
|
|
407
|
+
post?: never;
|
|
408
|
+
delete?: never;
|
|
409
|
+
options?: never;
|
|
410
|
+
head?: never;
|
|
411
|
+
patch?: never;
|
|
412
|
+
trace?: never;
|
|
413
|
+
};
|
|
414
|
+
"/api/v1/analytics/profit": {
|
|
415
|
+
parameters: {
|
|
416
|
+
query?: never;
|
|
417
|
+
header?: never;
|
|
418
|
+
path?: never;
|
|
419
|
+
cookie?: never;
|
|
420
|
+
};
|
|
421
|
+
/**
|
|
422
|
+
* Get Profit Analytics
|
|
423
|
+
* @description Revenue, costs, fees, and profit with a waterfall, cost breakdowns, a daily trend, the most and least profitable products, and products missing a cost price. Session members also need finance access. Matches the P&L Analysis page. Requires `analytics:read`.
|
|
424
|
+
*
|
|
425
|
+
* Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
|
|
426
|
+
*/
|
|
427
|
+
get: operations["get_v1_analytics_profit"];
|
|
428
|
+
put?: never;
|
|
429
|
+
post?: never;
|
|
430
|
+
delete?: never;
|
|
431
|
+
options?: never;
|
|
432
|
+
head?: never;
|
|
433
|
+
patch?: never;
|
|
434
|
+
trace?: never;
|
|
435
|
+
};
|
|
436
|
+
"/api/v1/analytics/reports": {
|
|
437
|
+
parameters: {
|
|
438
|
+
query?: never;
|
|
439
|
+
header?: never;
|
|
440
|
+
path?: never;
|
|
441
|
+
cookie?: never;
|
|
442
|
+
};
|
|
443
|
+
/**
|
|
444
|
+
* Get Business Report
|
|
445
|
+
* @description The management summary: headline KPIs, top products, sales by marketplace, alerts, settlement totals, and data quality. Matches the Business Reports page. Requires `analytics:read`.
|
|
446
|
+
*
|
|
447
|
+
* Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
|
|
448
|
+
*/
|
|
449
|
+
get: operations["get_v1_analytics_reports"];
|
|
450
|
+
put?: never;
|
|
451
|
+
post?: never;
|
|
452
|
+
delete?: never;
|
|
453
|
+
options?: never;
|
|
454
|
+
head?: never;
|
|
455
|
+
patch?: never;
|
|
456
|
+
trace?: never;
|
|
457
|
+
};
|
|
458
|
+
"/api/v1/analytics/stores": {
|
|
459
|
+
parameters: {
|
|
460
|
+
query?: never;
|
|
461
|
+
header?: never;
|
|
462
|
+
path?: never;
|
|
463
|
+
cookie?: never;
|
|
464
|
+
};
|
|
465
|
+
/**
|
|
466
|
+
* Get Store Analytics
|
|
467
|
+
* @description Seller Centre shop metrics: visitors, page views, followers, the placed, paid, and confirmed buyer funnel, a daily trend, and the app and web split. Matches the Analytics (Seller Centre) page. Requires `analytics:read`.
|
|
468
|
+
*
|
|
469
|
+
* Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
|
|
470
|
+
*/
|
|
471
|
+
get: operations["get_v1_analytics_stores"];
|
|
288
472
|
put?: never;
|
|
289
473
|
post?: never;
|
|
290
474
|
delete?: never;
|
|
@@ -293,7 +477,7 @@ interface paths {
|
|
|
293
477
|
patch?: never;
|
|
294
478
|
trace?: never;
|
|
295
479
|
};
|
|
296
|
-
"/api/v1/analytics/
|
|
480
|
+
"/api/v1/analytics/traffic": {
|
|
297
481
|
parameters: {
|
|
298
482
|
query?: never;
|
|
299
483
|
header?: never;
|
|
@@ -301,12 +485,12 @@ interface paths {
|
|
|
301
485
|
cookie?: never;
|
|
302
486
|
};
|
|
303
487
|
/**
|
|
304
|
-
* Get
|
|
305
|
-
* @description
|
|
488
|
+
* Get Traffic Analytics
|
|
489
|
+
* @description Impressions, page views, visitors, add-to-cart, and conversion, with the funnel, a daily trend, products ranked by lost conversion, diagnostics, and the videos that drive traffic. Matches the Traffic page. Requires `analytics:read`.
|
|
306
490
|
*
|
|
307
491
|
* Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
|
|
308
492
|
*/
|
|
309
|
-
get: operations["
|
|
493
|
+
get: operations["get_v1_analytics_traffic"];
|
|
310
494
|
put?: never;
|
|
311
495
|
post?: never;
|
|
312
496
|
delete?: never;
|
|
@@ -677,6 +861,48 @@ interface paths {
|
|
|
677
861
|
patch?: never;
|
|
678
862
|
trace?: never;
|
|
679
863
|
};
|
|
864
|
+
"/api/v1/documents": {
|
|
865
|
+
parameters: {
|
|
866
|
+
query?: never;
|
|
867
|
+
header?: never;
|
|
868
|
+
path?: never;
|
|
869
|
+
cookie?: never;
|
|
870
|
+
};
|
|
871
|
+
get?: never;
|
|
872
|
+
put?: never;
|
|
873
|
+
/**
|
|
874
|
+
* Upload Document
|
|
875
|
+
* @description Upload one file to the knowledge base as multipart/form-data. Requires `documents:write`.
|
|
876
|
+
*
|
|
877
|
+
* Accepted: PDF up to 20 MB, Excel (.xlsx/.xlsm) up to 10 MB, images up to 8 MB, CSV and Markdown up to 2 MB. PDFs, Markdown, and images are indexed in the background; poll `GET /api/v1/documents/{documentId}` until `status` is `completed`. CSV and Excel are stored for agents to read but are not indexed.
|
|
878
|
+
*/
|
|
879
|
+
post: operations["post_v1_documents"];
|
|
880
|
+
delete?: never;
|
|
881
|
+
options?: never;
|
|
882
|
+
head?: never;
|
|
883
|
+
patch?: never;
|
|
884
|
+
trace?: never;
|
|
885
|
+
};
|
|
886
|
+
"/api/v1/documents/{documentId}": {
|
|
887
|
+
parameters: {
|
|
888
|
+
query?: never;
|
|
889
|
+
header?: never;
|
|
890
|
+
path?: never;
|
|
891
|
+
cookie?: never;
|
|
892
|
+
};
|
|
893
|
+
/**
|
|
894
|
+
* Get Document
|
|
895
|
+
* @description Read one knowledge base document and its indexing status. Requires `documents:read`.
|
|
896
|
+
*/
|
|
897
|
+
get: operations["get_v1_documents_by_documentid"];
|
|
898
|
+
put?: never;
|
|
899
|
+
post?: never;
|
|
900
|
+
delete?: never;
|
|
901
|
+
options?: never;
|
|
902
|
+
head?: never;
|
|
903
|
+
patch?: never;
|
|
904
|
+
trace?: never;
|
|
905
|
+
};
|
|
680
906
|
"/api/v1/evaluate": {
|
|
681
907
|
parameters: {
|
|
682
908
|
query?: never;
|
|
@@ -1367,6 +1593,28 @@ interface paths {
|
|
|
1367
1593
|
patch?: never;
|
|
1368
1594
|
trace?: never;
|
|
1369
1595
|
};
|
|
1596
|
+
"/api/v1/products/{productId}/images": {
|
|
1597
|
+
parameters: {
|
|
1598
|
+
query?: never;
|
|
1599
|
+
header?: never;
|
|
1600
|
+
path?: never;
|
|
1601
|
+
cookie?: never;
|
|
1602
|
+
};
|
|
1603
|
+
get?: never;
|
|
1604
|
+
put?: never;
|
|
1605
|
+
/**
|
|
1606
|
+
* Upload Product Image
|
|
1607
|
+
* @description Upload one image to a product's or variant's gallery as multipart/form-data. Requires `catalog:write`.
|
|
1608
|
+
*
|
|
1609
|
+
* JPEG, PNG, WebP, AVIF, or HEIC up to 8 MB; WebP, AVIF, and HEIC are stored as JPEG. The image is added at `position`, or at the end. Publish the product to send the new gallery to marketplaces.
|
|
1610
|
+
*/
|
|
1611
|
+
post: operations["post_v1_products_by_productid_images"];
|
|
1612
|
+
delete?: never;
|
|
1613
|
+
options?: never;
|
|
1614
|
+
head?: never;
|
|
1615
|
+
patch?: never;
|
|
1616
|
+
trace?: never;
|
|
1617
|
+
};
|
|
1370
1618
|
"/api/v1/products/{productId}/inventory": {
|
|
1371
1619
|
parameters: {
|
|
1372
1620
|
query?: never;
|
|
@@ -1634,7 +1882,7 @@ interface paths {
|
|
|
1634
1882
|
patch?: never;
|
|
1635
1883
|
trace?: never;
|
|
1636
1884
|
};
|
|
1637
|
-
"/api/v1/promotions/{promotionId}/
|
|
1885
|
+
"/api/v1/promotions/{promotionId}/retry": {
|
|
1638
1886
|
parameters: {
|
|
1639
1887
|
query?: never;
|
|
1640
1888
|
header?: never;
|
|
@@ -1644,10 +1892,12 @@ interface paths {
|
|
|
1644
1892
|
get?: never;
|
|
1645
1893
|
put?: never;
|
|
1646
1894
|
/**
|
|
1647
|
-
*
|
|
1648
|
-
* @description
|
|
1895
|
+
* Retry Marketplace Delivery
|
|
1896
|
+
* @description Run marketplace delivery again after a failure, for example once a store is reconnected. Requires `promotions:write`.
|
|
1897
|
+
*
|
|
1898
|
+
* You do not need this to publish a promotion: creating or activating it, editing it while active or scheduled, and assigning products already deliver it, and pausing, ending, or archiving removes it. A retry brings each marketplace back in line with the promotion's current status.
|
|
1649
1899
|
*/
|
|
1650
|
-
post: operations["
|
|
1900
|
+
post: operations["post_v1_promotions_by_promotionid_retry"];
|
|
1651
1901
|
delete?: never;
|
|
1652
1902
|
options?: never;
|
|
1653
1903
|
head?: never;
|
|
@@ -3565,69 +3815,7 @@ interface components {
|
|
|
3565
3815
|
pathItems: never;
|
|
3566
3816
|
}
|
|
3567
3817
|
interface operations {
|
|
3568
|
-
|
|
3569
|
-
parameters: {
|
|
3570
|
-
query?: never;
|
|
3571
|
-
header?: never;
|
|
3572
|
-
path?: never;
|
|
3573
|
-
cookie?: never;
|
|
3574
|
-
};
|
|
3575
|
-
requestBody?: never;
|
|
3576
|
-
responses: {
|
|
3577
|
-
/** @description API root metadata. */
|
|
3578
|
-
200: {
|
|
3579
|
-
headers: {
|
|
3580
|
-
[name: string]: unknown;
|
|
3581
|
-
};
|
|
3582
|
-
content: {
|
|
3583
|
-
"application/json": {
|
|
3584
|
-
ok: boolean;
|
|
3585
|
-
resource: string;
|
|
3586
|
-
service: string;
|
|
3587
|
-
};
|
|
3588
|
-
};
|
|
3589
|
-
};
|
|
3590
|
-
/** @description Too many requests. */
|
|
3591
|
-
429: {
|
|
3592
|
-
headers: {
|
|
3593
|
-
[name: string]: unknown;
|
|
3594
|
-
};
|
|
3595
|
-
content?: never;
|
|
3596
|
-
};
|
|
3597
|
-
};
|
|
3598
|
-
};
|
|
3599
|
-
get_v1: {
|
|
3600
|
-
parameters: {
|
|
3601
|
-
query?: never;
|
|
3602
|
-
header?: never;
|
|
3603
|
-
path?: never;
|
|
3604
|
-
cookie?: never;
|
|
3605
|
-
};
|
|
3606
|
-
requestBody?: never;
|
|
3607
|
-
responses: {
|
|
3608
|
-
/** @description API v1 root metadata. */
|
|
3609
|
-
200: {
|
|
3610
|
-
headers: {
|
|
3611
|
-
[name: string]: unknown;
|
|
3612
|
-
};
|
|
3613
|
-
content: {
|
|
3614
|
-
"application/json": {
|
|
3615
|
-
ok: boolean;
|
|
3616
|
-
resource: string;
|
|
3617
|
-
service: string;
|
|
3618
|
-
};
|
|
3619
|
-
};
|
|
3620
|
-
};
|
|
3621
|
-
/** @description Too many requests. */
|
|
3622
|
-
429: {
|
|
3623
|
-
headers: {
|
|
3624
|
-
[name: string]: unknown;
|
|
3625
|
-
};
|
|
3626
|
-
content?: never;
|
|
3627
|
-
};
|
|
3628
|
-
};
|
|
3629
|
-
};
|
|
3630
|
-
post_v1_agents_general_invoke: {
|
|
3818
|
+
post_v1_agents_general_invoke: {
|
|
3631
3819
|
parameters: {
|
|
3632
3820
|
query?: never;
|
|
3633
3821
|
header?: never;
|
|
@@ -4002,7 +4190,1771 @@ interface operations {
|
|
|
4002
4190
|
};
|
|
4003
4191
|
};
|
|
4004
4192
|
};
|
|
4005
|
-
/** @description Invalid agent request, unknown tool or model, or a decision count that does not match the pending approvals */
|
|
4193
|
+
/** @description Invalid agent request, unknown tool or model, or a decision count that does not match the pending approvals */
|
|
4194
|
+
400: {
|
|
4195
|
+
headers: {
|
|
4196
|
+
[name: string]: unknown;
|
|
4197
|
+
};
|
|
4198
|
+
content?: never;
|
|
4199
|
+
};
|
|
4200
|
+
/** @description Unauthorized */
|
|
4201
|
+
401: {
|
|
4202
|
+
headers: {
|
|
4203
|
+
[name: string]: unknown;
|
|
4204
|
+
};
|
|
4205
|
+
content?: never;
|
|
4206
|
+
};
|
|
4207
|
+
/** @description Missing agents:invoke scope or Assistant access */
|
|
4208
|
+
403: {
|
|
4209
|
+
headers: {
|
|
4210
|
+
[name: string]: unknown;
|
|
4211
|
+
};
|
|
4212
|
+
content?: never;
|
|
4213
|
+
};
|
|
4214
|
+
/** @description Agent run not found */
|
|
4215
|
+
404: {
|
|
4216
|
+
headers: {
|
|
4217
|
+
[name: string]: unknown;
|
|
4218
|
+
};
|
|
4219
|
+
content?: never;
|
|
4220
|
+
};
|
|
4221
|
+
};
|
|
4222
|
+
};
|
|
4223
|
+
get_v1_analytics_ads: {
|
|
4224
|
+
parameters: {
|
|
4225
|
+
query?: {
|
|
4226
|
+
/** @description Required for session auth. API keys already belong to one organization. */
|
|
4227
|
+
organizationId?: string;
|
|
4228
|
+
/** @description First day of the range (YYYY-MM-DD). Defaults to 29 days before `to`. */
|
|
4229
|
+
from?: string;
|
|
4230
|
+
/** @description Last day of the range, inclusive (YYYY-MM-DD). Defaults to today. */
|
|
4231
|
+
to?: string;
|
|
4232
|
+
/** @description IANA time zone that defines each day, for example `Asia/Kuala_Lumpur`. Defaults to Asia/Singapore. */
|
|
4233
|
+
timeZone?: string;
|
|
4234
|
+
/** @description Comma-separated marketplaces, for example `shopee,lazada`. */
|
|
4235
|
+
marketplace?: string;
|
|
4236
|
+
/** @description Comma-separated countries. One country selects its currency. */
|
|
4237
|
+
country?: string;
|
|
4238
|
+
/** @description Comma-separated store (account) ids from `GET /api/v1/marketplaces/connected`. */
|
|
4239
|
+
store?: string;
|
|
4240
|
+
/** @description ISO currency. Only orders in this currency are counted; amounts are not converted. Defaults to the single country's currency, otherwise SGD. */
|
|
4241
|
+
currency?: string;
|
|
4242
|
+
};
|
|
4243
|
+
header?: never;
|
|
4244
|
+
path?: never;
|
|
4245
|
+
cookie?: never;
|
|
4246
|
+
};
|
|
4247
|
+
requestBody?: never;
|
|
4248
|
+
responses: {
|
|
4249
|
+
/** @description Get Ads Analytics */
|
|
4250
|
+
200: {
|
|
4251
|
+
headers: {
|
|
4252
|
+
[name: string]: unknown;
|
|
4253
|
+
};
|
|
4254
|
+
content: {
|
|
4255
|
+
"application/json": {
|
|
4256
|
+
ok: boolean;
|
|
4257
|
+
/** @constant */
|
|
4258
|
+
apiVersion: "developer_v1";
|
|
4259
|
+
operationId: string;
|
|
4260
|
+
/** @enum {string} */
|
|
4261
|
+
status: "accepted" | "completed" | "failed";
|
|
4262
|
+
jobId?: string;
|
|
4263
|
+
productId?: string;
|
|
4264
|
+
warnings: string[];
|
|
4265
|
+
recommendations: string[];
|
|
4266
|
+
links: {
|
|
4267
|
+
[key: string]: string;
|
|
4268
|
+
};
|
|
4269
|
+
data: {
|
|
4270
|
+
filters: {
|
|
4271
|
+
from: string;
|
|
4272
|
+
to: string;
|
|
4273
|
+
marketplace: string;
|
|
4274
|
+
country: string;
|
|
4275
|
+
store: string;
|
|
4276
|
+
/** @description Currency of every amount in the response. */
|
|
4277
|
+
currency: string;
|
|
4278
|
+
timeZone: string;
|
|
4279
|
+
};
|
|
4280
|
+
/** @description The last day the periods count back from. */
|
|
4281
|
+
anchorDate: string;
|
|
4282
|
+
/** @description The 28 days the KPI totals cover. */
|
|
4283
|
+
kpiDateRange: {
|
|
4284
|
+
from: string;
|
|
4285
|
+
to: string;
|
|
4286
|
+
};
|
|
4287
|
+
kpis: {
|
|
4288
|
+
spend: number;
|
|
4289
|
+
attributedGmv: number;
|
|
4290
|
+
attributedOrders: number;
|
|
4291
|
+
impressions: number;
|
|
4292
|
+
clicks: number;
|
|
4293
|
+
roas: number | null;
|
|
4294
|
+
acos: number | null;
|
|
4295
|
+
productCount: number;
|
|
4296
|
+
productsWithAds: number;
|
|
4297
|
+
};
|
|
4298
|
+
coverage: {
|
|
4299
|
+
ads: boolean;
|
|
4300
|
+
productLevelAds: boolean;
|
|
4301
|
+
/** @description Only ad fee lines are known, not per-product ad data. */
|
|
4302
|
+
feeLineOnly: boolean;
|
|
4303
|
+
};
|
|
4304
|
+
message: string | null;
|
|
4305
|
+
products: {
|
|
4306
|
+
productId: string | null;
|
|
4307
|
+
productName: string;
|
|
4308
|
+
thumbnailUrl: string | null;
|
|
4309
|
+
platform: string | null;
|
|
4310
|
+
accountId: string | null;
|
|
4311
|
+
sku: string | null;
|
|
4312
|
+
externalProductId: string | null;
|
|
4313
|
+
last28Totals: {
|
|
4314
|
+
revenue: number | null;
|
|
4315
|
+
orders: number | null;
|
|
4316
|
+
qtySold: number | null;
|
|
4317
|
+
avgUnitPrice: number | null;
|
|
4318
|
+
adSpend: number | null;
|
|
4319
|
+
adRevenue: number | null;
|
|
4320
|
+
adOrders: number | null;
|
|
4321
|
+
adQtySold: number | null;
|
|
4322
|
+
adRoas: number | null;
|
|
4323
|
+
hasSales: boolean;
|
|
4324
|
+
hasAds: boolean;
|
|
4325
|
+
};
|
|
4326
|
+
periods: {
|
|
4327
|
+
/** @enum {string} */
|
|
4328
|
+
period:
|
|
4329
|
+
| "today"
|
|
4330
|
+
| "yesterday"
|
|
4331
|
+
| "avg_7"
|
|
4332
|
+
| "d7"
|
|
4333
|
+
| "avg_28"
|
|
4334
|
+
| "d28";
|
|
4335
|
+
label: string;
|
|
4336
|
+
isAverage: boolean;
|
|
4337
|
+
revenue: number | null;
|
|
4338
|
+
orders: number | null;
|
|
4339
|
+
qtySold: number | null;
|
|
4340
|
+
avgUnitPrice: number | null;
|
|
4341
|
+
adSpend: number | null;
|
|
4342
|
+
adRevenue: number | null;
|
|
4343
|
+
adOrders: number | null;
|
|
4344
|
+
adQtySold: number | null;
|
|
4345
|
+
adRoas: number | null;
|
|
4346
|
+
hasSales: boolean;
|
|
4347
|
+
hasAds: boolean;
|
|
4348
|
+
}[];
|
|
4349
|
+
}[];
|
|
4350
|
+
};
|
|
4351
|
+
};
|
|
4352
|
+
};
|
|
4353
|
+
};
|
|
4354
|
+
/** @description Invalid request */
|
|
4355
|
+
400: {
|
|
4356
|
+
headers: {
|
|
4357
|
+
[name: string]: unknown;
|
|
4358
|
+
};
|
|
4359
|
+
content?: never;
|
|
4360
|
+
};
|
|
4361
|
+
/** @description Unauthorized */
|
|
4362
|
+
401: {
|
|
4363
|
+
headers: {
|
|
4364
|
+
[name: string]: unknown;
|
|
4365
|
+
};
|
|
4366
|
+
content?: never;
|
|
4367
|
+
};
|
|
4368
|
+
/** @description Missing the `analytics:read` scope */
|
|
4369
|
+
403: {
|
|
4370
|
+
headers: {
|
|
4371
|
+
[name: string]: unknown;
|
|
4372
|
+
};
|
|
4373
|
+
content?: never;
|
|
4374
|
+
};
|
|
4375
|
+
/** @description Rate limit exceeded */
|
|
4376
|
+
429: {
|
|
4377
|
+
headers: {
|
|
4378
|
+
[name: string]: unknown;
|
|
4379
|
+
};
|
|
4380
|
+
content?: never;
|
|
4381
|
+
};
|
|
4382
|
+
/** @description Internal Server Error */
|
|
4383
|
+
500: {
|
|
4384
|
+
headers: {
|
|
4385
|
+
[name: string]: unknown;
|
|
4386
|
+
};
|
|
4387
|
+
content?: never;
|
|
4388
|
+
};
|
|
4389
|
+
};
|
|
4390
|
+
};
|
|
4391
|
+
get_v1_analytics_ai_traffic: {
|
|
4392
|
+
parameters: {
|
|
4393
|
+
query?: {
|
|
4394
|
+
/** @description Required for session auth. API keys already belong to one organization. */
|
|
4395
|
+
organizationId?: string;
|
|
4396
|
+
/** @description First day of the range (YYYY-MM-DD). Defaults to 29 days before `to`. */
|
|
4397
|
+
from?: string;
|
|
4398
|
+
/** @description Last day of the range, inclusive (YYYY-MM-DD). Defaults to today. */
|
|
4399
|
+
to?: string;
|
|
4400
|
+
/** @description IANA time zone that defines each day, for example `Asia/Kuala_Lumpur`. Defaults to Asia/Singapore. */
|
|
4401
|
+
timeZone?: string;
|
|
4402
|
+
/** @description One AI source id from `data.filterOptions.sources`. */
|
|
4403
|
+
source?: string;
|
|
4404
|
+
trafficType?: "indexing" | "click_through" | "page_view" | "assistant";
|
|
4405
|
+
/** @description One route key from `data.filterOptions.routes`. */
|
|
4406
|
+
route?: string;
|
|
4407
|
+
/** @description ISO country code of the visit. */
|
|
4408
|
+
country?: string;
|
|
4409
|
+
};
|
|
4410
|
+
header?: never;
|
|
4411
|
+
path?: never;
|
|
4412
|
+
cookie?: never;
|
|
4413
|
+
};
|
|
4414
|
+
requestBody?: never;
|
|
4415
|
+
responses: {
|
|
4416
|
+
/** @description Get AI Traffic Analytics */
|
|
4417
|
+
200: {
|
|
4418
|
+
headers: {
|
|
4419
|
+
[name: string]: unknown;
|
|
4420
|
+
};
|
|
4421
|
+
content: {
|
|
4422
|
+
"application/json": {
|
|
4423
|
+
ok: boolean;
|
|
4424
|
+
/** @constant */
|
|
4425
|
+
apiVersion: "developer_v1";
|
|
4426
|
+
operationId: string;
|
|
4427
|
+
/** @enum {string} */
|
|
4428
|
+
status: "accepted" | "completed" | "failed";
|
|
4429
|
+
jobId?: string;
|
|
4430
|
+
productId?: string;
|
|
4431
|
+
warnings: string[];
|
|
4432
|
+
recommendations: string[];
|
|
4433
|
+
links: {
|
|
4434
|
+
[key: string]: string;
|
|
4435
|
+
};
|
|
4436
|
+
data: {
|
|
4437
|
+
filters: {
|
|
4438
|
+
from: string;
|
|
4439
|
+
to: string;
|
|
4440
|
+
source: string;
|
|
4441
|
+
trafficType: string;
|
|
4442
|
+
route: string;
|
|
4443
|
+
country: string;
|
|
4444
|
+
timeZone: string;
|
|
4445
|
+
};
|
|
4446
|
+
filterOptions: {
|
|
4447
|
+
sources: {
|
|
4448
|
+
value: string;
|
|
4449
|
+
label: string;
|
|
4450
|
+
}[];
|
|
4451
|
+
routes: {
|
|
4452
|
+
value: string;
|
|
4453
|
+
label: string;
|
|
4454
|
+
}[];
|
|
4455
|
+
countries: {
|
|
4456
|
+
value: string;
|
|
4457
|
+
label: string;
|
|
4458
|
+
}[];
|
|
4459
|
+
};
|
|
4460
|
+
summary: {
|
|
4461
|
+
totalEvents: number;
|
|
4462
|
+
totalHits: number;
|
|
4463
|
+
pageViews: number;
|
|
4464
|
+
productPageViews: number;
|
|
4465
|
+
productsViewed: number;
|
|
4466
|
+
referredSessions: number;
|
|
4467
|
+
indexingHits: number;
|
|
4468
|
+
assistantHits: number;
|
|
4469
|
+
clickThroughs: number;
|
|
4470
|
+
productsRequested: number;
|
|
4471
|
+
productsWithReferrals: number;
|
|
4472
|
+
attributableHits: number;
|
|
4473
|
+
uniqueSources: number;
|
|
4474
|
+
uniqueRoutes: number;
|
|
4475
|
+
uniqueProducts: number;
|
|
4476
|
+
topSource: string | null;
|
|
4477
|
+
topRoute: string | null;
|
|
4478
|
+
topCountry: string | null;
|
|
4479
|
+
lastSeenAt: string | null;
|
|
4480
|
+
};
|
|
4481
|
+
trend: {
|
|
4482
|
+
date: string;
|
|
4483
|
+
label: string;
|
|
4484
|
+
hits: number;
|
|
4485
|
+
attributableHits: number;
|
|
4486
|
+
uniqueSources: number;
|
|
4487
|
+
}[];
|
|
4488
|
+
sourceBreakdown: {
|
|
4489
|
+
value: string;
|
|
4490
|
+
label: string;
|
|
4491
|
+
count: number;
|
|
4492
|
+
}[];
|
|
4493
|
+
routeBreakdown: {
|
|
4494
|
+
value: string;
|
|
4495
|
+
label: string;
|
|
4496
|
+
count: number;
|
|
4497
|
+
}[];
|
|
4498
|
+
countryBreakdown: {
|
|
4499
|
+
value: string;
|
|
4500
|
+
label: string;
|
|
4501
|
+
count: number;
|
|
4502
|
+
}[];
|
|
4503
|
+
productBreakdown: {
|
|
4504
|
+
productId: string;
|
|
4505
|
+
productName: string;
|
|
4506
|
+
count: number;
|
|
4507
|
+
}[];
|
|
4508
|
+
recentEvents: {
|
|
4509
|
+
id: string;
|
|
4510
|
+
occurredAt: string;
|
|
4511
|
+
sourceLabel: string;
|
|
4512
|
+
trafficType: string;
|
|
4513
|
+
operator: string;
|
|
4514
|
+
routeLabel: string;
|
|
4515
|
+
path: string;
|
|
4516
|
+
countryCode: string | null;
|
|
4517
|
+
referrer: string | null;
|
|
4518
|
+
inferredKeyword: string | null;
|
|
4519
|
+
inferredIntent: {
|
|
4520
|
+
label: string;
|
|
4521
|
+
source: string;
|
|
4522
|
+
confidence: number | null;
|
|
4523
|
+
} | null;
|
|
4524
|
+
productId: string | null;
|
|
4525
|
+
productName: string | null;
|
|
4526
|
+
}[];
|
|
4527
|
+
dataFreshness: {
|
|
4528
|
+
metricsAvailable: boolean;
|
|
4529
|
+
notes: string[];
|
|
4530
|
+
};
|
|
4531
|
+
};
|
|
4532
|
+
};
|
|
4533
|
+
};
|
|
4534
|
+
};
|
|
4535
|
+
/** @description Invalid request */
|
|
4536
|
+
400: {
|
|
4537
|
+
headers: {
|
|
4538
|
+
[name: string]: unknown;
|
|
4539
|
+
};
|
|
4540
|
+
content?: never;
|
|
4541
|
+
};
|
|
4542
|
+
/** @description Unauthorized */
|
|
4543
|
+
401: {
|
|
4544
|
+
headers: {
|
|
4545
|
+
[name: string]: unknown;
|
|
4546
|
+
};
|
|
4547
|
+
content?: never;
|
|
4548
|
+
};
|
|
4549
|
+
/** @description Missing the `analytics:read` scope */
|
|
4550
|
+
403: {
|
|
4551
|
+
headers: {
|
|
4552
|
+
[name: string]: unknown;
|
|
4553
|
+
};
|
|
4554
|
+
content?: never;
|
|
4555
|
+
};
|
|
4556
|
+
/** @description Rate limit exceeded */
|
|
4557
|
+
429: {
|
|
4558
|
+
headers: {
|
|
4559
|
+
[name: string]: unknown;
|
|
4560
|
+
};
|
|
4561
|
+
content?: never;
|
|
4562
|
+
};
|
|
4563
|
+
/** @description Internal Server Error */
|
|
4564
|
+
500: {
|
|
4565
|
+
headers: {
|
|
4566
|
+
[name: string]: unknown;
|
|
4567
|
+
};
|
|
4568
|
+
content?: never;
|
|
4569
|
+
};
|
|
4570
|
+
};
|
|
4571
|
+
};
|
|
4572
|
+
get_v1_analytics_content: {
|
|
4573
|
+
parameters: {
|
|
4574
|
+
query?: {
|
|
4575
|
+
/** @description Required for session auth. API keys already belong to one organization. */
|
|
4576
|
+
organizationId?: string;
|
|
4577
|
+
/** @description First day of the range (YYYY-MM-DD). Defaults to 29 days before `to`. */
|
|
4578
|
+
from?: string;
|
|
4579
|
+
/** @description Last day of the range, inclusive (YYYY-MM-DD). Defaults to today. */
|
|
4580
|
+
to?: string;
|
|
4581
|
+
/** @description IANA time zone that defines each day, for example `Asia/Kuala_Lumpur`. Defaults to Asia/Singapore. */
|
|
4582
|
+
timeZone?: string;
|
|
4583
|
+
/** @description Comma-separated marketplaces, for example `shopee,lazada`. */
|
|
4584
|
+
marketplace?: string;
|
|
4585
|
+
/** @description Comma-separated countries. One country selects its currency. */
|
|
4586
|
+
country?: string;
|
|
4587
|
+
/** @description Comma-separated store (account) ids from `GET /api/v1/marketplaces/connected`. */
|
|
4588
|
+
store?: string;
|
|
4589
|
+
/** @description ISO currency. Only orders in this currency are counted; amounts are not converted. Defaults to the single country's currency, otherwise SGD. */
|
|
4590
|
+
currency?: string;
|
|
4591
|
+
};
|
|
4592
|
+
header?: never;
|
|
4593
|
+
path?: never;
|
|
4594
|
+
cookie?: never;
|
|
4595
|
+
};
|
|
4596
|
+
requestBody?: never;
|
|
4597
|
+
responses: {
|
|
4598
|
+
/** @description Get Video and LIVE Analytics */
|
|
4599
|
+
200: {
|
|
4600
|
+
headers: {
|
|
4601
|
+
[name: string]: unknown;
|
|
4602
|
+
};
|
|
4603
|
+
content: {
|
|
4604
|
+
"application/json": {
|
|
4605
|
+
ok: boolean;
|
|
4606
|
+
/** @constant */
|
|
4607
|
+
apiVersion: "developer_v1";
|
|
4608
|
+
operationId: string;
|
|
4609
|
+
/** @enum {string} */
|
|
4610
|
+
status: "accepted" | "completed" | "failed";
|
|
4611
|
+
jobId?: string;
|
|
4612
|
+
productId?: string;
|
|
4613
|
+
warnings: string[];
|
|
4614
|
+
recommendations: string[];
|
|
4615
|
+
links: {
|
|
4616
|
+
[key: string]: string;
|
|
4617
|
+
};
|
|
4618
|
+
data: {
|
|
4619
|
+
filters: {
|
|
4620
|
+
from: string;
|
|
4621
|
+
to: string;
|
|
4622
|
+
marketplace: string;
|
|
4623
|
+
country: string;
|
|
4624
|
+
store: string;
|
|
4625
|
+
/** @description Currency of every amount in the response. */
|
|
4626
|
+
currency: string;
|
|
4627
|
+
timeZone: string;
|
|
4628
|
+
};
|
|
4629
|
+
coverage: {
|
|
4630
|
+
content: boolean;
|
|
4631
|
+
};
|
|
4632
|
+
kpis: {
|
|
4633
|
+
views: number;
|
|
4634
|
+
productClicks: number;
|
|
4635
|
+
orders: number;
|
|
4636
|
+
gmv: number;
|
|
4637
|
+
contentCount: number;
|
|
4638
|
+
clickRate: number | null;
|
|
4639
|
+
};
|
|
4640
|
+
dailyTrend: {
|
|
4641
|
+
date: string;
|
|
4642
|
+
views: number;
|
|
4643
|
+
productClicks: number;
|
|
4644
|
+
orders: number;
|
|
4645
|
+
gmv: number;
|
|
4646
|
+
}[];
|
|
4647
|
+
byType: {
|
|
4648
|
+
contentType: string;
|
|
4649
|
+
views: number;
|
|
4650
|
+
gmv: number;
|
|
4651
|
+
orders: number;
|
|
4652
|
+
clicks: number;
|
|
4653
|
+
}[];
|
|
4654
|
+
items: {
|
|
4655
|
+
externalContentId: string | null;
|
|
4656
|
+
/** @description For example `video` or `live`. */
|
|
4657
|
+
contentType: string;
|
|
4658
|
+
title: string;
|
|
4659
|
+
platform: string | null;
|
|
4660
|
+
accountId: string | null;
|
|
4661
|
+
productId: string | null;
|
|
4662
|
+
externalProductId: string | null;
|
|
4663
|
+
productName: string | null;
|
|
4664
|
+
productThumbnailUrl: string | null;
|
|
4665
|
+
/** @description Public link to the video. */
|
|
4666
|
+
contentUrl: string | null;
|
|
4667
|
+
views: number;
|
|
4668
|
+
productClicks: number;
|
|
4669
|
+
orders: number;
|
|
4670
|
+
gmv: number;
|
|
4671
|
+
clickRate: number | null;
|
|
4672
|
+
orderRate: number | null;
|
|
4673
|
+
}[];
|
|
4674
|
+
message: string | null;
|
|
4675
|
+
};
|
|
4676
|
+
};
|
|
4677
|
+
};
|
|
4678
|
+
};
|
|
4679
|
+
/** @description Invalid request */
|
|
4680
|
+
400: {
|
|
4681
|
+
headers: {
|
|
4682
|
+
[name: string]: unknown;
|
|
4683
|
+
};
|
|
4684
|
+
content?: never;
|
|
4685
|
+
};
|
|
4686
|
+
/** @description Unauthorized */
|
|
4687
|
+
401: {
|
|
4688
|
+
headers: {
|
|
4689
|
+
[name: string]: unknown;
|
|
4690
|
+
};
|
|
4691
|
+
content?: never;
|
|
4692
|
+
};
|
|
4693
|
+
/** @description Missing the `analytics:read` scope */
|
|
4694
|
+
403: {
|
|
4695
|
+
headers: {
|
|
4696
|
+
[name: string]: unknown;
|
|
4697
|
+
};
|
|
4698
|
+
content?: never;
|
|
4699
|
+
};
|
|
4700
|
+
/** @description Rate limit exceeded */
|
|
4701
|
+
429: {
|
|
4702
|
+
headers: {
|
|
4703
|
+
[name: string]: unknown;
|
|
4704
|
+
};
|
|
4705
|
+
content?: never;
|
|
4706
|
+
};
|
|
4707
|
+
/** @description Internal Server Error */
|
|
4708
|
+
500: {
|
|
4709
|
+
headers: {
|
|
4710
|
+
[name: string]: unknown;
|
|
4711
|
+
};
|
|
4712
|
+
content?: never;
|
|
4713
|
+
};
|
|
4714
|
+
};
|
|
4715
|
+
};
|
|
4716
|
+
get_v1_analytics_orders: {
|
|
4717
|
+
parameters: {
|
|
4718
|
+
query?: {
|
|
4719
|
+
/** @description Required for session auth. API keys already belong to one organization. */
|
|
4720
|
+
organizationId?: string;
|
|
4721
|
+
/** @description First day of the range (YYYY-MM-DD). Defaults to 29 days before `to`. */
|
|
4722
|
+
from?: string;
|
|
4723
|
+
/** @description Last day of the range, inclusive (YYYY-MM-DD). Defaults to today. */
|
|
4724
|
+
to?: string;
|
|
4725
|
+
/** @description IANA time zone that defines each day, for example `Asia/Kuala_Lumpur`. Defaults to Asia/Singapore. */
|
|
4726
|
+
timeZone?: string;
|
|
4727
|
+
/** @description Comma-separated marketplaces, for example `shopee,lazada`. */
|
|
4728
|
+
marketplace?: string;
|
|
4729
|
+
/** @description Comma-separated countries. One country selects its currency. */
|
|
4730
|
+
country?: string;
|
|
4731
|
+
/** @description Comma-separated store (account) ids from `GET /api/v1/marketplaces/connected`. */
|
|
4732
|
+
store?: string;
|
|
4733
|
+
/** @description ISO currency. Only orders in this currency are counted; amounts are not converted. Defaults to the single country's currency, otherwise SGD. */
|
|
4734
|
+
currency?: string;
|
|
4735
|
+
};
|
|
4736
|
+
header?: never;
|
|
4737
|
+
path?: never;
|
|
4738
|
+
cookie?: never;
|
|
4739
|
+
};
|
|
4740
|
+
requestBody?: never;
|
|
4741
|
+
responses: {
|
|
4742
|
+
/** @description Get Order Analytics */
|
|
4743
|
+
200: {
|
|
4744
|
+
headers: {
|
|
4745
|
+
[name: string]: unknown;
|
|
4746
|
+
};
|
|
4747
|
+
content: {
|
|
4748
|
+
"application/json": {
|
|
4749
|
+
ok: boolean;
|
|
4750
|
+
/** @constant */
|
|
4751
|
+
apiVersion: "developer_v1";
|
|
4752
|
+
operationId: string;
|
|
4753
|
+
/** @enum {string} */
|
|
4754
|
+
status: "accepted" | "completed" | "failed";
|
|
4755
|
+
jobId?: string;
|
|
4756
|
+
productId?: string;
|
|
4757
|
+
warnings: string[];
|
|
4758
|
+
recommendations: string[];
|
|
4759
|
+
links: {
|
|
4760
|
+
[key: string]: string;
|
|
4761
|
+
};
|
|
4762
|
+
data: {
|
|
4763
|
+
filters: {
|
|
4764
|
+
from: string;
|
|
4765
|
+
to: string;
|
|
4766
|
+
marketplace: string;
|
|
4767
|
+
country: string;
|
|
4768
|
+
store: string;
|
|
4769
|
+
/** @description Currency of every amount in the response. */
|
|
4770
|
+
currency: string;
|
|
4771
|
+
timeZone: string;
|
|
4772
|
+
};
|
|
4773
|
+
previousFrom: string;
|
|
4774
|
+
previousTo: string;
|
|
4775
|
+
kpis: {
|
|
4776
|
+
orders: number;
|
|
4777
|
+
netSales: number;
|
|
4778
|
+
/** @description Average order value. */
|
|
4779
|
+
aov: number;
|
|
4780
|
+
unitsSold: number;
|
|
4781
|
+
unitsPerOrder: number;
|
|
4782
|
+
returnedOrders: number;
|
|
4783
|
+
/** @description Share of orders returned, 0 to 1. */
|
|
4784
|
+
returnRate: number;
|
|
4785
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
4786
|
+
ordersChangePercent: number | null;
|
|
4787
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
4788
|
+
netSalesChangePercent: number | null;
|
|
4789
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
4790
|
+
aovChangePercent: number | null;
|
|
4791
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
4792
|
+
unitsChangePercent: number | null;
|
|
4793
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
4794
|
+
returnRateChangePercent: number | null;
|
|
4795
|
+
identifiedBuyers: number;
|
|
4796
|
+
repeatBuyers: number;
|
|
4797
|
+
repeatRate: number | null;
|
|
4798
|
+
cancelledOrders: number;
|
|
4799
|
+
cancelRate: number | null;
|
|
4800
|
+
};
|
|
4801
|
+
statusMix: {
|
|
4802
|
+
status: string;
|
|
4803
|
+
orders: number;
|
|
4804
|
+
netSales: number;
|
|
4805
|
+
}[];
|
|
4806
|
+
platformMix: {
|
|
4807
|
+
platform: string;
|
|
4808
|
+
orders: number;
|
|
4809
|
+
netSales: number;
|
|
4810
|
+
}[];
|
|
4811
|
+
dailyTrend: {
|
|
4812
|
+
date: string;
|
|
4813
|
+
previousDate: string | null;
|
|
4814
|
+
orders: number;
|
|
4815
|
+
netSales: number;
|
|
4816
|
+
previousOrders: number;
|
|
4817
|
+
previousNetSales: number;
|
|
4818
|
+
}[];
|
|
4819
|
+
/** @description Up to 40 products ranked by net sales. */
|
|
4820
|
+
topProducts: {
|
|
4821
|
+
productId: string | null;
|
|
4822
|
+
productName: string;
|
|
4823
|
+
platform: string | null;
|
|
4824
|
+
accountId: string | null;
|
|
4825
|
+
externalProductId: string | null;
|
|
4826
|
+
sku: string | null;
|
|
4827
|
+
thumbnailUrl: string | null;
|
|
4828
|
+
orders: number;
|
|
4829
|
+
unitsSold: number;
|
|
4830
|
+
netSales: number;
|
|
4831
|
+
}[];
|
|
4832
|
+
};
|
|
4833
|
+
};
|
|
4834
|
+
};
|
|
4835
|
+
};
|
|
4836
|
+
/** @description Invalid request */
|
|
4837
|
+
400: {
|
|
4838
|
+
headers: {
|
|
4839
|
+
[name: string]: unknown;
|
|
4840
|
+
};
|
|
4841
|
+
content?: never;
|
|
4842
|
+
};
|
|
4843
|
+
/** @description Unauthorized */
|
|
4844
|
+
401: {
|
|
4845
|
+
headers: {
|
|
4846
|
+
[name: string]: unknown;
|
|
4847
|
+
};
|
|
4848
|
+
content?: never;
|
|
4849
|
+
};
|
|
4850
|
+
/** @description Missing the `analytics:read` scope */
|
|
4851
|
+
403: {
|
|
4852
|
+
headers: {
|
|
4853
|
+
[name: string]: unknown;
|
|
4854
|
+
};
|
|
4855
|
+
content?: never;
|
|
4856
|
+
};
|
|
4857
|
+
/** @description Rate limit exceeded */
|
|
4858
|
+
429: {
|
|
4859
|
+
headers: {
|
|
4860
|
+
[name: string]: unknown;
|
|
4861
|
+
};
|
|
4862
|
+
content?: never;
|
|
4863
|
+
};
|
|
4864
|
+
/** @description Internal Server Error */
|
|
4865
|
+
500: {
|
|
4866
|
+
headers: {
|
|
4867
|
+
[name: string]: unknown;
|
|
4868
|
+
};
|
|
4869
|
+
content?: never;
|
|
4870
|
+
};
|
|
4871
|
+
};
|
|
4872
|
+
};
|
|
4873
|
+
get_v1_analytics_overview: {
|
|
4874
|
+
parameters: {
|
|
4875
|
+
query?: {
|
|
4876
|
+
/** @description Required for session auth. API keys already belong to one organization. */
|
|
4877
|
+
organizationId?: string;
|
|
4878
|
+
/** @description First day of the range (YYYY-MM-DD). Defaults to 29 days before `to`. */
|
|
4879
|
+
from?: string;
|
|
4880
|
+
/** @description Last day of the range, inclusive (YYYY-MM-DD). Defaults to today. */
|
|
4881
|
+
to?: string;
|
|
4882
|
+
/** @description IANA time zone that defines each day, for example `Asia/Kuala_Lumpur`. Defaults to Asia/Singapore. */
|
|
4883
|
+
timeZone?: string;
|
|
4884
|
+
/** @description Comma-separated marketplaces, for example `shopee,lazada`. */
|
|
4885
|
+
marketplace?: string;
|
|
4886
|
+
/** @description Comma-separated countries. One country selects its currency. */
|
|
4887
|
+
country?: string;
|
|
4888
|
+
/** @description Comma-separated store (account) ids from `GET /api/v1/marketplaces/connected`. */
|
|
4889
|
+
store?: string;
|
|
4890
|
+
/** @description ISO currency. Only orders in this currency are counted; amounts are not converted. Defaults to the single country's currency, otherwise SGD. */
|
|
4891
|
+
currency?: string;
|
|
4892
|
+
};
|
|
4893
|
+
header?: never;
|
|
4894
|
+
path?: never;
|
|
4895
|
+
cookie?: never;
|
|
4896
|
+
};
|
|
4897
|
+
requestBody?: never;
|
|
4898
|
+
responses: {
|
|
4899
|
+
/** @description Get Growth Overview */
|
|
4900
|
+
200: {
|
|
4901
|
+
headers: {
|
|
4902
|
+
[name: string]: unknown;
|
|
4903
|
+
};
|
|
4904
|
+
content: {
|
|
4905
|
+
"application/json": {
|
|
4906
|
+
ok: boolean;
|
|
4907
|
+
/** @constant */
|
|
4908
|
+
apiVersion: "developer_v1";
|
|
4909
|
+
operationId: string;
|
|
4910
|
+
/** @enum {string} */
|
|
4911
|
+
status: "accepted" | "completed" | "failed";
|
|
4912
|
+
jobId?: string;
|
|
4913
|
+
productId?: string;
|
|
4914
|
+
warnings: string[];
|
|
4915
|
+
recommendations: string[];
|
|
4916
|
+
links: {
|
|
4917
|
+
[key: string]: string;
|
|
4918
|
+
};
|
|
4919
|
+
data: {
|
|
4920
|
+
filters: {
|
|
4921
|
+
from: string;
|
|
4922
|
+
to: string;
|
|
4923
|
+
marketplace: string;
|
|
4924
|
+
country: string;
|
|
4925
|
+
store: string;
|
|
4926
|
+
/** @description Currency of every amount in the response. */
|
|
4927
|
+
currency: string;
|
|
4928
|
+
timeZone: string;
|
|
4929
|
+
};
|
|
4930
|
+
previousFrom: string;
|
|
4931
|
+
previousTo: string;
|
|
4932
|
+
/** @description `all`, or the single marketplace reported. With one marketplace, `channelMix` is split by store. */
|
|
4933
|
+
marketplaceScope: string;
|
|
4934
|
+
kpis: {
|
|
4935
|
+
grossSales: number;
|
|
4936
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
4937
|
+
grossSalesChangePercent: number | null;
|
|
4938
|
+
netSales: number;
|
|
4939
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
4940
|
+
netSalesChangePercent: number | null;
|
|
4941
|
+
orders: number;
|
|
4942
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
4943
|
+
ordersChangePercent: number | null;
|
|
4944
|
+
unitsSold: number;
|
|
4945
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
4946
|
+
unitsChangePercent: number | null;
|
|
4947
|
+
aov: number | null;
|
|
4948
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
4949
|
+
aovChangePercent: number | null;
|
|
4950
|
+
unitsPerOrder: number | null;
|
|
4951
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
4952
|
+
unitsPerOrderChangePercent: number | null;
|
|
4953
|
+
visitors: number | null;
|
|
4954
|
+
pageviews: number | null;
|
|
4955
|
+
/** @description Visitors who added to cart. */
|
|
4956
|
+
atcUsers: number | null;
|
|
4957
|
+
viewToOrderCvr: number | null;
|
|
4958
|
+
contributionProfit: number | null;
|
|
4959
|
+
adsSpend: number | null;
|
|
4960
|
+
};
|
|
4961
|
+
dailyTrend: {
|
|
4962
|
+
date: string;
|
|
4963
|
+
grossSales: number;
|
|
4964
|
+
netSales: number;
|
|
4965
|
+
orders: number;
|
|
4966
|
+
unitsSold: number;
|
|
4967
|
+
aov: number | null;
|
|
4968
|
+
unitsPerOrder: number | null;
|
|
4969
|
+
visitors: number | null;
|
|
4970
|
+
pageviews: number | null;
|
|
4971
|
+
}[];
|
|
4972
|
+
funnel: {
|
|
4973
|
+
id: string;
|
|
4974
|
+
label: string;
|
|
4975
|
+
value: number | null;
|
|
4976
|
+
covered: boolean;
|
|
4977
|
+
}[];
|
|
4978
|
+
channelMix: {
|
|
4979
|
+
platform: string;
|
|
4980
|
+
accountId: string | null;
|
|
4981
|
+
label: string;
|
|
4982
|
+
netSales: number;
|
|
4983
|
+
orders: number;
|
|
4984
|
+
unitsSold: number;
|
|
4985
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
4986
|
+
changePercent: number | null;
|
|
4987
|
+
}[];
|
|
4988
|
+
topProducts: {
|
|
4989
|
+
productId: string | null;
|
|
4990
|
+
variantId: string | null;
|
|
4991
|
+
sku: string | null;
|
|
4992
|
+
productName: string;
|
|
4993
|
+
thumbnailUrl: string | null;
|
|
4994
|
+
platform: string | null;
|
|
4995
|
+
accountId: string | null;
|
|
4996
|
+
externalProductId: string | null;
|
|
4997
|
+
netSales: number;
|
|
4998
|
+
orders: number;
|
|
4999
|
+
unitsSold: number;
|
|
5000
|
+
/** @description Share of net sales, 0 to 1. */
|
|
5001
|
+
revenueShare: number;
|
|
5002
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
5003
|
+
gmvChangePercent: number | null;
|
|
5004
|
+
}[];
|
|
5005
|
+
laggingProducts: {
|
|
5006
|
+
productId: string | null;
|
|
5007
|
+
variantId: string | null;
|
|
5008
|
+
sku: string | null;
|
|
5009
|
+
productName: string;
|
|
5010
|
+
thumbnailUrl: string | null;
|
|
5011
|
+
platform: string | null;
|
|
5012
|
+
accountId: string | null;
|
|
5013
|
+
externalProductId: string | null;
|
|
5014
|
+
netSales: number;
|
|
5015
|
+
orders: number;
|
|
5016
|
+
unitsSold: number;
|
|
5017
|
+
/** @description Share of net sales, 0 to 1. */
|
|
5018
|
+
revenueShare: number;
|
|
5019
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
5020
|
+
gmvChangePercent: number | null;
|
|
5021
|
+
}[];
|
|
5022
|
+
/** @description Ranked next actions. */
|
|
5023
|
+
insights: {
|
|
5024
|
+
id: string;
|
|
5025
|
+
code: string;
|
|
5026
|
+
/** @enum {string} */
|
|
5027
|
+
severity: "info" | "warn" | "critical" | "opportunity";
|
|
5028
|
+
/** @enum {string} */
|
|
5029
|
+
category:
|
|
5030
|
+
| "conversion"
|
|
5031
|
+
| "profit"
|
|
5032
|
+
| "inventory"
|
|
5033
|
+
| "ads"
|
|
5034
|
+
| "growth"
|
|
5035
|
+
| "data"
|
|
5036
|
+
| "market"
|
|
5037
|
+
| "pricing";
|
|
5038
|
+
title: string;
|
|
5039
|
+
summary: string;
|
|
5040
|
+
impactLabel: string;
|
|
5041
|
+
/** @description 0 to 100, higher first. */
|
|
5042
|
+
impactScore: number;
|
|
5043
|
+
productId: string | null;
|
|
5044
|
+
productName: string | null;
|
|
5045
|
+
}[];
|
|
5046
|
+
/** @description Which data sources have data for this range. */
|
|
5047
|
+
coverage: {
|
|
5048
|
+
sales: boolean;
|
|
5049
|
+
traffic: boolean;
|
|
5050
|
+
ads: boolean;
|
|
5051
|
+
content: boolean;
|
|
5052
|
+
inventory: boolean;
|
|
5053
|
+
profit: boolean;
|
|
5054
|
+
market: boolean;
|
|
5055
|
+
};
|
|
5056
|
+
syncFreshness: {
|
|
5057
|
+
jobType: string;
|
|
5058
|
+
platform: string | null;
|
|
5059
|
+
accountId: string | null;
|
|
5060
|
+
status: string;
|
|
5061
|
+
completedAt: string | null;
|
|
5062
|
+
rowsUpserted: number;
|
|
5063
|
+
}[];
|
|
5064
|
+
};
|
|
5065
|
+
};
|
|
5066
|
+
};
|
|
5067
|
+
};
|
|
5068
|
+
/** @description Invalid request */
|
|
5069
|
+
400: {
|
|
5070
|
+
headers: {
|
|
5071
|
+
[name: string]: unknown;
|
|
5072
|
+
};
|
|
5073
|
+
content?: never;
|
|
5074
|
+
};
|
|
5075
|
+
/** @description Unauthorized */
|
|
5076
|
+
401: {
|
|
5077
|
+
headers: {
|
|
5078
|
+
[name: string]: unknown;
|
|
5079
|
+
};
|
|
5080
|
+
content?: never;
|
|
5081
|
+
};
|
|
5082
|
+
/** @description Missing the `analytics:read` scope */
|
|
5083
|
+
403: {
|
|
5084
|
+
headers: {
|
|
5085
|
+
[name: string]: unknown;
|
|
5086
|
+
};
|
|
5087
|
+
content?: never;
|
|
5088
|
+
};
|
|
5089
|
+
/** @description Rate limit exceeded */
|
|
5090
|
+
429: {
|
|
5091
|
+
headers: {
|
|
5092
|
+
[name: string]: unknown;
|
|
5093
|
+
};
|
|
5094
|
+
content?: never;
|
|
5095
|
+
};
|
|
5096
|
+
/** @description Internal Server Error */
|
|
5097
|
+
500: {
|
|
5098
|
+
headers: {
|
|
5099
|
+
[name: string]: unknown;
|
|
5100
|
+
};
|
|
5101
|
+
content?: never;
|
|
5102
|
+
};
|
|
5103
|
+
};
|
|
5104
|
+
};
|
|
5105
|
+
get_v1_analytics_pricing: {
|
|
5106
|
+
parameters: {
|
|
5107
|
+
query?: {
|
|
5108
|
+
/** @description Required for session auth. API keys already belong to one organization. */
|
|
5109
|
+
organizationId?: string;
|
|
5110
|
+
/** @description First day of the range (YYYY-MM-DD). Defaults to 29 days before `to`. */
|
|
5111
|
+
from?: string;
|
|
5112
|
+
/** @description Last day of the range, inclusive (YYYY-MM-DD). Defaults to today. */
|
|
5113
|
+
to?: string;
|
|
5114
|
+
/** @description IANA time zone that defines each day, for example `Asia/Kuala_Lumpur`. Defaults to Asia/Singapore. */
|
|
5115
|
+
timeZone?: string;
|
|
5116
|
+
/** @description Comma-separated marketplaces, for example `shopee,lazada`. */
|
|
5117
|
+
marketplace?: string;
|
|
5118
|
+
/** @description Comma-separated countries. One country selects its currency. */
|
|
5119
|
+
country?: string;
|
|
5120
|
+
/** @description Comma-separated store (account) ids from `GET /api/v1/marketplaces/connected`. */
|
|
5121
|
+
store?: string;
|
|
5122
|
+
/** @description ISO currency. Only orders in this currency are counted; amounts are not converted. Defaults to the single country's currency, otherwise SGD. */
|
|
5123
|
+
currency?: string;
|
|
5124
|
+
};
|
|
5125
|
+
header?: never;
|
|
5126
|
+
path?: never;
|
|
5127
|
+
cookie?: never;
|
|
5128
|
+
};
|
|
5129
|
+
requestBody?: never;
|
|
5130
|
+
responses: {
|
|
5131
|
+
/** @description Get Pricing Analytics */
|
|
5132
|
+
200: {
|
|
5133
|
+
headers: {
|
|
5134
|
+
[name: string]: unknown;
|
|
5135
|
+
};
|
|
5136
|
+
content: {
|
|
5137
|
+
"application/json": {
|
|
5138
|
+
ok: boolean;
|
|
5139
|
+
/** @constant */
|
|
5140
|
+
apiVersion: "developer_v1";
|
|
5141
|
+
operationId: string;
|
|
5142
|
+
/** @enum {string} */
|
|
5143
|
+
status: "accepted" | "completed" | "failed";
|
|
5144
|
+
jobId?: string;
|
|
5145
|
+
productId?: string;
|
|
5146
|
+
warnings: string[];
|
|
5147
|
+
recommendations: string[];
|
|
5148
|
+
links: {
|
|
5149
|
+
[key: string]: string;
|
|
5150
|
+
};
|
|
5151
|
+
data: {
|
|
5152
|
+
filters: {
|
|
5153
|
+
from: string;
|
|
5154
|
+
to: string;
|
|
5155
|
+
marketplace: string;
|
|
5156
|
+
country: string;
|
|
5157
|
+
store: string;
|
|
5158
|
+
/** @description Currency of every amount in the response. */
|
|
5159
|
+
currency: string;
|
|
5160
|
+
timeZone: string;
|
|
5161
|
+
};
|
|
5162
|
+
/** @description Selling products from the top 30 by net sales. */
|
|
5163
|
+
products: {
|
|
5164
|
+
productId: string | null;
|
|
5165
|
+
productName: string;
|
|
5166
|
+
sku: string | null;
|
|
5167
|
+
netSales: number;
|
|
5168
|
+
unitsSold: number;
|
|
5169
|
+
velocity: number;
|
|
5170
|
+
contributionMargin: number | null;
|
|
5171
|
+
daysOfCover: number | null;
|
|
5172
|
+
catalogCurrency: string | null;
|
|
5173
|
+
listPrice: number | null;
|
|
5174
|
+
salePrice: number | null;
|
|
5175
|
+
discountPct: number | null;
|
|
5176
|
+
peerPriceP50: number | null;
|
|
5177
|
+
recommendation: string;
|
|
5178
|
+
}[];
|
|
5179
|
+
};
|
|
5180
|
+
};
|
|
5181
|
+
};
|
|
5182
|
+
};
|
|
5183
|
+
/** @description Invalid request */
|
|
5184
|
+
400: {
|
|
5185
|
+
headers: {
|
|
5186
|
+
[name: string]: unknown;
|
|
5187
|
+
};
|
|
5188
|
+
content?: never;
|
|
5189
|
+
};
|
|
5190
|
+
/** @description Unauthorized */
|
|
5191
|
+
401: {
|
|
5192
|
+
headers: {
|
|
5193
|
+
[name: string]: unknown;
|
|
5194
|
+
};
|
|
5195
|
+
content?: never;
|
|
5196
|
+
};
|
|
5197
|
+
/** @description Missing the `analytics:read` scope */
|
|
5198
|
+
403: {
|
|
5199
|
+
headers: {
|
|
5200
|
+
[name: string]: unknown;
|
|
5201
|
+
};
|
|
5202
|
+
content?: never;
|
|
5203
|
+
};
|
|
5204
|
+
/** @description Rate limit exceeded */
|
|
5205
|
+
429: {
|
|
5206
|
+
headers: {
|
|
5207
|
+
[name: string]: unknown;
|
|
5208
|
+
};
|
|
5209
|
+
content?: never;
|
|
5210
|
+
};
|
|
5211
|
+
/** @description Internal Server Error */
|
|
5212
|
+
500: {
|
|
5213
|
+
headers: {
|
|
5214
|
+
[name: string]: unknown;
|
|
5215
|
+
};
|
|
5216
|
+
content?: never;
|
|
5217
|
+
};
|
|
5218
|
+
};
|
|
5219
|
+
};
|
|
5220
|
+
get_v1_analytics_products: {
|
|
5221
|
+
parameters: {
|
|
5222
|
+
query?: {
|
|
5223
|
+
/** @description Required for session auth. API keys already belong to one organization. */
|
|
5224
|
+
organizationId?: string;
|
|
5225
|
+
/** @description First day of the range (YYYY-MM-DD). Defaults to 29 days before `to`. */
|
|
5226
|
+
from?: string;
|
|
5227
|
+
/** @description Last day of the range, inclusive (YYYY-MM-DD). Defaults to today. */
|
|
5228
|
+
to?: string;
|
|
5229
|
+
/** @description IANA time zone that defines each day, for example `Asia/Kuala_Lumpur`. Defaults to Asia/Singapore. */
|
|
5230
|
+
timeZone?: string;
|
|
5231
|
+
/** @description Comma-separated marketplaces, for example `shopee,lazada`. */
|
|
5232
|
+
marketplace?: string;
|
|
5233
|
+
/** @description Comma-separated countries. One country selects its currency. */
|
|
5234
|
+
country?: string;
|
|
5235
|
+
/** @description Comma-separated store (account) ids from `GET /api/v1/marketplaces/connected`. */
|
|
5236
|
+
store?: string;
|
|
5237
|
+
/** @description ISO currency. Only orders in this currency are counted; amounts are not converted. Defaults to the single country's currency, otherwise SGD. */
|
|
5238
|
+
currency?: string;
|
|
5239
|
+
/** @description Search product name or SKU. */
|
|
5240
|
+
q?: string;
|
|
5241
|
+
/** @description Comma-separated product or variant UUIDs, up to 50, to report only those products. */
|
|
5242
|
+
productId?: string;
|
|
5243
|
+
/** @description Products to return, ranked by net sales. */
|
|
5244
|
+
limit?: number;
|
|
5245
|
+
};
|
|
5246
|
+
header?: never;
|
|
5247
|
+
path?: never;
|
|
5248
|
+
cookie?: never;
|
|
5249
|
+
};
|
|
5250
|
+
requestBody?: never;
|
|
5251
|
+
responses: {
|
|
5252
|
+
/** @description Get Product Analytics */
|
|
5253
|
+
200: {
|
|
5254
|
+
headers: {
|
|
5255
|
+
[name: string]: unknown;
|
|
5256
|
+
};
|
|
5257
|
+
content: {
|
|
5258
|
+
"application/json": {
|
|
5259
|
+
ok: boolean;
|
|
5260
|
+
/** @constant */
|
|
5261
|
+
apiVersion: "developer_v1";
|
|
5262
|
+
operationId: string;
|
|
5263
|
+
/** @enum {string} */
|
|
5264
|
+
status: "accepted" | "completed" | "failed";
|
|
5265
|
+
jobId?: string;
|
|
5266
|
+
productId?: string;
|
|
5267
|
+
warnings: string[];
|
|
5268
|
+
recommendations: string[];
|
|
5269
|
+
links: {
|
|
5270
|
+
[key: string]: string;
|
|
5271
|
+
};
|
|
5272
|
+
data: {
|
|
5273
|
+
filters: {
|
|
5274
|
+
from: string;
|
|
5275
|
+
to: string;
|
|
5276
|
+
marketplace: string;
|
|
5277
|
+
country: string;
|
|
5278
|
+
store: string;
|
|
5279
|
+
/** @description Currency of every amount in the response. */
|
|
5280
|
+
currency: string;
|
|
5281
|
+
timeZone: string;
|
|
5282
|
+
q: string;
|
|
5283
|
+
};
|
|
5284
|
+
products: {
|
|
5285
|
+
productId: string | null;
|
|
5286
|
+
variantId: string | null;
|
|
5287
|
+
sku: string | null;
|
|
5288
|
+
productName: string;
|
|
5289
|
+
thumbnailUrl: string | null;
|
|
5290
|
+
platform: string | null;
|
|
5291
|
+
accountId: string | null;
|
|
5292
|
+
externalProductId: string | null;
|
|
5293
|
+
gmv: number;
|
|
5294
|
+
netSales: number;
|
|
5295
|
+
orders: number;
|
|
5296
|
+
unitsSold: number;
|
|
5297
|
+
revenueShare: number;
|
|
5298
|
+
/** @description Units sold per day. */
|
|
5299
|
+
velocity: number;
|
|
5300
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
5301
|
+
gmvChangePercent: number | null;
|
|
5302
|
+
impressions: number | null;
|
|
5303
|
+
pageviews: number | null;
|
|
5304
|
+
visitors: number | null;
|
|
5305
|
+
clicks: number | null;
|
|
5306
|
+
atcUsers: number | null;
|
|
5307
|
+
atcUnits: number | null;
|
|
5308
|
+
viewToOrderCvr: number | null;
|
|
5309
|
+
visitorValue: number | null;
|
|
5310
|
+
listingStatus: string | null;
|
|
5311
|
+
channelsLive: number;
|
|
5312
|
+
/** @description Currency of listPrice and salePrice, which can differ from the report currency. */
|
|
5313
|
+
catalogCurrency: string | null;
|
|
5314
|
+
marketPrices: {
|
|
5315
|
+
marketplace: string;
|
|
5316
|
+
storeId: string | null;
|
|
5317
|
+
storeName: string | null;
|
|
5318
|
+
productId: string | null;
|
|
5319
|
+
sellerSku: string | null;
|
|
5320
|
+
variation: string | null;
|
|
5321
|
+
country: string | null;
|
|
5322
|
+
currency: string;
|
|
5323
|
+
price: number | null;
|
|
5324
|
+
salePrice: number | null;
|
|
5325
|
+
saleStartDate: string | null;
|
|
5326
|
+
saleEndDate: string | null;
|
|
5327
|
+
status: string | null;
|
|
5328
|
+
}[];
|
|
5329
|
+
listPrice: number | null;
|
|
5330
|
+
salePrice: number | null;
|
|
5331
|
+
discountPct: number | null;
|
|
5332
|
+
/** @description Units per day during promotions against outside them, as a ratio change. */
|
|
5333
|
+
promoLift: number | null;
|
|
5334
|
+
completenessScore: number | null;
|
|
5335
|
+
lastPublishedAt: string | null;
|
|
5336
|
+
available: number | null;
|
|
5337
|
+
daysOfCover: number | null;
|
|
5338
|
+
stockoutRisk: string | null;
|
|
5339
|
+
cogs: number | null;
|
|
5340
|
+
/** @description Share of sold units with a cost price, 0 to 1. */
|
|
5341
|
+
cogsCoverage: number | null;
|
|
5342
|
+
platformFees: number | null;
|
|
5343
|
+
adsFees: number | null;
|
|
5344
|
+
contributionProfit: number | null;
|
|
5345
|
+
contributionMargin: number | null;
|
|
5346
|
+
returnRate: number | null;
|
|
5347
|
+
refundAmount: number | null;
|
|
5348
|
+
adsSpend: number | null;
|
|
5349
|
+
adsRoas: number | null;
|
|
5350
|
+
adsAcos: number | null;
|
|
5351
|
+
contentGmv: number | null;
|
|
5352
|
+
/** @description Median competitor price. */
|
|
5353
|
+
peerPriceP50: number | null;
|
|
5354
|
+
searchRank: number | null;
|
|
5355
|
+
alerts: {
|
|
5356
|
+
code: string;
|
|
5357
|
+
/** @enum {string} */
|
|
5358
|
+
severity: "info" | "warn" | "critical";
|
|
5359
|
+
message: string;
|
|
5360
|
+
}[];
|
|
5361
|
+
}[];
|
|
5362
|
+
insights: {
|
|
5363
|
+
id: string;
|
|
5364
|
+
code: string;
|
|
5365
|
+
/** @enum {string} */
|
|
5366
|
+
severity: "info" | "warn" | "critical" | "opportunity";
|
|
5367
|
+
/** @enum {string} */
|
|
5368
|
+
category:
|
|
5369
|
+
| "conversion"
|
|
5370
|
+
| "profit"
|
|
5371
|
+
| "inventory"
|
|
5372
|
+
| "ads"
|
|
5373
|
+
| "growth"
|
|
5374
|
+
| "data"
|
|
5375
|
+
| "market"
|
|
5376
|
+
| "pricing";
|
|
5377
|
+
title: string;
|
|
5378
|
+
summary: string;
|
|
5379
|
+
impactLabel: string;
|
|
5380
|
+
/** @description 0 to 100, higher first. */
|
|
5381
|
+
impactScore: number;
|
|
5382
|
+
productId: string | null;
|
|
5383
|
+
productName: string | null;
|
|
5384
|
+
}[];
|
|
5385
|
+
/** @description Which data sources have data for this range. */
|
|
5386
|
+
coverage: {
|
|
5387
|
+
sales: boolean;
|
|
5388
|
+
traffic: boolean;
|
|
5389
|
+
ads: boolean;
|
|
5390
|
+
content: boolean;
|
|
5391
|
+
inventory: boolean;
|
|
5392
|
+
profit: boolean;
|
|
5393
|
+
market: boolean;
|
|
5394
|
+
};
|
|
5395
|
+
};
|
|
5396
|
+
};
|
|
5397
|
+
};
|
|
5398
|
+
};
|
|
5399
|
+
/** @description Invalid request */
|
|
5400
|
+
400: {
|
|
5401
|
+
headers: {
|
|
5402
|
+
[name: string]: unknown;
|
|
5403
|
+
};
|
|
5404
|
+
content?: never;
|
|
5405
|
+
};
|
|
5406
|
+
/** @description Unauthorized */
|
|
5407
|
+
401: {
|
|
5408
|
+
headers: {
|
|
5409
|
+
[name: string]: unknown;
|
|
5410
|
+
};
|
|
5411
|
+
content?: never;
|
|
5412
|
+
};
|
|
5413
|
+
/** @description Missing the `analytics:read` scope */
|
|
5414
|
+
403: {
|
|
5415
|
+
headers: {
|
|
5416
|
+
[name: string]: unknown;
|
|
5417
|
+
};
|
|
5418
|
+
content?: never;
|
|
5419
|
+
};
|
|
5420
|
+
/** @description Rate limit exceeded */
|
|
5421
|
+
429: {
|
|
5422
|
+
headers: {
|
|
5423
|
+
[name: string]: unknown;
|
|
5424
|
+
};
|
|
5425
|
+
content?: never;
|
|
5426
|
+
};
|
|
5427
|
+
/** @description Internal Server Error */
|
|
5428
|
+
500: {
|
|
5429
|
+
headers: {
|
|
5430
|
+
[name: string]: unknown;
|
|
5431
|
+
};
|
|
5432
|
+
content?: never;
|
|
5433
|
+
};
|
|
5434
|
+
};
|
|
5435
|
+
};
|
|
5436
|
+
get_v1_analytics_profit: {
|
|
5437
|
+
parameters: {
|
|
5438
|
+
query?: {
|
|
5439
|
+
/** @description Required for session auth. API keys already belong to one organization. */
|
|
5440
|
+
organizationId?: string;
|
|
5441
|
+
/** @description First day of the range (YYYY-MM-DD). Defaults to 29 days before `to`. */
|
|
5442
|
+
from?: string;
|
|
5443
|
+
/** @description Last day of the range, inclusive (YYYY-MM-DD). Defaults to today. */
|
|
5444
|
+
to?: string;
|
|
5445
|
+
/** @description IANA time zone that defines each day, for example `Asia/Kuala_Lumpur`. Defaults to Asia/Singapore. */
|
|
5446
|
+
timeZone?: string;
|
|
5447
|
+
/** @description Comma-separated marketplaces, for example `shopee,lazada`. */
|
|
5448
|
+
marketplace?: string;
|
|
5449
|
+
/** @description Comma-separated countries. One country selects its currency. */
|
|
5450
|
+
country?: string;
|
|
5451
|
+
/** @description Comma-separated store (account) ids from `GET /api/v1/marketplaces/connected`. */
|
|
5452
|
+
store?: string;
|
|
5453
|
+
/** @description ISO currency. Only orders in this currency are counted; amounts are not converted. Defaults to the single country's currency, otherwise SGD. */
|
|
5454
|
+
currency?: string;
|
|
5455
|
+
/** @description Comma-separated SKUs to report only those products. */
|
|
5456
|
+
sku?: string;
|
|
5457
|
+
};
|
|
5458
|
+
header?: never;
|
|
5459
|
+
path?: never;
|
|
5460
|
+
cookie?: never;
|
|
5461
|
+
};
|
|
5462
|
+
requestBody?: never;
|
|
5463
|
+
responses: {
|
|
5464
|
+
/** @description Get Profit Analytics */
|
|
5465
|
+
200: {
|
|
5466
|
+
headers: {
|
|
5467
|
+
[name: string]: unknown;
|
|
5468
|
+
};
|
|
5469
|
+
content: {
|
|
5470
|
+
"application/json": {
|
|
5471
|
+
ok: boolean;
|
|
5472
|
+
/** @constant */
|
|
5473
|
+
apiVersion: "developer_v1";
|
|
5474
|
+
operationId: string;
|
|
5475
|
+
/** @enum {string} */
|
|
5476
|
+
status: "accepted" | "completed" | "failed";
|
|
5477
|
+
jobId?: string;
|
|
5478
|
+
productId?: string;
|
|
5479
|
+
warnings: string[];
|
|
5480
|
+
recommendations: string[];
|
|
5481
|
+
links: {
|
|
5482
|
+
[key: string]: string;
|
|
5483
|
+
};
|
|
5484
|
+
data: {
|
|
5485
|
+
filters: {
|
|
5486
|
+
from: string;
|
|
5487
|
+
to: string;
|
|
5488
|
+
marketplace: string;
|
|
5489
|
+
country: string;
|
|
5490
|
+
store: string;
|
|
5491
|
+
/** @description Currency of every amount in the response. */
|
|
5492
|
+
currency: string;
|
|
5493
|
+
timeZone: string;
|
|
5494
|
+
sku: string;
|
|
5495
|
+
};
|
|
5496
|
+
/**
|
|
5497
|
+
* @description `profit` when cost prices cover sales, otherwise `earnings` (revenue after fees).
|
|
5498
|
+
* @enum {string}
|
|
5499
|
+
*/
|
|
5500
|
+
reportingBasis: "earnings" | "profit";
|
|
5501
|
+
currentRange: {
|
|
5502
|
+
from: string;
|
|
5503
|
+
to: string;
|
|
5504
|
+
};
|
|
5505
|
+
previousRange: {
|
|
5506
|
+
from: string;
|
|
5507
|
+
to: string;
|
|
5508
|
+
};
|
|
5509
|
+
metricCards: {
|
|
5510
|
+
/** @enum {string} */
|
|
5511
|
+
id:
|
|
5512
|
+
| "net_revenue"
|
|
5513
|
+
| "total_costs"
|
|
5514
|
+
| "net_profit"
|
|
5515
|
+
| "net_margin"
|
|
5516
|
+
| "marketplace_costs"
|
|
5517
|
+
| "earnings_after_fees"
|
|
5518
|
+
| "earnings_rate";
|
|
5519
|
+
label: string;
|
|
5520
|
+
value: number | null;
|
|
5521
|
+
/** @enum {string} */
|
|
5522
|
+
unit: "currency" | "percent";
|
|
5523
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
5524
|
+
changePercent: number | null;
|
|
5525
|
+
}[];
|
|
5526
|
+
dailyTrend: {
|
|
5527
|
+
date: string;
|
|
5528
|
+
netRevenue: number;
|
|
5529
|
+
netProfit: number | null;
|
|
5530
|
+
earningsAfterFees: number;
|
|
5531
|
+
}[];
|
|
5532
|
+
waterfall: {
|
|
5533
|
+
/** @enum {string} */
|
|
5534
|
+
id:
|
|
5535
|
+
| "gross_sales"
|
|
5536
|
+
| "discounts"
|
|
5537
|
+
| "returns"
|
|
5538
|
+
| "platform_fees"
|
|
5539
|
+
| "cogs"
|
|
5540
|
+
| "fulfillment"
|
|
5541
|
+
| "operating"
|
|
5542
|
+
| "net_profit"
|
|
5543
|
+
| "earnings_after_fees";
|
|
5544
|
+
label: string;
|
|
5545
|
+
amount: number | null;
|
|
5546
|
+
/** @enum {string} */
|
|
5547
|
+
kind: "positive" | "negative" | "result";
|
|
5548
|
+
}[];
|
|
5549
|
+
breakdownSections: {
|
|
5550
|
+
/** @enum {string} */
|
|
5551
|
+
id:
|
|
5552
|
+
| "revenue"
|
|
5553
|
+
| "platform_fees"
|
|
5554
|
+
| "cogs"
|
|
5555
|
+
| "fulfillment"
|
|
5556
|
+
| "operating";
|
|
5557
|
+
title: string;
|
|
5558
|
+
total: number;
|
|
5559
|
+
rows: {
|
|
5560
|
+
id: string;
|
|
5561
|
+
label: string;
|
|
5562
|
+
amount: number;
|
|
5563
|
+
/** @enum {string} */
|
|
5564
|
+
unit: "currency" | "percent";
|
|
5565
|
+
}[];
|
|
5566
|
+
}[];
|
|
5567
|
+
insights: {
|
|
5568
|
+
id: string;
|
|
5569
|
+
title: string;
|
|
5570
|
+
description: string;
|
|
5571
|
+
/** @enum {string} */
|
|
5572
|
+
tone: "positive" | "warning" | "neutral";
|
|
5573
|
+
}[];
|
|
5574
|
+
profitabilitySnapshot: {
|
|
5575
|
+
marketplaceCosts: number;
|
|
5576
|
+
earningsAfterFees: number;
|
|
5577
|
+
earningsRate: number;
|
|
5578
|
+
totalKnownCosts: number;
|
|
5579
|
+
ordersInRange: number;
|
|
5580
|
+
costRatio: number;
|
|
5581
|
+
shippingRatio: number;
|
|
5582
|
+
uncostedUnits: number;
|
|
5583
|
+
};
|
|
5584
|
+
/** @description Sold products without a cost price. */
|
|
5585
|
+
missingCostProducts: {
|
|
5586
|
+
productId: string;
|
|
5587
|
+
variantId: string | null;
|
|
5588
|
+
name: string;
|
|
5589
|
+
variantName: string | null;
|
|
5590
|
+
thumbnailUrl: string | null;
|
|
5591
|
+
sku: string | null;
|
|
5592
|
+
soldUnits: number;
|
|
5593
|
+
marketplaces: string[];
|
|
5594
|
+
countries: string[];
|
|
5595
|
+
}[];
|
|
5596
|
+
topProducts: {
|
|
5597
|
+
productId: string;
|
|
5598
|
+
variantId: string | null;
|
|
5599
|
+
name: string;
|
|
5600
|
+
variantName: string | null;
|
|
5601
|
+
thumbnailUrl: string | null;
|
|
5602
|
+
sku: string | null;
|
|
5603
|
+
unitsSold: number;
|
|
5604
|
+
totalRevenue: number;
|
|
5605
|
+
totalCogs: number;
|
|
5606
|
+
/** @description Marketplace and fulfillment fees allocated to the product. */
|
|
5607
|
+
totalFees: number;
|
|
5608
|
+
earningsAfterFees: number;
|
|
5609
|
+
earningsRate: number;
|
|
5610
|
+
/** @description Null until every sold unit has a cost price. */
|
|
5611
|
+
totalProfit: number | null;
|
|
5612
|
+
profitMargin: number | null;
|
|
5613
|
+
/** @description Profit counting only units with a cost price. */
|
|
5614
|
+
knownCostProfit: number;
|
|
5615
|
+
knownCostMargin: number;
|
|
5616
|
+
/** @description Share of sold units with a cost price, 0 to 1. */
|
|
5617
|
+
costCoverage: number;
|
|
5618
|
+
marketplaces: string[];
|
|
5619
|
+
}[];
|
|
5620
|
+
underperformingProducts: {
|
|
5621
|
+
productId: string;
|
|
5622
|
+
variantId: string | null;
|
|
5623
|
+
name: string;
|
|
5624
|
+
variantName: string | null;
|
|
5625
|
+
thumbnailUrl: string | null;
|
|
5626
|
+
sku: string | null;
|
|
5627
|
+
unitsSold: number;
|
|
5628
|
+
totalRevenue: number;
|
|
5629
|
+
totalCogs: number;
|
|
5630
|
+
/** @description Marketplace and fulfillment fees allocated to the product. */
|
|
5631
|
+
totalFees: number;
|
|
5632
|
+
earningsAfterFees: number;
|
|
5633
|
+
earningsRate: number;
|
|
5634
|
+
/** @description Null until every sold unit has a cost price. */
|
|
5635
|
+
totalProfit: number | null;
|
|
5636
|
+
profitMargin: number | null;
|
|
5637
|
+
/** @description Profit counting only units with a cost price. */
|
|
5638
|
+
knownCostProfit: number;
|
|
5639
|
+
knownCostMargin: number;
|
|
5640
|
+
/** @description Share of sold units with a cost price, 0 to 1. */
|
|
5641
|
+
costCoverage: number;
|
|
5642
|
+
marketplaces: string[];
|
|
5643
|
+
}[];
|
|
5644
|
+
/** @description Sales against the historical retail price, when price books record one. */
|
|
5645
|
+
retailUplift: {
|
|
5646
|
+
currency: string;
|
|
5647
|
+
soldUnits: number;
|
|
5648
|
+
coveredUnits: number;
|
|
5649
|
+
missingBaselineUnits: number;
|
|
5650
|
+
priceBookRecordedUnits: number;
|
|
5651
|
+
retailValue: number | null;
|
|
5652
|
+
salesValue: number | null;
|
|
5653
|
+
upliftAmount: number | null;
|
|
5654
|
+
markupRate: number | null;
|
|
5655
|
+
} | null;
|
|
5656
|
+
notes: string[];
|
|
5657
|
+
};
|
|
5658
|
+
};
|
|
5659
|
+
};
|
|
5660
|
+
};
|
|
5661
|
+
/** @description Invalid request */
|
|
5662
|
+
400: {
|
|
5663
|
+
headers: {
|
|
5664
|
+
[name: string]: unknown;
|
|
5665
|
+
};
|
|
5666
|
+
content?: never;
|
|
5667
|
+
};
|
|
5668
|
+
/** @description Unauthorized */
|
|
5669
|
+
401: {
|
|
5670
|
+
headers: {
|
|
5671
|
+
[name: string]: unknown;
|
|
5672
|
+
};
|
|
5673
|
+
content?: never;
|
|
5674
|
+
};
|
|
5675
|
+
/** @description Missing the `analytics:read` scope */
|
|
5676
|
+
403: {
|
|
5677
|
+
headers: {
|
|
5678
|
+
[name: string]: unknown;
|
|
5679
|
+
};
|
|
5680
|
+
content?: never;
|
|
5681
|
+
};
|
|
5682
|
+
/** @description Rate limit exceeded */
|
|
5683
|
+
429: {
|
|
5684
|
+
headers: {
|
|
5685
|
+
[name: string]: unknown;
|
|
5686
|
+
};
|
|
5687
|
+
content?: never;
|
|
5688
|
+
};
|
|
5689
|
+
/** @description Internal Server Error */
|
|
5690
|
+
500: {
|
|
5691
|
+
headers: {
|
|
5692
|
+
[name: string]: unknown;
|
|
5693
|
+
};
|
|
5694
|
+
content?: never;
|
|
5695
|
+
};
|
|
5696
|
+
};
|
|
5697
|
+
};
|
|
5698
|
+
get_v1_analytics_reports: {
|
|
5699
|
+
parameters: {
|
|
5700
|
+
query?: {
|
|
5701
|
+
/** @description Required for session auth. API keys already belong to one organization. */
|
|
5702
|
+
organizationId?: string;
|
|
5703
|
+
/** @description First day of the range (YYYY-MM-DD). Defaults to 29 days before `to`. */
|
|
5704
|
+
from?: string;
|
|
5705
|
+
/** @description Last day of the range, inclusive (YYYY-MM-DD). Defaults to today. */
|
|
5706
|
+
to?: string;
|
|
5707
|
+
/** @description IANA time zone that defines each day, for example `Asia/Kuala_Lumpur`. Defaults to Asia/Singapore. */
|
|
5708
|
+
timeZone?: string;
|
|
5709
|
+
/** @description Comma-separated marketplaces, for example `shopee,lazada`. */
|
|
5710
|
+
marketplace?: string;
|
|
5711
|
+
/** @description Comma-separated countries. One country selects its currency. */
|
|
5712
|
+
country?: string;
|
|
5713
|
+
/** @description Comma-separated store (account) ids from `GET /api/v1/marketplaces/connected`. */
|
|
5714
|
+
store?: string;
|
|
5715
|
+
/** @description ISO currency. Only orders in this currency are counted; amounts are not converted. Defaults to the single country's currency, otherwise SGD. */
|
|
5716
|
+
currency?: string;
|
|
5717
|
+
};
|
|
5718
|
+
header?: never;
|
|
5719
|
+
path?: never;
|
|
5720
|
+
cookie?: never;
|
|
5721
|
+
};
|
|
5722
|
+
requestBody?: never;
|
|
5723
|
+
responses: {
|
|
5724
|
+
/** @description Get Business Report */
|
|
5725
|
+
200: {
|
|
5726
|
+
headers: {
|
|
5727
|
+
[name: string]: unknown;
|
|
5728
|
+
};
|
|
5729
|
+
content: {
|
|
5730
|
+
"application/json": {
|
|
5731
|
+
ok: boolean;
|
|
5732
|
+
/** @constant */
|
|
5733
|
+
apiVersion: "developer_v1";
|
|
5734
|
+
operationId: string;
|
|
5735
|
+
/** @enum {string} */
|
|
5736
|
+
status: "accepted" | "completed" | "failed";
|
|
5737
|
+
jobId?: string;
|
|
5738
|
+
productId?: string;
|
|
5739
|
+
warnings: string[];
|
|
5740
|
+
recommendations: string[];
|
|
5741
|
+
links: {
|
|
5742
|
+
[key: string]: string;
|
|
5743
|
+
};
|
|
5744
|
+
data: {
|
|
5745
|
+
filters: {
|
|
5746
|
+
from: string;
|
|
5747
|
+
to: string;
|
|
5748
|
+
marketplace: string;
|
|
5749
|
+
country: string;
|
|
5750
|
+
store: string;
|
|
5751
|
+
/** @description Currency of every amount in the response. */
|
|
5752
|
+
currency: string;
|
|
5753
|
+
timeZone: string;
|
|
5754
|
+
};
|
|
5755
|
+
kpis: {
|
|
5756
|
+
id: string;
|
|
5757
|
+
label: string;
|
|
5758
|
+
value: number | null;
|
|
5759
|
+
previous: number | null;
|
|
5760
|
+
/** @enum {string} */
|
|
5761
|
+
unit: "currency" | "number" | "percent";
|
|
5762
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
5763
|
+
changePercent: number | null;
|
|
5764
|
+
}[];
|
|
5765
|
+
topProducts: {
|
|
5766
|
+
productId: string | null;
|
|
5767
|
+
variantId: string | null;
|
|
5768
|
+
name: string;
|
|
5769
|
+
variantName: string | null;
|
|
5770
|
+
sku: string | null;
|
|
5771
|
+
thumbnailUrl: string | null;
|
|
5772
|
+
totalRevenue: number;
|
|
5773
|
+
}[];
|
|
5774
|
+
marketplaceBreakdown: {
|
|
5775
|
+
platform: string;
|
|
5776
|
+
country: string | null;
|
|
5777
|
+
revenue: number;
|
|
5778
|
+
orders: number;
|
|
5779
|
+
share: number;
|
|
5780
|
+
}[];
|
|
5781
|
+
alerts: {
|
|
5782
|
+
id: string;
|
|
5783
|
+
title: string;
|
|
5784
|
+
description: string;
|
|
5785
|
+
/** @enum {string} */
|
|
5786
|
+
tone: "warning" | "neutral" | "positive";
|
|
5787
|
+
}[];
|
|
5788
|
+
settlements: {
|
|
5789
|
+
ordersCount: number;
|
|
5790
|
+
withFinanceCount: number;
|
|
5791
|
+
missingFinanceCount: number;
|
|
5792
|
+
grossSales: number;
|
|
5793
|
+
netSettlement: number;
|
|
5794
|
+
platformFees: number;
|
|
5795
|
+
fulfillmentFees: number;
|
|
5796
|
+
};
|
|
5797
|
+
dataQuality: {
|
|
5798
|
+
generatedAt: string;
|
|
5799
|
+
lastOrderUpdatedAt: string | null;
|
|
5800
|
+
lastFinanceEventAt: string | null;
|
|
5801
|
+
financeCoverage: number;
|
|
5802
|
+
costCoverage: number;
|
|
5803
|
+
profitComplete: boolean;
|
|
5804
|
+
};
|
|
5805
|
+
};
|
|
5806
|
+
};
|
|
5807
|
+
};
|
|
5808
|
+
};
|
|
5809
|
+
/** @description Invalid request */
|
|
5810
|
+
400: {
|
|
5811
|
+
headers: {
|
|
5812
|
+
[name: string]: unknown;
|
|
5813
|
+
};
|
|
5814
|
+
content?: never;
|
|
5815
|
+
};
|
|
5816
|
+
/** @description Unauthorized */
|
|
5817
|
+
401: {
|
|
5818
|
+
headers: {
|
|
5819
|
+
[name: string]: unknown;
|
|
5820
|
+
};
|
|
5821
|
+
content?: never;
|
|
5822
|
+
};
|
|
5823
|
+
/** @description Missing the `analytics:read` scope */
|
|
5824
|
+
403: {
|
|
5825
|
+
headers: {
|
|
5826
|
+
[name: string]: unknown;
|
|
5827
|
+
};
|
|
5828
|
+
content?: never;
|
|
5829
|
+
};
|
|
5830
|
+
/** @description Rate limit exceeded */
|
|
5831
|
+
429: {
|
|
5832
|
+
headers: {
|
|
5833
|
+
[name: string]: unknown;
|
|
5834
|
+
};
|
|
5835
|
+
content?: never;
|
|
5836
|
+
};
|
|
5837
|
+
/** @description Internal Server Error */
|
|
5838
|
+
500: {
|
|
5839
|
+
headers: {
|
|
5840
|
+
[name: string]: unknown;
|
|
5841
|
+
};
|
|
5842
|
+
content?: never;
|
|
5843
|
+
};
|
|
5844
|
+
};
|
|
5845
|
+
};
|
|
5846
|
+
get_v1_analytics_stores: {
|
|
5847
|
+
parameters: {
|
|
5848
|
+
query?: {
|
|
5849
|
+
/** @description Required for session auth. API keys already belong to one organization. */
|
|
5850
|
+
organizationId?: string;
|
|
5851
|
+
/** @description First day of the range (YYYY-MM-DD). Defaults to 29 days before `to`. */
|
|
5852
|
+
from?: string;
|
|
5853
|
+
/** @description Last day of the range, inclusive (YYYY-MM-DD). Defaults to today. */
|
|
5854
|
+
to?: string;
|
|
5855
|
+
/** @description IANA time zone that defines each day, for example `Asia/Kuala_Lumpur`. Defaults to Asia/Singapore. */
|
|
5856
|
+
timeZone?: string;
|
|
5857
|
+
/** @description Comma-separated marketplaces, for example `shopee,lazada`. */
|
|
5858
|
+
marketplace?: string;
|
|
5859
|
+
/** @description Comma-separated countries. One country selects its currency. */
|
|
5860
|
+
country?: string;
|
|
5861
|
+
/** @description Comma-separated store (account) ids from `GET /api/v1/marketplaces/connected`. */
|
|
5862
|
+
store?: string;
|
|
5863
|
+
/** @description ISO currency. Only orders in this currency are counted; amounts are not converted. Defaults to the single country's currency, otherwise SGD. */
|
|
5864
|
+
currency?: string;
|
|
5865
|
+
};
|
|
5866
|
+
header?: never;
|
|
5867
|
+
path?: never;
|
|
5868
|
+
cookie?: never;
|
|
5869
|
+
};
|
|
5870
|
+
requestBody?: never;
|
|
5871
|
+
responses: {
|
|
5872
|
+
/** @description Get Store Analytics */
|
|
5873
|
+
200: {
|
|
5874
|
+
headers: {
|
|
5875
|
+
[name: string]: unknown;
|
|
5876
|
+
};
|
|
5877
|
+
content: {
|
|
5878
|
+
"application/json": {
|
|
5879
|
+
ok: boolean;
|
|
5880
|
+
/** @constant */
|
|
5881
|
+
apiVersion: "developer_v1";
|
|
5882
|
+
operationId: string;
|
|
5883
|
+
/** @enum {string} */
|
|
5884
|
+
status: "accepted" | "completed" | "failed";
|
|
5885
|
+
jobId?: string;
|
|
5886
|
+
productId?: string;
|
|
5887
|
+
warnings: string[];
|
|
5888
|
+
recommendations: string[];
|
|
5889
|
+
links: {
|
|
5890
|
+
[key: string]: string;
|
|
5891
|
+
};
|
|
5892
|
+
data: {
|
|
5893
|
+
filters: {
|
|
5894
|
+
from: string;
|
|
5895
|
+
to: string;
|
|
5896
|
+
marketplace: string;
|
|
5897
|
+
country: string;
|
|
5898
|
+
store: string;
|
|
5899
|
+
/** @description Currency of every amount in the response. */
|
|
5900
|
+
currency: string;
|
|
5901
|
+
timeZone: string;
|
|
5902
|
+
};
|
|
5903
|
+
hasData: boolean;
|
|
5904
|
+
totals: {
|
|
5905
|
+
visitors: number;
|
|
5906
|
+
pageViews: number;
|
|
5907
|
+
newVisitors: number;
|
|
5908
|
+
returningVisitors: number;
|
|
5909
|
+
newFollowers: number;
|
|
5910
|
+
averagePageViews: number | null;
|
|
5911
|
+
averageStaySeconds: number | null;
|
|
5912
|
+
placedBuyers: number;
|
|
5913
|
+
placedUnits: number;
|
|
5914
|
+
placedOrders: number;
|
|
5915
|
+
placedSales: number;
|
|
5916
|
+
paidBuyers: number;
|
|
5917
|
+
paidUnits: number;
|
|
5918
|
+
paidOrders: number;
|
|
5919
|
+
paidSales: number;
|
|
5920
|
+
confirmedBuyers: number;
|
|
5921
|
+
confirmedUnits: number;
|
|
5922
|
+
confirmedOrders: number;
|
|
5923
|
+
confirmedSales: number;
|
|
5924
|
+
bounceRate: number | null;
|
|
5925
|
+
visitorToPlacedRate: number | null;
|
|
5926
|
+
visitorToPaidRate: number | null;
|
|
5927
|
+
visitorToConfirmedRate: number | null;
|
|
5928
|
+
placedToPaidRate: number | null;
|
|
5929
|
+
placedToConfirmedRate: number | null;
|
|
5930
|
+
};
|
|
5931
|
+
trend: {
|
|
5932
|
+
date: string;
|
|
5933
|
+
visitors: number;
|
|
5934
|
+
pageViews: number;
|
|
5935
|
+
paidOrders: number;
|
|
5936
|
+
paidSales: number;
|
|
5937
|
+
}[];
|
|
5938
|
+
deviceBreakdown: {
|
|
5939
|
+
/** @enum {string} */
|
|
5940
|
+
device: "app" | "pc";
|
|
5941
|
+
visitors: number;
|
|
5942
|
+
pageViews: number;
|
|
5943
|
+
newVisitors: number;
|
|
5944
|
+
returningVisitors: number;
|
|
5945
|
+
bounceRate: number | null;
|
|
5946
|
+
}[];
|
|
5947
|
+
coverage: {
|
|
5948
|
+
platforms: string[];
|
|
5949
|
+
sources: string[];
|
|
5950
|
+
firstDate: string | null;
|
|
5951
|
+
lastDate: string | null;
|
|
5952
|
+
};
|
|
5953
|
+
};
|
|
5954
|
+
};
|
|
5955
|
+
};
|
|
5956
|
+
};
|
|
5957
|
+
/** @description Invalid request */
|
|
4006
5958
|
400: {
|
|
4007
5959
|
headers: {
|
|
4008
5960
|
[name: string]: unknown;
|
|
@@ -4016,15 +5968,22 @@ interface operations {
|
|
|
4016
5968
|
};
|
|
4017
5969
|
content?: never;
|
|
4018
5970
|
};
|
|
4019
|
-
/** @description Missing
|
|
5971
|
+
/** @description Missing the `analytics:read` scope */
|
|
4020
5972
|
403: {
|
|
4021
5973
|
headers: {
|
|
4022
5974
|
[name: string]: unknown;
|
|
4023
5975
|
};
|
|
4024
5976
|
content?: never;
|
|
4025
5977
|
};
|
|
4026
|
-
/** @description
|
|
4027
|
-
|
|
5978
|
+
/** @description Rate limit exceeded */
|
|
5979
|
+
429: {
|
|
5980
|
+
headers: {
|
|
5981
|
+
[name: string]: unknown;
|
|
5982
|
+
};
|
|
5983
|
+
content?: never;
|
|
5984
|
+
};
|
|
5985
|
+
/** @description Internal Server Error */
|
|
5986
|
+
500: {
|
|
4028
5987
|
headers: {
|
|
4029
5988
|
[name: string]: unknown;
|
|
4030
5989
|
};
|
|
@@ -4032,7 +5991,7 @@ interface operations {
|
|
|
4032
5991
|
};
|
|
4033
5992
|
};
|
|
4034
5993
|
};
|
|
4035
|
-
|
|
5994
|
+
get_v1_analytics_traffic: {
|
|
4036
5995
|
parameters: {
|
|
4037
5996
|
query?: {
|
|
4038
5997
|
/** @description Required for session auth. API keys already belong to one organization. */
|
|
@@ -4041,6 +6000,8 @@ interface operations {
|
|
|
4041
6000
|
from?: string;
|
|
4042
6001
|
/** @description Last day of the range, inclusive (YYYY-MM-DD). Defaults to today. */
|
|
4043
6002
|
to?: string;
|
|
6003
|
+
/** @description IANA time zone that defines each day, for example `Asia/Kuala_Lumpur`. Defaults to Asia/Singapore. */
|
|
6004
|
+
timeZone?: string;
|
|
4044
6005
|
/** @description Comma-separated marketplaces, for example `shopee,lazada`. */
|
|
4045
6006
|
marketplace?: string;
|
|
4046
6007
|
/** @description Comma-separated countries. One country selects its currency. */
|
|
@@ -4049,8 +6010,6 @@ interface operations {
|
|
|
4049
6010
|
store?: string;
|
|
4050
6011
|
/** @description ISO currency. Only orders in this currency are counted; amounts are not converted. Defaults to the single country's currency, otherwise SGD. */
|
|
4051
6012
|
currency?: string;
|
|
4052
|
-
/** @description IANA time zone that defines each day, for example `Asia/Kuala_Lumpur`. Defaults to Asia/Singapore. */
|
|
4053
|
-
timeZone?: string;
|
|
4054
6013
|
};
|
|
4055
6014
|
header?: never;
|
|
4056
6015
|
path?: never;
|
|
@@ -4058,7 +6017,7 @@ interface operations {
|
|
|
4058
6017
|
};
|
|
4059
6018
|
requestBody?: never;
|
|
4060
6019
|
responses: {
|
|
4061
|
-
/** @description
|
|
6020
|
+
/** @description Get Traffic Analytics */
|
|
4062
6021
|
200: {
|
|
4063
6022
|
headers: {
|
|
4064
6023
|
[name: string]: unknown;
|
|
@@ -4092,62 +6051,123 @@ interface operations {
|
|
|
4092
6051
|
previousFrom: string;
|
|
4093
6052
|
previousTo: string;
|
|
4094
6053
|
kpis: {
|
|
4095
|
-
|
|
4096
|
-
netSales: number;
|
|
4097
|
-
/** @description Average order value. */
|
|
4098
|
-
aov: number;
|
|
4099
|
-
unitsSold: number;
|
|
4100
|
-
unitsPerOrder: number;
|
|
4101
|
-
returnedOrders: number;
|
|
4102
|
-
/** @description Share of orders returned, 0 to 1. */
|
|
4103
|
-
returnRate: number;
|
|
6054
|
+
impressions: number | null;
|
|
4104
6055
|
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
netSalesChangePercent: number | null;
|
|
6056
|
+
impressionsChangePercent: number | null;
|
|
6057
|
+
pageviews: number | null;
|
|
4108
6058
|
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
4109
|
-
|
|
6059
|
+
pageviewsChangePercent: number | null;
|
|
6060
|
+
visitors: number | null;
|
|
4110
6061
|
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
4111
|
-
|
|
6062
|
+
visitorsChangePercent: number | null;
|
|
6063
|
+
clicks: number | null;
|
|
6064
|
+
/** @description Visitors who added to cart. */
|
|
6065
|
+
atcUsers: number | null;
|
|
4112
6066
|
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
4113
|
-
|
|
4114
|
-
identifiedBuyers: number;
|
|
4115
|
-
repeatBuyers: number;
|
|
4116
|
-
repeatRate: number | null;
|
|
4117
|
-
cancelledOrders: number;
|
|
4118
|
-
cancelRate: number | null;
|
|
4119
|
-
};
|
|
4120
|
-
statusMix: {
|
|
4121
|
-
status: string;
|
|
4122
|
-
orders: number;
|
|
4123
|
-
netSales: number;
|
|
4124
|
-
}[];
|
|
4125
|
-
platformMix: {
|
|
4126
|
-
platform: string;
|
|
6067
|
+
atcUsersChangePercent: number | null;
|
|
4127
6068
|
orders: number;
|
|
6069
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
6070
|
+
ordersChangePercent: number | null;
|
|
4128
6071
|
netSales: number;
|
|
6072
|
+
ctr: number | null;
|
|
6073
|
+
viewToOrderCvr: number | null;
|
|
6074
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
6075
|
+
viewToOrderCvrChangePercent: number | null;
|
|
6076
|
+
visitToAtc: number | null;
|
|
6077
|
+
revenuePerVisitor: number | null;
|
|
6078
|
+
/** @description Share of traffic from ads, 0 to 1. */
|
|
6079
|
+
paidTrafficShare: number | null;
|
|
6080
|
+
/**
|
|
6081
|
+
* @description `click` when unique visitors are unavailable and conversion uses clicks or page views.
|
|
6082
|
+
* @enum {string}
|
|
6083
|
+
*/
|
|
6084
|
+
funnelMode?: "visit" | "click";
|
|
6085
|
+
cvrDenominatorLabel?: string;
|
|
6086
|
+
};
|
|
6087
|
+
/** @description Page views, visitors, potential buyers, buyers. */
|
|
6088
|
+
funnel: {
|
|
6089
|
+
id: string;
|
|
6090
|
+
label: string;
|
|
6091
|
+
value: number | null;
|
|
6092
|
+
covered: boolean;
|
|
6093
|
+
rateFromPrevious?: number | null;
|
|
6094
|
+
rateLabel?: string | null;
|
|
4129
6095
|
}[];
|
|
4130
6096
|
dailyTrend: {
|
|
4131
6097
|
date: string;
|
|
4132
|
-
|
|
6098
|
+
impressions: number;
|
|
6099
|
+
pageviews: number;
|
|
6100
|
+
visitors: number;
|
|
6101
|
+
atcUsers: number;
|
|
6102
|
+
clicks: number;
|
|
4133
6103
|
orders: number;
|
|
4134
|
-
netSales: number;
|
|
4135
|
-
previousOrders: number;
|
|
4136
|
-
previousNetSales: number;
|
|
4137
6104
|
}[];
|
|
4138
|
-
|
|
4139
|
-
topProducts: {
|
|
6105
|
+
products: {
|
|
4140
6106
|
productId: string | null;
|
|
6107
|
+
variantId: string | null;
|
|
4141
6108
|
productName: string;
|
|
4142
6109
|
platform: string | null;
|
|
4143
|
-
accountId: string | null;
|
|
4144
6110
|
externalProductId: string | null;
|
|
4145
6111
|
sku: string | null;
|
|
4146
6112
|
thumbnailUrl: string | null;
|
|
6113
|
+
impressions: number;
|
|
6114
|
+
pageviews: number;
|
|
6115
|
+
visitors: number;
|
|
6116
|
+
clicks: number;
|
|
6117
|
+
atcUsers: number;
|
|
4147
6118
|
orders: number;
|
|
4148
|
-
unitsSold: number;
|
|
4149
6119
|
netSales: number;
|
|
6120
|
+
ctr: number | null;
|
|
6121
|
+
viewToOrderCvr: number | null;
|
|
6122
|
+
visitToAtc: number | null;
|
|
6123
|
+
viewToOrder: number | null;
|
|
6124
|
+
netSalesPerVisitor: number | null;
|
|
6125
|
+
diagnosis: string;
|
|
6126
|
+
/** @description Higher means fix first. */
|
|
6127
|
+
opportunityScore: number;
|
|
6128
|
+
/** @enum {string} */
|
|
6129
|
+
leak:
|
|
6130
|
+
| "high_traffic_low_cvr"
|
|
6131
|
+
| "zero_orders"
|
|
6132
|
+
| "healthy"
|
|
6133
|
+
| "no_traffic";
|
|
6134
|
+
}[];
|
|
6135
|
+
diagnostics: {
|
|
6136
|
+
id: string;
|
|
6137
|
+
/** @enum {string} */
|
|
6138
|
+
severity: "info" | "warn" | "critical" | "opportunity";
|
|
6139
|
+
title: string;
|
|
6140
|
+
summary: string;
|
|
6141
|
+
metricLabel: string;
|
|
6142
|
+
metricValue: string;
|
|
6143
|
+
}[];
|
|
6144
|
+
contentDrivers: {
|
|
6145
|
+
externalContentId: string | null;
|
|
6146
|
+
contentType: string;
|
|
6147
|
+
title: string;
|
|
6148
|
+
platform: string | null;
|
|
6149
|
+
productId: string | null;
|
|
6150
|
+
externalProductId: string | null;
|
|
6151
|
+
productName: string | null;
|
|
6152
|
+
productThumbnailUrl: string | null;
|
|
6153
|
+
views: number;
|
|
6154
|
+
productClicks: number;
|
|
6155
|
+
orders: number;
|
|
6156
|
+
gmv: number;
|
|
6157
|
+
clickRate: number | null;
|
|
6158
|
+
orderRate: number | null;
|
|
4150
6159
|
}[];
|
|
6160
|
+
leakCount: number;
|
|
6161
|
+
/** @description Which data sources have data for this range. */
|
|
6162
|
+
coverage: {
|
|
6163
|
+
sales: boolean;
|
|
6164
|
+
traffic: boolean;
|
|
6165
|
+
ads: boolean;
|
|
6166
|
+
content: boolean;
|
|
6167
|
+
inventory: boolean;
|
|
6168
|
+
profit: boolean;
|
|
6169
|
+
market: boolean;
|
|
6170
|
+
};
|
|
4151
6171
|
};
|
|
4152
6172
|
};
|
|
4153
6173
|
};
|
|
@@ -7449,29 +9469,255 @@ interface operations {
|
|
|
7449
9469
|
};
|
|
7450
9470
|
};
|
|
7451
9471
|
};
|
|
7452
|
-
/** @description Bad Request */
|
|
7453
|
-
400: {
|
|
9472
|
+
/** @description Bad Request */
|
|
9473
|
+
400: {
|
|
9474
|
+
headers: {
|
|
9475
|
+
[name: string]: unknown;
|
|
9476
|
+
};
|
|
9477
|
+
content?: never;
|
|
9478
|
+
};
|
|
9479
|
+
/** @description Unauthorized */
|
|
9480
|
+
401: {
|
|
9481
|
+
headers: {
|
|
9482
|
+
[name: string]: unknown;
|
|
9483
|
+
};
|
|
9484
|
+
content?: never;
|
|
9485
|
+
};
|
|
9486
|
+
/** @description Insufficient Credits */
|
|
9487
|
+
402: {
|
|
9488
|
+
headers: {
|
|
9489
|
+
[name: string]: unknown;
|
|
9490
|
+
};
|
|
9491
|
+
content?: never;
|
|
9492
|
+
};
|
|
9493
|
+
/** @description Forbidden */
|
|
9494
|
+
403: {
|
|
9495
|
+
headers: {
|
|
9496
|
+
[name: string]: unknown;
|
|
9497
|
+
};
|
|
9498
|
+
content?: never;
|
|
9499
|
+
};
|
|
9500
|
+
/** @description Internal Server Error */
|
|
9501
|
+
500: {
|
|
9502
|
+
headers: {
|
|
9503
|
+
[name: string]: unknown;
|
|
9504
|
+
};
|
|
9505
|
+
content?: never;
|
|
9506
|
+
};
|
|
9507
|
+
};
|
|
9508
|
+
};
|
|
9509
|
+
get_v1_directory: {
|
|
9510
|
+
parameters: {
|
|
9511
|
+
query?: never;
|
|
9512
|
+
header?: never;
|
|
9513
|
+
path?: never;
|
|
9514
|
+
cookie?: never;
|
|
9515
|
+
};
|
|
9516
|
+
requestBody?: never;
|
|
9517
|
+
responses: {
|
|
9518
|
+
/** @description Success */
|
|
9519
|
+
200: {
|
|
9520
|
+
headers: {
|
|
9521
|
+
[name: string]: unknown;
|
|
9522
|
+
};
|
|
9523
|
+
content: {
|
|
9524
|
+
"application/json": {
|
|
9525
|
+
ok?: boolean;
|
|
9526
|
+
/** @default public_directory_v1 */
|
|
9527
|
+
apiVersion: string;
|
|
9528
|
+
};
|
|
9529
|
+
};
|
|
9530
|
+
};
|
|
9531
|
+
/** @description Bad Request */
|
|
9532
|
+
400: {
|
|
9533
|
+
headers: {
|
|
9534
|
+
[name: string]: unknown;
|
|
9535
|
+
};
|
|
9536
|
+
content?: never;
|
|
9537
|
+
};
|
|
9538
|
+
/** @description Unauthorized */
|
|
9539
|
+
401: {
|
|
9540
|
+
headers: {
|
|
9541
|
+
[name: string]: unknown;
|
|
9542
|
+
};
|
|
9543
|
+
content?: never;
|
|
9544
|
+
};
|
|
9545
|
+
/** @description Insufficient Credits */
|
|
9546
|
+
402: {
|
|
9547
|
+
headers: {
|
|
9548
|
+
[name: string]: unknown;
|
|
9549
|
+
};
|
|
9550
|
+
content?: never;
|
|
9551
|
+
};
|
|
9552
|
+
/** @description Forbidden */
|
|
9553
|
+
403: {
|
|
9554
|
+
headers: {
|
|
9555
|
+
[name: string]: unknown;
|
|
9556
|
+
};
|
|
9557
|
+
content?: never;
|
|
9558
|
+
};
|
|
9559
|
+
/** @description Internal Server Error */
|
|
9560
|
+
500: {
|
|
9561
|
+
headers: {
|
|
9562
|
+
[name: string]: unknown;
|
|
9563
|
+
};
|
|
9564
|
+
content?: never;
|
|
9565
|
+
};
|
|
9566
|
+
};
|
|
9567
|
+
};
|
|
9568
|
+
post_v1_documents: {
|
|
9569
|
+
parameters: {
|
|
9570
|
+
query?: never;
|
|
9571
|
+
header?: never;
|
|
9572
|
+
path?: never;
|
|
9573
|
+
cookie?: never;
|
|
9574
|
+
};
|
|
9575
|
+
requestBody: {
|
|
9576
|
+
content: {
|
|
9577
|
+
"multipart/form-data": {
|
|
9578
|
+
/**
|
|
9579
|
+
* Format: binary
|
|
9580
|
+
* @description The file to upload.
|
|
9581
|
+
*/
|
|
9582
|
+
file: string;
|
|
9583
|
+
/** @description Required for session auth. API keys already belong to one organization. */
|
|
9584
|
+
organizationId?: string;
|
|
9585
|
+
/**
|
|
9586
|
+
* @description What the document is. `bank_statement` is never shown to AI.
|
|
9587
|
+
* @default other
|
|
9588
|
+
* @enum {string}
|
|
9589
|
+
*/
|
|
9590
|
+
documentType?:
|
|
9591
|
+
| "datasheet"
|
|
9592
|
+
| "invoice"
|
|
9593
|
+
| "packing_list"
|
|
9594
|
+
| "compliance_certificate"
|
|
9595
|
+
| "test_report"
|
|
9596
|
+
| "sds"
|
|
9597
|
+
| "manual"
|
|
9598
|
+
| "warranty"
|
|
9599
|
+
| "authorization_letter"
|
|
9600
|
+
| "shipping_doc"
|
|
9601
|
+
| "regulation"
|
|
9602
|
+
| "policy"
|
|
9603
|
+
| "bank_statement"
|
|
9604
|
+
| "other";
|
|
9605
|
+
/**
|
|
9606
|
+
* Format: uuid
|
|
9607
|
+
* @description Attach the document to one product instead of the whole organization.
|
|
9608
|
+
*/
|
|
9609
|
+
productId?: string;
|
|
9610
|
+
/** @description File name to store. Defaults to the uploaded file's name. */
|
|
9611
|
+
fileName?: string;
|
|
9612
|
+
};
|
|
9613
|
+
};
|
|
9614
|
+
};
|
|
9615
|
+
responses: {
|
|
9616
|
+
/** @description The document was stored; indexing is queued. */
|
|
9617
|
+
202: {
|
|
9618
|
+
headers: {
|
|
9619
|
+
[name: string]: unknown;
|
|
9620
|
+
};
|
|
9621
|
+
content: {
|
|
9622
|
+
"application/json": {
|
|
9623
|
+
ok: boolean;
|
|
9624
|
+
/** @constant */
|
|
9625
|
+
apiVersion: "developer_v1";
|
|
9626
|
+
operationId: string;
|
|
9627
|
+
/** @enum {string} */
|
|
9628
|
+
status: "accepted" | "completed" | "failed";
|
|
9629
|
+
jobId?: string;
|
|
9630
|
+
productId?: string;
|
|
9631
|
+
warnings: string[];
|
|
9632
|
+
recommendations: string[];
|
|
9633
|
+
links: {
|
|
9634
|
+
[key: string]: string;
|
|
9635
|
+
};
|
|
9636
|
+
data: {
|
|
9637
|
+
document: {
|
|
9638
|
+
id: string;
|
|
9639
|
+
title: string;
|
|
9640
|
+
fileName: string;
|
|
9641
|
+
mimeType: string;
|
|
9642
|
+
sizeBytes: number;
|
|
9643
|
+
/** @enum {string} */
|
|
9644
|
+
documentType:
|
|
9645
|
+
| "datasheet"
|
|
9646
|
+
| "invoice"
|
|
9647
|
+
| "packing_list"
|
|
9648
|
+
| "compliance_certificate"
|
|
9649
|
+
| "test_report"
|
|
9650
|
+
| "sds"
|
|
9651
|
+
| "manual"
|
|
9652
|
+
| "warranty"
|
|
9653
|
+
| "authorization_letter"
|
|
9654
|
+
| "shipping_doc"
|
|
9655
|
+
| "regulation"
|
|
9656
|
+
| "policy"
|
|
9657
|
+
| "bank_statement"
|
|
9658
|
+
| "other";
|
|
9659
|
+
productId: string | null;
|
|
9660
|
+
/**
|
|
9661
|
+
* @description `pending` and `processing` while indexing; `completed` when agents can search it.
|
|
9662
|
+
* @enum {string}
|
|
9663
|
+
*/
|
|
9664
|
+
status:
|
|
9665
|
+
| "pending"
|
|
9666
|
+
| "processing"
|
|
9667
|
+
| "completed"
|
|
9668
|
+
| "completed_with_warnings"
|
|
9669
|
+
| "failed";
|
|
9670
|
+
/** @description Searchable chunks. CSV and Excel are stored for reading but not indexed, so this is 0. */
|
|
9671
|
+
indexedChunkCount: number | null;
|
|
9672
|
+
pageCount: number | null;
|
|
9673
|
+
errorMessage: string | null;
|
|
9674
|
+
createdAt: string;
|
|
9675
|
+
updatedAt: string;
|
|
9676
|
+
};
|
|
9677
|
+
/** @description Indexing was queued. */
|
|
9678
|
+
queued: boolean;
|
|
9679
|
+
warning?: string;
|
|
9680
|
+
};
|
|
9681
|
+
};
|
|
9682
|
+
};
|
|
9683
|
+
};
|
|
9684
|
+
/** @description Invalid request */
|
|
9685
|
+
400: {
|
|
9686
|
+
headers: {
|
|
9687
|
+
[name: string]: unknown;
|
|
9688
|
+
};
|
|
9689
|
+
content?: never;
|
|
9690
|
+
};
|
|
9691
|
+
/** @description Unauthorized */
|
|
9692
|
+
401: {
|
|
9693
|
+
headers: {
|
|
9694
|
+
[name: string]: unknown;
|
|
9695
|
+
};
|
|
9696
|
+
content?: never;
|
|
9697
|
+
};
|
|
9698
|
+
/** @description Missing the `documents:write` scope */
|
|
9699
|
+
403: {
|
|
7454
9700
|
headers: {
|
|
7455
9701
|
[name: string]: unknown;
|
|
7456
9702
|
};
|
|
7457
9703
|
content?: never;
|
|
7458
9704
|
};
|
|
7459
|
-
/** @description
|
|
7460
|
-
|
|
9705
|
+
/** @description Product not found */
|
|
9706
|
+
404: {
|
|
7461
9707
|
headers: {
|
|
7462
9708
|
[name: string]: unknown;
|
|
7463
9709
|
};
|
|
7464
9710
|
content?: never;
|
|
7465
9711
|
};
|
|
7466
|
-
/** @description
|
|
7467
|
-
|
|
9712
|
+
/** @description The request body is not multipart or is too large */
|
|
9713
|
+
413: {
|
|
7468
9714
|
headers: {
|
|
7469
9715
|
[name: string]: unknown;
|
|
7470
9716
|
};
|
|
7471
9717
|
content?: never;
|
|
7472
9718
|
};
|
|
7473
|
-
/** @description
|
|
7474
|
-
|
|
9719
|
+
/** @description Rate limit exceeded */
|
|
9720
|
+
429: {
|
|
7475
9721
|
headers: {
|
|
7476
9722
|
[name: string]: unknown;
|
|
7477
9723
|
};
|
|
@@ -7486,29 +9732,86 @@ interface operations {
|
|
|
7486
9732
|
};
|
|
7487
9733
|
};
|
|
7488
9734
|
};
|
|
7489
|
-
|
|
9735
|
+
get_v1_documents_by_documentid: {
|
|
7490
9736
|
parameters: {
|
|
7491
|
-
query?:
|
|
9737
|
+
query?: {
|
|
9738
|
+
/** @description Required for session auth. API keys already belong to one organization. */
|
|
9739
|
+
organizationId?: string;
|
|
9740
|
+
};
|
|
7492
9741
|
header?: never;
|
|
7493
|
-
path
|
|
9742
|
+
path: {
|
|
9743
|
+
documentId: string;
|
|
9744
|
+
};
|
|
7494
9745
|
cookie?: never;
|
|
7495
9746
|
};
|
|
7496
9747
|
requestBody?: never;
|
|
7497
9748
|
responses: {
|
|
7498
|
-
/** @description
|
|
9749
|
+
/** @description The document. */
|
|
7499
9750
|
200: {
|
|
7500
9751
|
headers: {
|
|
7501
9752
|
[name: string]: unknown;
|
|
7502
9753
|
};
|
|
7503
9754
|
content: {
|
|
7504
9755
|
"application/json": {
|
|
7505
|
-
ok
|
|
7506
|
-
/** @
|
|
7507
|
-
apiVersion:
|
|
9756
|
+
ok: boolean;
|
|
9757
|
+
/** @constant */
|
|
9758
|
+
apiVersion: "developer_v1";
|
|
9759
|
+
operationId: string;
|
|
9760
|
+
/** @enum {string} */
|
|
9761
|
+
status: "accepted" | "completed" | "failed";
|
|
9762
|
+
jobId?: string;
|
|
9763
|
+
productId?: string;
|
|
9764
|
+
warnings: string[];
|
|
9765
|
+
recommendations: string[];
|
|
9766
|
+
links: {
|
|
9767
|
+
[key: string]: string;
|
|
9768
|
+
};
|
|
9769
|
+
data: {
|
|
9770
|
+
document: {
|
|
9771
|
+
id: string;
|
|
9772
|
+
title: string;
|
|
9773
|
+
fileName: string;
|
|
9774
|
+
mimeType: string;
|
|
9775
|
+
sizeBytes: number;
|
|
9776
|
+
/** @enum {string} */
|
|
9777
|
+
documentType:
|
|
9778
|
+
| "datasheet"
|
|
9779
|
+
| "invoice"
|
|
9780
|
+
| "packing_list"
|
|
9781
|
+
| "compliance_certificate"
|
|
9782
|
+
| "test_report"
|
|
9783
|
+
| "sds"
|
|
9784
|
+
| "manual"
|
|
9785
|
+
| "warranty"
|
|
9786
|
+
| "authorization_letter"
|
|
9787
|
+
| "shipping_doc"
|
|
9788
|
+
| "regulation"
|
|
9789
|
+
| "policy"
|
|
9790
|
+
| "bank_statement"
|
|
9791
|
+
| "other";
|
|
9792
|
+
productId: string | null;
|
|
9793
|
+
/**
|
|
9794
|
+
* @description `pending` and `processing` while indexing; `completed` when agents can search it.
|
|
9795
|
+
* @enum {string}
|
|
9796
|
+
*/
|
|
9797
|
+
status:
|
|
9798
|
+
| "pending"
|
|
9799
|
+
| "processing"
|
|
9800
|
+
| "completed"
|
|
9801
|
+
| "completed_with_warnings"
|
|
9802
|
+
| "failed";
|
|
9803
|
+
/** @description Searchable chunks. CSV and Excel are stored for reading but not indexed, so this is 0. */
|
|
9804
|
+
indexedChunkCount: number | null;
|
|
9805
|
+
pageCount: number | null;
|
|
9806
|
+
errorMessage: string | null;
|
|
9807
|
+
createdAt: string;
|
|
9808
|
+
updatedAt: string;
|
|
9809
|
+
};
|
|
9810
|
+
};
|
|
7508
9811
|
};
|
|
7509
9812
|
};
|
|
7510
9813
|
};
|
|
7511
|
-
/** @description
|
|
9814
|
+
/** @description Invalid request */
|
|
7512
9815
|
400: {
|
|
7513
9816
|
headers: {
|
|
7514
9817
|
[name: string]: unknown;
|
|
@@ -7522,15 +9825,22 @@ interface operations {
|
|
|
7522
9825
|
};
|
|
7523
9826
|
content?: never;
|
|
7524
9827
|
};
|
|
7525
|
-
/** @description
|
|
7526
|
-
|
|
9828
|
+
/** @description Missing the `documents:read` scope */
|
|
9829
|
+
403: {
|
|
7527
9830
|
headers: {
|
|
7528
9831
|
[name: string]: unknown;
|
|
7529
9832
|
};
|
|
7530
9833
|
content?: never;
|
|
7531
9834
|
};
|
|
7532
|
-
/** @description
|
|
7533
|
-
|
|
9835
|
+
/** @description Document not found */
|
|
9836
|
+
404: {
|
|
9837
|
+
headers: {
|
|
9838
|
+
[name: string]: unknown;
|
|
9839
|
+
};
|
|
9840
|
+
content?: never;
|
|
9841
|
+
};
|
|
9842
|
+
/** @description Rate limit exceeded */
|
|
9843
|
+
429: {
|
|
7534
9844
|
headers: {
|
|
7535
9845
|
[name: string]: unknown;
|
|
7536
9846
|
};
|
|
@@ -11620,6 +13930,117 @@ interface operations {
|
|
|
11620
13930
|
};
|
|
11621
13931
|
};
|
|
11622
13932
|
};
|
|
13933
|
+
post_v1_products_by_productid_images: {
|
|
13934
|
+
parameters: {
|
|
13935
|
+
query?: never;
|
|
13936
|
+
header?: never;
|
|
13937
|
+
path: {
|
|
13938
|
+
productId: string;
|
|
13939
|
+
};
|
|
13940
|
+
cookie?: never;
|
|
13941
|
+
};
|
|
13942
|
+
requestBody: {
|
|
13943
|
+
content: {
|
|
13944
|
+
"multipart/form-data": {
|
|
13945
|
+
/**
|
|
13946
|
+
* Format: binary
|
|
13947
|
+
* @description The image file.
|
|
13948
|
+
*/
|
|
13949
|
+
file: string;
|
|
13950
|
+
/** @description Required for session auth. API keys already belong to one organization. */
|
|
13951
|
+
organizationId?: string;
|
|
13952
|
+
/** @description Zero-based place in the gallery; 0 makes it the main image. Defaults to the end. */
|
|
13953
|
+
position?: number;
|
|
13954
|
+
};
|
|
13955
|
+
};
|
|
13956
|
+
};
|
|
13957
|
+
responses: {
|
|
13958
|
+
/** @description The image was added to the gallery. */
|
|
13959
|
+
201: {
|
|
13960
|
+
headers: {
|
|
13961
|
+
[name: string]: unknown;
|
|
13962
|
+
};
|
|
13963
|
+
content: {
|
|
13964
|
+
"application/json": {
|
|
13965
|
+
ok: boolean;
|
|
13966
|
+
/** @constant */
|
|
13967
|
+
apiVersion: "developer_v1";
|
|
13968
|
+
operationId: string;
|
|
13969
|
+
/** @enum {string} */
|
|
13970
|
+
status: "accepted" | "completed" | "failed";
|
|
13971
|
+
jobId?: string;
|
|
13972
|
+
productId?: string;
|
|
13973
|
+
warnings: string[];
|
|
13974
|
+
recommendations: string[];
|
|
13975
|
+
links: {
|
|
13976
|
+
[key: string]: string;
|
|
13977
|
+
};
|
|
13978
|
+
data: {
|
|
13979
|
+
image: {
|
|
13980
|
+
/** @description Public URL of the stored image. */
|
|
13981
|
+
url: string;
|
|
13982
|
+
position: number;
|
|
13983
|
+
};
|
|
13984
|
+
/** @description The product's gallery after the upload, in order. */
|
|
13985
|
+
images: {
|
|
13986
|
+
url: string;
|
|
13987
|
+
position: number;
|
|
13988
|
+
}[];
|
|
13989
|
+
};
|
|
13990
|
+
};
|
|
13991
|
+
};
|
|
13992
|
+
};
|
|
13993
|
+
/** @description Invalid request */
|
|
13994
|
+
400: {
|
|
13995
|
+
headers: {
|
|
13996
|
+
[name: string]: unknown;
|
|
13997
|
+
};
|
|
13998
|
+
content?: never;
|
|
13999
|
+
};
|
|
14000
|
+
/** @description Unauthorized */
|
|
14001
|
+
401: {
|
|
14002
|
+
headers: {
|
|
14003
|
+
[name: string]: unknown;
|
|
14004
|
+
};
|
|
14005
|
+
content?: never;
|
|
14006
|
+
};
|
|
14007
|
+
/** @description Missing the `catalog:write` scope */
|
|
14008
|
+
403: {
|
|
14009
|
+
headers: {
|
|
14010
|
+
[name: string]: unknown;
|
|
14011
|
+
};
|
|
14012
|
+
content?: never;
|
|
14013
|
+
};
|
|
14014
|
+
/** @description Product not found */
|
|
14015
|
+
404: {
|
|
14016
|
+
headers: {
|
|
14017
|
+
[name: string]: unknown;
|
|
14018
|
+
};
|
|
14019
|
+
content?: never;
|
|
14020
|
+
};
|
|
14021
|
+
/** @description The request body is not multipart or is too large */
|
|
14022
|
+
413: {
|
|
14023
|
+
headers: {
|
|
14024
|
+
[name: string]: unknown;
|
|
14025
|
+
};
|
|
14026
|
+
content?: never;
|
|
14027
|
+
};
|
|
14028
|
+
/** @description Rate limit exceeded */
|
|
14029
|
+
429: {
|
|
14030
|
+
headers: {
|
|
14031
|
+
[name: string]: unknown;
|
|
14032
|
+
};
|
|
14033
|
+
content?: never;
|
|
14034
|
+
};
|
|
14035
|
+
/** @description Internal Server Error */
|
|
14036
|
+
500: {
|
|
14037
|
+
headers: {
|
|
14038
|
+
[name: string]: unknown;
|
|
14039
|
+
};
|
|
14040
|
+
content?: never;
|
|
14041
|
+
};
|
|
14042
|
+
};
|
|
14043
|
+
};
|
|
11623
14044
|
patch_v1_products_by_productid_inventory: {
|
|
11624
14045
|
parameters: {
|
|
11625
14046
|
query?: never;
|
|
@@ -13553,7 +15974,7 @@ interface operations {
|
|
|
13553
15974
|
};
|
|
13554
15975
|
};
|
|
13555
15976
|
};
|
|
13556
|
-
|
|
15977
|
+
post_v1_promotions_by_promotionid_retry: {
|
|
13557
15978
|
parameters: {
|
|
13558
15979
|
query?: {
|
|
13559
15980
|
/** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
|
|
@@ -13575,7 +15996,7 @@ interface operations {
|
|
|
13575
15996
|
"application/json": {
|
|
13576
15997
|
organizationId?: string;
|
|
13577
15998
|
/**
|
|
13578
|
-
* @description
|
|
15999
|
+
* @description Retry one marketplace. When omitted, retries every promotion marketplace.
|
|
13579
16000
|
* @enum {string}
|
|
13580
16001
|
*/
|
|
13581
16002
|
marketplace?:
|
|
@@ -13586,13 +16007,13 @@ interface operations {
|
|
|
13586
16007
|
| "amazon"
|
|
13587
16008
|
| "zalora"
|
|
13588
16009
|
| "ebay";
|
|
13589
|
-
/** @description
|
|
16010
|
+
/** @description Retry only these products. When omitted, retries every assigned product. */
|
|
13590
16011
|
productIds?: string[];
|
|
13591
16012
|
};
|
|
13592
16013
|
};
|
|
13593
16014
|
};
|
|
13594
16015
|
responses: {
|
|
13595
|
-
/** @description
|
|
16016
|
+
/** @description Delivery queued again. */
|
|
13596
16017
|
202: {
|
|
13597
16018
|
headers: {
|
|
13598
16019
|
[name: string]: unknown;
|
|
@@ -16910,15 +19331,115 @@ declare class AnalyticsClient {
|
|
|
16910
19331
|
protected readonly _http: OmniHttp;
|
|
16911
19332
|
constructor(_http: OmniHttp);
|
|
16912
19333
|
/**
|
|
16913
|
-
* Get
|
|
19334
|
+
* Get Ads Analytics
|
|
19335
|
+
*
|
|
19336
|
+
* Ad spend, attributed sales, ROAS, and ACOS over the last 28 days, and per-product sales and ad metrics for today, yesterday, 7-day and 28-day averages, and the same day one and four weeks ago. Matches the Ads page. Requires `analytics:read`.
|
|
19337
|
+
|
|
19338
|
+
Amounts are in `data.filters.currency`. The periods count back from the end of the range.
|
|
19339
|
+
*
|
|
19340
|
+
* `GET /api/v1/analytics/ads`
|
|
19341
|
+
*/
|
|
19342
|
+
getAds(request?: OperationQuery<operations["get_v1_analytics_ads"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_analytics_ads"]>>;
|
|
19343
|
+
/**
|
|
19344
|
+
* Get AI Traffic Analytics
|
|
19345
|
+
*
|
|
19346
|
+
* Visits and crawls from AI assistants and search engines: totals, a daily trend, breakdowns by source, route, country, and product, and recent events. Matches the AI Traffic page. Requires `analytics:read`.
|
|
19347
|
+
|
|
19348
|
+
A range covers at most 365 days; a longer one is shortened to the last 365 days. Read the applied range from `data.filters`.
|
|
19349
|
+
*
|
|
19350
|
+
* `GET /api/v1/analytics/ai-traffic`
|
|
19351
|
+
*/
|
|
19352
|
+
getAiTraffic(request?: OperationQuery<operations["get_v1_analytics_ai_traffic"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_analytics_ai_traffic"]>>;
|
|
19353
|
+
/**
|
|
19354
|
+
* Get Video and LIVE Analytics
|
|
19355
|
+
*
|
|
19356
|
+
* Views, product clicks, orders, and GMV from shoppable videos and LIVE streams, by day, by content type, and per video. Matches the Video / LIVE page. Requires `analytics:read`.
|
|
19357
|
+
|
|
19358
|
+
Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
|
|
19359
|
+
*
|
|
19360
|
+
* `GET /api/v1/analytics/content`
|
|
19361
|
+
*/
|
|
19362
|
+
getContent(request?: OperationQuery<operations["get_v1_analytics_content"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_analytics_content"]>>;
|
|
19363
|
+
/**
|
|
19364
|
+
* Get Order Analytics
|
|
19365
|
+
*
|
|
19366
|
+
* Order KPIs with their change against the previous period, a daily trend, sales by order status and by marketplace, and the top products by net sales. Repeat buyers are counted but not listed. Matches the Orders analysis page. Requires `analytics:read`.
|
|
19367
|
+
|
|
19368
|
+
Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
|
|
19369
|
+
*
|
|
19370
|
+
* `GET /api/v1/analytics/orders`
|
|
19371
|
+
*/
|
|
19372
|
+
getOrders(request?: OperationQuery<operations["get_v1_analytics_orders"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_analytics_orders"]>>;
|
|
19373
|
+
/**
|
|
19374
|
+
* Get Growth Overview
|
|
19375
|
+
*
|
|
19376
|
+
* Sales, traffic, and profit KPIs with their change against the previous period, a daily trend, the traffic funnel, sales by channel, top and lagging products, and ranked next actions. Matches the Growth Intelligence overview page. Requires `analytics:read`.
|
|
19377
|
+
|
|
19378
|
+
Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
|
|
19379
|
+
*
|
|
19380
|
+
* `GET /api/v1/analytics/overview`
|
|
19381
|
+
*/
|
|
19382
|
+
getOverview(request?: OperationQuery<operations["get_v1_analytics_overview"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_analytics_overview"]>>;
|
|
19383
|
+
/**
|
|
19384
|
+
* Get Pricing Analytics
|
|
19385
|
+
*
|
|
19386
|
+
* Selling products with their margin, velocity, stock cover, prices, competitor median, and a pricing recommendation. Matches the Pricing page. Requires `analytics:read`.
|
|
19387
|
+
|
|
19388
|
+
Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
|
|
19389
|
+
*
|
|
19390
|
+
* `GET /api/v1/analytics/pricing`
|
|
19391
|
+
*/
|
|
19392
|
+
getPricing(request?: OperationQuery<operations["get_v1_analytics_pricing"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_analytics_pricing"]>>;
|
|
19393
|
+
/**
|
|
19394
|
+
* Get Product Analytics
|
|
19395
|
+
*
|
|
19396
|
+
* Per-product sales, traffic, price, stock, profit, and ad performance, ranked by net sales, with ranked insights. Pass `productId` for specific products, for example on a product page. Matches the Products page. Requires `analytics:read`.
|
|
19397
|
+
|
|
19398
|
+
Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
|
|
19399
|
+
*
|
|
19400
|
+
* `GET /api/v1/analytics/products`
|
|
19401
|
+
*/
|
|
19402
|
+
getProducts(request?: OperationQuery<operations["get_v1_analytics_products"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_analytics_products"]>>;
|
|
19403
|
+
/**
|
|
19404
|
+
* Get Profit Analytics
|
|
19405
|
+
*
|
|
19406
|
+
* Revenue, costs, fees, and profit with a waterfall, cost breakdowns, a daily trend, the most and least profitable products, and products missing a cost price. Session members also need finance access. Matches the P&L Analysis page. Requires `analytics:read`.
|
|
19407
|
+
|
|
19408
|
+
Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
|
|
19409
|
+
*
|
|
19410
|
+
* `GET /api/v1/analytics/profit`
|
|
19411
|
+
*/
|
|
19412
|
+
getProfit(request?: OperationQuery<operations["get_v1_analytics_profit"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_analytics_profit"]>>;
|
|
19413
|
+
/**
|
|
19414
|
+
* Get Business Report
|
|
19415
|
+
*
|
|
19416
|
+
* The management summary: headline KPIs, top products, sales by marketplace, alerts, settlement totals, and data quality. Matches the Business Reports page. Requires `analytics:read`.
|
|
19417
|
+
|
|
19418
|
+
Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
|
|
19419
|
+
*
|
|
19420
|
+
* `GET /api/v1/analytics/reports`
|
|
19421
|
+
*/
|
|
19422
|
+
getReports(request?: OperationQuery<operations["get_v1_analytics_reports"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_analytics_reports"]>>;
|
|
19423
|
+
/**
|
|
19424
|
+
* Get Store Analytics
|
|
19425
|
+
*
|
|
19426
|
+
* Seller Centre shop metrics: visitors, page views, followers, the placed, paid, and confirmed buyer funnel, a daily trend, and the app and web split. Matches the Analytics (Seller Centre) page. Requires `analytics:read`.
|
|
19427
|
+
|
|
19428
|
+
Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
|
|
19429
|
+
*
|
|
19430
|
+
* `GET /api/v1/analytics/stores`
|
|
19431
|
+
*/
|
|
19432
|
+
getStores(request?: OperationQuery<operations["get_v1_analytics_stores"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_analytics_stores"]>>;
|
|
19433
|
+
/**
|
|
19434
|
+
* Get Traffic Analytics
|
|
16914
19435
|
*
|
|
16915
|
-
*
|
|
19436
|
+
* Impressions, page views, visitors, add-to-cart, and conversion, with the funnel, a daily trend, products ranked by lost conversion, diagnostics, and the videos that drive traffic. Matches the Traffic page. Requires `analytics:read`.
|
|
16916
19437
|
|
|
16917
19438
|
Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
|
|
16918
19439
|
*
|
|
16919
|
-
* `GET /api/v1/analytics/
|
|
19440
|
+
* `GET /api/v1/analytics/traffic`
|
|
16920
19441
|
*/
|
|
16921
|
-
|
|
19442
|
+
getTraffic(request?: OperationQuery<operations["get_v1_analytics_traffic"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_analytics_traffic"]>>;
|
|
16922
19443
|
}
|
|
16923
19444
|
declare class AopClient {
|
|
16924
19445
|
protected readonly _http: OmniHttp;
|
|
@@ -16964,26 +19485,6 @@ declare class AopClient {
|
|
|
16964
19485
|
*/
|
|
16965
19486
|
retry(request: OperationBody<operations["post_v1_aop_retry"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_aop_retry"]>>;
|
|
16966
19487
|
}
|
|
16967
|
-
declare class ApiClient {
|
|
16968
|
-
protected readonly _http: OmniHttp;
|
|
16969
|
-
constructor(_http: OmniHttp);
|
|
16970
|
-
/**
|
|
16971
|
-
* API Root
|
|
16972
|
-
*
|
|
16973
|
-
* Public API discovery root. Merchant payments are handled by organization-scoped checkout session endpoints.
|
|
16974
|
-
*
|
|
16975
|
-
* `GET /api`
|
|
16976
|
-
*/
|
|
16977
|
-
root(requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_root"]>>;
|
|
16978
|
-
/**
|
|
16979
|
-
* API v1 Root
|
|
16980
|
-
*
|
|
16981
|
-
* Public API v1 discovery root. Merchant payments are handled by organization-scoped checkout session endpoints.
|
|
16982
|
-
*
|
|
16983
|
-
* `GET /api/v1`
|
|
16984
|
-
*/
|
|
16985
|
-
v1(requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1"]>>;
|
|
16986
|
-
}
|
|
16987
19488
|
declare class CampaignsClient {
|
|
16988
19489
|
protected readonly _http: OmniHttp;
|
|
16989
19490
|
constructor(_http: OmniHttp);
|
|
@@ -17142,6 +19643,28 @@ declare class DirectoryClient {
|
|
|
17142
19643
|
*/
|
|
17143
19644
|
list(requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_directory"]>>;
|
|
17144
19645
|
}
|
|
19646
|
+
declare class DocumentsClient {
|
|
19647
|
+
protected readonly _http: OmniHttp;
|
|
19648
|
+
constructor(_http: OmniHttp);
|
|
19649
|
+
/**
|
|
19650
|
+
* Upload Document
|
|
19651
|
+
*
|
|
19652
|
+
* Upload one file to the knowledge base as multipart/form-data. Requires `documents:write`.
|
|
19653
|
+
|
|
19654
|
+
Accepted: PDF up to 20 MB, Excel (.xlsx/.xlsm) up to 10 MB, images up to 8 MB, CSV and Markdown up to 2 MB. PDFs, Markdown, and images are indexed in the background; poll `GET /api/v1/documents/{documentId}` until `status` is `completed`. CSV and Excel are stored for agents to read but are not indexed.
|
|
19655
|
+
*
|
|
19656
|
+
* `POST /api/v1/documents`
|
|
19657
|
+
*/
|
|
19658
|
+
upload(request: OperationBody<operations["post_v1_documents"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_documents"]>>;
|
|
19659
|
+
/**
|
|
19660
|
+
* Get Document
|
|
19661
|
+
*
|
|
19662
|
+
* Read one knowledge base document and its indexing status. Requires `documents:read`.
|
|
19663
|
+
*
|
|
19664
|
+
* `GET /api/v1/documents/{documentId}`
|
|
19665
|
+
*/
|
|
19666
|
+
get(request: OperationPath<operations["get_v1_documents_by_documentid"]> & OperationQuery<operations["get_v1_documents_by_documentid"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_documents_by_documentid"]>>;
|
|
19667
|
+
}
|
|
17145
19668
|
declare class EvaluateClient {
|
|
17146
19669
|
protected readonly _http: OmniHttp;
|
|
17147
19670
|
constructor(_http: OmniHttp);
|
|
@@ -17603,6 +20126,16 @@ declare class ProductsClient {
|
|
|
17603
20126
|
* `POST /api/v1/products/{productId}/delist`
|
|
17604
20127
|
*/
|
|
17605
20128
|
delist(request: OperationPath<operations["post_v1_products_by_productid_delist"]> & OperationBody<operations["post_v1_products_by_productid_delist"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_products_by_productid_delist"]>>;
|
|
20129
|
+
/**
|
|
20130
|
+
* Upload Product Image
|
|
20131
|
+
*
|
|
20132
|
+
* Upload one image to a product's or variant's gallery as multipart/form-data. Requires `catalog:write`.
|
|
20133
|
+
|
|
20134
|
+
JPEG, PNG, WebP, AVIF, or HEIC up to 8 MB; WebP, AVIF, and HEIC are stored as JPEG. The image is added at `position`, or at the end. Publish the product to send the new gallery to marketplaces.
|
|
20135
|
+
*
|
|
20136
|
+
* `POST /api/v1/products/{productId}/images`
|
|
20137
|
+
*/
|
|
20138
|
+
uploadImage(request: OperationPath<operations["post_v1_products_by_productid_images"]> & OperationBody<operations["post_v1_products_by_productid_images"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_products_by_productid_images"]>>;
|
|
17606
20139
|
/**
|
|
17607
20140
|
* Update Product Inventory
|
|
17608
20141
|
*
|
|
@@ -17775,13 +20308,15 @@ declare class PromotionsClient {
|
|
|
17775
20308
|
*/
|
|
17776
20309
|
addProducts(request: OperationPath<operations["post_v1_promotions_by_promotionid_products"]> & OperationQuery<operations["post_v1_promotions_by_promotionid_products"]> & OperationBody<operations["post_v1_promotions_by_promotionid_products"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_promotions_by_promotionid_products"]>>;
|
|
17777
20310
|
/**
|
|
17778
|
-
*
|
|
20311
|
+
* Retry Marketplace Delivery
|
|
17779
20312
|
*
|
|
17780
|
-
*
|
|
20313
|
+
* Run marketplace delivery again after a failure, for example once a store is reconnected. Requires `promotions:write`.
|
|
20314
|
+
|
|
20315
|
+
You do not need this to publish a promotion: creating or activating it, editing it while active or scheduled, and assigning products already deliver it, and pausing, ending, or archiving removes it. A retry brings each marketplace back in line with the promotion's current status.
|
|
17781
20316
|
*
|
|
17782
|
-
* `POST /api/v1/promotions/{promotionId}/
|
|
20317
|
+
* `POST /api/v1/promotions/{promotionId}/retry`
|
|
17783
20318
|
*/
|
|
17784
|
-
|
|
20319
|
+
retry(request: OperationPath<operations["post_v1_promotions_by_promotionid_retry"]> & OperationQuery<operations["post_v1_promotions_by_promotionid_retry"]> & OperationBody<operations["post_v1_promotions_by_promotionid_retry"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_promotions_by_promotionid_retry"]>>;
|
|
17785
20320
|
}
|
|
17786
20321
|
declare class ReturnsClient {
|
|
17787
20322
|
protected readonly _http: OmniHttp;
|
|
@@ -18070,12 +20605,12 @@ declare class OmniGeneratedClient {
|
|
|
18070
20605
|
readonly agents: AgentsClient;
|
|
18071
20606
|
readonly analytics: AnalyticsClient;
|
|
18072
20607
|
readonly aop: AopClient;
|
|
18073
|
-
readonly api: ApiClient;
|
|
18074
20608
|
readonly campaigns: CampaignsClient;
|
|
18075
20609
|
readonly catalog: CatalogClient;
|
|
18076
20610
|
readonly checkoutSessions: CheckoutSessionsClient;
|
|
18077
20611
|
readonly compare: CompareClient;
|
|
18078
20612
|
readonly directory: DirectoryClient;
|
|
20613
|
+
readonly documents: DocumentsClient;
|
|
18079
20614
|
readonly evaluate: EvaluateClient;
|
|
18080
20615
|
readonly feed: FeedClient;
|
|
18081
20616
|
readonly images: ImagesClient;
|
|
@@ -18107,12 +20642,12 @@ type OmniResources = {
|
|
|
18107
20642
|
agents: AgentsClient;
|
|
18108
20643
|
analytics: AnalyticsClient;
|
|
18109
20644
|
aop: AopClient;
|
|
18110
|
-
api: ApiClient;
|
|
18111
20645
|
campaigns: CampaignsClient;
|
|
18112
20646
|
catalog: CatalogClient;
|
|
18113
20647
|
checkoutSessions: CheckoutSessionsClient;
|
|
18114
20648
|
compare: CompareClient;
|
|
18115
20649
|
directory: DirectoryClient;
|
|
20650
|
+
documents: DocumentsClient;
|
|
18116
20651
|
evaluate: EvaluateClient;
|
|
18117
20652
|
feed: FeedClient;
|
|
18118
20653
|
images: ImagesClient;
|
|
@@ -18181,7 +20716,7 @@ declare function constructEvent(payload: string | Uint8Array, headers: WebhookHe
|
|
|
18181
20716
|
toleranceInSeconds?: number;
|
|
18182
20717
|
}): Promise<ConstructedWebhookEvent>;
|
|
18183
20718
|
|
|
18184
|
-
declare const SDK_VERSION = "0.
|
|
20719
|
+
declare const SDK_VERSION = "0.5.0";
|
|
18185
20720
|
|
|
18186
20721
|
type ProductCreatedWebhookEvent = components["schemas"]["ProductCreatedWebhookEvent"];
|
|
18187
20722
|
type ProductUpdatedWebhookEvent = components["schemas"]["ProductUpdatedWebhookEvent"];
|