@omni-commerce/sdk 0.3.0 → 0.4.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 +386 -48
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2242 -214
- package/dist/index.d.ts +2242 -214
- package/dist/index.js +386 -48
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -191,7 +191,49 @@ declare class JobFailedError extends OmniError {
|
|
|
191
191
|
*/
|
|
192
192
|
|
|
193
193
|
interface paths {
|
|
194
|
-
"/api": {
|
|
194
|
+
"/api/v1/agents/general/invoke": {
|
|
195
|
+
parameters: {
|
|
196
|
+
query?: never;
|
|
197
|
+
header?: never;
|
|
198
|
+
path?: never;
|
|
199
|
+
cookie?: never;
|
|
200
|
+
};
|
|
201
|
+
get?: never;
|
|
202
|
+
put?: never;
|
|
203
|
+
/**
|
|
204
|
+
* Invoke the Omni agent
|
|
205
|
+
* @description Run the general Omni agent and wait until it completes, pauses for approval, or fails. Requires `agents:invoke`.
|
|
206
|
+
*
|
|
207
|
+
* 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.
|
|
208
|
+
*/
|
|
209
|
+
post: operations["post_v1_agents_general_invoke"];
|
|
210
|
+
delete?: never;
|
|
211
|
+
options?: never;
|
|
212
|
+
head?: never;
|
|
213
|
+
patch?: never;
|
|
214
|
+
trace?: never;
|
|
215
|
+
};
|
|
216
|
+
"/api/v1/agents/general/runs": {
|
|
217
|
+
parameters: {
|
|
218
|
+
query?: never;
|
|
219
|
+
header?: never;
|
|
220
|
+
path?: never;
|
|
221
|
+
cookie?: never;
|
|
222
|
+
};
|
|
223
|
+
get?: never;
|
|
224
|
+
put?: never;
|
|
225
|
+
/**
|
|
226
|
+
* Start an Omni agent run
|
|
227
|
+
* @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.
|
|
228
|
+
*/
|
|
229
|
+
post: operations["post_v1_agents_general_runs"];
|
|
230
|
+
delete?: never;
|
|
231
|
+
options?: never;
|
|
232
|
+
head?: never;
|
|
233
|
+
patch?: never;
|
|
234
|
+
trace?: never;
|
|
235
|
+
};
|
|
236
|
+
"/api/v1/agents/general/runs/{runId}": {
|
|
195
237
|
parameters: {
|
|
196
238
|
query?: never;
|
|
197
239
|
header?: never;
|
|
@@ -199,10 +241,10 @@ interface paths {
|
|
|
199
241
|
cookie?: never;
|
|
200
242
|
};
|
|
201
243
|
/**
|
|
202
|
-
*
|
|
203
|
-
* @description
|
|
244
|
+
* Get an Omni agent run
|
|
245
|
+
* @description Read a queued, running, completed, paused, or failed Omni agent run. Requires `agents:invoke`.
|
|
204
246
|
*/
|
|
205
|
-
get: operations["
|
|
247
|
+
get: operations["get_v1_agents_general_runs_by_runid"];
|
|
206
248
|
put?: never;
|
|
207
249
|
post?: never;
|
|
208
250
|
delete?: never;
|
|
@@ -211,7 +253,7 @@ interface paths {
|
|
|
211
253
|
patch?: never;
|
|
212
254
|
trace?: never;
|
|
213
255
|
};
|
|
214
|
-
"/api/v1": {
|
|
256
|
+
"/api/v1/analytics/ads": {
|
|
215
257
|
parameters: {
|
|
216
258
|
query?: never;
|
|
217
259
|
header?: never;
|
|
@@ -219,10 +261,12 @@ interface paths {
|
|
|
219
261
|
cookie?: never;
|
|
220
262
|
};
|
|
221
263
|
/**
|
|
222
|
-
*
|
|
223
|
-
* @description
|
|
264
|
+
* Get Ads Analytics
|
|
265
|
+
* @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`.
|
|
266
|
+
*
|
|
267
|
+
* Amounts are in `data.filters.currency`. The periods count back from the end of the range.
|
|
224
268
|
*/
|
|
225
|
-
get: operations["
|
|
269
|
+
get: operations["get_v1_analytics_ads"];
|
|
226
270
|
put?: never;
|
|
227
271
|
post?: never;
|
|
228
272
|
delete?: never;
|
|
@@ -231,49 +275,117 @@ interface paths {
|
|
|
231
275
|
patch?: never;
|
|
232
276
|
trace?: never;
|
|
233
277
|
};
|
|
234
|
-
"/api/v1/
|
|
278
|
+
"/api/v1/analytics/ai-traffic": {
|
|
235
279
|
parameters: {
|
|
236
280
|
query?: never;
|
|
237
281
|
header?: never;
|
|
238
282
|
path?: never;
|
|
239
283
|
cookie?: never;
|
|
240
284
|
};
|
|
241
|
-
|
|
285
|
+
/**
|
|
286
|
+
* Get AI Traffic Analytics
|
|
287
|
+
* @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`.
|
|
288
|
+
*
|
|
289
|
+
* A range covers at most 365 days; a longer one is shortened to the last 365 days. Read the applied range from `data.filters`.
|
|
290
|
+
*/
|
|
291
|
+
get: operations["get_v1_analytics_ai_traffic"];
|
|
292
|
+
put?: never;
|
|
293
|
+
post?: never;
|
|
294
|
+
delete?: never;
|
|
295
|
+
options?: never;
|
|
296
|
+
head?: never;
|
|
297
|
+
patch?: never;
|
|
298
|
+
trace?: never;
|
|
299
|
+
};
|
|
300
|
+
"/api/v1/analytics/content": {
|
|
301
|
+
parameters: {
|
|
302
|
+
query?: never;
|
|
303
|
+
header?: never;
|
|
304
|
+
path?: never;
|
|
305
|
+
cookie?: never;
|
|
306
|
+
};
|
|
307
|
+
/**
|
|
308
|
+
* Get Video and LIVE Analytics
|
|
309
|
+
* @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`.
|
|
310
|
+
*
|
|
311
|
+
* Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
|
|
312
|
+
*/
|
|
313
|
+
get: operations["get_v1_analytics_content"];
|
|
242
314
|
put?: never;
|
|
315
|
+
post?: never;
|
|
316
|
+
delete?: never;
|
|
317
|
+
options?: never;
|
|
318
|
+
head?: never;
|
|
319
|
+
patch?: never;
|
|
320
|
+
trace?: never;
|
|
321
|
+
};
|
|
322
|
+
"/api/v1/analytics/orders": {
|
|
323
|
+
parameters: {
|
|
324
|
+
query?: never;
|
|
325
|
+
header?: never;
|
|
326
|
+
path?: never;
|
|
327
|
+
cookie?: never;
|
|
328
|
+
};
|
|
243
329
|
/**
|
|
244
|
-
*
|
|
245
|
-
* @description
|
|
330
|
+
* Get Order Analytics
|
|
331
|
+
* @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
332
|
*
|
|
247
|
-
*
|
|
333
|
+
* Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
|
|
248
334
|
*/
|
|
249
|
-
|
|
335
|
+
get: operations["get_v1_analytics_orders"];
|
|
336
|
+
put?: never;
|
|
337
|
+
post?: never;
|
|
250
338
|
delete?: never;
|
|
251
339
|
options?: never;
|
|
252
340
|
head?: never;
|
|
253
341
|
patch?: never;
|
|
254
342
|
trace?: never;
|
|
255
343
|
};
|
|
256
|
-
"/api/v1/
|
|
344
|
+
"/api/v1/analytics/overview": {
|
|
257
345
|
parameters: {
|
|
258
346
|
query?: never;
|
|
259
347
|
header?: never;
|
|
260
348
|
path?: never;
|
|
261
349
|
cookie?: never;
|
|
262
350
|
};
|
|
263
|
-
|
|
351
|
+
/**
|
|
352
|
+
* Get Growth Overview
|
|
353
|
+
* @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`.
|
|
354
|
+
*
|
|
355
|
+
* Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
|
|
356
|
+
*/
|
|
357
|
+
get: operations["get_v1_analytics_overview"];
|
|
264
358
|
put?: never;
|
|
359
|
+
post?: never;
|
|
360
|
+
delete?: never;
|
|
361
|
+
options?: never;
|
|
362
|
+
head?: never;
|
|
363
|
+
patch?: never;
|
|
364
|
+
trace?: never;
|
|
365
|
+
};
|
|
366
|
+
"/api/v1/analytics/pricing": {
|
|
367
|
+
parameters: {
|
|
368
|
+
query?: never;
|
|
369
|
+
header?: never;
|
|
370
|
+
path?: never;
|
|
371
|
+
cookie?: never;
|
|
372
|
+
};
|
|
265
373
|
/**
|
|
266
|
-
*
|
|
267
|
-
* @description
|
|
374
|
+
* Get Pricing Analytics
|
|
375
|
+
* @description Selling products with their margin, velocity, stock cover, prices, competitor median, and a pricing recommendation. Matches the Pricing page. Requires `analytics:read`.
|
|
376
|
+
*
|
|
377
|
+
* Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
|
|
268
378
|
*/
|
|
269
|
-
|
|
379
|
+
get: operations["get_v1_analytics_pricing"];
|
|
380
|
+
put?: never;
|
|
381
|
+
post?: never;
|
|
270
382
|
delete?: never;
|
|
271
383
|
options?: never;
|
|
272
384
|
head?: never;
|
|
273
385
|
patch?: never;
|
|
274
386
|
trace?: never;
|
|
275
387
|
};
|
|
276
|
-
"/api/v1/
|
|
388
|
+
"/api/v1/analytics/products": {
|
|
277
389
|
parameters: {
|
|
278
390
|
query?: never;
|
|
279
391
|
header?: never;
|
|
@@ -281,10 +393,78 @@ interface paths {
|
|
|
281
393
|
cookie?: never;
|
|
282
394
|
};
|
|
283
395
|
/**
|
|
284
|
-
* Get
|
|
285
|
-
* @description
|
|
396
|
+
* Get Product Analytics
|
|
397
|
+
* @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`.
|
|
398
|
+
*
|
|
399
|
+
* Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
|
|
286
400
|
*/
|
|
287
|
-
get: operations["
|
|
401
|
+
get: operations["get_v1_analytics_products"];
|
|
402
|
+
put?: never;
|
|
403
|
+
post?: never;
|
|
404
|
+
delete?: never;
|
|
405
|
+
options?: never;
|
|
406
|
+
head?: never;
|
|
407
|
+
patch?: never;
|
|
408
|
+
trace?: never;
|
|
409
|
+
};
|
|
410
|
+
"/api/v1/analytics/profit": {
|
|
411
|
+
parameters: {
|
|
412
|
+
query?: never;
|
|
413
|
+
header?: never;
|
|
414
|
+
path?: never;
|
|
415
|
+
cookie?: never;
|
|
416
|
+
};
|
|
417
|
+
/**
|
|
418
|
+
* Get Profit Analytics
|
|
419
|
+
* @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`.
|
|
420
|
+
*
|
|
421
|
+
* Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
|
|
422
|
+
*/
|
|
423
|
+
get: operations["get_v1_analytics_profit"];
|
|
424
|
+
put?: never;
|
|
425
|
+
post?: never;
|
|
426
|
+
delete?: never;
|
|
427
|
+
options?: never;
|
|
428
|
+
head?: never;
|
|
429
|
+
patch?: never;
|
|
430
|
+
trace?: never;
|
|
431
|
+
};
|
|
432
|
+
"/api/v1/analytics/reports": {
|
|
433
|
+
parameters: {
|
|
434
|
+
query?: never;
|
|
435
|
+
header?: never;
|
|
436
|
+
path?: never;
|
|
437
|
+
cookie?: never;
|
|
438
|
+
};
|
|
439
|
+
/**
|
|
440
|
+
* Get Business Report
|
|
441
|
+
* @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`.
|
|
442
|
+
*
|
|
443
|
+
* Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
|
|
444
|
+
*/
|
|
445
|
+
get: operations["get_v1_analytics_reports"];
|
|
446
|
+
put?: never;
|
|
447
|
+
post?: never;
|
|
448
|
+
delete?: never;
|
|
449
|
+
options?: never;
|
|
450
|
+
head?: never;
|
|
451
|
+
patch?: never;
|
|
452
|
+
trace?: never;
|
|
453
|
+
};
|
|
454
|
+
"/api/v1/analytics/stores": {
|
|
455
|
+
parameters: {
|
|
456
|
+
query?: never;
|
|
457
|
+
header?: never;
|
|
458
|
+
path?: never;
|
|
459
|
+
cookie?: never;
|
|
460
|
+
};
|
|
461
|
+
/**
|
|
462
|
+
* Get Store Analytics
|
|
463
|
+
* @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`.
|
|
464
|
+
*
|
|
465
|
+
* Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
|
|
466
|
+
*/
|
|
467
|
+
get: operations["get_v1_analytics_stores"];
|
|
288
468
|
put?: never;
|
|
289
469
|
post?: never;
|
|
290
470
|
delete?: never;
|
|
@@ -293,7 +473,7 @@ interface paths {
|
|
|
293
473
|
patch?: never;
|
|
294
474
|
trace?: never;
|
|
295
475
|
};
|
|
296
|
-
"/api/v1/analytics/
|
|
476
|
+
"/api/v1/analytics/traffic": {
|
|
297
477
|
parameters: {
|
|
298
478
|
query?: never;
|
|
299
479
|
header?: never;
|
|
@@ -301,12 +481,12 @@ interface paths {
|
|
|
301
481
|
cookie?: never;
|
|
302
482
|
};
|
|
303
483
|
/**
|
|
304
|
-
* Get
|
|
305
|
-
* @description
|
|
484
|
+
* Get Traffic Analytics
|
|
485
|
+
* @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
486
|
*
|
|
307
487
|
* Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
|
|
308
488
|
*/
|
|
309
|
-
get: operations["
|
|
489
|
+
get: operations["get_v1_analytics_traffic"];
|
|
310
490
|
put?: never;
|
|
311
491
|
post?: never;
|
|
312
492
|
delete?: never;
|
|
@@ -3565,68 +3745,6 @@ interface components {
|
|
|
3565
3745
|
pathItems: never;
|
|
3566
3746
|
}
|
|
3567
3747
|
interface operations {
|
|
3568
|
-
get_root: {
|
|
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
3748
|
post_v1_agents_general_invoke: {
|
|
3631
3749
|
parameters: {
|
|
3632
3750
|
query?: never;
|
|
@@ -3896,7 +4014,1729 @@ interface operations {
|
|
|
3896
4014
|
};
|
|
3897
4015
|
};
|
|
3898
4016
|
};
|
|
3899
|
-
/** @description Invalid agent request, unknown tool or model, or a decision count that does not match the pending approvals */
|
|
4017
|
+
/** @description Invalid agent request, unknown tool or model, or a decision count that does not match the pending approvals */
|
|
4018
|
+
400: {
|
|
4019
|
+
headers: {
|
|
4020
|
+
[name: string]: unknown;
|
|
4021
|
+
};
|
|
4022
|
+
content?: never;
|
|
4023
|
+
};
|
|
4024
|
+
/** @description Unauthorized */
|
|
4025
|
+
401: {
|
|
4026
|
+
headers: {
|
|
4027
|
+
[name: string]: unknown;
|
|
4028
|
+
};
|
|
4029
|
+
content?: never;
|
|
4030
|
+
};
|
|
4031
|
+
/** @description Insufficient AI credits */
|
|
4032
|
+
402: {
|
|
4033
|
+
headers: {
|
|
4034
|
+
[name: string]: unknown;
|
|
4035
|
+
};
|
|
4036
|
+
content?: never;
|
|
4037
|
+
};
|
|
4038
|
+
/** @description Missing agents:invoke scope or Assistant access */
|
|
4039
|
+
403: {
|
|
4040
|
+
headers: {
|
|
4041
|
+
[name: string]: unknown;
|
|
4042
|
+
};
|
|
4043
|
+
content?: never;
|
|
4044
|
+
};
|
|
4045
|
+
/** @description The thread already has an active run, or decisions were sent for a thread with no run awaiting approval */
|
|
4046
|
+
409: {
|
|
4047
|
+
headers: {
|
|
4048
|
+
[name: string]: unknown;
|
|
4049
|
+
};
|
|
4050
|
+
content?: never;
|
|
4051
|
+
};
|
|
4052
|
+
/** @description The agent run failed. `data.run_id` identifies the stored run */
|
|
4053
|
+
500: {
|
|
4054
|
+
headers: {
|
|
4055
|
+
[name: string]: unknown;
|
|
4056
|
+
};
|
|
4057
|
+
content?: never;
|
|
4058
|
+
};
|
|
4059
|
+
};
|
|
4060
|
+
};
|
|
4061
|
+
get_v1_agents_general_runs_by_runid: {
|
|
4062
|
+
parameters: {
|
|
4063
|
+
query?: {
|
|
4064
|
+
/** @description Required for session auth. Optional for API keys, which already belong to one organization. */
|
|
4065
|
+
organizationId?: string;
|
|
4066
|
+
};
|
|
4067
|
+
header?: never;
|
|
4068
|
+
path: {
|
|
4069
|
+
runId: string;
|
|
4070
|
+
};
|
|
4071
|
+
cookie?: never;
|
|
4072
|
+
};
|
|
4073
|
+
requestBody?: never;
|
|
4074
|
+
responses: {
|
|
4075
|
+
/** @description The agent run. */
|
|
4076
|
+
200: {
|
|
4077
|
+
headers: {
|
|
4078
|
+
/** @description Seconds to wait before polling again. Sent while the run is queued or running. */
|
|
4079
|
+
"Retry-After"?: number;
|
|
4080
|
+
[name: string]: unknown;
|
|
4081
|
+
};
|
|
4082
|
+
content: {
|
|
4083
|
+
"application/json": {
|
|
4084
|
+
run_id: string;
|
|
4085
|
+
thread_id: string;
|
|
4086
|
+
/** @enum {string} */
|
|
4087
|
+
status:
|
|
4088
|
+
| "queued"
|
|
4089
|
+
| "running"
|
|
4090
|
+
| "completed"
|
|
4091
|
+
| "awaiting_approval"
|
|
4092
|
+
| "failed";
|
|
4093
|
+
messages: {
|
|
4094
|
+
/** @enum {string} */
|
|
4095
|
+
type: "human" | "ai" | "tool" | "system";
|
|
4096
|
+
/** @enum {string} */
|
|
4097
|
+
role: "user" | "assistant" | "tool" | "system";
|
|
4098
|
+
content: string;
|
|
4099
|
+
id?: string;
|
|
4100
|
+
name?: string;
|
|
4101
|
+
tool_calls?: {
|
|
4102
|
+
id?: string;
|
|
4103
|
+
name: string;
|
|
4104
|
+
args: unknown;
|
|
4105
|
+
}[];
|
|
4106
|
+
tool_call_id?: string;
|
|
4107
|
+
}[];
|
|
4108
|
+
structured_output: {
|
|
4109
|
+
[key: string]: unknown;
|
|
4110
|
+
} | null;
|
|
4111
|
+
approvals:
|
|
4112
|
+
| {
|
|
4113
|
+
interrupt_instance_id: string;
|
|
4114
|
+
tool_name: string | null;
|
|
4115
|
+
tool_args: unknown;
|
|
4116
|
+
message: string;
|
|
4117
|
+
}[]
|
|
4118
|
+
| null;
|
|
4119
|
+
error: string | null;
|
|
4120
|
+
};
|
|
4121
|
+
};
|
|
4122
|
+
};
|
|
4123
|
+
/** @description Invalid agent request, unknown tool or model, or a decision count that does not match the pending approvals */
|
|
4124
|
+
400: {
|
|
4125
|
+
headers: {
|
|
4126
|
+
[name: string]: unknown;
|
|
4127
|
+
};
|
|
4128
|
+
content?: never;
|
|
4129
|
+
};
|
|
4130
|
+
/** @description Unauthorized */
|
|
4131
|
+
401: {
|
|
4132
|
+
headers: {
|
|
4133
|
+
[name: string]: unknown;
|
|
4134
|
+
};
|
|
4135
|
+
content?: never;
|
|
4136
|
+
};
|
|
4137
|
+
/** @description Missing agents:invoke scope or Assistant access */
|
|
4138
|
+
403: {
|
|
4139
|
+
headers: {
|
|
4140
|
+
[name: string]: unknown;
|
|
4141
|
+
};
|
|
4142
|
+
content?: never;
|
|
4143
|
+
};
|
|
4144
|
+
/** @description Agent run not found */
|
|
4145
|
+
404: {
|
|
4146
|
+
headers: {
|
|
4147
|
+
[name: string]: unknown;
|
|
4148
|
+
};
|
|
4149
|
+
content?: never;
|
|
4150
|
+
};
|
|
4151
|
+
};
|
|
4152
|
+
};
|
|
4153
|
+
get_v1_analytics_ads: {
|
|
4154
|
+
parameters: {
|
|
4155
|
+
query?: {
|
|
4156
|
+
/** @description Required for session auth. API keys already belong to one organization. */
|
|
4157
|
+
organizationId?: string;
|
|
4158
|
+
/** @description First day of the range (YYYY-MM-DD). Defaults to 29 days before `to`. */
|
|
4159
|
+
from?: string;
|
|
4160
|
+
/** @description Last day of the range, inclusive (YYYY-MM-DD). Defaults to today. */
|
|
4161
|
+
to?: string;
|
|
4162
|
+
/** @description IANA time zone that defines each day, for example `Asia/Kuala_Lumpur`. Defaults to Asia/Singapore. */
|
|
4163
|
+
timeZone?: string;
|
|
4164
|
+
/** @description Comma-separated marketplaces, for example `shopee,lazada`. */
|
|
4165
|
+
marketplace?: string;
|
|
4166
|
+
/** @description Comma-separated countries. One country selects its currency. */
|
|
4167
|
+
country?: string;
|
|
4168
|
+
/** @description Comma-separated store (account) ids from `GET /api/v1/marketplaces/connected`. */
|
|
4169
|
+
store?: string;
|
|
4170
|
+
/** @description ISO currency. Only orders in this currency are counted; amounts are not converted. Defaults to the single country's currency, otherwise SGD. */
|
|
4171
|
+
currency?: string;
|
|
4172
|
+
};
|
|
4173
|
+
header?: never;
|
|
4174
|
+
path?: never;
|
|
4175
|
+
cookie?: never;
|
|
4176
|
+
};
|
|
4177
|
+
requestBody?: never;
|
|
4178
|
+
responses: {
|
|
4179
|
+
/** @description Get Ads Analytics */
|
|
4180
|
+
200: {
|
|
4181
|
+
headers: {
|
|
4182
|
+
[name: string]: unknown;
|
|
4183
|
+
};
|
|
4184
|
+
content: {
|
|
4185
|
+
"application/json": {
|
|
4186
|
+
ok: boolean;
|
|
4187
|
+
/** @constant */
|
|
4188
|
+
apiVersion: "developer_v1";
|
|
4189
|
+
operationId: string;
|
|
4190
|
+
/** @enum {string} */
|
|
4191
|
+
status: "accepted" | "completed" | "failed";
|
|
4192
|
+
jobId?: string;
|
|
4193
|
+
productId?: string;
|
|
4194
|
+
warnings: string[];
|
|
4195
|
+
recommendations: string[];
|
|
4196
|
+
links: {
|
|
4197
|
+
[key: string]: string;
|
|
4198
|
+
};
|
|
4199
|
+
data: {
|
|
4200
|
+
filters: {
|
|
4201
|
+
from: string;
|
|
4202
|
+
to: string;
|
|
4203
|
+
marketplace: string;
|
|
4204
|
+
country: string;
|
|
4205
|
+
store: string;
|
|
4206
|
+
/** @description Currency of every amount in the response. */
|
|
4207
|
+
currency: string;
|
|
4208
|
+
timeZone: string;
|
|
4209
|
+
};
|
|
4210
|
+
/** @description The last day the periods count back from. */
|
|
4211
|
+
anchorDate: string;
|
|
4212
|
+
/** @description The 28 days the KPI totals cover. */
|
|
4213
|
+
kpiDateRange: {
|
|
4214
|
+
from: string;
|
|
4215
|
+
to: string;
|
|
4216
|
+
};
|
|
4217
|
+
kpis: {
|
|
4218
|
+
spend: number;
|
|
4219
|
+
attributedGmv: number;
|
|
4220
|
+
attributedOrders: number;
|
|
4221
|
+
impressions: number;
|
|
4222
|
+
clicks: number;
|
|
4223
|
+
roas: number | null;
|
|
4224
|
+
acos: number | null;
|
|
4225
|
+
productCount: number;
|
|
4226
|
+
productsWithAds: number;
|
|
4227
|
+
};
|
|
4228
|
+
coverage: {
|
|
4229
|
+
ads: boolean;
|
|
4230
|
+
productLevelAds: boolean;
|
|
4231
|
+
/** @description Only ad fee lines are known, not per-product ad data. */
|
|
4232
|
+
feeLineOnly: boolean;
|
|
4233
|
+
};
|
|
4234
|
+
message: string | null;
|
|
4235
|
+
products: {
|
|
4236
|
+
productId: string | null;
|
|
4237
|
+
productName: string;
|
|
4238
|
+
thumbnailUrl: string | null;
|
|
4239
|
+
platform: string | null;
|
|
4240
|
+
accountId: string | null;
|
|
4241
|
+
sku: string | null;
|
|
4242
|
+
externalProductId: string | null;
|
|
4243
|
+
last28Totals: {
|
|
4244
|
+
revenue: number | null;
|
|
4245
|
+
orders: number | null;
|
|
4246
|
+
qtySold: number | null;
|
|
4247
|
+
avgUnitPrice: number | null;
|
|
4248
|
+
adSpend: number | null;
|
|
4249
|
+
adRevenue: number | null;
|
|
4250
|
+
adOrders: number | null;
|
|
4251
|
+
adQtySold: number | null;
|
|
4252
|
+
adRoas: number | null;
|
|
4253
|
+
hasSales: boolean;
|
|
4254
|
+
hasAds: boolean;
|
|
4255
|
+
};
|
|
4256
|
+
periods: {
|
|
4257
|
+
/** @enum {string} */
|
|
4258
|
+
period:
|
|
4259
|
+
| "today"
|
|
4260
|
+
| "yesterday"
|
|
4261
|
+
| "avg_7"
|
|
4262
|
+
| "d7"
|
|
4263
|
+
| "avg_28"
|
|
4264
|
+
| "d28";
|
|
4265
|
+
label: string;
|
|
4266
|
+
isAverage: boolean;
|
|
4267
|
+
revenue: number | null;
|
|
4268
|
+
orders: number | null;
|
|
4269
|
+
qtySold: number | null;
|
|
4270
|
+
avgUnitPrice: number | null;
|
|
4271
|
+
adSpend: number | null;
|
|
4272
|
+
adRevenue: number | null;
|
|
4273
|
+
adOrders: number | null;
|
|
4274
|
+
adQtySold: number | null;
|
|
4275
|
+
adRoas: number | null;
|
|
4276
|
+
hasSales: boolean;
|
|
4277
|
+
hasAds: boolean;
|
|
4278
|
+
}[];
|
|
4279
|
+
}[];
|
|
4280
|
+
};
|
|
4281
|
+
};
|
|
4282
|
+
};
|
|
4283
|
+
};
|
|
4284
|
+
/** @description Invalid request */
|
|
4285
|
+
400: {
|
|
4286
|
+
headers: {
|
|
4287
|
+
[name: string]: unknown;
|
|
4288
|
+
};
|
|
4289
|
+
content?: never;
|
|
4290
|
+
};
|
|
4291
|
+
/** @description Unauthorized */
|
|
4292
|
+
401: {
|
|
4293
|
+
headers: {
|
|
4294
|
+
[name: string]: unknown;
|
|
4295
|
+
};
|
|
4296
|
+
content?: never;
|
|
4297
|
+
};
|
|
4298
|
+
/** @description Missing the `analytics:read` scope */
|
|
4299
|
+
403: {
|
|
4300
|
+
headers: {
|
|
4301
|
+
[name: string]: unknown;
|
|
4302
|
+
};
|
|
4303
|
+
content?: never;
|
|
4304
|
+
};
|
|
4305
|
+
/** @description Rate limit exceeded */
|
|
4306
|
+
429: {
|
|
4307
|
+
headers: {
|
|
4308
|
+
[name: string]: unknown;
|
|
4309
|
+
};
|
|
4310
|
+
content?: never;
|
|
4311
|
+
};
|
|
4312
|
+
/** @description Internal Server Error */
|
|
4313
|
+
500: {
|
|
4314
|
+
headers: {
|
|
4315
|
+
[name: string]: unknown;
|
|
4316
|
+
};
|
|
4317
|
+
content?: never;
|
|
4318
|
+
};
|
|
4319
|
+
};
|
|
4320
|
+
};
|
|
4321
|
+
get_v1_analytics_ai_traffic: {
|
|
4322
|
+
parameters: {
|
|
4323
|
+
query?: {
|
|
4324
|
+
/** @description Required for session auth. API keys already belong to one organization. */
|
|
4325
|
+
organizationId?: string;
|
|
4326
|
+
/** @description First day of the range (YYYY-MM-DD). Defaults to 29 days before `to`. */
|
|
4327
|
+
from?: string;
|
|
4328
|
+
/** @description Last day of the range, inclusive (YYYY-MM-DD). Defaults to today. */
|
|
4329
|
+
to?: string;
|
|
4330
|
+
/** @description IANA time zone that defines each day, for example `Asia/Kuala_Lumpur`. Defaults to Asia/Singapore. */
|
|
4331
|
+
timeZone?: string;
|
|
4332
|
+
/** @description One AI source id from `data.filterOptions.sources`. */
|
|
4333
|
+
source?: string;
|
|
4334
|
+
trafficType?: "indexing" | "click_through" | "page_view" | "assistant";
|
|
4335
|
+
/** @description One route key from `data.filterOptions.routes`. */
|
|
4336
|
+
route?: string;
|
|
4337
|
+
/** @description ISO country code of the visit. */
|
|
4338
|
+
country?: string;
|
|
4339
|
+
};
|
|
4340
|
+
header?: never;
|
|
4341
|
+
path?: never;
|
|
4342
|
+
cookie?: never;
|
|
4343
|
+
};
|
|
4344
|
+
requestBody?: never;
|
|
4345
|
+
responses: {
|
|
4346
|
+
/** @description Get AI Traffic Analytics */
|
|
4347
|
+
200: {
|
|
4348
|
+
headers: {
|
|
4349
|
+
[name: string]: unknown;
|
|
4350
|
+
};
|
|
4351
|
+
content: {
|
|
4352
|
+
"application/json": {
|
|
4353
|
+
ok: boolean;
|
|
4354
|
+
/** @constant */
|
|
4355
|
+
apiVersion: "developer_v1";
|
|
4356
|
+
operationId: string;
|
|
4357
|
+
/** @enum {string} */
|
|
4358
|
+
status: "accepted" | "completed" | "failed";
|
|
4359
|
+
jobId?: string;
|
|
4360
|
+
productId?: string;
|
|
4361
|
+
warnings: string[];
|
|
4362
|
+
recommendations: string[];
|
|
4363
|
+
links: {
|
|
4364
|
+
[key: string]: string;
|
|
4365
|
+
};
|
|
4366
|
+
data: {
|
|
4367
|
+
filters: {
|
|
4368
|
+
from: string;
|
|
4369
|
+
to: string;
|
|
4370
|
+
source: string;
|
|
4371
|
+
trafficType: string;
|
|
4372
|
+
route: string;
|
|
4373
|
+
country: string;
|
|
4374
|
+
timeZone: string;
|
|
4375
|
+
};
|
|
4376
|
+
filterOptions: {
|
|
4377
|
+
sources: {
|
|
4378
|
+
value: string;
|
|
4379
|
+
label: string;
|
|
4380
|
+
}[];
|
|
4381
|
+
routes: {
|
|
4382
|
+
value: string;
|
|
4383
|
+
label: string;
|
|
4384
|
+
}[];
|
|
4385
|
+
countries: {
|
|
4386
|
+
value: string;
|
|
4387
|
+
label: string;
|
|
4388
|
+
}[];
|
|
4389
|
+
};
|
|
4390
|
+
summary: {
|
|
4391
|
+
totalEvents: number;
|
|
4392
|
+
totalHits: number;
|
|
4393
|
+
pageViews: number;
|
|
4394
|
+
productPageViews: number;
|
|
4395
|
+
productsViewed: number;
|
|
4396
|
+
referredSessions: number;
|
|
4397
|
+
indexingHits: number;
|
|
4398
|
+
assistantHits: number;
|
|
4399
|
+
clickThroughs: number;
|
|
4400
|
+
productsRequested: number;
|
|
4401
|
+
productsWithReferrals: number;
|
|
4402
|
+
attributableHits: number;
|
|
4403
|
+
uniqueSources: number;
|
|
4404
|
+
uniqueRoutes: number;
|
|
4405
|
+
uniqueProducts: number;
|
|
4406
|
+
topSource: string | null;
|
|
4407
|
+
topRoute: string | null;
|
|
4408
|
+
topCountry: string | null;
|
|
4409
|
+
lastSeenAt: string | null;
|
|
4410
|
+
};
|
|
4411
|
+
trend: {
|
|
4412
|
+
date: string;
|
|
4413
|
+
label: string;
|
|
4414
|
+
hits: number;
|
|
4415
|
+
attributableHits: number;
|
|
4416
|
+
uniqueSources: number;
|
|
4417
|
+
}[];
|
|
4418
|
+
sourceBreakdown: {
|
|
4419
|
+
value: string;
|
|
4420
|
+
label: string;
|
|
4421
|
+
count: number;
|
|
4422
|
+
}[];
|
|
4423
|
+
routeBreakdown: {
|
|
4424
|
+
value: string;
|
|
4425
|
+
label: string;
|
|
4426
|
+
count: number;
|
|
4427
|
+
}[];
|
|
4428
|
+
countryBreakdown: {
|
|
4429
|
+
value: string;
|
|
4430
|
+
label: string;
|
|
4431
|
+
count: number;
|
|
4432
|
+
}[];
|
|
4433
|
+
productBreakdown: {
|
|
4434
|
+
productId: string;
|
|
4435
|
+
productName: string;
|
|
4436
|
+
count: number;
|
|
4437
|
+
}[];
|
|
4438
|
+
recentEvents: {
|
|
4439
|
+
id: string;
|
|
4440
|
+
occurredAt: string;
|
|
4441
|
+
sourceLabel: string;
|
|
4442
|
+
trafficType: string;
|
|
4443
|
+
operator: string;
|
|
4444
|
+
routeLabel: string;
|
|
4445
|
+
path: string;
|
|
4446
|
+
countryCode: string | null;
|
|
4447
|
+
referrer: string | null;
|
|
4448
|
+
inferredKeyword: string | null;
|
|
4449
|
+
inferredIntent: {
|
|
4450
|
+
label: string;
|
|
4451
|
+
source: string;
|
|
4452
|
+
confidence: number | null;
|
|
4453
|
+
} | null;
|
|
4454
|
+
productId: string | null;
|
|
4455
|
+
productName: string | null;
|
|
4456
|
+
}[];
|
|
4457
|
+
dataFreshness: {
|
|
4458
|
+
metricsAvailable: boolean;
|
|
4459
|
+
notes: string[];
|
|
4460
|
+
};
|
|
4461
|
+
};
|
|
4462
|
+
};
|
|
4463
|
+
};
|
|
4464
|
+
};
|
|
4465
|
+
/** @description Invalid request */
|
|
4466
|
+
400: {
|
|
4467
|
+
headers: {
|
|
4468
|
+
[name: string]: unknown;
|
|
4469
|
+
};
|
|
4470
|
+
content?: never;
|
|
4471
|
+
};
|
|
4472
|
+
/** @description Unauthorized */
|
|
4473
|
+
401: {
|
|
4474
|
+
headers: {
|
|
4475
|
+
[name: string]: unknown;
|
|
4476
|
+
};
|
|
4477
|
+
content?: never;
|
|
4478
|
+
};
|
|
4479
|
+
/** @description Missing the `analytics:read` scope */
|
|
4480
|
+
403: {
|
|
4481
|
+
headers: {
|
|
4482
|
+
[name: string]: unknown;
|
|
4483
|
+
};
|
|
4484
|
+
content?: never;
|
|
4485
|
+
};
|
|
4486
|
+
/** @description Rate limit exceeded */
|
|
4487
|
+
429: {
|
|
4488
|
+
headers: {
|
|
4489
|
+
[name: string]: unknown;
|
|
4490
|
+
};
|
|
4491
|
+
content?: never;
|
|
4492
|
+
};
|
|
4493
|
+
/** @description Internal Server Error */
|
|
4494
|
+
500: {
|
|
4495
|
+
headers: {
|
|
4496
|
+
[name: string]: unknown;
|
|
4497
|
+
};
|
|
4498
|
+
content?: never;
|
|
4499
|
+
};
|
|
4500
|
+
};
|
|
4501
|
+
};
|
|
4502
|
+
get_v1_analytics_content: {
|
|
4503
|
+
parameters: {
|
|
4504
|
+
query?: {
|
|
4505
|
+
/** @description Required for session auth. API keys already belong to one organization. */
|
|
4506
|
+
organizationId?: string;
|
|
4507
|
+
/** @description First day of the range (YYYY-MM-DD). Defaults to 29 days before `to`. */
|
|
4508
|
+
from?: string;
|
|
4509
|
+
/** @description Last day of the range, inclusive (YYYY-MM-DD). Defaults to today. */
|
|
4510
|
+
to?: string;
|
|
4511
|
+
/** @description IANA time zone that defines each day, for example `Asia/Kuala_Lumpur`. Defaults to Asia/Singapore. */
|
|
4512
|
+
timeZone?: string;
|
|
4513
|
+
/** @description Comma-separated marketplaces, for example `shopee,lazada`. */
|
|
4514
|
+
marketplace?: string;
|
|
4515
|
+
/** @description Comma-separated countries. One country selects its currency. */
|
|
4516
|
+
country?: string;
|
|
4517
|
+
/** @description Comma-separated store (account) ids from `GET /api/v1/marketplaces/connected`. */
|
|
4518
|
+
store?: string;
|
|
4519
|
+
/** @description ISO currency. Only orders in this currency are counted; amounts are not converted. Defaults to the single country's currency, otherwise SGD. */
|
|
4520
|
+
currency?: string;
|
|
4521
|
+
};
|
|
4522
|
+
header?: never;
|
|
4523
|
+
path?: never;
|
|
4524
|
+
cookie?: never;
|
|
4525
|
+
};
|
|
4526
|
+
requestBody?: never;
|
|
4527
|
+
responses: {
|
|
4528
|
+
/** @description Get Video and LIVE Analytics */
|
|
4529
|
+
200: {
|
|
4530
|
+
headers: {
|
|
4531
|
+
[name: string]: unknown;
|
|
4532
|
+
};
|
|
4533
|
+
content: {
|
|
4534
|
+
"application/json": {
|
|
4535
|
+
ok: boolean;
|
|
4536
|
+
/** @constant */
|
|
4537
|
+
apiVersion: "developer_v1";
|
|
4538
|
+
operationId: string;
|
|
4539
|
+
/** @enum {string} */
|
|
4540
|
+
status: "accepted" | "completed" | "failed";
|
|
4541
|
+
jobId?: string;
|
|
4542
|
+
productId?: string;
|
|
4543
|
+
warnings: string[];
|
|
4544
|
+
recommendations: string[];
|
|
4545
|
+
links: {
|
|
4546
|
+
[key: string]: string;
|
|
4547
|
+
};
|
|
4548
|
+
data: {
|
|
4549
|
+
filters: {
|
|
4550
|
+
from: string;
|
|
4551
|
+
to: string;
|
|
4552
|
+
marketplace: string;
|
|
4553
|
+
country: string;
|
|
4554
|
+
store: string;
|
|
4555
|
+
/** @description Currency of every amount in the response. */
|
|
4556
|
+
currency: string;
|
|
4557
|
+
timeZone: string;
|
|
4558
|
+
};
|
|
4559
|
+
coverage: {
|
|
4560
|
+
content: boolean;
|
|
4561
|
+
};
|
|
4562
|
+
kpis: {
|
|
4563
|
+
views: number;
|
|
4564
|
+
productClicks: number;
|
|
4565
|
+
orders: number;
|
|
4566
|
+
gmv: number;
|
|
4567
|
+
contentCount: number;
|
|
4568
|
+
clickRate: number | null;
|
|
4569
|
+
};
|
|
4570
|
+
dailyTrend: {
|
|
4571
|
+
date: string;
|
|
4572
|
+
views: number;
|
|
4573
|
+
productClicks: number;
|
|
4574
|
+
orders: number;
|
|
4575
|
+
gmv: number;
|
|
4576
|
+
}[];
|
|
4577
|
+
byType: {
|
|
4578
|
+
contentType: string;
|
|
4579
|
+
views: number;
|
|
4580
|
+
gmv: number;
|
|
4581
|
+
orders: number;
|
|
4582
|
+
clicks: number;
|
|
4583
|
+
}[];
|
|
4584
|
+
items: {
|
|
4585
|
+
externalContentId: string | null;
|
|
4586
|
+
/** @description For example `video` or `live`. */
|
|
4587
|
+
contentType: string;
|
|
4588
|
+
title: string;
|
|
4589
|
+
platform: string | null;
|
|
4590
|
+
accountId: string | null;
|
|
4591
|
+
productId: string | null;
|
|
4592
|
+
externalProductId: string | null;
|
|
4593
|
+
productName: string | null;
|
|
4594
|
+
productThumbnailUrl: string | null;
|
|
4595
|
+
/** @description Public link to the video. */
|
|
4596
|
+
contentUrl: string | null;
|
|
4597
|
+
views: number;
|
|
4598
|
+
productClicks: number;
|
|
4599
|
+
orders: number;
|
|
4600
|
+
gmv: number;
|
|
4601
|
+
clickRate: number | null;
|
|
4602
|
+
orderRate: number | null;
|
|
4603
|
+
}[];
|
|
4604
|
+
message: string | null;
|
|
4605
|
+
};
|
|
4606
|
+
};
|
|
4607
|
+
};
|
|
4608
|
+
};
|
|
4609
|
+
/** @description Invalid request */
|
|
4610
|
+
400: {
|
|
4611
|
+
headers: {
|
|
4612
|
+
[name: string]: unknown;
|
|
4613
|
+
};
|
|
4614
|
+
content?: never;
|
|
4615
|
+
};
|
|
4616
|
+
/** @description Unauthorized */
|
|
4617
|
+
401: {
|
|
4618
|
+
headers: {
|
|
4619
|
+
[name: string]: unknown;
|
|
4620
|
+
};
|
|
4621
|
+
content?: never;
|
|
4622
|
+
};
|
|
4623
|
+
/** @description Missing the `analytics:read` scope */
|
|
4624
|
+
403: {
|
|
4625
|
+
headers: {
|
|
4626
|
+
[name: string]: unknown;
|
|
4627
|
+
};
|
|
4628
|
+
content?: never;
|
|
4629
|
+
};
|
|
4630
|
+
/** @description Rate limit exceeded */
|
|
4631
|
+
429: {
|
|
4632
|
+
headers: {
|
|
4633
|
+
[name: string]: unknown;
|
|
4634
|
+
};
|
|
4635
|
+
content?: never;
|
|
4636
|
+
};
|
|
4637
|
+
/** @description Internal Server Error */
|
|
4638
|
+
500: {
|
|
4639
|
+
headers: {
|
|
4640
|
+
[name: string]: unknown;
|
|
4641
|
+
};
|
|
4642
|
+
content?: never;
|
|
4643
|
+
};
|
|
4644
|
+
};
|
|
4645
|
+
};
|
|
4646
|
+
get_v1_analytics_orders: {
|
|
4647
|
+
parameters: {
|
|
4648
|
+
query?: {
|
|
4649
|
+
/** @description Required for session auth. API keys already belong to one organization. */
|
|
4650
|
+
organizationId?: string;
|
|
4651
|
+
/** @description First day of the range (YYYY-MM-DD). Defaults to 29 days before `to`. */
|
|
4652
|
+
from?: string;
|
|
4653
|
+
/** @description Last day of the range, inclusive (YYYY-MM-DD). Defaults to today. */
|
|
4654
|
+
to?: string;
|
|
4655
|
+
/** @description IANA time zone that defines each day, for example `Asia/Kuala_Lumpur`. Defaults to Asia/Singapore. */
|
|
4656
|
+
timeZone?: string;
|
|
4657
|
+
/** @description Comma-separated marketplaces, for example `shopee,lazada`. */
|
|
4658
|
+
marketplace?: string;
|
|
4659
|
+
/** @description Comma-separated countries. One country selects its currency. */
|
|
4660
|
+
country?: string;
|
|
4661
|
+
/** @description Comma-separated store (account) ids from `GET /api/v1/marketplaces/connected`. */
|
|
4662
|
+
store?: string;
|
|
4663
|
+
/** @description ISO currency. Only orders in this currency are counted; amounts are not converted. Defaults to the single country's currency, otherwise SGD. */
|
|
4664
|
+
currency?: string;
|
|
4665
|
+
};
|
|
4666
|
+
header?: never;
|
|
4667
|
+
path?: never;
|
|
4668
|
+
cookie?: never;
|
|
4669
|
+
};
|
|
4670
|
+
requestBody?: never;
|
|
4671
|
+
responses: {
|
|
4672
|
+
/** @description Get Order Analytics */
|
|
4673
|
+
200: {
|
|
4674
|
+
headers: {
|
|
4675
|
+
[name: string]: unknown;
|
|
4676
|
+
};
|
|
4677
|
+
content: {
|
|
4678
|
+
"application/json": {
|
|
4679
|
+
ok: boolean;
|
|
4680
|
+
/** @constant */
|
|
4681
|
+
apiVersion: "developer_v1";
|
|
4682
|
+
operationId: string;
|
|
4683
|
+
/** @enum {string} */
|
|
4684
|
+
status: "accepted" | "completed" | "failed";
|
|
4685
|
+
jobId?: string;
|
|
4686
|
+
productId?: string;
|
|
4687
|
+
warnings: string[];
|
|
4688
|
+
recommendations: string[];
|
|
4689
|
+
links: {
|
|
4690
|
+
[key: string]: string;
|
|
4691
|
+
};
|
|
4692
|
+
data: {
|
|
4693
|
+
filters: {
|
|
4694
|
+
from: string;
|
|
4695
|
+
to: string;
|
|
4696
|
+
marketplace: string;
|
|
4697
|
+
country: string;
|
|
4698
|
+
store: string;
|
|
4699
|
+
/** @description Currency of every amount in the response. */
|
|
4700
|
+
currency: string;
|
|
4701
|
+
timeZone: string;
|
|
4702
|
+
};
|
|
4703
|
+
previousFrom: string;
|
|
4704
|
+
previousTo: string;
|
|
4705
|
+
kpis: {
|
|
4706
|
+
orders: number;
|
|
4707
|
+
netSales: number;
|
|
4708
|
+
/** @description Average order value. */
|
|
4709
|
+
aov: number;
|
|
4710
|
+
unitsSold: number;
|
|
4711
|
+
unitsPerOrder: number;
|
|
4712
|
+
returnedOrders: number;
|
|
4713
|
+
/** @description Share of orders returned, 0 to 1. */
|
|
4714
|
+
returnRate: number;
|
|
4715
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
4716
|
+
ordersChangePercent: number | null;
|
|
4717
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
4718
|
+
netSalesChangePercent: number | null;
|
|
4719
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
4720
|
+
aovChangePercent: number | null;
|
|
4721
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
4722
|
+
unitsChangePercent: number | null;
|
|
4723
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
4724
|
+
returnRateChangePercent: number | null;
|
|
4725
|
+
identifiedBuyers: number;
|
|
4726
|
+
repeatBuyers: number;
|
|
4727
|
+
repeatRate: number | null;
|
|
4728
|
+
cancelledOrders: number;
|
|
4729
|
+
cancelRate: number | null;
|
|
4730
|
+
};
|
|
4731
|
+
statusMix: {
|
|
4732
|
+
status: string;
|
|
4733
|
+
orders: number;
|
|
4734
|
+
netSales: number;
|
|
4735
|
+
}[];
|
|
4736
|
+
platformMix: {
|
|
4737
|
+
platform: string;
|
|
4738
|
+
orders: number;
|
|
4739
|
+
netSales: number;
|
|
4740
|
+
}[];
|
|
4741
|
+
dailyTrend: {
|
|
4742
|
+
date: string;
|
|
4743
|
+
previousDate: string | null;
|
|
4744
|
+
orders: number;
|
|
4745
|
+
netSales: number;
|
|
4746
|
+
previousOrders: number;
|
|
4747
|
+
previousNetSales: number;
|
|
4748
|
+
}[];
|
|
4749
|
+
/** @description Up to 40 products ranked by net sales. */
|
|
4750
|
+
topProducts: {
|
|
4751
|
+
productId: string | null;
|
|
4752
|
+
productName: string;
|
|
4753
|
+
platform: string | null;
|
|
4754
|
+
accountId: string | null;
|
|
4755
|
+
externalProductId: string | null;
|
|
4756
|
+
sku: string | null;
|
|
4757
|
+
thumbnailUrl: string | null;
|
|
4758
|
+
orders: number;
|
|
4759
|
+
unitsSold: number;
|
|
4760
|
+
netSales: number;
|
|
4761
|
+
}[];
|
|
4762
|
+
};
|
|
4763
|
+
};
|
|
4764
|
+
};
|
|
4765
|
+
};
|
|
4766
|
+
/** @description Invalid request */
|
|
4767
|
+
400: {
|
|
4768
|
+
headers: {
|
|
4769
|
+
[name: string]: unknown;
|
|
4770
|
+
};
|
|
4771
|
+
content?: never;
|
|
4772
|
+
};
|
|
4773
|
+
/** @description Unauthorized */
|
|
4774
|
+
401: {
|
|
4775
|
+
headers: {
|
|
4776
|
+
[name: string]: unknown;
|
|
4777
|
+
};
|
|
4778
|
+
content?: never;
|
|
4779
|
+
};
|
|
4780
|
+
/** @description Missing the `analytics:read` scope */
|
|
4781
|
+
403: {
|
|
4782
|
+
headers: {
|
|
4783
|
+
[name: string]: unknown;
|
|
4784
|
+
};
|
|
4785
|
+
content?: never;
|
|
4786
|
+
};
|
|
4787
|
+
/** @description Rate limit exceeded */
|
|
4788
|
+
429: {
|
|
4789
|
+
headers: {
|
|
4790
|
+
[name: string]: unknown;
|
|
4791
|
+
};
|
|
4792
|
+
content?: never;
|
|
4793
|
+
};
|
|
4794
|
+
/** @description Internal Server Error */
|
|
4795
|
+
500: {
|
|
4796
|
+
headers: {
|
|
4797
|
+
[name: string]: unknown;
|
|
4798
|
+
};
|
|
4799
|
+
content?: never;
|
|
4800
|
+
};
|
|
4801
|
+
};
|
|
4802
|
+
};
|
|
4803
|
+
get_v1_analytics_overview: {
|
|
4804
|
+
parameters: {
|
|
4805
|
+
query?: {
|
|
4806
|
+
/** @description Required for session auth. API keys already belong to one organization. */
|
|
4807
|
+
organizationId?: string;
|
|
4808
|
+
/** @description First day of the range (YYYY-MM-DD). Defaults to 29 days before `to`. */
|
|
4809
|
+
from?: string;
|
|
4810
|
+
/** @description Last day of the range, inclusive (YYYY-MM-DD). Defaults to today. */
|
|
4811
|
+
to?: string;
|
|
4812
|
+
/** @description IANA time zone that defines each day, for example `Asia/Kuala_Lumpur`. Defaults to Asia/Singapore. */
|
|
4813
|
+
timeZone?: string;
|
|
4814
|
+
/** @description Comma-separated marketplaces, for example `shopee,lazada`. */
|
|
4815
|
+
marketplace?: string;
|
|
4816
|
+
/** @description Comma-separated countries. One country selects its currency. */
|
|
4817
|
+
country?: string;
|
|
4818
|
+
/** @description Comma-separated store (account) ids from `GET /api/v1/marketplaces/connected`. */
|
|
4819
|
+
store?: string;
|
|
4820
|
+
/** @description ISO currency. Only orders in this currency are counted; amounts are not converted. Defaults to the single country's currency, otherwise SGD. */
|
|
4821
|
+
currency?: string;
|
|
4822
|
+
};
|
|
4823
|
+
header?: never;
|
|
4824
|
+
path?: never;
|
|
4825
|
+
cookie?: never;
|
|
4826
|
+
};
|
|
4827
|
+
requestBody?: never;
|
|
4828
|
+
responses: {
|
|
4829
|
+
/** @description Get Growth Overview */
|
|
4830
|
+
200: {
|
|
4831
|
+
headers: {
|
|
4832
|
+
[name: string]: unknown;
|
|
4833
|
+
};
|
|
4834
|
+
content: {
|
|
4835
|
+
"application/json": {
|
|
4836
|
+
ok: boolean;
|
|
4837
|
+
/** @constant */
|
|
4838
|
+
apiVersion: "developer_v1";
|
|
4839
|
+
operationId: string;
|
|
4840
|
+
/** @enum {string} */
|
|
4841
|
+
status: "accepted" | "completed" | "failed";
|
|
4842
|
+
jobId?: string;
|
|
4843
|
+
productId?: string;
|
|
4844
|
+
warnings: string[];
|
|
4845
|
+
recommendations: string[];
|
|
4846
|
+
links: {
|
|
4847
|
+
[key: string]: string;
|
|
4848
|
+
};
|
|
4849
|
+
data: {
|
|
4850
|
+
filters: {
|
|
4851
|
+
from: string;
|
|
4852
|
+
to: string;
|
|
4853
|
+
marketplace: string;
|
|
4854
|
+
country: string;
|
|
4855
|
+
store: string;
|
|
4856
|
+
/** @description Currency of every amount in the response. */
|
|
4857
|
+
currency: string;
|
|
4858
|
+
timeZone: string;
|
|
4859
|
+
};
|
|
4860
|
+
previousFrom: string;
|
|
4861
|
+
previousTo: string;
|
|
4862
|
+
/** @description `all`, or the single marketplace reported. With one marketplace, `channelMix` is split by store. */
|
|
4863
|
+
marketplaceScope: string;
|
|
4864
|
+
kpis: {
|
|
4865
|
+
grossSales: number;
|
|
4866
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
4867
|
+
grossSalesChangePercent: number | null;
|
|
4868
|
+
netSales: number;
|
|
4869
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
4870
|
+
netSalesChangePercent: number | null;
|
|
4871
|
+
orders: number;
|
|
4872
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
4873
|
+
ordersChangePercent: number | null;
|
|
4874
|
+
unitsSold: number;
|
|
4875
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
4876
|
+
unitsChangePercent: number | null;
|
|
4877
|
+
aov: number | null;
|
|
4878
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
4879
|
+
aovChangePercent: number | null;
|
|
4880
|
+
unitsPerOrder: number | null;
|
|
4881
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
4882
|
+
unitsPerOrderChangePercent: number | null;
|
|
4883
|
+
visitors: number | null;
|
|
4884
|
+
pageviews: number | null;
|
|
4885
|
+
/** @description Visitors who added to cart. */
|
|
4886
|
+
atcUsers: number | null;
|
|
4887
|
+
viewToOrderCvr: number | null;
|
|
4888
|
+
contributionProfit: number | null;
|
|
4889
|
+
adsSpend: number | null;
|
|
4890
|
+
};
|
|
4891
|
+
dailyTrend: {
|
|
4892
|
+
date: string;
|
|
4893
|
+
grossSales: number;
|
|
4894
|
+
netSales: number;
|
|
4895
|
+
orders: number;
|
|
4896
|
+
unitsSold: number;
|
|
4897
|
+
aov: number | null;
|
|
4898
|
+
unitsPerOrder: number | null;
|
|
4899
|
+
visitors: number | null;
|
|
4900
|
+
pageviews: number | null;
|
|
4901
|
+
}[];
|
|
4902
|
+
funnel: {
|
|
4903
|
+
id: string;
|
|
4904
|
+
label: string;
|
|
4905
|
+
value: number | null;
|
|
4906
|
+
covered: boolean;
|
|
4907
|
+
}[];
|
|
4908
|
+
channelMix: {
|
|
4909
|
+
platform: string;
|
|
4910
|
+
accountId: string | null;
|
|
4911
|
+
label: string;
|
|
4912
|
+
netSales: number;
|
|
4913
|
+
orders: number;
|
|
4914
|
+
unitsSold: number;
|
|
4915
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
4916
|
+
changePercent: number | null;
|
|
4917
|
+
}[];
|
|
4918
|
+
topProducts: {
|
|
4919
|
+
productId: string | null;
|
|
4920
|
+
variantId: string | null;
|
|
4921
|
+
sku: string | null;
|
|
4922
|
+
productName: string;
|
|
4923
|
+
thumbnailUrl: string | null;
|
|
4924
|
+
platform: string | null;
|
|
4925
|
+
accountId: string | null;
|
|
4926
|
+
externalProductId: string | null;
|
|
4927
|
+
netSales: number;
|
|
4928
|
+
orders: number;
|
|
4929
|
+
unitsSold: number;
|
|
4930
|
+
/** @description Share of net sales, 0 to 1. */
|
|
4931
|
+
revenueShare: number;
|
|
4932
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
4933
|
+
gmvChangePercent: number | null;
|
|
4934
|
+
}[];
|
|
4935
|
+
laggingProducts: {
|
|
4936
|
+
productId: string | null;
|
|
4937
|
+
variantId: string | null;
|
|
4938
|
+
sku: string | null;
|
|
4939
|
+
productName: string;
|
|
4940
|
+
thumbnailUrl: string | null;
|
|
4941
|
+
platform: string | null;
|
|
4942
|
+
accountId: string | null;
|
|
4943
|
+
externalProductId: string | null;
|
|
4944
|
+
netSales: number;
|
|
4945
|
+
orders: number;
|
|
4946
|
+
unitsSold: number;
|
|
4947
|
+
/** @description Share of net sales, 0 to 1. */
|
|
4948
|
+
revenueShare: number;
|
|
4949
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
4950
|
+
gmvChangePercent: number | null;
|
|
4951
|
+
}[];
|
|
4952
|
+
/** @description Ranked next actions. */
|
|
4953
|
+
insights: {
|
|
4954
|
+
id: string;
|
|
4955
|
+
code: string;
|
|
4956
|
+
/** @enum {string} */
|
|
4957
|
+
severity: "info" | "warn" | "critical" | "opportunity";
|
|
4958
|
+
/** @enum {string} */
|
|
4959
|
+
category:
|
|
4960
|
+
| "conversion"
|
|
4961
|
+
| "profit"
|
|
4962
|
+
| "inventory"
|
|
4963
|
+
| "ads"
|
|
4964
|
+
| "growth"
|
|
4965
|
+
| "data"
|
|
4966
|
+
| "market"
|
|
4967
|
+
| "pricing";
|
|
4968
|
+
title: string;
|
|
4969
|
+
summary: string;
|
|
4970
|
+
impactLabel: string;
|
|
4971
|
+
/** @description 0 to 100, higher first. */
|
|
4972
|
+
impactScore: number;
|
|
4973
|
+
productId: string | null;
|
|
4974
|
+
productName: string | null;
|
|
4975
|
+
}[];
|
|
4976
|
+
/** @description Which data sources have data for this range. */
|
|
4977
|
+
coverage: {
|
|
4978
|
+
sales: boolean;
|
|
4979
|
+
traffic: boolean;
|
|
4980
|
+
ads: boolean;
|
|
4981
|
+
content: boolean;
|
|
4982
|
+
inventory: boolean;
|
|
4983
|
+
profit: boolean;
|
|
4984
|
+
market: boolean;
|
|
4985
|
+
};
|
|
4986
|
+
syncFreshness: {
|
|
4987
|
+
jobType: string;
|
|
4988
|
+
platform: string | null;
|
|
4989
|
+
accountId: string | null;
|
|
4990
|
+
status: string;
|
|
4991
|
+
completedAt: string | null;
|
|
4992
|
+
rowsUpserted: number;
|
|
4993
|
+
}[];
|
|
4994
|
+
};
|
|
4995
|
+
};
|
|
4996
|
+
};
|
|
4997
|
+
};
|
|
4998
|
+
/** @description Invalid request */
|
|
4999
|
+
400: {
|
|
5000
|
+
headers: {
|
|
5001
|
+
[name: string]: unknown;
|
|
5002
|
+
};
|
|
5003
|
+
content?: never;
|
|
5004
|
+
};
|
|
5005
|
+
/** @description Unauthorized */
|
|
5006
|
+
401: {
|
|
5007
|
+
headers: {
|
|
5008
|
+
[name: string]: unknown;
|
|
5009
|
+
};
|
|
5010
|
+
content?: never;
|
|
5011
|
+
};
|
|
5012
|
+
/** @description Missing the `analytics:read` scope */
|
|
5013
|
+
403: {
|
|
5014
|
+
headers: {
|
|
5015
|
+
[name: string]: unknown;
|
|
5016
|
+
};
|
|
5017
|
+
content?: never;
|
|
5018
|
+
};
|
|
5019
|
+
/** @description Rate limit exceeded */
|
|
5020
|
+
429: {
|
|
5021
|
+
headers: {
|
|
5022
|
+
[name: string]: unknown;
|
|
5023
|
+
};
|
|
5024
|
+
content?: never;
|
|
5025
|
+
};
|
|
5026
|
+
/** @description Internal Server Error */
|
|
5027
|
+
500: {
|
|
5028
|
+
headers: {
|
|
5029
|
+
[name: string]: unknown;
|
|
5030
|
+
};
|
|
5031
|
+
content?: never;
|
|
5032
|
+
};
|
|
5033
|
+
};
|
|
5034
|
+
};
|
|
5035
|
+
get_v1_analytics_pricing: {
|
|
5036
|
+
parameters: {
|
|
5037
|
+
query?: {
|
|
5038
|
+
/** @description Required for session auth. API keys already belong to one organization. */
|
|
5039
|
+
organizationId?: string;
|
|
5040
|
+
/** @description First day of the range (YYYY-MM-DD). Defaults to 29 days before `to`. */
|
|
5041
|
+
from?: string;
|
|
5042
|
+
/** @description Last day of the range, inclusive (YYYY-MM-DD). Defaults to today. */
|
|
5043
|
+
to?: string;
|
|
5044
|
+
/** @description IANA time zone that defines each day, for example `Asia/Kuala_Lumpur`. Defaults to Asia/Singapore. */
|
|
5045
|
+
timeZone?: string;
|
|
5046
|
+
/** @description Comma-separated marketplaces, for example `shopee,lazada`. */
|
|
5047
|
+
marketplace?: string;
|
|
5048
|
+
/** @description Comma-separated countries. One country selects its currency. */
|
|
5049
|
+
country?: string;
|
|
5050
|
+
/** @description Comma-separated store (account) ids from `GET /api/v1/marketplaces/connected`. */
|
|
5051
|
+
store?: string;
|
|
5052
|
+
/** @description ISO currency. Only orders in this currency are counted; amounts are not converted. Defaults to the single country's currency, otherwise SGD. */
|
|
5053
|
+
currency?: string;
|
|
5054
|
+
};
|
|
5055
|
+
header?: never;
|
|
5056
|
+
path?: never;
|
|
5057
|
+
cookie?: never;
|
|
5058
|
+
};
|
|
5059
|
+
requestBody?: never;
|
|
5060
|
+
responses: {
|
|
5061
|
+
/** @description Get Pricing Analytics */
|
|
5062
|
+
200: {
|
|
5063
|
+
headers: {
|
|
5064
|
+
[name: string]: unknown;
|
|
5065
|
+
};
|
|
5066
|
+
content: {
|
|
5067
|
+
"application/json": {
|
|
5068
|
+
ok: boolean;
|
|
5069
|
+
/** @constant */
|
|
5070
|
+
apiVersion: "developer_v1";
|
|
5071
|
+
operationId: string;
|
|
5072
|
+
/** @enum {string} */
|
|
5073
|
+
status: "accepted" | "completed" | "failed";
|
|
5074
|
+
jobId?: string;
|
|
5075
|
+
productId?: string;
|
|
5076
|
+
warnings: string[];
|
|
5077
|
+
recommendations: string[];
|
|
5078
|
+
links: {
|
|
5079
|
+
[key: string]: string;
|
|
5080
|
+
};
|
|
5081
|
+
data: {
|
|
5082
|
+
filters: {
|
|
5083
|
+
from: string;
|
|
5084
|
+
to: string;
|
|
5085
|
+
marketplace: string;
|
|
5086
|
+
country: string;
|
|
5087
|
+
store: string;
|
|
5088
|
+
/** @description Currency of every amount in the response. */
|
|
5089
|
+
currency: string;
|
|
5090
|
+
timeZone: string;
|
|
5091
|
+
};
|
|
5092
|
+
/** @description Selling products from the top 30 by net sales. */
|
|
5093
|
+
products: {
|
|
5094
|
+
productId: string | null;
|
|
5095
|
+
productName: string;
|
|
5096
|
+
sku: string | null;
|
|
5097
|
+
netSales: number;
|
|
5098
|
+
unitsSold: number;
|
|
5099
|
+
velocity: number;
|
|
5100
|
+
contributionMargin: number | null;
|
|
5101
|
+
daysOfCover: number | null;
|
|
5102
|
+
catalogCurrency: string | null;
|
|
5103
|
+
listPrice: number | null;
|
|
5104
|
+
salePrice: number | null;
|
|
5105
|
+
discountPct: number | null;
|
|
5106
|
+
peerPriceP50: number | null;
|
|
5107
|
+
recommendation: string;
|
|
5108
|
+
}[];
|
|
5109
|
+
};
|
|
5110
|
+
};
|
|
5111
|
+
};
|
|
5112
|
+
};
|
|
5113
|
+
/** @description Invalid request */
|
|
5114
|
+
400: {
|
|
5115
|
+
headers: {
|
|
5116
|
+
[name: string]: unknown;
|
|
5117
|
+
};
|
|
5118
|
+
content?: never;
|
|
5119
|
+
};
|
|
5120
|
+
/** @description Unauthorized */
|
|
5121
|
+
401: {
|
|
5122
|
+
headers: {
|
|
5123
|
+
[name: string]: unknown;
|
|
5124
|
+
};
|
|
5125
|
+
content?: never;
|
|
5126
|
+
};
|
|
5127
|
+
/** @description Missing the `analytics:read` scope */
|
|
5128
|
+
403: {
|
|
5129
|
+
headers: {
|
|
5130
|
+
[name: string]: unknown;
|
|
5131
|
+
};
|
|
5132
|
+
content?: never;
|
|
5133
|
+
};
|
|
5134
|
+
/** @description Rate limit exceeded */
|
|
5135
|
+
429: {
|
|
5136
|
+
headers: {
|
|
5137
|
+
[name: string]: unknown;
|
|
5138
|
+
};
|
|
5139
|
+
content?: never;
|
|
5140
|
+
};
|
|
5141
|
+
/** @description Internal Server Error */
|
|
5142
|
+
500: {
|
|
5143
|
+
headers: {
|
|
5144
|
+
[name: string]: unknown;
|
|
5145
|
+
};
|
|
5146
|
+
content?: never;
|
|
5147
|
+
};
|
|
5148
|
+
};
|
|
5149
|
+
};
|
|
5150
|
+
get_v1_analytics_products: {
|
|
5151
|
+
parameters: {
|
|
5152
|
+
query?: {
|
|
5153
|
+
/** @description Required for session auth. API keys already belong to one organization. */
|
|
5154
|
+
organizationId?: string;
|
|
5155
|
+
/** @description First day of the range (YYYY-MM-DD). Defaults to 29 days before `to`. */
|
|
5156
|
+
from?: string;
|
|
5157
|
+
/** @description Last day of the range, inclusive (YYYY-MM-DD). Defaults to today. */
|
|
5158
|
+
to?: string;
|
|
5159
|
+
/** @description IANA time zone that defines each day, for example `Asia/Kuala_Lumpur`. Defaults to Asia/Singapore. */
|
|
5160
|
+
timeZone?: string;
|
|
5161
|
+
/** @description Comma-separated marketplaces, for example `shopee,lazada`. */
|
|
5162
|
+
marketplace?: string;
|
|
5163
|
+
/** @description Comma-separated countries. One country selects its currency. */
|
|
5164
|
+
country?: string;
|
|
5165
|
+
/** @description Comma-separated store (account) ids from `GET /api/v1/marketplaces/connected`. */
|
|
5166
|
+
store?: string;
|
|
5167
|
+
/** @description ISO currency. Only orders in this currency are counted; amounts are not converted. Defaults to the single country's currency, otherwise SGD. */
|
|
5168
|
+
currency?: string;
|
|
5169
|
+
/** @description Search product name or SKU. */
|
|
5170
|
+
q?: string;
|
|
5171
|
+
/** @description Comma-separated product or variant UUIDs, up to 50, to report only those products. */
|
|
5172
|
+
productId?: string;
|
|
5173
|
+
/** @description Products to return, ranked by net sales. */
|
|
5174
|
+
limit?: number;
|
|
5175
|
+
};
|
|
5176
|
+
header?: never;
|
|
5177
|
+
path?: never;
|
|
5178
|
+
cookie?: never;
|
|
5179
|
+
};
|
|
5180
|
+
requestBody?: never;
|
|
5181
|
+
responses: {
|
|
5182
|
+
/** @description Get Product Analytics */
|
|
5183
|
+
200: {
|
|
5184
|
+
headers: {
|
|
5185
|
+
[name: string]: unknown;
|
|
5186
|
+
};
|
|
5187
|
+
content: {
|
|
5188
|
+
"application/json": {
|
|
5189
|
+
ok: boolean;
|
|
5190
|
+
/** @constant */
|
|
5191
|
+
apiVersion: "developer_v1";
|
|
5192
|
+
operationId: string;
|
|
5193
|
+
/** @enum {string} */
|
|
5194
|
+
status: "accepted" | "completed" | "failed";
|
|
5195
|
+
jobId?: string;
|
|
5196
|
+
productId?: string;
|
|
5197
|
+
warnings: string[];
|
|
5198
|
+
recommendations: string[];
|
|
5199
|
+
links: {
|
|
5200
|
+
[key: string]: string;
|
|
5201
|
+
};
|
|
5202
|
+
data: {
|
|
5203
|
+
filters: {
|
|
5204
|
+
from: string;
|
|
5205
|
+
to: string;
|
|
5206
|
+
marketplace: string;
|
|
5207
|
+
country: string;
|
|
5208
|
+
store: string;
|
|
5209
|
+
/** @description Currency of every amount in the response. */
|
|
5210
|
+
currency: string;
|
|
5211
|
+
timeZone: string;
|
|
5212
|
+
q: string;
|
|
5213
|
+
};
|
|
5214
|
+
products: {
|
|
5215
|
+
productId: string | null;
|
|
5216
|
+
variantId: string | null;
|
|
5217
|
+
sku: string | null;
|
|
5218
|
+
productName: string;
|
|
5219
|
+
thumbnailUrl: string | null;
|
|
5220
|
+
platform: string | null;
|
|
5221
|
+
accountId: string | null;
|
|
5222
|
+
externalProductId: string | null;
|
|
5223
|
+
gmv: number;
|
|
5224
|
+
netSales: number;
|
|
5225
|
+
orders: number;
|
|
5226
|
+
unitsSold: number;
|
|
5227
|
+
revenueShare: number;
|
|
5228
|
+
/** @description Units sold per day. */
|
|
5229
|
+
velocity: number;
|
|
5230
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
5231
|
+
gmvChangePercent: number | null;
|
|
5232
|
+
impressions: number | null;
|
|
5233
|
+
pageviews: number | null;
|
|
5234
|
+
visitors: number | null;
|
|
5235
|
+
clicks: number | null;
|
|
5236
|
+
atcUsers: number | null;
|
|
5237
|
+
atcUnits: number | null;
|
|
5238
|
+
viewToOrderCvr: number | null;
|
|
5239
|
+
visitorValue: number | null;
|
|
5240
|
+
listingStatus: string | null;
|
|
5241
|
+
channelsLive: number;
|
|
5242
|
+
/** @description Currency of listPrice and salePrice, which can differ from the report currency. */
|
|
5243
|
+
catalogCurrency: string | null;
|
|
5244
|
+
marketPrices: {
|
|
5245
|
+
marketplace: string;
|
|
5246
|
+
storeId: string | null;
|
|
5247
|
+
storeName: string | null;
|
|
5248
|
+
productId: string | null;
|
|
5249
|
+
sellerSku: string | null;
|
|
5250
|
+
variation: string | null;
|
|
5251
|
+
country: string | null;
|
|
5252
|
+
currency: string;
|
|
5253
|
+
price: number | null;
|
|
5254
|
+
salePrice: number | null;
|
|
5255
|
+
saleStartDate: string | null;
|
|
5256
|
+
saleEndDate: string | null;
|
|
5257
|
+
status: string | null;
|
|
5258
|
+
}[];
|
|
5259
|
+
listPrice: number | null;
|
|
5260
|
+
salePrice: number | null;
|
|
5261
|
+
discountPct: number | null;
|
|
5262
|
+
/** @description Units per day during promotions against outside them, as a ratio change. */
|
|
5263
|
+
promoLift: number | null;
|
|
5264
|
+
completenessScore: number | null;
|
|
5265
|
+
lastPublishedAt: string | null;
|
|
5266
|
+
available: number | null;
|
|
5267
|
+
daysOfCover: number | null;
|
|
5268
|
+
stockoutRisk: string | null;
|
|
5269
|
+
cogs: number | null;
|
|
5270
|
+
/** @description Share of sold units with a cost price, 0 to 1. */
|
|
5271
|
+
cogsCoverage: number | null;
|
|
5272
|
+
platformFees: number | null;
|
|
5273
|
+
adsFees: number | null;
|
|
5274
|
+
contributionProfit: number | null;
|
|
5275
|
+
contributionMargin: number | null;
|
|
5276
|
+
returnRate: number | null;
|
|
5277
|
+
refundAmount: number | null;
|
|
5278
|
+
adsSpend: number | null;
|
|
5279
|
+
adsRoas: number | null;
|
|
5280
|
+
adsAcos: number | null;
|
|
5281
|
+
contentGmv: number | null;
|
|
5282
|
+
/** @description Median competitor price. */
|
|
5283
|
+
peerPriceP50: number | null;
|
|
5284
|
+
searchRank: number | null;
|
|
5285
|
+
alerts: {
|
|
5286
|
+
code: string;
|
|
5287
|
+
/** @enum {string} */
|
|
5288
|
+
severity: "info" | "warn" | "critical";
|
|
5289
|
+
message: string;
|
|
5290
|
+
}[];
|
|
5291
|
+
}[];
|
|
5292
|
+
insights: {
|
|
5293
|
+
id: string;
|
|
5294
|
+
code: string;
|
|
5295
|
+
/** @enum {string} */
|
|
5296
|
+
severity: "info" | "warn" | "critical" | "opportunity";
|
|
5297
|
+
/** @enum {string} */
|
|
5298
|
+
category:
|
|
5299
|
+
| "conversion"
|
|
5300
|
+
| "profit"
|
|
5301
|
+
| "inventory"
|
|
5302
|
+
| "ads"
|
|
5303
|
+
| "growth"
|
|
5304
|
+
| "data"
|
|
5305
|
+
| "market"
|
|
5306
|
+
| "pricing";
|
|
5307
|
+
title: string;
|
|
5308
|
+
summary: string;
|
|
5309
|
+
impactLabel: string;
|
|
5310
|
+
/** @description 0 to 100, higher first. */
|
|
5311
|
+
impactScore: number;
|
|
5312
|
+
productId: string | null;
|
|
5313
|
+
productName: string | null;
|
|
5314
|
+
}[];
|
|
5315
|
+
/** @description Which data sources have data for this range. */
|
|
5316
|
+
coverage: {
|
|
5317
|
+
sales: boolean;
|
|
5318
|
+
traffic: boolean;
|
|
5319
|
+
ads: boolean;
|
|
5320
|
+
content: boolean;
|
|
5321
|
+
inventory: boolean;
|
|
5322
|
+
profit: boolean;
|
|
5323
|
+
market: boolean;
|
|
5324
|
+
};
|
|
5325
|
+
};
|
|
5326
|
+
};
|
|
5327
|
+
};
|
|
5328
|
+
};
|
|
5329
|
+
/** @description Invalid request */
|
|
5330
|
+
400: {
|
|
5331
|
+
headers: {
|
|
5332
|
+
[name: string]: unknown;
|
|
5333
|
+
};
|
|
5334
|
+
content?: never;
|
|
5335
|
+
};
|
|
5336
|
+
/** @description Unauthorized */
|
|
5337
|
+
401: {
|
|
5338
|
+
headers: {
|
|
5339
|
+
[name: string]: unknown;
|
|
5340
|
+
};
|
|
5341
|
+
content?: never;
|
|
5342
|
+
};
|
|
5343
|
+
/** @description Missing the `analytics:read` scope */
|
|
5344
|
+
403: {
|
|
5345
|
+
headers: {
|
|
5346
|
+
[name: string]: unknown;
|
|
5347
|
+
};
|
|
5348
|
+
content?: never;
|
|
5349
|
+
};
|
|
5350
|
+
/** @description Rate limit exceeded */
|
|
5351
|
+
429: {
|
|
5352
|
+
headers: {
|
|
5353
|
+
[name: string]: unknown;
|
|
5354
|
+
};
|
|
5355
|
+
content?: never;
|
|
5356
|
+
};
|
|
5357
|
+
/** @description Internal Server Error */
|
|
5358
|
+
500: {
|
|
5359
|
+
headers: {
|
|
5360
|
+
[name: string]: unknown;
|
|
5361
|
+
};
|
|
5362
|
+
content?: never;
|
|
5363
|
+
};
|
|
5364
|
+
};
|
|
5365
|
+
};
|
|
5366
|
+
get_v1_analytics_profit: {
|
|
5367
|
+
parameters: {
|
|
5368
|
+
query?: {
|
|
5369
|
+
/** @description Required for session auth. API keys already belong to one organization. */
|
|
5370
|
+
organizationId?: string;
|
|
5371
|
+
/** @description First day of the range (YYYY-MM-DD). Defaults to 29 days before `to`. */
|
|
5372
|
+
from?: string;
|
|
5373
|
+
/** @description Last day of the range, inclusive (YYYY-MM-DD). Defaults to today. */
|
|
5374
|
+
to?: string;
|
|
5375
|
+
/** @description IANA time zone that defines each day, for example `Asia/Kuala_Lumpur`. Defaults to Asia/Singapore. */
|
|
5376
|
+
timeZone?: string;
|
|
5377
|
+
/** @description Comma-separated marketplaces, for example `shopee,lazada`. */
|
|
5378
|
+
marketplace?: string;
|
|
5379
|
+
/** @description Comma-separated countries. One country selects its currency. */
|
|
5380
|
+
country?: string;
|
|
5381
|
+
/** @description Comma-separated store (account) ids from `GET /api/v1/marketplaces/connected`. */
|
|
5382
|
+
store?: string;
|
|
5383
|
+
/** @description ISO currency. Only orders in this currency are counted; amounts are not converted. Defaults to the single country's currency, otherwise SGD. */
|
|
5384
|
+
currency?: string;
|
|
5385
|
+
/** @description Comma-separated SKUs to report only those products. */
|
|
5386
|
+
sku?: string;
|
|
5387
|
+
};
|
|
5388
|
+
header?: never;
|
|
5389
|
+
path?: never;
|
|
5390
|
+
cookie?: never;
|
|
5391
|
+
};
|
|
5392
|
+
requestBody?: never;
|
|
5393
|
+
responses: {
|
|
5394
|
+
/** @description Get Profit Analytics */
|
|
5395
|
+
200: {
|
|
5396
|
+
headers: {
|
|
5397
|
+
[name: string]: unknown;
|
|
5398
|
+
};
|
|
5399
|
+
content: {
|
|
5400
|
+
"application/json": {
|
|
5401
|
+
ok: boolean;
|
|
5402
|
+
/** @constant */
|
|
5403
|
+
apiVersion: "developer_v1";
|
|
5404
|
+
operationId: string;
|
|
5405
|
+
/** @enum {string} */
|
|
5406
|
+
status: "accepted" | "completed" | "failed";
|
|
5407
|
+
jobId?: string;
|
|
5408
|
+
productId?: string;
|
|
5409
|
+
warnings: string[];
|
|
5410
|
+
recommendations: string[];
|
|
5411
|
+
links: {
|
|
5412
|
+
[key: string]: string;
|
|
5413
|
+
};
|
|
5414
|
+
data: {
|
|
5415
|
+
filters: {
|
|
5416
|
+
from: string;
|
|
5417
|
+
to: string;
|
|
5418
|
+
marketplace: string;
|
|
5419
|
+
country: string;
|
|
5420
|
+
store: string;
|
|
5421
|
+
/** @description Currency of every amount in the response. */
|
|
5422
|
+
currency: string;
|
|
5423
|
+
timeZone: string;
|
|
5424
|
+
sku: string;
|
|
5425
|
+
};
|
|
5426
|
+
/**
|
|
5427
|
+
* @description `profit` when cost prices cover sales, otherwise `earnings` (revenue after fees).
|
|
5428
|
+
* @enum {string}
|
|
5429
|
+
*/
|
|
5430
|
+
reportingBasis: "earnings" | "profit";
|
|
5431
|
+
currentRange: {
|
|
5432
|
+
from: string;
|
|
5433
|
+
to: string;
|
|
5434
|
+
};
|
|
5435
|
+
previousRange: {
|
|
5436
|
+
from: string;
|
|
5437
|
+
to: string;
|
|
5438
|
+
};
|
|
5439
|
+
metricCards: {
|
|
5440
|
+
/** @enum {string} */
|
|
5441
|
+
id:
|
|
5442
|
+
| "net_revenue"
|
|
5443
|
+
| "total_costs"
|
|
5444
|
+
| "net_profit"
|
|
5445
|
+
| "net_margin"
|
|
5446
|
+
| "marketplace_costs"
|
|
5447
|
+
| "earnings_after_fees"
|
|
5448
|
+
| "earnings_rate";
|
|
5449
|
+
label: string;
|
|
5450
|
+
value: number | null;
|
|
5451
|
+
/** @enum {string} */
|
|
5452
|
+
unit: "currency" | "percent";
|
|
5453
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
5454
|
+
changePercent: number | null;
|
|
5455
|
+
}[];
|
|
5456
|
+
dailyTrend: {
|
|
5457
|
+
date: string;
|
|
5458
|
+
netRevenue: number;
|
|
5459
|
+
netProfit: number | null;
|
|
5460
|
+
earningsAfterFees: number;
|
|
5461
|
+
}[];
|
|
5462
|
+
waterfall: {
|
|
5463
|
+
/** @enum {string} */
|
|
5464
|
+
id:
|
|
5465
|
+
| "gross_sales"
|
|
5466
|
+
| "discounts"
|
|
5467
|
+
| "returns"
|
|
5468
|
+
| "platform_fees"
|
|
5469
|
+
| "cogs"
|
|
5470
|
+
| "fulfillment"
|
|
5471
|
+
| "operating"
|
|
5472
|
+
| "net_profit"
|
|
5473
|
+
| "earnings_after_fees";
|
|
5474
|
+
label: string;
|
|
5475
|
+
amount: number | null;
|
|
5476
|
+
/** @enum {string} */
|
|
5477
|
+
kind: "positive" | "negative" | "result";
|
|
5478
|
+
}[];
|
|
5479
|
+
breakdownSections: {
|
|
5480
|
+
/** @enum {string} */
|
|
5481
|
+
id:
|
|
5482
|
+
| "revenue"
|
|
5483
|
+
| "platform_fees"
|
|
5484
|
+
| "cogs"
|
|
5485
|
+
| "fulfillment"
|
|
5486
|
+
| "operating";
|
|
5487
|
+
title: string;
|
|
5488
|
+
total: number;
|
|
5489
|
+
rows: {
|
|
5490
|
+
id: string;
|
|
5491
|
+
label: string;
|
|
5492
|
+
amount: number;
|
|
5493
|
+
/** @enum {string} */
|
|
5494
|
+
unit: "currency" | "percent";
|
|
5495
|
+
}[];
|
|
5496
|
+
}[];
|
|
5497
|
+
insights: {
|
|
5498
|
+
id: string;
|
|
5499
|
+
title: string;
|
|
5500
|
+
description: string;
|
|
5501
|
+
/** @enum {string} */
|
|
5502
|
+
tone: "positive" | "warning" | "neutral";
|
|
5503
|
+
}[];
|
|
5504
|
+
profitabilitySnapshot: {
|
|
5505
|
+
marketplaceCosts: number;
|
|
5506
|
+
earningsAfterFees: number;
|
|
5507
|
+
earningsRate: number;
|
|
5508
|
+
totalKnownCosts: number;
|
|
5509
|
+
ordersInRange: number;
|
|
5510
|
+
costRatio: number;
|
|
5511
|
+
shippingRatio: number;
|
|
5512
|
+
uncostedUnits: number;
|
|
5513
|
+
};
|
|
5514
|
+
/** @description Sold products without a cost price. */
|
|
5515
|
+
missingCostProducts: {
|
|
5516
|
+
productId: string;
|
|
5517
|
+
variantId: string | null;
|
|
5518
|
+
name: string;
|
|
5519
|
+
variantName: string | null;
|
|
5520
|
+
thumbnailUrl: string | null;
|
|
5521
|
+
sku: string | null;
|
|
5522
|
+
soldUnits: number;
|
|
5523
|
+
marketplaces: string[];
|
|
5524
|
+
countries: string[];
|
|
5525
|
+
}[];
|
|
5526
|
+
topProducts: {
|
|
5527
|
+
productId: string;
|
|
5528
|
+
variantId: string | null;
|
|
5529
|
+
name: string;
|
|
5530
|
+
variantName: string | null;
|
|
5531
|
+
thumbnailUrl: string | null;
|
|
5532
|
+
sku: string | null;
|
|
5533
|
+
unitsSold: number;
|
|
5534
|
+
totalRevenue: number;
|
|
5535
|
+
totalCogs: number;
|
|
5536
|
+
/** @description Marketplace and fulfillment fees allocated to the product. */
|
|
5537
|
+
totalFees: number;
|
|
5538
|
+
earningsAfterFees: number;
|
|
5539
|
+
earningsRate: number;
|
|
5540
|
+
/** @description Null until every sold unit has a cost price. */
|
|
5541
|
+
totalProfit: number | null;
|
|
5542
|
+
profitMargin: number | null;
|
|
5543
|
+
/** @description Profit counting only units with a cost price. */
|
|
5544
|
+
knownCostProfit: number;
|
|
5545
|
+
knownCostMargin: number;
|
|
5546
|
+
/** @description Share of sold units with a cost price, 0 to 1. */
|
|
5547
|
+
costCoverage: number;
|
|
5548
|
+
marketplaces: string[];
|
|
5549
|
+
}[];
|
|
5550
|
+
underperformingProducts: {
|
|
5551
|
+
productId: string;
|
|
5552
|
+
variantId: string | null;
|
|
5553
|
+
name: string;
|
|
5554
|
+
variantName: string | null;
|
|
5555
|
+
thumbnailUrl: string | null;
|
|
5556
|
+
sku: string | null;
|
|
5557
|
+
unitsSold: number;
|
|
5558
|
+
totalRevenue: number;
|
|
5559
|
+
totalCogs: number;
|
|
5560
|
+
/** @description Marketplace and fulfillment fees allocated to the product. */
|
|
5561
|
+
totalFees: number;
|
|
5562
|
+
earningsAfterFees: number;
|
|
5563
|
+
earningsRate: number;
|
|
5564
|
+
/** @description Null until every sold unit has a cost price. */
|
|
5565
|
+
totalProfit: number | null;
|
|
5566
|
+
profitMargin: number | null;
|
|
5567
|
+
/** @description Profit counting only units with a cost price. */
|
|
5568
|
+
knownCostProfit: number;
|
|
5569
|
+
knownCostMargin: number;
|
|
5570
|
+
/** @description Share of sold units with a cost price, 0 to 1. */
|
|
5571
|
+
costCoverage: number;
|
|
5572
|
+
marketplaces: string[];
|
|
5573
|
+
}[];
|
|
5574
|
+
/** @description Sales against the historical retail price, when price books record one. */
|
|
5575
|
+
retailUplift: {
|
|
5576
|
+
currency: string;
|
|
5577
|
+
soldUnits: number;
|
|
5578
|
+
coveredUnits: number;
|
|
5579
|
+
missingBaselineUnits: number;
|
|
5580
|
+
priceBookRecordedUnits: number;
|
|
5581
|
+
retailValue: number | null;
|
|
5582
|
+
salesValue: number | null;
|
|
5583
|
+
upliftAmount: number | null;
|
|
5584
|
+
markupRate: number | null;
|
|
5585
|
+
} | null;
|
|
5586
|
+
notes: string[];
|
|
5587
|
+
};
|
|
5588
|
+
};
|
|
5589
|
+
};
|
|
5590
|
+
};
|
|
5591
|
+
/** @description Invalid request */
|
|
5592
|
+
400: {
|
|
5593
|
+
headers: {
|
|
5594
|
+
[name: string]: unknown;
|
|
5595
|
+
};
|
|
5596
|
+
content?: never;
|
|
5597
|
+
};
|
|
5598
|
+
/** @description Unauthorized */
|
|
5599
|
+
401: {
|
|
5600
|
+
headers: {
|
|
5601
|
+
[name: string]: unknown;
|
|
5602
|
+
};
|
|
5603
|
+
content?: never;
|
|
5604
|
+
};
|
|
5605
|
+
/** @description Missing the `analytics:read` scope */
|
|
5606
|
+
403: {
|
|
5607
|
+
headers: {
|
|
5608
|
+
[name: string]: unknown;
|
|
5609
|
+
};
|
|
5610
|
+
content?: never;
|
|
5611
|
+
};
|
|
5612
|
+
/** @description Rate limit exceeded */
|
|
5613
|
+
429: {
|
|
5614
|
+
headers: {
|
|
5615
|
+
[name: string]: unknown;
|
|
5616
|
+
};
|
|
5617
|
+
content?: never;
|
|
5618
|
+
};
|
|
5619
|
+
/** @description Internal Server Error */
|
|
5620
|
+
500: {
|
|
5621
|
+
headers: {
|
|
5622
|
+
[name: string]: unknown;
|
|
5623
|
+
};
|
|
5624
|
+
content?: never;
|
|
5625
|
+
};
|
|
5626
|
+
};
|
|
5627
|
+
};
|
|
5628
|
+
get_v1_analytics_reports: {
|
|
5629
|
+
parameters: {
|
|
5630
|
+
query?: {
|
|
5631
|
+
/** @description Required for session auth. API keys already belong to one organization. */
|
|
5632
|
+
organizationId?: string;
|
|
5633
|
+
/** @description First day of the range (YYYY-MM-DD). Defaults to 29 days before `to`. */
|
|
5634
|
+
from?: string;
|
|
5635
|
+
/** @description Last day of the range, inclusive (YYYY-MM-DD). Defaults to today. */
|
|
5636
|
+
to?: string;
|
|
5637
|
+
/** @description IANA time zone that defines each day, for example `Asia/Kuala_Lumpur`. Defaults to Asia/Singapore. */
|
|
5638
|
+
timeZone?: string;
|
|
5639
|
+
/** @description Comma-separated marketplaces, for example `shopee,lazada`. */
|
|
5640
|
+
marketplace?: string;
|
|
5641
|
+
/** @description Comma-separated countries. One country selects its currency. */
|
|
5642
|
+
country?: string;
|
|
5643
|
+
/** @description Comma-separated store (account) ids from `GET /api/v1/marketplaces/connected`. */
|
|
5644
|
+
store?: string;
|
|
5645
|
+
/** @description ISO currency. Only orders in this currency are counted; amounts are not converted. Defaults to the single country's currency, otherwise SGD. */
|
|
5646
|
+
currency?: string;
|
|
5647
|
+
};
|
|
5648
|
+
header?: never;
|
|
5649
|
+
path?: never;
|
|
5650
|
+
cookie?: never;
|
|
5651
|
+
};
|
|
5652
|
+
requestBody?: never;
|
|
5653
|
+
responses: {
|
|
5654
|
+
/** @description Get Business Report */
|
|
5655
|
+
200: {
|
|
5656
|
+
headers: {
|
|
5657
|
+
[name: string]: unknown;
|
|
5658
|
+
};
|
|
5659
|
+
content: {
|
|
5660
|
+
"application/json": {
|
|
5661
|
+
ok: boolean;
|
|
5662
|
+
/** @constant */
|
|
5663
|
+
apiVersion: "developer_v1";
|
|
5664
|
+
operationId: string;
|
|
5665
|
+
/** @enum {string} */
|
|
5666
|
+
status: "accepted" | "completed" | "failed";
|
|
5667
|
+
jobId?: string;
|
|
5668
|
+
productId?: string;
|
|
5669
|
+
warnings: string[];
|
|
5670
|
+
recommendations: string[];
|
|
5671
|
+
links: {
|
|
5672
|
+
[key: string]: string;
|
|
5673
|
+
};
|
|
5674
|
+
data: {
|
|
5675
|
+
filters: {
|
|
5676
|
+
from: string;
|
|
5677
|
+
to: string;
|
|
5678
|
+
marketplace: string;
|
|
5679
|
+
country: string;
|
|
5680
|
+
store: string;
|
|
5681
|
+
/** @description Currency of every amount in the response. */
|
|
5682
|
+
currency: string;
|
|
5683
|
+
timeZone: string;
|
|
5684
|
+
};
|
|
5685
|
+
kpis: {
|
|
5686
|
+
id: string;
|
|
5687
|
+
label: string;
|
|
5688
|
+
value: number | null;
|
|
5689
|
+
previous: number | null;
|
|
5690
|
+
/** @enum {string} */
|
|
5691
|
+
unit: "currency" | "number" | "percent";
|
|
5692
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
5693
|
+
changePercent: number | null;
|
|
5694
|
+
}[];
|
|
5695
|
+
topProducts: {
|
|
5696
|
+
productId: string | null;
|
|
5697
|
+
variantId: string | null;
|
|
5698
|
+
name: string;
|
|
5699
|
+
variantName: string | null;
|
|
5700
|
+
sku: string | null;
|
|
5701
|
+
thumbnailUrl: string | null;
|
|
5702
|
+
totalRevenue: number;
|
|
5703
|
+
}[];
|
|
5704
|
+
marketplaceBreakdown: {
|
|
5705
|
+
platform: string;
|
|
5706
|
+
country: string | null;
|
|
5707
|
+
revenue: number;
|
|
5708
|
+
orders: number;
|
|
5709
|
+
share: number;
|
|
5710
|
+
}[];
|
|
5711
|
+
alerts: {
|
|
5712
|
+
id: string;
|
|
5713
|
+
title: string;
|
|
5714
|
+
description: string;
|
|
5715
|
+
/** @enum {string} */
|
|
5716
|
+
tone: "warning" | "neutral" | "positive";
|
|
5717
|
+
}[];
|
|
5718
|
+
settlements: {
|
|
5719
|
+
ordersCount: number;
|
|
5720
|
+
withFinanceCount: number;
|
|
5721
|
+
missingFinanceCount: number;
|
|
5722
|
+
grossSales: number;
|
|
5723
|
+
netSettlement: number;
|
|
5724
|
+
platformFees: number;
|
|
5725
|
+
fulfillmentFees: number;
|
|
5726
|
+
};
|
|
5727
|
+
dataQuality: {
|
|
5728
|
+
generatedAt: string;
|
|
5729
|
+
lastOrderUpdatedAt: string | null;
|
|
5730
|
+
lastFinanceEventAt: string | null;
|
|
5731
|
+
financeCoverage: number;
|
|
5732
|
+
costCoverage: number;
|
|
5733
|
+
profitComplete: boolean;
|
|
5734
|
+
};
|
|
5735
|
+
};
|
|
5736
|
+
};
|
|
5737
|
+
};
|
|
5738
|
+
};
|
|
5739
|
+
/** @description Invalid request */
|
|
3900
5740
|
400: {
|
|
3901
5741
|
headers: {
|
|
3902
5742
|
[name: string]: unknown;
|
|
@@ -3910,28 +5750,21 @@ interface operations {
|
|
|
3910
5750
|
};
|
|
3911
5751
|
content?: never;
|
|
3912
5752
|
};
|
|
3913
|
-
/** @description
|
|
3914
|
-
402: {
|
|
3915
|
-
headers: {
|
|
3916
|
-
[name: string]: unknown;
|
|
3917
|
-
};
|
|
3918
|
-
content?: never;
|
|
3919
|
-
};
|
|
3920
|
-
/** @description Missing agents:invoke scope or Assistant access */
|
|
5753
|
+
/** @description Missing the `analytics:read` scope */
|
|
3921
5754
|
403: {
|
|
3922
5755
|
headers: {
|
|
3923
5756
|
[name: string]: unknown;
|
|
3924
5757
|
};
|
|
3925
5758
|
content?: never;
|
|
3926
5759
|
};
|
|
3927
|
-
/** @description
|
|
3928
|
-
|
|
5760
|
+
/** @description Rate limit exceeded */
|
|
5761
|
+
429: {
|
|
3929
5762
|
headers: {
|
|
3930
5763
|
[name: string]: unknown;
|
|
3931
5764
|
};
|
|
3932
5765
|
content?: never;
|
|
3933
5766
|
};
|
|
3934
|
-
/** @description
|
|
5767
|
+
/** @description Internal Server Error */
|
|
3935
5768
|
500: {
|
|
3936
5769
|
headers: {
|
|
3937
5770
|
[name: string]: unknown;
|
|
@@ -3940,69 +5773,118 @@ interface operations {
|
|
|
3940
5773
|
};
|
|
3941
5774
|
};
|
|
3942
5775
|
};
|
|
3943
|
-
|
|
5776
|
+
get_v1_analytics_stores: {
|
|
3944
5777
|
parameters: {
|
|
3945
5778
|
query?: {
|
|
3946
|
-
/** @description Required for session auth.
|
|
5779
|
+
/** @description Required for session auth. API keys already belong to one organization. */
|
|
3947
5780
|
organizationId?: string;
|
|
5781
|
+
/** @description First day of the range (YYYY-MM-DD). Defaults to 29 days before `to`. */
|
|
5782
|
+
from?: string;
|
|
5783
|
+
/** @description Last day of the range, inclusive (YYYY-MM-DD). Defaults to today. */
|
|
5784
|
+
to?: string;
|
|
5785
|
+
/** @description IANA time zone that defines each day, for example `Asia/Kuala_Lumpur`. Defaults to Asia/Singapore. */
|
|
5786
|
+
timeZone?: string;
|
|
5787
|
+
/** @description Comma-separated marketplaces, for example `shopee,lazada`. */
|
|
5788
|
+
marketplace?: string;
|
|
5789
|
+
/** @description Comma-separated countries. One country selects its currency. */
|
|
5790
|
+
country?: string;
|
|
5791
|
+
/** @description Comma-separated store (account) ids from `GET /api/v1/marketplaces/connected`. */
|
|
5792
|
+
store?: string;
|
|
5793
|
+
/** @description ISO currency. Only orders in this currency are counted; amounts are not converted. Defaults to the single country's currency, otherwise SGD. */
|
|
5794
|
+
currency?: string;
|
|
3948
5795
|
};
|
|
3949
5796
|
header?: never;
|
|
3950
|
-
path
|
|
3951
|
-
runId: string;
|
|
3952
|
-
};
|
|
5797
|
+
path?: never;
|
|
3953
5798
|
cookie?: never;
|
|
3954
5799
|
};
|
|
3955
5800
|
requestBody?: never;
|
|
3956
5801
|
responses: {
|
|
3957
|
-
/** @description
|
|
5802
|
+
/** @description Get Store Analytics */
|
|
3958
5803
|
200: {
|
|
3959
5804
|
headers: {
|
|
3960
|
-
/** @description Seconds to wait before polling again. Sent while the run is queued or running. */
|
|
3961
|
-
"Retry-After"?: number;
|
|
3962
5805
|
[name: string]: unknown;
|
|
3963
5806
|
};
|
|
3964
5807
|
content: {
|
|
3965
5808
|
"application/json": {
|
|
3966
|
-
|
|
3967
|
-
|
|
5809
|
+
ok: boolean;
|
|
5810
|
+
/** @constant */
|
|
5811
|
+
apiVersion: "developer_v1";
|
|
5812
|
+
operationId: string;
|
|
3968
5813
|
/** @enum {string} */
|
|
3969
|
-
status:
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
5814
|
+
status: "accepted" | "completed" | "failed";
|
|
5815
|
+
jobId?: string;
|
|
5816
|
+
productId?: string;
|
|
5817
|
+
warnings: string[];
|
|
5818
|
+
recommendations: string[];
|
|
5819
|
+
links: {
|
|
5820
|
+
[key: string]: string;
|
|
5821
|
+
};
|
|
5822
|
+
data: {
|
|
5823
|
+
filters: {
|
|
5824
|
+
from: string;
|
|
5825
|
+
to: string;
|
|
5826
|
+
marketplace: string;
|
|
5827
|
+
country: string;
|
|
5828
|
+
store: string;
|
|
5829
|
+
/** @description Currency of every amount in the response. */
|
|
5830
|
+
currency: string;
|
|
5831
|
+
timeZone: string;
|
|
5832
|
+
};
|
|
5833
|
+
hasData: boolean;
|
|
5834
|
+
totals: {
|
|
5835
|
+
visitors: number;
|
|
5836
|
+
pageViews: number;
|
|
5837
|
+
newVisitors: number;
|
|
5838
|
+
returningVisitors: number;
|
|
5839
|
+
newFollowers: number;
|
|
5840
|
+
averagePageViews: number | null;
|
|
5841
|
+
averageStaySeconds: number | null;
|
|
5842
|
+
placedBuyers: number;
|
|
5843
|
+
placedUnits: number;
|
|
5844
|
+
placedOrders: number;
|
|
5845
|
+
placedSales: number;
|
|
5846
|
+
paidBuyers: number;
|
|
5847
|
+
paidUnits: number;
|
|
5848
|
+
paidOrders: number;
|
|
5849
|
+
paidSales: number;
|
|
5850
|
+
confirmedBuyers: number;
|
|
5851
|
+
confirmedUnits: number;
|
|
5852
|
+
confirmedOrders: number;
|
|
5853
|
+
confirmedSales: number;
|
|
5854
|
+
bounceRate: number | null;
|
|
5855
|
+
visitorToPlacedRate: number | null;
|
|
5856
|
+
visitorToPaidRate: number | null;
|
|
5857
|
+
visitorToConfirmedRate: number | null;
|
|
5858
|
+
placedToPaidRate: number | null;
|
|
5859
|
+
placedToConfirmedRate: number | null;
|
|
5860
|
+
};
|
|
5861
|
+
trend: {
|
|
5862
|
+
date: string;
|
|
5863
|
+
visitors: number;
|
|
5864
|
+
pageViews: number;
|
|
5865
|
+
paidOrders: number;
|
|
5866
|
+
paidSales: number;
|
|
3987
5867
|
}[];
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
5868
|
+
deviceBreakdown: {
|
|
5869
|
+
/** @enum {string} */
|
|
5870
|
+
device: "app" | "pc";
|
|
5871
|
+
visitors: number;
|
|
5872
|
+
pageViews: number;
|
|
5873
|
+
newVisitors: number;
|
|
5874
|
+
returningVisitors: number;
|
|
5875
|
+
bounceRate: number | null;
|
|
5876
|
+
}[];
|
|
5877
|
+
coverage: {
|
|
5878
|
+
platforms: string[];
|
|
5879
|
+
sources: string[];
|
|
5880
|
+
firstDate: string | null;
|
|
5881
|
+
lastDate: string | null;
|
|
5882
|
+
};
|
|
5883
|
+
};
|
|
4002
5884
|
};
|
|
4003
5885
|
};
|
|
4004
5886
|
};
|
|
4005
|
-
/** @description Invalid
|
|
5887
|
+
/** @description Invalid request */
|
|
4006
5888
|
400: {
|
|
4007
5889
|
headers: {
|
|
4008
5890
|
[name: string]: unknown;
|
|
@@ -4016,15 +5898,22 @@ interface operations {
|
|
|
4016
5898
|
};
|
|
4017
5899
|
content?: never;
|
|
4018
5900
|
};
|
|
4019
|
-
/** @description Missing
|
|
5901
|
+
/** @description Missing the `analytics:read` scope */
|
|
4020
5902
|
403: {
|
|
4021
5903
|
headers: {
|
|
4022
5904
|
[name: string]: unknown;
|
|
4023
5905
|
};
|
|
4024
5906
|
content?: never;
|
|
4025
5907
|
};
|
|
4026
|
-
/** @description
|
|
4027
|
-
|
|
5908
|
+
/** @description Rate limit exceeded */
|
|
5909
|
+
429: {
|
|
5910
|
+
headers: {
|
|
5911
|
+
[name: string]: unknown;
|
|
5912
|
+
};
|
|
5913
|
+
content?: never;
|
|
5914
|
+
};
|
|
5915
|
+
/** @description Internal Server Error */
|
|
5916
|
+
500: {
|
|
4028
5917
|
headers: {
|
|
4029
5918
|
[name: string]: unknown;
|
|
4030
5919
|
};
|
|
@@ -4032,7 +5921,7 @@ interface operations {
|
|
|
4032
5921
|
};
|
|
4033
5922
|
};
|
|
4034
5923
|
};
|
|
4035
|
-
|
|
5924
|
+
get_v1_analytics_traffic: {
|
|
4036
5925
|
parameters: {
|
|
4037
5926
|
query?: {
|
|
4038
5927
|
/** @description Required for session auth. API keys already belong to one organization. */
|
|
@@ -4041,6 +5930,8 @@ interface operations {
|
|
|
4041
5930
|
from?: string;
|
|
4042
5931
|
/** @description Last day of the range, inclusive (YYYY-MM-DD). Defaults to today. */
|
|
4043
5932
|
to?: string;
|
|
5933
|
+
/** @description IANA time zone that defines each day, for example `Asia/Kuala_Lumpur`. Defaults to Asia/Singapore. */
|
|
5934
|
+
timeZone?: string;
|
|
4044
5935
|
/** @description Comma-separated marketplaces, for example `shopee,lazada`. */
|
|
4045
5936
|
marketplace?: string;
|
|
4046
5937
|
/** @description Comma-separated countries. One country selects its currency. */
|
|
@@ -4049,8 +5940,6 @@ interface operations {
|
|
|
4049
5940
|
store?: string;
|
|
4050
5941
|
/** @description ISO currency. Only orders in this currency are counted; amounts are not converted. Defaults to the single country's currency, otherwise SGD. */
|
|
4051
5942
|
currency?: string;
|
|
4052
|
-
/** @description IANA time zone that defines each day, for example `Asia/Kuala_Lumpur`. Defaults to Asia/Singapore. */
|
|
4053
|
-
timeZone?: string;
|
|
4054
5943
|
};
|
|
4055
5944
|
header?: never;
|
|
4056
5945
|
path?: never;
|
|
@@ -4058,7 +5947,7 @@ interface operations {
|
|
|
4058
5947
|
};
|
|
4059
5948
|
requestBody?: never;
|
|
4060
5949
|
responses: {
|
|
4061
|
-
/** @description
|
|
5950
|
+
/** @description Get Traffic Analytics */
|
|
4062
5951
|
200: {
|
|
4063
5952
|
headers: {
|
|
4064
5953
|
[name: string]: unknown;
|
|
@@ -4092,62 +5981,123 @@ interface operations {
|
|
|
4092
5981
|
previousFrom: string;
|
|
4093
5982
|
previousTo: string;
|
|
4094
5983
|
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;
|
|
4104
|
-
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
4105
|
-
ordersChangePercent: number | null;
|
|
5984
|
+
impressions: number | null;
|
|
4106
5985
|
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
4107
|
-
|
|
5986
|
+
impressionsChangePercent: number | null;
|
|
5987
|
+
pageviews: number | null;
|
|
4108
5988
|
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
4109
|
-
|
|
5989
|
+
pageviewsChangePercent: number | null;
|
|
5990
|
+
visitors: number | null;
|
|
4110
5991
|
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
4111
|
-
|
|
5992
|
+
visitorsChangePercent: number | null;
|
|
5993
|
+
clicks: number | null;
|
|
5994
|
+
/** @description Visitors who added to cart. */
|
|
5995
|
+
atcUsers: number | null;
|
|
4112
5996
|
/** @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;
|
|
5997
|
+
atcUsersChangePercent: number | null;
|
|
4127
5998
|
orders: number;
|
|
5999
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
6000
|
+
ordersChangePercent: number | null;
|
|
4128
6001
|
netSales: number;
|
|
6002
|
+
ctr: number | null;
|
|
6003
|
+
viewToOrderCvr: number | null;
|
|
6004
|
+
/** @description Change against the previous period of equal length. Null without a baseline. */
|
|
6005
|
+
viewToOrderCvrChangePercent: number | null;
|
|
6006
|
+
visitToAtc: number | null;
|
|
6007
|
+
revenuePerVisitor: number | null;
|
|
6008
|
+
/** @description Share of traffic from ads, 0 to 1. */
|
|
6009
|
+
paidTrafficShare: number | null;
|
|
6010
|
+
/**
|
|
6011
|
+
* @description `click` when unique visitors are unavailable and conversion uses clicks or page views.
|
|
6012
|
+
* @enum {string}
|
|
6013
|
+
*/
|
|
6014
|
+
funnelMode?: "visit" | "click";
|
|
6015
|
+
cvrDenominatorLabel?: string;
|
|
6016
|
+
};
|
|
6017
|
+
/** @description Page views, visitors, potential buyers, buyers. */
|
|
6018
|
+
funnel: {
|
|
6019
|
+
id: string;
|
|
6020
|
+
label: string;
|
|
6021
|
+
value: number | null;
|
|
6022
|
+
covered: boolean;
|
|
6023
|
+
rateFromPrevious?: number | null;
|
|
6024
|
+
rateLabel?: string | null;
|
|
4129
6025
|
}[];
|
|
4130
6026
|
dailyTrend: {
|
|
4131
6027
|
date: string;
|
|
4132
|
-
|
|
6028
|
+
impressions: number;
|
|
6029
|
+
pageviews: number;
|
|
6030
|
+
visitors: number;
|
|
6031
|
+
atcUsers: number;
|
|
6032
|
+
clicks: number;
|
|
4133
6033
|
orders: number;
|
|
4134
|
-
netSales: number;
|
|
4135
|
-
previousOrders: number;
|
|
4136
|
-
previousNetSales: number;
|
|
4137
6034
|
}[];
|
|
4138
|
-
|
|
4139
|
-
topProducts: {
|
|
6035
|
+
products: {
|
|
4140
6036
|
productId: string | null;
|
|
6037
|
+
variantId: string | null;
|
|
4141
6038
|
productName: string;
|
|
4142
6039
|
platform: string | null;
|
|
4143
|
-
accountId: string | null;
|
|
4144
6040
|
externalProductId: string | null;
|
|
4145
6041
|
sku: string | null;
|
|
4146
6042
|
thumbnailUrl: string | null;
|
|
6043
|
+
impressions: number;
|
|
6044
|
+
pageviews: number;
|
|
6045
|
+
visitors: number;
|
|
6046
|
+
clicks: number;
|
|
6047
|
+
atcUsers: number;
|
|
4147
6048
|
orders: number;
|
|
4148
|
-
unitsSold: number;
|
|
4149
6049
|
netSales: number;
|
|
6050
|
+
ctr: number | null;
|
|
6051
|
+
viewToOrderCvr: number | null;
|
|
6052
|
+
visitToAtc: number | null;
|
|
6053
|
+
viewToOrder: number | null;
|
|
6054
|
+
netSalesPerVisitor: number | null;
|
|
6055
|
+
diagnosis: string;
|
|
6056
|
+
/** @description Higher means fix first. */
|
|
6057
|
+
opportunityScore: number;
|
|
6058
|
+
/** @enum {string} */
|
|
6059
|
+
leak:
|
|
6060
|
+
| "high_traffic_low_cvr"
|
|
6061
|
+
| "zero_orders"
|
|
6062
|
+
| "healthy"
|
|
6063
|
+
| "no_traffic";
|
|
4150
6064
|
}[];
|
|
6065
|
+
diagnostics: {
|
|
6066
|
+
id: string;
|
|
6067
|
+
/** @enum {string} */
|
|
6068
|
+
severity: "info" | "warn" | "critical" | "opportunity";
|
|
6069
|
+
title: string;
|
|
6070
|
+
summary: string;
|
|
6071
|
+
metricLabel: string;
|
|
6072
|
+
metricValue: string;
|
|
6073
|
+
}[];
|
|
6074
|
+
contentDrivers: {
|
|
6075
|
+
externalContentId: string | null;
|
|
6076
|
+
contentType: string;
|
|
6077
|
+
title: string;
|
|
6078
|
+
platform: string | null;
|
|
6079
|
+
productId: string | null;
|
|
6080
|
+
externalProductId: string | null;
|
|
6081
|
+
productName: string | null;
|
|
6082
|
+
productThumbnailUrl: string | null;
|
|
6083
|
+
views: number;
|
|
6084
|
+
productClicks: number;
|
|
6085
|
+
orders: number;
|
|
6086
|
+
gmv: number;
|
|
6087
|
+
clickRate: number | null;
|
|
6088
|
+
orderRate: number | null;
|
|
6089
|
+
}[];
|
|
6090
|
+
leakCount: number;
|
|
6091
|
+
/** @description Which data sources have data for this range. */
|
|
6092
|
+
coverage: {
|
|
6093
|
+
sales: boolean;
|
|
6094
|
+
traffic: boolean;
|
|
6095
|
+
ads: boolean;
|
|
6096
|
+
content: boolean;
|
|
6097
|
+
inventory: boolean;
|
|
6098
|
+
profit: boolean;
|
|
6099
|
+
market: boolean;
|
|
6100
|
+
};
|
|
4151
6101
|
};
|
|
4152
6102
|
};
|
|
4153
6103
|
};
|
|
@@ -16910,15 +18860,115 @@ declare class AnalyticsClient {
|
|
|
16910
18860
|
protected readonly _http: OmniHttp;
|
|
16911
18861
|
constructor(_http: OmniHttp);
|
|
16912
18862
|
/**
|
|
16913
|
-
* Get
|
|
18863
|
+
* Get Ads Analytics
|
|
18864
|
+
*
|
|
18865
|
+
* 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`.
|
|
18866
|
+
|
|
18867
|
+
Amounts are in `data.filters.currency`. The periods count back from the end of the range.
|
|
18868
|
+
*
|
|
18869
|
+
* `GET /api/v1/analytics/ads`
|
|
18870
|
+
*/
|
|
18871
|
+
getAds(request?: OperationQuery<operations["get_v1_analytics_ads"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_analytics_ads"]>>;
|
|
18872
|
+
/**
|
|
18873
|
+
* Get AI Traffic Analytics
|
|
16914
18874
|
*
|
|
16915
|
-
*
|
|
18875
|
+
* 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`.
|
|
18876
|
+
|
|
18877
|
+
A range covers at most 365 days; a longer one is shortened to the last 365 days. Read the applied range from `data.filters`.
|
|
18878
|
+
*
|
|
18879
|
+
* `GET /api/v1/analytics/ai-traffic`
|
|
18880
|
+
*/
|
|
18881
|
+
getAiTraffic(request?: OperationQuery<operations["get_v1_analytics_ai_traffic"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_analytics_ai_traffic"]>>;
|
|
18882
|
+
/**
|
|
18883
|
+
* Get Video and LIVE Analytics
|
|
18884
|
+
*
|
|
18885
|
+
* 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`.
|
|
18886
|
+
|
|
18887
|
+
Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
|
|
18888
|
+
*
|
|
18889
|
+
* `GET /api/v1/analytics/content`
|
|
18890
|
+
*/
|
|
18891
|
+
getContent(request?: OperationQuery<operations["get_v1_analytics_content"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_analytics_content"]>>;
|
|
18892
|
+
/**
|
|
18893
|
+
* Get Order Analytics
|
|
18894
|
+
*
|
|
18895
|
+
* 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`.
|
|
18896
|
+
|
|
18897
|
+
Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
|
|
18898
|
+
*
|
|
18899
|
+
* `GET /api/v1/analytics/orders`
|
|
18900
|
+
*/
|
|
18901
|
+
getOrders(request?: OperationQuery<operations["get_v1_analytics_orders"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_analytics_orders"]>>;
|
|
18902
|
+
/**
|
|
18903
|
+
* Get Growth Overview
|
|
18904
|
+
*
|
|
18905
|
+
* 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`.
|
|
18906
|
+
|
|
18907
|
+
Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
|
|
18908
|
+
*
|
|
18909
|
+
* `GET /api/v1/analytics/overview`
|
|
18910
|
+
*/
|
|
18911
|
+
getOverview(request?: OperationQuery<operations["get_v1_analytics_overview"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_analytics_overview"]>>;
|
|
18912
|
+
/**
|
|
18913
|
+
* Get Pricing Analytics
|
|
18914
|
+
*
|
|
18915
|
+
* Selling products with their margin, velocity, stock cover, prices, competitor median, and a pricing recommendation. Matches the Pricing page. Requires `analytics:read`.
|
|
18916
|
+
|
|
18917
|
+
Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
|
|
18918
|
+
*
|
|
18919
|
+
* `GET /api/v1/analytics/pricing`
|
|
18920
|
+
*/
|
|
18921
|
+
getPricing(request?: OperationQuery<operations["get_v1_analytics_pricing"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_analytics_pricing"]>>;
|
|
18922
|
+
/**
|
|
18923
|
+
* Get Product Analytics
|
|
18924
|
+
*
|
|
18925
|
+
* 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`.
|
|
18926
|
+
|
|
18927
|
+
Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
|
|
18928
|
+
*
|
|
18929
|
+
* `GET /api/v1/analytics/products`
|
|
18930
|
+
*/
|
|
18931
|
+
getProducts(request?: OperationQuery<operations["get_v1_analytics_products"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_analytics_products"]>>;
|
|
18932
|
+
/**
|
|
18933
|
+
* Get Profit Analytics
|
|
18934
|
+
*
|
|
18935
|
+
* 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`.
|
|
18936
|
+
|
|
18937
|
+
Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
|
|
18938
|
+
*
|
|
18939
|
+
* `GET /api/v1/analytics/profit`
|
|
18940
|
+
*/
|
|
18941
|
+
getProfit(request?: OperationQuery<operations["get_v1_analytics_profit"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_analytics_profit"]>>;
|
|
18942
|
+
/**
|
|
18943
|
+
* Get Business Report
|
|
18944
|
+
*
|
|
18945
|
+
* The management summary: headline KPIs, top products, sales by marketplace, alerts, settlement totals, and data quality. Matches the Business Reports page. Requires `analytics:read`.
|
|
18946
|
+
|
|
18947
|
+
Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
|
|
18948
|
+
*
|
|
18949
|
+
* `GET /api/v1/analytics/reports`
|
|
18950
|
+
*/
|
|
18951
|
+
getReports(request?: OperationQuery<operations["get_v1_analytics_reports"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_analytics_reports"]>>;
|
|
18952
|
+
/**
|
|
18953
|
+
* Get Store Analytics
|
|
18954
|
+
*
|
|
18955
|
+
* 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`.
|
|
18956
|
+
|
|
18957
|
+
Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
|
|
18958
|
+
*
|
|
18959
|
+
* `GET /api/v1/analytics/stores`
|
|
18960
|
+
*/
|
|
18961
|
+
getStores(request?: OperationQuery<operations["get_v1_analytics_stores"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_analytics_stores"]>>;
|
|
18962
|
+
/**
|
|
18963
|
+
* Get Traffic Analytics
|
|
18964
|
+
*
|
|
18965
|
+
* 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
18966
|
|
|
16917
18967
|
Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
|
|
16918
18968
|
*
|
|
16919
|
-
* `GET /api/v1/analytics/
|
|
18969
|
+
* `GET /api/v1/analytics/traffic`
|
|
16920
18970
|
*/
|
|
16921
|
-
|
|
18971
|
+
getTraffic(request?: OperationQuery<operations["get_v1_analytics_traffic"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_analytics_traffic"]>>;
|
|
16922
18972
|
}
|
|
16923
18973
|
declare class AopClient {
|
|
16924
18974
|
protected readonly _http: OmniHttp;
|
|
@@ -16964,26 +19014,6 @@ declare class AopClient {
|
|
|
16964
19014
|
*/
|
|
16965
19015
|
retry(request: OperationBody<operations["post_v1_aop_retry"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_aop_retry"]>>;
|
|
16966
19016
|
}
|
|
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
19017
|
declare class CampaignsClient {
|
|
16988
19018
|
protected readonly _http: OmniHttp;
|
|
16989
19019
|
constructor(_http: OmniHttp);
|
|
@@ -18070,7 +20100,6 @@ declare class OmniGeneratedClient {
|
|
|
18070
20100
|
readonly agents: AgentsClient;
|
|
18071
20101
|
readonly analytics: AnalyticsClient;
|
|
18072
20102
|
readonly aop: AopClient;
|
|
18073
|
-
readonly api: ApiClient;
|
|
18074
20103
|
readonly campaigns: CampaignsClient;
|
|
18075
20104
|
readonly catalog: CatalogClient;
|
|
18076
20105
|
readonly checkoutSessions: CheckoutSessionsClient;
|
|
@@ -18107,7 +20136,6 @@ type OmniResources = {
|
|
|
18107
20136
|
agents: AgentsClient;
|
|
18108
20137
|
analytics: AnalyticsClient;
|
|
18109
20138
|
aop: AopClient;
|
|
18110
|
-
api: ApiClient;
|
|
18111
20139
|
campaigns: CampaignsClient;
|
|
18112
20140
|
catalog: CatalogClient;
|
|
18113
20141
|
checkoutSessions: CheckoutSessionsClient;
|
|
@@ -18181,7 +20209,7 @@ declare function constructEvent(payload: string | Uint8Array, headers: WebhookHe
|
|
|
18181
20209
|
toleranceInSeconds?: number;
|
|
18182
20210
|
}): Promise<ConstructedWebhookEvent>;
|
|
18183
20211
|
|
|
18184
|
-
declare const SDK_VERSION = "0.
|
|
20212
|
+
declare const SDK_VERSION = "0.4.0";
|
|
18185
20213
|
|
|
18186
20214
|
type ProductCreatedWebhookEvent = components["schemas"]["ProductCreatedWebhookEvent"];
|
|
18187
20215
|
type ProductUpdatedWebhookEvent = components["schemas"]["ProductUpdatedWebhookEvent"];
|