@omni-commerce/sdk 0.17.0 → 0.19.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.d.ts CHANGED
@@ -91,6 +91,94 @@ declare class OmniHttp {
91
91
  */
92
92
 
93
93
  interface paths {
94
+ "/api/embed/{deploymentId}/.well-known/agent-card.json": {
95
+ parameters: {
96
+ query?: never;
97
+ header?: never;
98
+ path?: never;
99
+ cookie?: never;
100
+ };
101
+ /**
102
+ * Discover a published merchant agent
103
+ * @description A2A 1.0 Agent Card for any configured agent published to a customer deployment. Private model settings, prompts and publisher identity are excluded.
104
+ */
105
+ get: operations["get_embed_by_deploymentid_well_known_agent_card_json"];
106
+ put?: never;
107
+ post?: never;
108
+ delete?: never;
109
+ options?: never;
110
+ head?: never;
111
+ patch?: never;
112
+ trace?: never;
113
+ };
114
+ "/api/embed/{deploymentId}/a2a": {
115
+ parameters: {
116
+ query?: never;
117
+ header?: never;
118
+ path?: never;
119
+ cookie?: never;
120
+ };
121
+ get?: never;
122
+ put?: never;
123
+ /**
124
+ * Call a merchant agent using A2A
125
+ * @description Official A2A 1.0 JSON-RPC SendMessage, GetTask and CancelTask.
126
+ *
127
+ * ### Authentication
128
+ *
129
+ * Uses the existing customer JWT from /api/embed/{deploymentId}/session; send the same Origin when creating and using the session.
130
+ *
131
+ * ### Messages
132
+ *
133
+ * SendMessage accepts text user messages with a UUID messageId and up to 4000 characters. For asynchronous execution set configuration.returnImmediately=true and retrieve the task. Every task is bound to the customer session.
134
+ *
135
+ * Bot verification and storefront protection apply. Payment proofs belong in the checkout completion endpoint, outside model messages.
136
+ *
137
+ * ### Signed offers and buyer agents
138
+ *
139
+ * Payable offers in purchase-offers artifacts include checkoutJwt when the platform signing key is configured. Requests may carry a Web Bot Auth signature; the verified agent origin is recorded on resulting offers and orders.
140
+ */
141
+ post: operations["post_embed_by_deploymentid_a2a"];
142
+ delete?: never;
143
+ options?: never;
144
+ head?: never;
145
+ patch?: never;
146
+ trace?: never;
147
+ };
148
+ "/api/embed/{deploymentId}/checkout-sessions/{operation}": {
149
+ parameters: {
150
+ query?: never;
151
+ header?: never;
152
+ path?: never;
153
+ cookie?: never;
154
+ };
155
+ get?: never;
156
+ put?: never;
157
+ /**
158
+ * Manage customer-owned purchase offers
159
+ * @description ### Operations
160
+ *
161
+ * create: offers[] (1–5), with stable requestId, exact purchasable product/variant IDs, quantities, shipping country and optional unitAmount proposals. get/cancel: sessionIds[] (1–20). complete: sessionId, paymentProof, and buyer approval of cartVersion, totalAmount and currency. pay: sessionId and the same exact approval; returns checkoutUrl for Stripe-hosted card entry.
162
+ *
163
+ * ### Results and safeguards
164
+ *
165
+ * Batches return ordered per-target results, succeededCount and failedCount. At most ten unpaid offers may be held per customer. Merchant-approved currency, countries, shipping and tax terms are required. Shopify-listed products return the supported Shopify checkout handoff.
166
+ *
167
+ * ### Payment
168
+ *
169
+ * Completion reuses the existing Stripe ACP or x402 rail. Hosted card checkout requires this organization's seller Stripe key and a public HTTPS webhook destination; signed Stripe events and a one-shot durable deadline use the same completion service. The page collects an address within the quoted country. Indeterminate confirmation remains payment_pending and blocks a new payment; x402 uncertainty requires merchant reconciliation. Direct creation honors configured bot verification. Payment completion does not book a carrier or establish delivery.
170
+ *
171
+ * ### Signed offers and buyer agents
172
+ *
173
+ * When the platform signing key is configured, payable offers include checkoutJwt: an ES256 JWT of the offer terms (merchant, cart_version, UCP line items and totals in minor units, expiry). Verify it with the /.well-known/ucp signing_keys entry named by its kid; it can serve as an AP2 checkout_jwt. Requests may carry a Web Bot Auth signature (Signature, Signature-Input and Signature-Agent headers); the verified agent origin is recorded on the offer and order.
174
+ */
175
+ post: operations["post_embed_by_deploymentid_checkout_sessions_by_operation"];
176
+ delete?: never;
177
+ options?: never;
178
+ head?: never;
179
+ patch?: never;
180
+ trace?: never;
181
+ };
94
182
  "/api/v1/agents/general/invoke": {
95
183
  parameters: {
96
184
  query?: never;
@@ -796,7 +884,7 @@ interface paths {
796
884
  put?: never;
797
885
  /**
798
886
  * Complete Agentic Checkout Session
799
- * @description Settle the selected rail and create a native `agentic` order. Settlement failures return 402 and leave the session in `ready_for_payment`.
887
+ * @description Settle the selected rail and create a native `agentic` order. Definitive settlement failures return 402. Pending confirmation locks the offer in `payment_pending`; durable recovery resumes the same attempt.
800
888
  */
801
889
  post: operations["post_v1_checkout_sessions_by_sessionid_complete"];
802
890
  delete?: never;
@@ -805,6 +893,46 @@ interface paths {
805
893
  patch?: never;
806
894
  trace?: never;
807
895
  };
896
+ "/api/v1/commerce/jobs/await": {
897
+ parameters: {
898
+ query?: never;
899
+ header?: never;
900
+ path?: never;
901
+ cookie?: never;
902
+ };
903
+ get?: never;
904
+ put?: never;
905
+ /**
906
+ * Await Commerce Jobs
907
+ * @description Wait for a mixed batch of returned commerce correlations: inventory_job, price_event, publish_job, delist_batch, store_switch, omni_delete, zalora_import, enrichment_batch, order_action and return_action. Maximum 50000 entries; IDs are trimmed and duplicates collapse by kind/id in first-requested order. timeoutMs=0 reads once; bounded waits allow up to 120000ms. Catalog jobs require catalog:read; order/return jobs require orders:read; mixed batches require both. Session callers include organizationId. Every job retains its target identity, status, errors and available label artifacts. Missing or inaccessible fulfillment jobs fail explicitly. needs_review is an uncertain outcome, never automatic success or authorization to resubmit. data.success describes completion; use state verification before claiming a marketplace effect. Scheduled future actions are verified after execution, not when scheduled.
908
+ */
909
+ post: operations["post_v1_commerce_jobs_await"];
910
+ delete?: never;
911
+ options?: never;
912
+ head?: never;
913
+ patch?: never;
914
+ trace?: never;
915
+ };
916
+ "/api/v1/commerce/state/verify": {
917
+ parameters: {
918
+ query?: never;
919
+ header?: never;
920
+ path?: never;
921
+ cookie?: never;
922
+ };
923
+ get?: never;
924
+ put?: never;
925
+ /**
926
+ * Verify Commerce State
927
+ * @description Perform fresh marketplace verification using the canonical services for every supported marketplace. For products provide productIds plus expected, or targets[{productId,expected}] for mixed values. For order and return operations provide their returned order_action/return_action correlations; product and fulfillment checks may share one request. Maximum 50000 entries per target array, with bounded concurrency. Catalog verification requires catalog:read; fulfillment verification requires orders:read; mixed batches require both. Session callers include organizationId. Missing, unauthorized, unsupported and unconfirmed targets fail explicitly. A return decision can be confirmed while later lifecycle steps remain pending. Labels confirm generated artifacts, not physical printing. Provider acceptance alone does not establish a changed state; tracking omitted by the provider remains unconfirmed. This read never resubmits a marketplace action.
928
+ */
929
+ post: operations["post_v1_commerce_state_verify"];
930
+ delete?: never;
931
+ options?: never;
932
+ head?: never;
933
+ patch?: never;
934
+ trace?: never;
935
+ };
808
936
  "/api/v1/compare": {
809
937
  parameters: {
810
938
  query?: never;
@@ -1393,6 +1521,100 @@ interface paths {
1393
1521
  patch?: never;
1394
1522
  trace?: never;
1395
1523
  };
1524
+ "/api/v1/orders/actions": {
1525
+ parameters: {
1526
+ query?: never;
1527
+ header?: never;
1528
+ path?: never;
1529
+ cookie?: never;
1530
+ };
1531
+ /**
1532
+ * Check Order Action Options
1533
+ * @description ### Authorization
1534
+ *
1535
+ * Requires orders:write.
1536
+ *
1537
+ * ### Choices
1538
+ *
1539
+ * Read current marketplace choices for ship, cancel, labels or update_tracking for 1–50 order UUIDs using repeated orderIds query parameters. The shared order service checks status, store connection and marketplace capability. Results preserve first-requested order, with explicit per-order errors. Use the exact choice payload and supply any fields marked requiresInput. An unsupported marketplace operation is an explicit failure, not a silently skipped order. Ship arranges shipment; labels generates printable files. Fulfillment behavior is identical to the existing single-order API and workspace UI.
1540
+ */
1541
+ get: operations["get_v1_orders_actions"];
1542
+ put?: never;
1543
+ /**
1544
+ * Process Order Actions
1545
+ * @description ### Authorization
1546
+ *
1547
+ * Requires orders:write.
1548
+ *
1549
+ * ### Batch submission
1550
+ *
1551
+ * Queue 1–50 distinct order operations with a UUID requestId. Each operation has orderId, action (ship, cancel, labels or update_tracking), and optional payload. Use exact marketplace choices from GET /api/v1/orders/actions and supply required carrier, tracking, pickup/drop-off or cancellation details. One operation per order is allowed in a batch; later stages such as labels after shipment require another submission. All targets are authorized before any enqueue. Per-order failures are isolated; results retain request order and include every accepted jobId. data.success means all submissions were accepted, not that marketplace processing finished.
1552
+ *
1553
+ * ### Recovery and completion
1554
+ *
1555
+ * Retain requestId and unchanged operations for retries; a changed operation with a reused key fails that target. Follow links.poll or GET /api/v1/orders/actions/jobs with every returned jobId (orders:read). The durable worker rechecks initiating permissions before marketplace writes. Label jobs return download URLs after success; the API does not control a physical printer. Completed jobs and partial failures remain explicit.
1556
+ */
1557
+ post: operations["post_v1_orders_actions"];
1558
+ delete?: never;
1559
+ options?: never;
1560
+ head?: never;
1561
+ patch?: never;
1562
+ trace?: never;
1563
+ };
1564
+ "/api/v1/orders/actions/jobs": {
1565
+ parameters: {
1566
+ query?: never;
1567
+ header?: never;
1568
+ path?: never;
1569
+ cookie?: never;
1570
+ };
1571
+ /**
1572
+ * Get Order Action Jobs
1573
+ * @description ### Authorization
1574
+ *
1575
+ * Requires orders:read.
1576
+ *
1577
+ * ### Outcomes and labels
1578
+ *
1579
+ * Read every requested order action job in one batch of 1–50 UUIDs using repeated jobIds parameters. Results preserve first-requested order. data.success is true only when every requested job succeeded; failedCount includes failed and not_supported, while pendingCount includes queued and running. Successful label jobs contain downloadable files in labels[]. A missing or cross-organization job returns 404; current store restrictions apply to all targets. The top-level completed status describes the lookup, not job completion. No raw provider acknowledgements are exposed.
1580
+ */
1581
+ get: operations["get_v1_orders_actions_jobs"];
1582
+ put?: never;
1583
+ post?: never;
1584
+ delete?: never;
1585
+ options?: never;
1586
+ head?: never;
1587
+ patch?: never;
1588
+ trace?: never;
1589
+ };
1590
+ "/api/v1/orders/picking-list": {
1591
+ parameters: {
1592
+ query?: never;
1593
+ header?: never;
1594
+ path?: never;
1595
+ cookie?: never;
1596
+ };
1597
+ get?: never;
1598
+ put?: never;
1599
+ /**
1600
+ * Create Picking List
1601
+ * @description ### Authorization
1602
+ *
1603
+ * Requires orders:read. API keys resolve organization scope from their credential; session callers include organizationId.
1604
+ *
1605
+ * ### PDF output
1606
+ *
1607
+ * Create a private PDF picking list for 1–500 order UUIDs, trimmed and deduplicated in first-requested order. Missing or inaccessible orders fail the complete selection without creating a partial document. The same grouping, product quantities, SKU/variation and currency-labeled prices as the workspace Orders page are used. timeZone accepts an IANA time zone; omitted API requests use UTC. This does not arrange shipment or change orders.
1608
+ *
1609
+ * The result contains structured list data, every orderId, a saved documentId and a signed HTTPS downloadUrl valid until expiresAt (five minutes). Generate a fresh list for a new download URL. Download the PDF and send it to your own printer; the API does not control local printers. PDF rendering may take up to 120 seconds.
1610
+ */
1611
+ post: operations["post_v1_orders_picking_list"];
1612
+ delete?: never;
1613
+ options?: never;
1614
+ head?: never;
1615
+ patch?: never;
1616
+ trace?: never;
1617
+ };
1396
1618
  "/api/v1/organizations": {
1397
1619
  parameters: {
1398
1620
  query?: never;
@@ -1705,6 +1927,8 @@ interface paths {
1705
1927
  * ### Marketplace sync
1706
1928
  *
1707
1929
  * The update is Omni-only by default. Set `syncToMarketplaces` to `true` to queue durable marketplace work. Omit `targets` to sync every enabled, published account for the product, or provide exact `{ platform, accountId }` targets. Every explicit target is validated before the catalog changes. The response contains pollable job IDs and immediate per-target queue status; use `GET /api/v1/jobs/{jobId}` for progress.
1930
+ *
1931
+ * An explicit marketplace push also refreshes matching catalog prices without recording a catalog change. For this unchanged-price refresh, send `Idempotency-Key` to reuse its saved job and exact targets on retries. Use a new key for a new refresh.
1708
1932
  */
1709
1933
  patch: operations["patch_v1_products_by_productid_price"];
1710
1934
  trace?: never;
@@ -2112,6 +2336,92 @@ interface paths {
2112
2336
  patch?: never;
2113
2337
  trace?: never;
2114
2338
  };
2339
+ "/api/v1/returns/actions": {
2340
+ parameters: {
2341
+ query?: never;
2342
+ header?: never;
2343
+ path?: never;
2344
+ cookie?: never;
2345
+ };
2346
+ /**
2347
+ * Check Return Actions
2348
+ * @description ### Authorization
2349
+ *
2350
+ * Requires orders:write.
2351
+ *
2352
+ * ### Eligibility
2353
+ *
2354
+ * Read live marketplace decisions for 1–50 OmniCommerce return UUIDs using repeated returnIds query parameters. Refreshes the saved return state through the same service as the order UI. All targets are organization- and store-scoped before marketplace access. Results preserve first-requested order; one provider failure does not block another store. data.success describes eligibility checks, not whether an action is available. Completed, cancelled and other terminal returns have no actions. Check actions.length and limitation; never infer eligibility from status alone. Amazon and WhatsApp currently return explicit processing limitations. Other marketplaces expose only decisions supported by their current API state. No buyer remarks, shipping evidence or raw provider payloads are returned. Pass each chosen action id and version unchanged to POST /api/v1/returns/actions.
2355
+ */
2356
+ get: operations["get_v1_returns_actions"];
2357
+ put?: never;
2358
+ /**
2359
+ * Process Returns
2360
+ * @description ### Authorization
2361
+ *
2362
+ * Requires orders:write.
2363
+ *
2364
+ * ### Submit decisions
2365
+ *
2366
+ * Queue 1–50 selected return decisions, including a one-element batch for a single return. Use only actionId/version pairs from a fresh eligibility check. Identical duplicate return operations are deduplicated in first-requested order; conflicting duplicates are rejected. requestId is a UUID idempotency key: retry the same key and unchanged operations after a transport failure. An active matching decision is reused; conflicting active decisions return 409. Returns HTTP 202 with every returnId and jobId. The durable worker rechecks current permissions, store identity, eligibility and version immediately before writing, then verifies the marketplace result. Follow links.poll or GET /api/v1/returns/actions/jobs with every jobIds entry; requires orders:read. data.success is true only when all jobs succeeded, so newly queued work has success=false and pendingCount>0. failed and needs_review are terminal failures; needs_review means the marketplace outcome is uncertain and must be checked before another action. Client disconnection does not cancel queued work.
2367
+ */
2368
+ post: operations["post_v1_returns_actions"];
2369
+ delete?: never;
2370
+ options?: never;
2371
+ head?: never;
2372
+ patch?: never;
2373
+ trace?: never;
2374
+ };
2375
+ "/api/v1/returns/actions/jobs": {
2376
+ parameters: {
2377
+ query?: never;
2378
+ header?: never;
2379
+ path?: never;
2380
+ cookie?: never;
2381
+ };
2382
+ /**
2383
+ * Get Return Action Jobs
2384
+ * @description ### Authorization
2385
+ *
2386
+ * Requires orders:read.
2387
+ *
2388
+ * ### Job outcomes
2389
+ *
2390
+ * Read the current state of 1–50 return-processing job UUIDs in one request using repeated jobIds parameters. Use every job ID returned by submission. Results preserve first-requested order. pendingCount counts queued, running and submitting; succeededCount counts succeeded; failedCount includes failed and needs_review. data.success is true only if every requested job succeeded. The top-level completed status refers to this lookup, not to the jobs. Missing or cross-organization jobs return 404; jobs outside assigned stores are forbidden. Evidence contains accepted/verified flags and before/after marketplace statuses, without raw provider payloads.
2391
+ */
2392
+ get: operations["get_v1_returns_actions_jobs"];
2393
+ put?: never;
2394
+ post?: never;
2395
+ delete?: never;
2396
+ options?: never;
2397
+ head?: never;
2398
+ patch?: never;
2399
+ trace?: never;
2400
+ };
2401
+ "/api/v1/returns/orders": {
2402
+ parameters: {
2403
+ query?: never;
2404
+ header?: never;
2405
+ path?: never;
2406
+ cookie?: never;
2407
+ };
2408
+ /**
2409
+ * Get Order Returns
2410
+ * @description Requires orders:read. Read stored return requests for 1–50 order UUIDs using repeated orderIds query parameters.
2411
+ *
2412
+ * ### Return identity
2413
+ *
2414
+ * Results preserve first-requested order and include distinct active and historical return requests. processingEligible is a local candidate flag, not live eligibility. Pass returnId values to GET /api/v1/returns/actions before choosing a decision. Every order is authorized before reading returns, including store restrictions; no buyer data is exposed.
2415
+ */
2416
+ get: operations["get_v1_returns_orders"];
2417
+ put?: never;
2418
+ post?: never;
2419
+ delete?: never;
2420
+ options?: never;
2421
+ head?: never;
2422
+ patch?: never;
2423
+ trace?: never;
2424
+ };
2115
2425
  "/api/v1/reviews": {
2116
2426
  parameters: {
2117
2427
  query?: never;
@@ -5060,24 +5370,245 @@ interface components {
5060
5370
  pathItems: never;
5061
5371
  }
5062
5372
  interface operations {
5063
- post_v1_agents_general_invoke: {
5373
+ get_embed_by_deploymentid_well_known_agent_card_json: {
5064
5374
  parameters: {
5065
5375
  query?: never;
5066
5376
  header?: never;
5067
- path?: never;
5377
+ path: {
5378
+ deploymentId: string;
5379
+ };
5380
+ cookie?: never;
5381
+ };
5382
+ requestBody?: never;
5383
+ responses: {
5384
+ /** @description Official A2A Agent Card. */
5385
+ 200: {
5386
+ headers: {
5387
+ [name: string]: unknown;
5388
+ };
5389
+ content?: never;
5390
+ };
5391
+ /** @description Customer deployment unavailable. */
5392
+ 404: {
5393
+ headers: {
5394
+ [name: string]: unknown;
5395
+ };
5396
+ content?: never;
5397
+ };
5398
+ };
5399
+ };
5400
+ post_embed_by_deploymentid_a2a: {
5401
+ parameters: {
5402
+ query?: never;
5403
+ header?: never;
5404
+ path: {
5405
+ deploymentId: string;
5406
+ };
5068
5407
  cookie?: never;
5069
5408
  };
5070
5409
  requestBody: {
5071
5410
  content: {
5072
- /**
5073
- * @example {
5074
- * "messages": [
5075
- * {
5076
- * "role": "user",
5077
- * "content": "How many products are missing a price?"
5078
- * }
5079
- * ]
5080
- * }
5411
+ "application/json": Record<string, never>;
5412
+ };
5413
+ };
5414
+ responses: {
5415
+ /** @description A2A JSON-RPC task or protocol error. */
5416
+ 200: {
5417
+ headers: {
5418
+ [name: string]: unknown;
5419
+ };
5420
+ content?: never;
5421
+ };
5422
+ /** @description Invalid customer session or buyer-agent signature. */
5423
+ 401: {
5424
+ headers: {
5425
+ [name: string]: unknown;
5426
+ };
5427
+ content?: never;
5428
+ };
5429
+ /** @description Deployment or origin mismatch. */
5430
+ 403: {
5431
+ headers: {
5432
+ [name: string]: unknown;
5433
+ };
5434
+ content?: never;
5435
+ };
5436
+ /** @description Storefront protection limit. */
5437
+ 429: {
5438
+ headers: {
5439
+ [name: string]: unknown;
5440
+ };
5441
+ content?: never;
5442
+ };
5443
+ };
5444
+ };
5445
+ post_embed_by_deploymentid_checkout_sessions_by_operation: {
5446
+ parameters: {
5447
+ query?: never;
5448
+ header?: never;
5449
+ path: {
5450
+ deploymentId: string;
5451
+ operation: "create" | "get" | "cancel" | "complete" | "pay";
5452
+ };
5453
+ cookie?: never;
5454
+ };
5455
+ requestBody: {
5456
+ content: {
5457
+ "application/json":
5458
+ | {
5459
+ offers: {
5460
+ /**
5461
+ * @default acp_stripe
5462
+ * @enum {string}
5463
+ */
5464
+ paymentRail?: "acp_stripe" | "x402";
5465
+ items: {
5466
+ productId: string;
5467
+ quantity: number;
5468
+ unitAmount?: number;
5469
+ }[];
5470
+ buyer?: {
5471
+ name?: string;
5472
+ /** Format: email */
5473
+ email?: string;
5474
+ phone?: string;
5475
+ } & {
5476
+ [key: string]: unknown;
5477
+ };
5478
+ shippingAddress?: {
5479
+ name?: string;
5480
+ line1?: string;
5481
+ line2?: string;
5482
+ city?: string;
5483
+ region?: string;
5484
+ postalCode?: string;
5485
+ country?: string;
5486
+ } & {
5487
+ [key: string]: unknown;
5488
+ };
5489
+ billingAddress?: {
5490
+ name?: string;
5491
+ line1?: string;
5492
+ line2?: string;
5493
+ city?: string;
5494
+ region?: string;
5495
+ postalCode?: string;
5496
+ country?: string;
5497
+ } & {
5498
+ [key: string]: unknown;
5499
+ };
5500
+ requestId: string;
5501
+ }[];
5502
+ }
5503
+ | {
5504
+ sessionIds: string[];
5505
+ }
5506
+ | {
5507
+ approval: {
5508
+ cartVersion: number;
5509
+ totalAmount: number;
5510
+ currency: string;
5511
+ };
5512
+ idempotencyKey?: string;
5513
+ paymentProof: {
5514
+ [key: string]: unknown;
5515
+ };
5516
+ sessionId: string;
5517
+ }
5518
+ | {
5519
+ sessionId: string;
5520
+ approval: {
5521
+ cartVersion: number;
5522
+ totalAmount: number;
5523
+ currency: string;
5524
+ };
5525
+ };
5526
+ };
5527
+ };
5528
+ responses: {
5529
+ /** @description Buyer-safe offers or completion result; costs, private metadata and payment proofs are excluded. */
5530
+ 200: {
5531
+ headers: {
5532
+ [name: string]: unknown;
5533
+ };
5534
+ content?: never;
5535
+ };
5536
+ /** @description Invalid operation or request. */
5537
+ 400: {
5538
+ headers: {
5539
+ [name: string]: unknown;
5540
+ };
5541
+ content?: never;
5542
+ };
5543
+ /** @description Invalid customer session or buyer-agent signature. */
5544
+ 401: {
5545
+ headers: {
5546
+ [name: string]: unknown;
5547
+ };
5548
+ content?: never;
5549
+ };
5550
+ /** @description Definitive payment failure. */
5551
+ 402: {
5552
+ headers: {
5553
+ [name: string]: unknown;
5554
+ };
5555
+ content?: never;
5556
+ };
5557
+ /** @description Invalid customer scope or merchant checkout disabled. */
5558
+ 403: {
5559
+ headers: {
5560
+ [name: string]: unknown;
5561
+ };
5562
+ content?: never;
5563
+ };
5564
+ /** @description Offer not found or belongs to another buyer. */
5565
+ 404: {
5566
+ headers: {
5567
+ [name: string]: unknown;
5568
+ };
5569
+ content?: never;
5570
+ };
5571
+ /** @description Approval mismatch, payment in progress, or payment reconciliation required. */
5572
+ 409: {
5573
+ headers: {
5574
+ [name: string]: unknown;
5575
+ };
5576
+ content?: never;
5577
+ };
5578
+ /** @description Storefront or active offer limit. */
5579
+ 429: {
5580
+ headers: {
5581
+ [name: string]: unknown;
5582
+ };
5583
+ content?: never;
5584
+ };
5585
+ /** @description Payment confirmation pending durable retry. */
5586
+ 503: {
5587
+ headers: {
5588
+ [name: string]: unknown;
5589
+ };
5590
+ content?: never;
5591
+ };
5592
+ };
5593
+ };
5594
+ post_v1_agents_general_invoke: {
5595
+ parameters: {
5596
+ query?: never;
5597
+ header?: never;
5598
+ path?: never;
5599
+ cookie?: never;
5600
+ };
5601
+ requestBody: {
5602
+ content: {
5603
+ /**
5604
+ * @example {
5605
+ * "messages": [
5606
+ * {
5607
+ * "role": "user",
5608
+ * "content": "How many products are missing a price?"
5609
+ * }
5610
+ * ]
5611
+ * }
5081
5612
  */
5082
5613
  "application/json": {
5083
5614
  organizationId?: string;
@@ -10953,6 +11484,8 @@ interface operations {
10953
11484
  items: {
10954
11485
  /** @description OmniCommerce product UUID. */
10955
11486
  productId: string;
11487
+ /** @description Optional proposed unit price. Merchant-agent discount, price and margin guardrails are enforced server-side. */
11488
+ unitAmount?: number;
10956
11489
  quantity: number;
10957
11490
  }[];
10958
11491
  buyer?: {
@@ -11007,6 +11540,7 @@ interface operations {
11007
11540
  /** @enum {string} */
11008
11541
  status:
11009
11542
  | "ready_for_payment"
11543
+ | "payment_pending"
11010
11544
  | "completed"
11011
11545
  | "cancelled"
11012
11546
  | "expired";
@@ -11120,6 +11654,7 @@ interface operations {
11120
11654
  /** @enum {string} */
11121
11655
  status:
11122
11656
  | "ready_for_payment"
11657
+ | "payment_pending"
11123
11658
  | "completed"
11124
11659
  | "cancelled"
11125
11660
  | "expired";
@@ -11216,6 +11751,8 @@ interface operations {
11216
11751
  items?: {
11217
11752
  /** @description OmniCommerce product UUID. */
11218
11753
  productId: string;
11754
+ /** @description Optional proposed unit price. Merchant-agent discount, price and margin guardrails are enforced server-side. */
11755
+ unitAmount?: number;
11219
11756
  quantity: number;
11220
11757
  }[];
11221
11758
  buyer?: {
@@ -11270,6 +11807,7 @@ interface operations {
11270
11807
  /** @enum {string} */
11271
11808
  status:
11272
11809
  | "ready_for_payment"
11810
+ | "payment_pending"
11273
11811
  | "completed"
11274
11812
  | "cancelled"
11275
11813
  | "expired";
@@ -11380,6 +11918,8 @@ interface operations {
11380
11918
  items?: {
11381
11919
  /** @description OmniCommerce product UUID. */
11382
11920
  productId: string;
11921
+ /** @description Optional proposed unit price. Merchant-agent discount, price and margin guardrails are enforced server-side. */
11922
+ unitAmount?: number;
11383
11923
  quantity: number;
11384
11924
  }[];
11385
11925
  buyer?: {
@@ -11434,6 +11974,7 @@ interface operations {
11434
11974
  /** @enum {string} */
11435
11975
  status:
11436
11976
  | "ready_for_payment"
11977
+ | "payment_pending"
11437
11978
  | "completed"
11438
11979
  | "cancelled"
11439
11980
  | "expired";
@@ -11554,6 +12095,7 @@ interface operations {
11554
12095
  /** @enum {string} */
11555
12096
  status:
11556
12097
  | "ready_for_payment"
12098
+ | "payment_pending"
11557
12099
  | "completed"
11558
12100
  | "cancelled"
11559
12101
  | "expired";
@@ -11655,6 +12197,11 @@ interface operations {
11655
12197
  requestBody: {
11656
12198
  content: {
11657
12199
  "application/json": {
12200
+ approval?: {
12201
+ cartVersion: number;
12202
+ totalAmount: number;
12203
+ currency: string;
12204
+ };
11658
12205
  idempotencyKey?: string;
11659
12206
  /** @description Rail-specific payment proof. ACP uses `{ sharedPaymentTokenId: string }`; x402 uses `{ paymentPayload: object }` or `{ xPayment: object }`. Local testing may use `{ test: true, testPaymentToken: string }` when test settlement is enabled. */
11660
12207
  paymentProof: {
@@ -11680,6 +12227,7 @@ interface operations {
11680
12227
  /** @enum {string} */
11681
12228
  status:
11682
12229
  | "ready_for_payment"
12230
+ | "payment_pending"
11683
12231
  | "completed"
11684
12232
  | "cancelled"
11685
12233
  | "expired";
@@ -11765,6 +12313,7 @@ interface operations {
11765
12313
  /** @enum {string} */
11766
12314
  status:
11767
12315
  | "ready_for_payment"
12316
+ | "payment_pending"
11768
12317
  | "completed"
11769
12318
  | "cancelled"
11770
12319
  | "expired";
@@ -11850,63 +12399,201 @@ interface operations {
11850
12399
  };
11851
12400
  };
11852
12401
  };
11853
- get_v1_compare: {
12402
+ post_v1_commerce_jobs_await: {
11854
12403
  parameters: {
11855
- query: {
11856
- /** @description Comma-separated product IDs (2..10). */
11857
- products: string;
11858
- /** @description Localization language. Defaults to en. */
11859
- language?: "en" | "th" | "id" | "ms" | "vi" | "tl";
11860
- };
12404
+ query?: never;
11861
12405
  header?: never;
11862
12406
  path?: never;
11863
12407
  cookie?: never;
11864
12408
  };
11865
- requestBody?: never;
12409
+ requestBody: {
12410
+ content: {
12411
+ "application/json": {
12412
+ /** @description Every returned commerce job correlation, including orders and returns. Maximum 50000; trimmed and deduplicated in first-requested order. */
12413
+ correlations: {
12414
+ /** @enum {string} */
12415
+ kind:
12416
+ | "inventory_job"
12417
+ | "price_event"
12418
+ | "publish_job"
12419
+ | "delist_batch"
12420
+ | "store_switch"
12421
+ | "omni_delete"
12422
+ | "zalora_import"
12423
+ | "enrichment_batch"
12424
+ | "order_action"
12425
+ | "return_action";
12426
+ id: string;
12427
+ platform?: string;
12428
+ storeId?: string;
12429
+ productId?: string;
12430
+ productIds?: string[];
12431
+ externalIds?: string[];
12432
+ }[];
12433
+ /** @description Wait budget in milliseconds; 0 is one status read. Maximum 120000. */
12434
+ timeoutMs?: number;
12435
+ organizationId?: string;
12436
+ };
12437
+ };
12438
+ };
11866
12439
  responses: {
11867
- /** @description Success */
12440
+ /** @description Request completed. Inspect data.success, per-target results and pendingCount for processing progress. */
11868
12441
  200: {
11869
12442
  headers: {
11870
12443
  [name: string]: unknown;
11871
12444
  };
11872
12445
  content: {
11873
12446
  "application/json": {
11874
- ok?: boolean;
11875
- /** @default public_compare_v1 */
12447
+ ok: boolean;
11876
12448
  apiVersion: string;
12449
+ /** Format: uuid */
12450
+ operationId: string;
12451
+ /** @enum {string} */
12452
+ status: "completed";
12453
+ data: {
12454
+ success: boolean;
12455
+ succeededCount: number;
12456
+ failedCount: number;
12457
+ productIds?: string[];
12458
+ orderIds?: string[];
12459
+ returnIds?: string[];
12460
+ correlations: {
12461
+ /** @enum {string} */
12462
+ kind:
12463
+ | "inventory_job"
12464
+ | "price_event"
12465
+ | "publish_job"
12466
+ | "delist_batch"
12467
+ | "store_switch"
12468
+ | "omni_delete"
12469
+ | "zalora_import"
12470
+ | "enrichment_batch"
12471
+ | "order_action"
12472
+ | "return_action";
12473
+ id: string;
12474
+ platform?: string;
12475
+ storeId?: string;
12476
+ productId?: string;
12477
+ productIds?: string[];
12478
+ externalIds?: string[];
12479
+ }[];
12480
+ message: string;
12481
+ allTerminal: boolean;
12482
+ timedOut: boolean;
12483
+ jobs: {
12484
+ /** @enum {string} */
12485
+ kind:
12486
+ | "inventory_job"
12487
+ | "price_event"
12488
+ | "publish_job"
12489
+ | "delist_batch"
12490
+ | "store_switch"
12491
+ | "omni_delete"
12492
+ | "zalora_import"
12493
+ | "enrichment_batch"
12494
+ | "order_action"
12495
+ | "return_action";
12496
+ id: string;
12497
+ /** @enum {string} */
12498
+ status:
12499
+ | "pending"
12500
+ | "running"
12501
+ | "success"
12502
+ | "error"
12503
+ | "superseded"
12504
+ | "skipped"
12505
+ | "unknown";
12506
+ terminal: boolean;
12507
+ orderId?: string;
12508
+ returnId?: string;
12509
+ productId?: string;
12510
+ productIds?: string[];
12511
+ platform?: string;
12512
+ storeId?: string;
12513
+ action?: string;
12514
+ sourceStatus?: string;
12515
+ labels?: {
12516
+ /** Format: uri */
12517
+ url: string;
12518
+ name: string | null;
12519
+ mimeType: string | null;
12520
+ }[];
12521
+ error?: string;
12522
+ message?: string;
12523
+ updatedAt?: string;
12524
+ externalIds?: string[];
12525
+ missingExternalIds?: string[];
12526
+ evidence?: {
12527
+ accepted?: boolean;
12528
+ verified?: boolean;
12529
+ statusBefore?: string | null;
12530
+ statusAfter?: string | null;
12531
+ };
12532
+ verification?: {
12533
+ ok: boolean;
12534
+ verified: boolean;
12535
+ skipped: boolean;
12536
+ reason?: string;
12537
+ expectedQuantity?: number;
12538
+ actualQuantity?: number | null;
12539
+ evidence?: string;
12540
+ verifiedAt?: string;
12541
+ };
12542
+ operations?: {
12543
+ delist: {
12544
+ status: string;
12545
+ result: {
12546
+ [key: string]: unknown;
12547
+ } | null;
12548
+ };
12549
+ publish: {
12550
+ status: string;
12551
+ result: {
12552
+ [key: string]: unknown;
12553
+ } | null;
12554
+ };
12555
+ };
12556
+ }[];
12557
+ pendingCount: number;
12558
+ };
12559
+ links: {
12560
+ [key: string]: string;
12561
+ };
12562
+ warnings: string[];
12563
+ recommendations: string[];
11877
12564
  };
11878
12565
  };
11879
12566
  };
11880
- /** @description Bad Request */
12567
+ /** @description Invalid request, conflicting operations, singular arguments or a batch exceeding the endpoint limit. */
11881
12568
  400: {
11882
12569
  headers: {
11883
12570
  [name: string]: unknown;
11884
12571
  };
11885
12572
  content?: never;
11886
12573
  };
11887
- /** @description Unauthorized */
12574
+ /** @description Missing or invalid credentials. */
11888
12575
  401: {
11889
12576
  headers: {
11890
12577
  [name: string]: unknown;
11891
12578
  };
11892
12579
  content?: never;
11893
12580
  };
11894
- /** @description Insufficient Credits */
11895
- 402: {
12581
+ /** @description Missing scope, organization mismatch, or a target outside the caller's assigned stores and markets. */
12582
+ 403: {
11896
12583
  headers: {
11897
12584
  [name: string]: unknown;
11898
12585
  };
11899
12586
  content?: never;
11900
12587
  };
11901
- /** @description Forbidden */
11902
- 403: {
12588
+ /** @description Rate limit exceeded. */
12589
+ 429: {
11903
12590
  headers: {
11904
12591
  [name: string]: unknown;
11905
12592
  };
11906
12593
  content?: never;
11907
12594
  };
11908
- /** @description Internal Server Error */
11909
- 500: {
12595
+ /** @description Service unavailable. Retry a submission with the same requestId and unchanged operations. */
12596
+ 503: {
11910
12597
  headers: {
11911
12598
  [name: string]: unknown;
11912
12599
  };
@@ -11914,31 +12601,292 @@ interface operations {
11914
12601
  };
11915
12602
  };
11916
12603
  };
11917
- get_v1_directory: {
12604
+ post_v1_commerce_state_verify: {
11918
12605
  parameters: {
11919
12606
  query?: never;
11920
12607
  header?: never;
11921
12608
  path?: never;
11922
12609
  cookie?: never;
11923
12610
  };
11924
- requestBody?: never;
11925
- responses: {
11926
- /** @description Success */
11927
- 200: {
11928
- headers: {
11929
- [name: string]: unknown;
11930
- };
11931
- content: {
11932
- "application/json": {
11933
- ok?: boolean;
11934
- /** @default public_directory_v1 */
11935
- apiVersion: string;
11936
- };
11937
- };
11938
- };
11939
- /** @description Bad Request */
11940
- 400: {
11941
- headers: {
12611
+ requestBody: {
12612
+ content: {
12613
+ "application/json": {
12614
+ /** @description Order and return action correlations to verify through fresh marketplace reads. May accompany product targets. */
12615
+ correlations?: {
12616
+ /** @enum {string} */
12617
+ kind: "order_action" | "return_action";
12618
+ /** Format: uuid */
12619
+ id: string;
12620
+ platform?: string;
12621
+ storeId?: string;
12622
+ productId?: string;
12623
+ productIds?: string[];
12624
+ externalIds?: string[];
12625
+ }[];
12626
+ /** @description Product or variant ids to verify together. Use every distinct productId returned by the completed commerce jobs (max 50000, bounded concurrency). */
12627
+ productIds?: string[];
12628
+ /** @description Expected commerce state after a write (price, quantity, listingStatus, etc). */
12629
+ expected?: {
12630
+ price?: number;
12631
+ salePrice?: number | null;
12632
+ currency?: string;
12633
+ quantity?: number;
12634
+ /** @enum {string} */
12635
+ listingStatus?: "active" | "draft" | "unlisted" | "deleted";
12636
+ platforms?: string[];
12637
+ };
12638
+ /** @description Per-product expected states for a mixed-value batch. Use every successful item's productId and commerceReceipt.expected together. Do not combine with productIds or shared expected. Identical duplicates are deduplicated; conflicting expectations are rejected. */
12639
+ targets?: {
12640
+ productId: string;
12641
+ expected: {
12642
+ price?: number;
12643
+ salePrice?: number | null;
12644
+ currency?: string;
12645
+ quantity?: number;
12646
+ /** @enum {string} */
12647
+ listingStatus?: "active" | "draft" | "unlisted" | "deleted";
12648
+ platforms?: string[];
12649
+ };
12650
+ }[];
12651
+ /**
12652
+ * @description Lifecycle action being verified. Use delete for Omni-only delete checks.
12653
+ * @enum {string}
12654
+ */
12655
+ action?:
12656
+ | "price"
12657
+ | "inventory"
12658
+ | "publish"
12659
+ | "update"
12660
+ | "delist"
12661
+ | "delete";
12662
+ /** @description Optional marketplace filter: shopee, lazada, tiktok, shopify, whatsapp, zalora, amazon, ebay. */
12663
+ platforms?: string[];
12664
+ /** @description Also assert Omni DB fields (default true). */
12665
+ includeOmni?: boolean;
12666
+ organizationId?: string;
12667
+ };
12668
+ };
12669
+ };
12670
+ responses: {
12671
+ /** @description Request completed. Inspect data.success, per-target results and pendingCount for processing progress. */
12672
+ 200: {
12673
+ headers: {
12674
+ [name: string]: unknown;
12675
+ };
12676
+ content: {
12677
+ "application/json": {
12678
+ ok: boolean;
12679
+ apiVersion: string;
12680
+ /** Format: uuid */
12681
+ operationId: string;
12682
+ /** @enum {string} */
12683
+ status: "completed";
12684
+ data: {
12685
+ success: boolean;
12686
+ succeededCount: number;
12687
+ failedCount: number;
12688
+ productIds?: string[];
12689
+ orderIds?: string[];
12690
+ returnIds?: string[];
12691
+ correlations: {
12692
+ /** @enum {string} */
12693
+ kind:
12694
+ | "inventory_job"
12695
+ | "price_event"
12696
+ | "publish_job"
12697
+ | "delist_batch"
12698
+ | "store_switch"
12699
+ | "omni_delete"
12700
+ | "zalora_import"
12701
+ | "enrichment_batch"
12702
+ | "order_action"
12703
+ | "return_action";
12704
+ id: string;
12705
+ platform?: string;
12706
+ storeId?: string;
12707
+ productId?: string;
12708
+ productIds?: string[];
12709
+ externalIds?: string[];
12710
+ }[];
12711
+ message: string;
12712
+ results: {
12713
+ success: boolean;
12714
+ productId: string;
12715
+ rootProductId?: string;
12716
+ verification: {
12717
+ ok: boolean;
12718
+ target: string;
12719
+ evidence: string;
12720
+ action?: string;
12721
+ platform?: string;
12722
+ storeId?: string;
12723
+ productId?: string;
12724
+ expected?: string;
12725
+ actual?: string;
12726
+ }[];
12727
+ listings: {
12728
+ [key: string]: unknown;
12729
+ }[];
12730
+ omni?: {
12731
+ [key: string]: unknown;
12732
+ };
12733
+ message: string;
12734
+ }[];
12735
+ jobs: {
12736
+ /** @enum {string} */
12737
+ kind: "order_action" | "return_action";
12738
+ id: string;
12739
+ success: boolean;
12740
+ orderId?: string;
12741
+ returnId?: string;
12742
+ action?: string;
12743
+ platform?: string;
12744
+ evidence: string;
12745
+ status?: string;
12746
+ statusBefore?: string | null;
12747
+ statusAfter?: string | null;
12748
+ labels?: {
12749
+ /** Format: uri */
12750
+ url: string;
12751
+ name: string | null;
12752
+ mimeType: string | null;
12753
+ }[];
12754
+ }[];
12755
+ };
12756
+ links: {
12757
+ [key: string]: string;
12758
+ };
12759
+ warnings: string[];
12760
+ recommendations: string[];
12761
+ };
12762
+ };
12763
+ };
12764
+ /** @description Invalid request, conflicting operations, singular arguments or a batch exceeding the endpoint limit. */
12765
+ 400: {
12766
+ headers: {
12767
+ [name: string]: unknown;
12768
+ };
12769
+ content?: never;
12770
+ };
12771
+ /** @description Missing or invalid credentials. */
12772
+ 401: {
12773
+ headers: {
12774
+ [name: string]: unknown;
12775
+ };
12776
+ content?: never;
12777
+ };
12778
+ /** @description Missing scope, organization mismatch, or a target outside the caller's assigned stores and markets. */
12779
+ 403: {
12780
+ headers: {
12781
+ [name: string]: unknown;
12782
+ };
12783
+ content?: never;
12784
+ };
12785
+ /** @description Rate limit exceeded. */
12786
+ 429: {
12787
+ headers: {
12788
+ [name: string]: unknown;
12789
+ };
12790
+ content?: never;
12791
+ };
12792
+ /** @description Service unavailable. Retry a submission with the same requestId and unchanged operations. */
12793
+ 503: {
12794
+ headers: {
12795
+ [name: string]: unknown;
12796
+ };
12797
+ content?: never;
12798
+ };
12799
+ };
12800
+ };
12801
+ get_v1_compare: {
12802
+ parameters: {
12803
+ query: {
12804
+ /** @description Comma-separated product IDs (2..10). */
12805
+ products: string;
12806
+ /** @description Localization language. Defaults to en. */
12807
+ language?: "en" | "th" | "id" | "ms" | "vi" | "tl";
12808
+ };
12809
+ header?: never;
12810
+ path?: never;
12811
+ cookie?: never;
12812
+ };
12813
+ requestBody?: never;
12814
+ responses: {
12815
+ /** @description Success */
12816
+ 200: {
12817
+ headers: {
12818
+ [name: string]: unknown;
12819
+ };
12820
+ content: {
12821
+ "application/json": {
12822
+ ok?: boolean;
12823
+ /** @default public_compare_v1 */
12824
+ apiVersion: string;
12825
+ };
12826
+ };
12827
+ };
12828
+ /** @description Bad Request */
12829
+ 400: {
12830
+ headers: {
12831
+ [name: string]: unknown;
12832
+ };
12833
+ content?: never;
12834
+ };
12835
+ /** @description Unauthorized */
12836
+ 401: {
12837
+ headers: {
12838
+ [name: string]: unknown;
12839
+ };
12840
+ content?: never;
12841
+ };
12842
+ /** @description Insufficient Credits */
12843
+ 402: {
12844
+ headers: {
12845
+ [name: string]: unknown;
12846
+ };
12847
+ content?: never;
12848
+ };
12849
+ /** @description Forbidden */
12850
+ 403: {
12851
+ headers: {
12852
+ [name: string]: unknown;
12853
+ };
12854
+ content?: never;
12855
+ };
12856
+ /** @description Internal Server Error */
12857
+ 500: {
12858
+ headers: {
12859
+ [name: string]: unknown;
12860
+ };
12861
+ content?: never;
12862
+ };
12863
+ };
12864
+ };
12865
+ get_v1_directory: {
12866
+ parameters: {
12867
+ query?: never;
12868
+ header?: never;
12869
+ path?: never;
12870
+ cookie?: never;
12871
+ };
12872
+ requestBody?: never;
12873
+ responses: {
12874
+ /** @description Success */
12875
+ 200: {
12876
+ headers: {
12877
+ [name: string]: unknown;
12878
+ };
12879
+ content: {
12880
+ "application/json": {
12881
+ ok?: boolean;
12882
+ /** @default public_directory_v1 */
12883
+ apiVersion: string;
12884
+ };
12885
+ };
12886
+ };
12887
+ /** @description Bad Request */
12888
+ 400: {
12889
+ headers: {
11942
12890
  [name: string]: unknown;
11943
12891
  };
11944
12892
  content?: never;
@@ -14901,139 +15849,95 @@ interface operations {
14901
15849
  };
14902
15850
  };
14903
15851
  };
14904
- post_v1_organizations: {
15852
+ get_v1_orders_actions: {
14905
15853
  parameters: {
14906
- query?: never;
15854
+ query: {
15855
+ /** @description Repeat this query parameter for each UUID. Between 1 and 50 entries, deduplicated in first-requested order. */
15856
+ orderIds: string[];
15857
+ action: "ship" | "cancel" | "labels" | "update_tracking";
15858
+ /** @description Session callers only. API keys resolve organization scope from the credential. */
15859
+ organizationId?: string;
15860
+ };
14907
15861
  header?: never;
14908
15862
  path?: never;
14909
15863
  cookie?: never;
14910
15864
  };
14911
- requestBody: {
14912
- content: {
14913
- /**
14914
- * @example {
14915
- * "name": "Acme Team"
14916
- * }
14917
- */
14918
- "application/json": {
14919
- /** @description Organization display name. */
14920
- name: string;
14921
- /**
14922
- * @description When true, Better Auth keeps the current active organization instead of switching active context.
14923
- * @default false
14924
- */
14925
- keepCurrentActiveOrganization?: boolean;
14926
- };
14927
- };
14928
- };
15865
+ requestBody?: never;
14929
15866
  responses: {
14930
- /** @description Organization created */
14931
- 201: {
15867
+ /** @description Request completed. Inspect data.success, per-target results and pendingCount for processing progress. */
15868
+ 200: {
14932
15869
  headers: {
14933
15870
  [name: string]: unknown;
14934
15871
  };
14935
15872
  content: {
14936
15873
  "application/json": {
14937
15874
  ok: boolean;
14938
- organizationId: string;
14939
- redirectUrl?: string;
14940
- organization: {
14941
- id: string;
14942
- name: string;
14943
- slug: string;
14944
- };
14945
- };
14946
- };
14947
- };
14948
- /** @description Bad Request - Invalid organization name or JSON */
14949
- 400: {
14950
- headers: {
14951
- [name: string]: unknown;
14952
- };
14953
- content?: never;
14954
- };
14955
- /** @description Unauthorized - Sign in is required */
14956
- 401: {
14957
- headers: {
14958
- [name: string]: unknown;
14959
- };
14960
- content?: never;
14961
- };
14962
- /** @description Internal Server Error */
14963
- 500: {
14964
- headers: {
14965
- [name: string]: unknown;
14966
- };
14967
- content?: never;
14968
- };
14969
- };
14970
- };
14971
- get_v1_price_books: {
14972
- parameters: {
14973
- query?: {
14974
- /** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
14975
- organizationId?: string;
14976
- /** @description Filter by marketplace platform: `shopee`, `lazada`, `tiktok`, `shopify`, `whatsapp`, `zalora`, `amazon`, or `ebay`. */
14977
- platform?:
14978
- | "shopee"
14979
- | "lazada"
14980
- | "tiktok"
14981
- | "shopify"
14982
- | "whatsapp"
14983
- | "zalora"
14984
- | "amazon"
14985
- | "ebay";
14986
- /** @description When `true`, return only enabled rules. */
14987
- enabledOnly?: boolean;
14988
- };
14989
- header?: never;
14990
- path?: never;
14991
- cookie?: never;
14992
- };
14993
- requestBody?: never;
14994
- responses: {
14995
- /** @description Price book rules returned. */
14996
- 200: {
14997
- headers: {
14998
- [name: string]: unknown;
14999
- };
15000
- content: {
15001
- "application/json": {
15002
- rules: Record<string, never>[];
15003
- total: number;
15875
+ apiVersion: string;
15876
+ /** Format: uuid */
15877
+ operationId: string;
15878
+ /** @enum {string} */
15879
+ status: "completed";
15880
+ data: {
15881
+ success: boolean;
15882
+ orderIds: string[];
15883
+ succeededCount: number;
15884
+ failedCount: number;
15885
+ results: {
15886
+ /** Format: uuid */
15887
+ orderId: string;
15888
+ success: boolean;
15889
+ choices: {
15890
+ id: string;
15891
+ label: string;
15892
+ description?: string;
15893
+ /** @description Send this as the action `payload` to use the choice. */
15894
+ payload?: {
15895
+ [key: string]: unknown;
15896
+ };
15897
+ /** @description The choice needs extra fields, such as a tracking number. */
15898
+ requiresInput?: boolean;
15899
+ }[];
15900
+ error?: string;
15901
+ }[];
15902
+ };
15903
+ links: {
15904
+ [key: string]: string;
15905
+ };
15906
+ warnings: string[];
15907
+ recommendations: string[];
15004
15908
  };
15005
15909
  };
15006
15910
  };
15007
- /** @description Bad Request (invalid platform filter) */
15911
+ /** @description Invalid request, conflicting operations, singular arguments or a batch exceeding the endpoint limit. */
15008
15912
  400: {
15009
15913
  headers: {
15010
15914
  [name: string]: unknown;
15011
15915
  };
15012
15916
  content?: never;
15013
15917
  };
15014
- /** @description Unauthorized */
15918
+ /** @description Missing or invalid credentials. */
15015
15919
  401: {
15016
15920
  headers: {
15017
15921
  [name: string]: unknown;
15018
15922
  };
15019
15923
  content?: never;
15020
15924
  };
15021
- /** @description Forbidden or missing `price_books:read` scope */
15925
+ /** @description Missing scope, organization mismatch, or a target outside the caller's assigned stores and markets. */
15022
15926
  403: {
15023
15927
  headers: {
15024
15928
  [name: string]: unknown;
15025
15929
  };
15026
15930
  content?: never;
15027
15931
  };
15028
- /** @description Rate limit exceeded */
15932
+ /** @description Rate limit exceeded. */
15029
15933
  429: {
15030
15934
  headers: {
15031
15935
  [name: string]: unknown;
15032
15936
  };
15033
15937
  content?: never;
15034
15938
  };
15035
- /** @description Internal Server Error */
15036
- 500: {
15939
+ /** @description Service unavailable. Retry a submission with the same requestId and unchanged operations. */
15940
+ 503: {
15037
15941
  headers: {
15038
15942
  [name: string]: unknown;
15039
15943
  };
@@ -15041,7 +15945,7 @@ interface operations {
15041
15945
  };
15042
15946
  };
15043
15947
  };
15044
- post_v1_price_books: {
15948
+ post_v1_orders_actions: {
15045
15949
  parameters: {
15046
15950
  query?: never;
15047
15951
  header?: never;
@@ -15050,94 +15954,99 @@ interface operations {
15050
15954
  };
15051
15955
  requestBody: {
15052
15956
  content: {
15053
- /**
15054
- * @example {
15055
- * "platform": "shopee",
15056
- * "marginValue": 10,
15057
- * "country": "singapore",
15058
- * "rounding": "currency_minor",
15059
- * "currency": "SGD",
15060
- * "enabled": true
15061
- * }
15062
- */
15063
15957
  "application/json": {
15064
- /** @description Required for session auth across multiple organizations. Optional for OAuth/API keys bound to one organization. */
15958
+ /** Format: uuid */
15959
+ requestId: string;
15960
+ operations: {
15961
+ /** Format: uuid */
15962
+ orderId: string;
15963
+ /** @enum {string} */
15964
+ action: "ship" | "cancel" | "labels" | "update_tracking";
15965
+ /** @default {} */
15966
+ payload?: {
15967
+ [key: string]: unknown;
15968
+ };
15969
+ }[];
15970
+ /** @description Session callers only. API keys resolve organization scope from the credential. */
15065
15971
  organizationId?: string;
15066
- /** @enum {string} */
15067
- platform:
15068
- | "shopee"
15069
- | "lazada"
15070
- | "tiktok"
15071
- | "shopify"
15072
- | "whatsapp"
15073
- | "zalora"
15074
- | "amazon"
15075
- | "ebay";
15076
- /** @description Optional connected store ID. Null/omit applies to all stores for the platform. */
15077
- storeId?: string | null;
15078
- /** @description Optional country scope (name or code). Null/omit applies to all countries. */
15079
- country?: string | null;
15080
- /** @description Markup percent applied to the catalog price. Ignored when `expression` is set. */
15081
- marginValue: number;
15082
- /** @description Buyer formula. `price` is the catalog price. Supports arithmetic, percentages, CEILING, IF, and CURRENCY(rate, "USD"). Replaces markup percent. */
15083
- expression?: string | null;
15084
- /**
15085
- * @description Defaults to `currency_minor` when omitted.
15086
- * @enum {string}
15087
- */
15088
- rounding?: "none" | "currency_minor" | "nearest_0_05" | "nearest_1";
15089
- /** @description Optional ISO 4217 currency for `currency_minor` rounding. */
15090
- currency?: string | null;
15091
- /**
15092
- * @description Whether the rule is active. Defaults to true.
15093
- * @default true
15094
- */
15095
- enabled?: boolean;
15096
15972
  };
15097
15973
  };
15098
15974
  };
15099
15975
  responses: {
15100
- /** @description Price book rule created. */
15101
- 201: {
15976
+ /** @description Decisions queued. Inspect every job; acceptance does not mean success. */
15977
+ 202: {
15102
15978
  headers: {
15103
15979
  [name: string]: unknown;
15104
15980
  };
15105
15981
  content: {
15106
15982
  "application/json": {
15107
- rule: Record<string, never>;
15983
+ ok: boolean;
15984
+ apiVersion: string;
15985
+ /** Format: uuid */
15986
+ operationId: string;
15987
+ /** @enum {string} */
15988
+ status: "accepted";
15989
+ data: {
15990
+ correlations: {
15991
+ /** @constant */
15992
+ kind: "order_action";
15993
+ /** Format: uuid */
15994
+ id: string;
15995
+ }[];
15996
+ success: boolean;
15997
+ orderIds: string[];
15998
+ succeededCount: number;
15999
+ failedCount: number;
16000
+ jobIds: string[];
16001
+ results: {
16002
+ /** Format: uuid */
16003
+ orderId: string;
16004
+ success: boolean;
16005
+ /** Format: uuid */
16006
+ jobId?: string;
16007
+ jobStatus?: string;
16008
+ duplicate?: boolean;
16009
+ error?: string;
16010
+ }[];
16011
+ };
16012
+ links: {
16013
+ [key: string]: string;
16014
+ };
16015
+ warnings: string[];
16016
+ recommendations: string[];
15108
16017
  };
15109
16018
  };
15110
16019
  };
15111
- /** @description Bad Request (invalid payload, markup range, or duplicate platform/store/country scope) */
16020
+ /** @description Invalid request, conflicting operations, singular arguments or a batch exceeding the endpoint limit. */
15112
16021
  400: {
15113
16022
  headers: {
15114
16023
  [name: string]: unknown;
15115
16024
  };
15116
16025
  content?: never;
15117
16026
  };
15118
- /** @description Unauthorized */
16027
+ /** @description Missing or invalid credentials. */
15119
16028
  401: {
15120
16029
  headers: {
15121
16030
  [name: string]: unknown;
15122
16031
  };
15123
16032
  content?: never;
15124
16033
  };
15125
- /** @description Forbidden or missing `price_books:write` scope */
16034
+ /** @description Missing scope, organization mismatch, or a target outside the caller's assigned stores and markets. */
15126
16035
  403: {
15127
16036
  headers: {
15128
16037
  [name: string]: unknown;
15129
16038
  };
15130
16039
  content?: never;
15131
16040
  };
15132
- /** @description Rate limit exceeded */
16041
+ /** @description Rate limit exceeded. */
15133
16042
  429: {
15134
16043
  headers: {
15135
16044
  [name: string]: unknown;
15136
16045
  };
15137
16046
  content?: never;
15138
16047
  };
15139
- /** @description Internal Server Error */
15140
- 500: {
16048
+ /** @description Service unavailable. Retry a submission with the same requestId and unchanged operations. */
16049
+ 503: {
15141
16050
  headers: {
15142
16051
  [name: string]: unknown;
15143
16052
  };
@@ -15145,54 +16054,112 @@ interface operations {
15145
16054
  };
15146
16055
  };
15147
16056
  };
15148
- get_v1_price_books_by_ruleid: {
16057
+ get_v1_orders_actions_jobs: {
15149
16058
  parameters: {
15150
- query?: {
15151
- /** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
16059
+ query: {
16060
+ /** @description Repeat this query parameter for each UUID. Between 1 and 50 entries, deduplicated in first-requested order. */
16061
+ jobIds: string[];
16062
+ /** @description Session callers only. API keys resolve organization scope from the credential. */
15152
16063
  organizationId?: string;
15153
16064
  };
15154
16065
  header?: never;
15155
- path: {
15156
- ruleId: string;
15157
- };
16066
+ path?: never;
15158
16067
  cookie?: never;
15159
16068
  };
15160
16069
  requestBody?: never;
15161
16070
  responses: {
15162
- /** @description Price book rule returned. */
16071
+ /** @description Request completed. Inspect data.success, per-target results and pendingCount for processing progress. */
15163
16072
  200: {
15164
16073
  headers: {
15165
16074
  [name: string]: unknown;
15166
16075
  };
15167
16076
  content: {
15168
16077
  "application/json": {
15169
- rule: Record<string, never>;
16078
+ ok: boolean;
16079
+ apiVersion: string;
16080
+ /** Format: uuid */
16081
+ operationId: string;
16082
+ /** @enum {string} */
16083
+ status: "completed";
16084
+ data: {
16085
+ success: boolean;
16086
+ orderIds: string[];
16087
+ succeededCount: number;
16088
+ failedCount: number;
16089
+ jobIds: string[];
16090
+ pendingCount: number;
16091
+ results: {
16092
+ id: string;
16093
+ orderId: string;
16094
+ /** @enum {string} */
16095
+ action: "ship" | "cancel" | "labels" | "update_tracking";
16096
+ /** @enum {string} */
16097
+ status:
16098
+ | "queued"
16099
+ | "running"
16100
+ | "succeeded"
16101
+ | "failed"
16102
+ | "not_supported";
16103
+ errorMessage: string | null;
16104
+ updatedAt: string | null;
16105
+ completedAt: string | null;
16106
+ /** @description Shipping label files. Filled when a `labels` job has succeeded. */
16107
+ labels: {
16108
+ /** @description Download URL of the label file. */
16109
+ url: string;
16110
+ name: string | null;
16111
+ mimeType: string | null;
16112
+ }[];
16113
+ /** Format: uuid */
16114
+ jobId: string;
16115
+ success: boolean;
16116
+ }[];
16117
+ };
16118
+ links: {
16119
+ [key: string]: string;
16120
+ };
16121
+ warnings: string[];
16122
+ recommendations: string[];
15170
16123
  };
15171
16124
  };
15172
16125
  };
15173
- /** @description Unauthorized */
16126
+ /** @description Invalid request, conflicting operations, singular arguments or a batch exceeding the endpoint limit. */
16127
+ 400: {
16128
+ headers: {
16129
+ [name: string]: unknown;
16130
+ };
16131
+ content?: never;
16132
+ };
16133
+ /** @description Missing or invalid credentials. */
15174
16134
  401: {
15175
16135
  headers: {
15176
16136
  [name: string]: unknown;
15177
16137
  };
15178
16138
  content?: never;
15179
16139
  };
15180
- /** @description Forbidden or missing `price_books:read` scope */
16140
+ /** @description Missing scope, organization mismatch, or a target outside the caller's assigned stores and markets. */
15181
16141
  403: {
15182
16142
  headers: {
15183
16143
  [name: string]: unknown;
15184
16144
  };
15185
16145
  content?: never;
15186
16146
  };
15187
- /** @description Price book rule not found */
16147
+ /** @description A job was not found in the authenticated organization. */
15188
16148
  404: {
15189
16149
  headers: {
15190
16150
  [name: string]: unknown;
15191
16151
  };
15192
16152
  content?: never;
15193
16153
  };
15194
- /** @description Internal Server Error */
15195
- 500: {
16154
+ /** @description Rate limit exceeded. */
16155
+ 429: {
16156
+ headers: {
16157
+ [name: string]: unknown;
16158
+ };
16159
+ content?: never;
16160
+ };
16161
+ /** @description Service unavailable. Retry a submission with the same requestId and unchanged operations. */
16162
+ 503: {
15196
16163
  headers: {
15197
16164
  [name: string]: unknown;
15198
16165
  };
@@ -15200,21 +16167,25 @@ interface operations {
15200
16167
  };
15201
16168
  };
15202
16169
  };
15203
- delete_v1_price_books_by_ruleid: {
16170
+ post_v1_orders_picking_list: {
15204
16171
  parameters: {
15205
- query?: {
15206
- /** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
15207
- organizationId?: string;
15208
- };
16172
+ query?: never;
15209
16173
  header?: never;
15210
- path: {
15211
- ruleId: string;
15212
- };
16174
+ path?: never;
15213
16175
  cookie?: never;
15214
16176
  };
15215
- requestBody?: never;
15216
- responses: {
15217
- /** @description Price book rule deleted. */
16177
+ requestBody: {
16178
+ content: {
16179
+ "application/json": {
16180
+ orderIds: string[];
16181
+ timeZone?: string;
16182
+ /** @description Session callers only. API keys resolve organization scope from the credential. */
16183
+ organizationId?: string;
16184
+ };
16185
+ };
16186
+ };
16187
+ responses: {
16188
+ /** @description Request completed. Inspect data.success, per-target results and pendingCount for processing progress. */
15218
16189
  200: {
15219
16190
  headers: {
15220
16191
  [name: string]: unknown;
@@ -15222,32 +16193,87 @@ interface operations {
15222
16193
  content: {
15223
16194
  "application/json": {
15224
16195
  ok: boolean;
16196
+ apiVersion: string;
16197
+ /** Format: uuid */
16198
+ operationId: string;
16199
+ /** @enum {string} */
16200
+ status: "completed";
16201
+ data: {
16202
+ success: boolean;
16203
+ orderIds: string[];
16204
+ succeededCount: number;
16205
+ failedCount: number;
16206
+ documentIds: string[];
16207
+ documentId: string;
16208
+ fileName: string;
16209
+ /** @constant */
16210
+ mimeType: "application/pdf";
16211
+ /** Format: uri */
16212
+ downloadUrl: string;
16213
+ /** Format: date-time */
16214
+ expiresAt: string;
16215
+ results: {
16216
+ /** Format: uuid */
16217
+ orderId: string;
16218
+ /** @constant */
16219
+ success: true;
16220
+ }[];
16221
+ list: {
16222
+ storeLabel: string;
16223
+ userLabel: string;
16224
+ printedAtLabel: string;
16225
+ orderQuantity: number;
16226
+ productQuantity: number;
16227
+ itemQuantity: number;
16228
+ rows: {
16229
+ productName: string;
16230
+ imageUrl: string | null;
16231
+ sku: string;
16232
+ variation: string | null;
16233
+ priceLabel: string;
16234
+ quantity: number;
16235
+ orderIds: string[];
16236
+ }[];
16237
+ };
16238
+ };
16239
+ links: {
16240
+ [key: string]: string;
16241
+ };
16242
+ warnings: string[];
16243
+ recommendations: string[];
15225
16244
  };
15226
16245
  };
15227
16246
  };
15228
- /** @description Unauthorized */
16247
+ /** @description Invalid request, conflicting operations, singular arguments or a batch exceeding the endpoint limit. */
16248
+ 400: {
16249
+ headers: {
16250
+ [name: string]: unknown;
16251
+ };
16252
+ content?: never;
16253
+ };
16254
+ /** @description Missing or invalid credentials. */
15229
16255
  401: {
15230
16256
  headers: {
15231
16257
  [name: string]: unknown;
15232
16258
  };
15233
16259
  content?: never;
15234
16260
  };
15235
- /** @description Forbidden or missing `price_books:write` scope */
16261
+ /** @description Missing scope, organization mismatch, or a target outside the caller's assigned stores and markets. */
15236
16262
  403: {
15237
16263
  headers: {
15238
16264
  [name: string]: unknown;
15239
16265
  };
15240
16266
  content?: never;
15241
16267
  };
15242
- /** @description Price book rule not found */
15243
- 404: {
16268
+ /** @description Rate limit exceeded. */
16269
+ 429: {
15244
16270
  headers: {
15245
16271
  [name: string]: unknown;
15246
16272
  };
15247
16273
  content?: never;
15248
16274
  };
15249
- /** @description Internal Server Error */
15250
- 500: {
16275
+ /** @description Service unavailable. Retry a submission with the same requestId and unchanged operations. */
16276
+ 503: {
15251
16277
  headers: {
15252
16278
  [name: string]: unknown;
15253
16279
  };
@@ -15255,53 +16281,110 @@ interface operations {
15255
16281
  };
15256
16282
  };
15257
16283
  };
15258
- patch_v1_price_books_by_ruleid: {
16284
+ post_v1_organizations: {
15259
16285
  parameters: {
15260
- query?: {
15261
- /** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
15262
- organizationId?: string;
15263
- };
16286
+ query?: never;
15264
16287
  header?: never;
15265
- path: {
15266
- ruleId: string;
15267
- };
16288
+ path?: never;
15268
16289
  cookie?: never;
15269
16290
  };
15270
16291
  requestBody: {
15271
16292
  content: {
15272
16293
  /**
15273
16294
  * @example {
15274
- * "marginValue": 12.5,
15275
- * "enabled": true
16295
+ * "name": "Acme Team"
15276
16296
  * }
15277
16297
  */
15278
16298
  "application/json": {
15279
- organizationId?: string;
15280
- storeId?: string | null;
15281
- country?: string | null;
15282
- marginValue?: number;
15283
- /** @enum {string} */
15284
- rounding?: "none" | "currency_minor" | "nearest_0_05" | "nearest_1";
15285
- currency?: string | null;
15286
- /** @description Buyer formula. `price` is the catalog price. Null clears the formula and markup percent applies again. */
15287
- expression?: string | null;
15288
- enabled?: boolean;
16299
+ /** @description Organization display name. */
16300
+ name: string;
16301
+ /**
16302
+ * @description When true, Better Auth keeps the current active organization instead of switching active context.
16303
+ * @default false
16304
+ */
16305
+ keepCurrentActiveOrganization?: boolean;
15289
16306
  };
15290
16307
  };
15291
16308
  };
15292
16309
  responses: {
15293
- /** @description Price book rule updated. */
16310
+ /** @description Organization created */
16311
+ 201: {
16312
+ headers: {
16313
+ [name: string]: unknown;
16314
+ };
16315
+ content: {
16316
+ "application/json": {
16317
+ ok: boolean;
16318
+ organizationId: string;
16319
+ redirectUrl?: string;
16320
+ organization: {
16321
+ id: string;
16322
+ name: string;
16323
+ slug: string;
16324
+ };
16325
+ };
16326
+ };
16327
+ };
16328
+ /** @description Bad Request - Invalid organization name or JSON */
16329
+ 400: {
16330
+ headers: {
16331
+ [name: string]: unknown;
16332
+ };
16333
+ content?: never;
16334
+ };
16335
+ /** @description Unauthorized - Sign in is required */
16336
+ 401: {
16337
+ headers: {
16338
+ [name: string]: unknown;
16339
+ };
16340
+ content?: never;
16341
+ };
16342
+ /** @description Internal Server Error */
16343
+ 500: {
16344
+ headers: {
16345
+ [name: string]: unknown;
16346
+ };
16347
+ content?: never;
16348
+ };
16349
+ };
16350
+ };
16351
+ get_v1_price_books: {
16352
+ parameters: {
16353
+ query?: {
16354
+ /** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
16355
+ organizationId?: string;
16356
+ /** @description Filter by marketplace platform: `shopee`, `lazada`, `tiktok`, `shopify`, `whatsapp`, `zalora`, `amazon`, or `ebay`. */
16357
+ platform?:
16358
+ | "shopee"
16359
+ | "lazada"
16360
+ | "tiktok"
16361
+ | "shopify"
16362
+ | "whatsapp"
16363
+ | "zalora"
16364
+ | "amazon"
16365
+ | "ebay";
16366
+ /** @description When `true`, return only enabled rules. */
16367
+ enabledOnly?: boolean;
16368
+ };
16369
+ header?: never;
16370
+ path?: never;
16371
+ cookie?: never;
16372
+ };
16373
+ requestBody?: never;
16374
+ responses: {
16375
+ /** @description Price book rules returned. */
15294
16376
  200: {
15295
16377
  headers: {
15296
16378
  [name: string]: unknown;
15297
16379
  };
15298
16380
  content: {
15299
16381
  "application/json": {
15300
- rule: Record<string, never>;
16382
+ rules: Record<string, never>[];
16383
+ total: number;
15301
16384
  };
15302
16385
  };
15303
16386
  };
15304
- /** @description Bad Request */
16387
+ /** @description Bad Request (invalid platform filter) */
15305
16388
  400: {
15306
16389
  headers: {
15307
16390
  [name: string]: unknown;
@@ -15315,15 +16398,15 @@ interface operations {
15315
16398
  };
15316
16399
  content?: never;
15317
16400
  };
15318
- /** @description Forbidden or missing `price_books:write` scope */
16401
+ /** @description Forbidden or missing `price_books:read` scope */
15319
16402
  403: {
15320
16403
  headers: {
15321
16404
  [name: string]: unknown;
15322
16405
  };
15323
16406
  content?: never;
15324
16407
  };
15325
- /** @description Price book rule not found */
15326
- 404: {
16408
+ /** @description Rate limit exceeded */
16409
+ 429: {
15327
16410
  headers: {
15328
16411
  [name: string]: unknown;
15329
16412
  };
@@ -15338,7 +16421,7 @@ interface operations {
15338
16421
  };
15339
16422
  };
15340
16423
  };
15341
- post_v1_price_books_preview: {
16424
+ post_v1_price_books: {
15342
16425
  parameters: {
15343
16426
  query?: never;
15344
16427
  header?: never;
@@ -15350,9 +16433,11 @@ interface operations {
15350
16433
  /**
15351
16434
  * @example {
15352
16435
  * "platform": "shopee",
15353
- * "listPrice": 100,
16436
+ * "marginValue": 10,
15354
16437
  * "country": "singapore",
15355
- * "currency": "SGD"
16438
+ * "rounding": "currency_minor",
16439
+ * "currency": "SGD",
16440
+ * "enabled": true
15356
16441
  * }
15357
16442
  */
15358
16443
  "application/json": {
@@ -15368,45 +16453,42 @@ interface operations {
15368
16453
  | "zalora"
15369
16454
  | "amazon"
15370
16455
  | "ebay";
15371
- /** @description Canonical list price to mark up. */
15372
- listPrice: number;
16456
+ /** @description Optional connected store ID. Null/omit applies to all stores for the platform. */
15373
16457
  storeId?: string | null;
16458
+ /** @description Optional country scope (name or code). Null/omit applies to all countries. */
15374
16459
  country?: string | null;
16460
+ /** @description Markup percent applied to the catalog price. Ignored when `expression` is set. */
16461
+ marginValue: number;
16462
+ /** @description Buyer formula. `price` is the catalog price. Supports arithmetic, percentages, CEILING, IF, and CURRENCY(rate, "USD"). Replaces markup percent. */
16463
+ expression?: string | null;
16464
+ /**
16465
+ * @description Defaults to `currency_minor` when omitted.
16466
+ * @enum {string}
16467
+ */
16468
+ rounding?: "none" | "currency_minor" | "nearest_0_05" | "nearest_1";
16469
+ /** @description Optional ISO 4217 currency for `currency_minor` rounding. */
15375
16470
  currency?: string | null;
15376
16471
  /**
15377
- * Format: uuid
15378
- * @description Optional force a specific rule instead of specificity matching.
16472
+ * @description Whether the rule is active. Defaults to true.
16473
+ * @default true
15379
16474
  */
15380
- ruleId?: string;
16475
+ enabled?: boolean;
15381
16476
  };
15382
16477
  };
15383
16478
  };
15384
16479
  responses: {
15385
- /** @description Preview computed. */
15386
- 200: {
16480
+ /** @description Price book rule created. */
16481
+ 201: {
15387
16482
  headers: {
15388
16483
  [name: string]: unknown;
15389
16484
  };
15390
16485
  content: {
15391
16486
  "application/json": {
15392
- listPrice: number;
15393
- channelListPrice: number;
15394
- applied: boolean;
15395
- /** @enum {string} */
15396
- source: "price_book" | "canonical";
15397
- markupPercent?: number;
15398
- /** @description Listed currency when known. A buyer formula with CURRENCY sets it. */
15399
- currency?: string;
15400
- /** @description Present and true when the buyer formula lists below the catalog price in the same currency. This is usually a payout formula, price * (1 - fees), used where the gross-up, price / (1 - fees), was meant. */
15401
- belowCatalogPrice?: boolean;
15402
- /** @description Set when the matched buyer formula cannot price this list price. Publish fails for that listing instead of using the catalog price. */
15403
- formulaError?: string;
15404
- rule?: Record<string, never> | null;
15405
- message?: string;
16487
+ rule: Record<string, never>;
15406
16488
  };
15407
16489
  };
15408
16490
  };
15409
- /** @description Bad Request, or the forced `ruleId` has a buyer formula that cannot price this list price */
16491
+ /** @description Bad Request (invalid payload, markup range, or duplicate platform/store/country scope) */
15410
16492
  400: {
15411
16493
  headers: {
15412
16494
  [name: string]: unknown;
@@ -15420,15 +16502,15 @@ interface operations {
15420
16502
  };
15421
16503
  content?: never;
15422
16504
  };
15423
- /** @description Forbidden or missing `price_books:read` scope */
16505
+ /** @description Forbidden or missing `price_books:write` scope */
15424
16506
  403: {
15425
16507
  headers: {
15426
16508
  [name: string]: unknown;
15427
16509
  };
15428
16510
  content?: never;
15429
16511
  };
15430
- /** @description Price book rule not found (when ruleId is set) */
15431
- 404: {
16512
+ /** @description Rate limit exceeded */
16513
+ 429: {
15432
16514
  headers: {
15433
16515
  [name: string]: unknown;
15434
16516
  };
@@ -15443,46 +16525,344 @@ interface operations {
15443
16525
  };
15444
16526
  };
15445
16527
  };
15446
- get_v1_products: {
16528
+ get_v1_price_books_by_ruleid: {
15447
16529
  parameters: {
15448
16530
  query?: {
15449
- /** @description Filter by one catalog view status. Lifecycle values include draft, active, archived and deleted; derived views include flagged, errors, qc_pending and qc_rejected. A product may have a lifecycle value and multiple derived signals simultaneously. */
15450
- status?: string;
15451
- /** @description Filter by enabled marketplace. */
15452
- marketplace?:
15453
- | "shopee"
15454
- | "lazada"
15455
- | "tiktok"
15456
- | "shopify"
15457
- | "whatsapp"
15458
- | "zalora"
15459
- | "amazon"
15460
- | "ebay";
15461
- /** @description Filter by marketplace country (e.g., Singapore, Malaysia). */
15462
- country?: string;
15463
- /** @description Search query for product name or SKU. */
15464
- q?: string;
15465
- /** @description Exact catalog SKU match after trim. Not fuzzy and not substring. Repeat the parameter or comma-separate up to 50 SKUs. Combined with other filters using AND. */
15466
- sku?: string;
15467
- /** @description Minimum price filter. */
15468
- minPrice?: number;
15469
- /** @description Maximum price filter. */
15470
- maxPrice?: number;
15471
- /** @description Sort order for results. */
15472
- sortBy?:
15473
- | "updated_desc"
15474
- | "updated_asc"
15475
- | "created_desc"
15476
- | "created_asc"
15477
- | "price_asc"
15478
- | "price_desc"
15479
- | "name_asc"
15480
- | "name_desc"
15481
- | "stock_asc"
15482
- | "stock_desc"
15483
- | "status_asc"
15484
- | "status_desc"
15485
- | "marketplace_asc"
16531
+ /** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
16532
+ organizationId?: string;
16533
+ };
16534
+ header?: never;
16535
+ path: {
16536
+ ruleId: string;
16537
+ };
16538
+ cookie?: never;
16539
+ };
16540
+ requestBody?: never;
16541
+ responses: {
16542
+ /** @description Price book rule returned. */
16543
+ 200: {
16544
+ headers: {
16545
+ [name: string]: unknown;
16546
+ };
16547
+ content: {
16548
+ "application/json": {
16549
+ rule: Record<string, never>;
16550
+ };
16551
+ };
16552
+ };
16553
+ /** @description Unauthorized */
16554
+ 401: {
16555
+ headers: {
16556
+ [name: string]: unknown;
16557
+ };
16558
+ content?: never;
16559
+ };
16560
+ /** @description Forbidden or missing `price_books:read` scope */
16561
+ 403: {
16562
+ headers: {
16563
+ [name: string]: unknown;
16564
+ };
16565
+ content?: never;
16566
+ };
16567
+ /** @description Price book rule not found */
16568
+ 404: {
16569
+ headers: {
16570
+ [name: string]: unknown;
16571
+ };
16572
+ content?: never;
16573
+ };
16574
+ /** @description Internal Server Error */
16575
+ 500: {
16576
+ headers: {
16577
+ [name: string]: unknown;
16578
+ };
16579
+ content?: never;
16580
+ };
16581
+ };
16582
+ };
16583
+ delete_v1_price_books_by_ruleid: {
16584
+ parameters: {
16585
+ query?: {
16586
+ /** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
16587
+ organizationId?: string;
16588
+ };
16589
+ header?: never;
16590
+ path: {
16591
+ ruleId: string;
16592
+ };
16593
+ cookie?: never;
16594
+ };
16595
+ requestBody?: never;
16596
+ responses: {
16597
+ /** @description Price book rule deleted. */
16598
+ 200: {
16599
+ headers: {
16600
+ [name: string]: unknown;
16601
+ };
16602
+ content: {
16603
+ "application/json": {
16604
+ ok: boolean;
16605
+ };
16606
+ };
16607
+ };
16608
+ /** @description Unauthorized */
16609
+ 401: {
16610
+ headers: {
16611
+ [name: string]: unknown;
16612
+ };
16613
+ content?: never;
16614
+ };
16615
+ /** @description Forbidden or missing `price_books:write` scope */
16616
+ 403: {
16617
+ headers: {
16618
+ [name: string]: unknown;
16619
+ };
16620
+ content?: never;
16621
+ };
16622
+ /** @description Price book rule not found */
16623
+ 404: {
16624
+ headers: {
16625
+ [name: string]: unknown;
16626
+ };
16627
+ content?: never;
16628
+ };
16629
+ /** @description Internal Server Error */
16630
+ 500: {
16631
+ headers: {
16632
+ [name: string]: unknown;
16633
+ };
16634
+ content?: never;
16635
+ };
16636
+ };
16637
+ };
16638
+ patch_v1_price_books_by_ruleid: {
16639
+ parameters: {
16640
+ query?: {
16641
+ /** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
16642
+ organizationId?: string;
16643
+ };
16644
+ header?: never;
16645
+ path: {
16646
+ ruleId: string;
16647
+ };
16648
+ cookie?: never;
16649
+ };
16650
+ requestBody: {
16651
+ content: {
16652
+ /**
16653
+ * @example {
16654
+ * "marginValue": 12.5,
16655
+ * "enabled": true
16656
+ * }
16657
+ */
16658
+ "application/json": {
16659
+ organizationId?: string;
16660
+ storeId?: string | null;
16661
+ country?: string | null;
16662
+ marginValue?: number;
16663
+ /** @enum {string} */
16664
+ rounding?: "none" | "currency_minor" | "nearest_0_05" | "nearest_1";
16665
+ currency?: string | null;
16666
+ /** @description Buyer formula. `price` is the catalog price. Null clears the formula and markup percent applies again. */
16667
+ expression?: string | null;
16668
+ enabled?: boolean;
16669
+ };
16670
+ };
16671
+ };
16672
+ responses: {
16673
+ /** @description Price book rule updated. */
16674
+ 200: {
16675
+ headers: {
16676
+ [name: string]: unknown;
16677
+ };
16678
+ content: {
16679
+ "application/json": {
16680
+ rule: Record<string, never>;
16681
+ };
16682
+ };
16683
+ };
16684
+ /** @description Bad Request */
16685
+ 400: {
16686
+ headers: {
16687
+ [name: string]: unknown;
16688
+ };
16689
+ content?: never;
16690
+ };
16691
+ /** @description Unauthorized */
16692
+ 401: {
16693
+ headers: {
16694
+ [name: string]: unknown;
16695
+ };
16696
+ content?: never;
16697
+ };
16698
+ /** @description Forbidden or missing `price_books:write` scope */
16699
+ 403: {
16700
+ headers: {
16701
+ [name: string]: unknown;
16702
+ };
16703
+ content?: never;
16704
+ };
16705
+ /** @description Price book rule not found */
16706
+ 404: {
16707
+ headers: {
16708
+ [name: string]: unknown;
16709
+ };
16710
+ content?: never;
16711
+ };
16712
+ /** @description Internal Server Error */
16713
+ 500: {
16714
+ headers: {
16715
+ [name: string]: unknown;
16716
+ };
16717
+ content?: never;
16718
+ };
16719
+ };
16720
+ };
16721
+ post_v1_price_books_preview: {
16722
+ parameters: {
16723
+ query?: never;
16724
+ header?: never;
16725
+ path?: never;
16726
+ cookie?: never;
16727
+ };
16728
+ requestBody: {
16729
+ content: {
16730
+ /**
16731
+ * @example {
16732
+ * "platform": "shopee",
16733
+ * "listPrice": 100,
16734
+ * "country": "singapore",
16735
+ * "currency": "SGD"
16736
+ * }
16737
+ */
16738
+ "application/json": {
16739
+ /** @description Required for session auth across multiple organizations. Optional for OAuth/API keys bound to one organization. */
16740
+ organizationId?: string;
16741
+ /** @enum {string} */
16742
+ platform:
16743
+ | "shopee"
16744
+ | "lazada"
16745
+ | "tiktok"
16746
+ | "shopify"
16747
+ | "whatsapp"
16748
+ | "zalora"
16749
+ | "amazon"
16750
+ | "ebay";
16751
+ /** @description Canonical list price to mark up. */
16752
+ listPrice: number;
16753
+ storeId?: string | null;
16754
+ country?: string | null;
16755
+ currency?: string | null;
16756
+ /**
16757
+ * Format: uuid
16758
+ * @description Optional force a specific rule instead of specificity matching.
16759
+ */
16760
+ ruleId?: string;
16761
+ };
16762
+ };
16763
+ };
16764
+ responses: {
16765
+ /** @description Preview computed. */
16766
+ 200: {
16767
+ headers: {
16768
+ [name: string]: unknown;
16769
+ };
16770
+ content: {
16771
+ "application/json": {
16772
+ listPrice: number;
16773
+ channelListPrice: number;
16774
+ applied: boolean;
16775
+ /** @enum {string} */
16776
+ source: "price_book" | "canonical";
16777
+ markupPercent?: number;
16778
+ /** @description Listed currency when known. A buyer formula with CURRENCY sets it. */
16779
+ currency?: string;
16780
+ /** @description Present and true when the buyer formula lists below the catalog price in the same currency. This is usually a payout formula, price * (1 - fees), used where the gross-up, price / (1 - fees), was meant. */
16781
+ belowCatalogPrice?: boolean;
16782
+ /** @description Set when the matched buyer formula cannot price this list price. Publish fails for that listing instead of using the catalog price. */
16783
+ formulaError?: string;
16784
+ rule?: Record<string, never> | null;
16785
+ message?: string;
16786
+ };
16787
+ };
16788
+ };
16789
+ /** @description Bad Request, or the forced `ruleId` has a buyer formula that cannot price this list price */
16790
+ 400: {
16791
+ headers: {
16792
+ [name: string]: unknown;
16793
+ };
16794
+ content?: never;
16795
+ };
16796
+ /** @description Unauthorized */
16797
+ 401: {
16798
+ headers: {
16799
+ [name: string]: unknown;
16800
+ };
16801
+ content?: never;
16802
+ };
16803
+ /** @description Forbidden or missing `price_books:read` scope */
16804
+ 403: {
16805
+ headers: {
16806
+ [name: string]: unknown;
16807
+ };
16808
+ content?: never;
16809
+ };
16810
+ /** @description Price book rule not found (when ruleId is set) */
16811
+ 404: {
16812
+ headers: {
16813
+ [name: string]: unknown;
16814
+ };
16815
+ content?: never;
16816
+ };
16817
+ /** @description Internal Server Error */
16818
+ 500: {
16819
+ headers: {
16820
+ [name: string]: unknown;
16821
+ };
16822
+ content?: never;
16823
+ };
16824
+ };
16825
+ };
16826
+ get_v1_products: {
16827
+ parameters: {
16828
+ query?: {
16829
+ /** @description Filter by one catalog view status. Lifecycle values include draft, active, archived and deleted; derived views include flagged, errors, qc_pending and qc_rejected. A product may have a lifecycle value and multiple derived signals simultaneously. */
16830
+ status?: string;
16831
+ /** @description Filter by enabled marketplace. */
16832
+ marketplace?:
16833
+ | "shopee"
16834
+ | "lazada"
16835
+ | "tiktok"
16836
+ | "shopify"
16837
+ | "whatsapp"
16838
+ | "zalora"
16839
+ | "amazon"
16840
+ | "ebay";
16841
+ /** @description Filter by marketplace country (e.g., Singapore, Malaysia). */
16842
+ country?: string;
16843
+ /** @description Search query for product name or SKU. */
16844
+ q?: string;
16845
+ /** @description Exact catalog SKU match after trim. Not fuzzy and not substring. Repeat the parameter or comma-separate up to 50 SKUs. Combined with other filters using AND. */
16846
+ sku?: string;
16847
+ /** @description Minimum price filter. */
16848
+ minPrice?: number;
16849
+ /** @description Maximum price filter. */
16850
+ maxPrice?: number;
16851
+ /** @description Sort order for results. */
16852
+ sortBy?:
16853
+ | "updated_desc"
16854
+ | "updated_asc"
16855
+ | "created_desc"
16856
+ | "created_asc"
16857
+ | "price_asc"
16858
+ | "price_desc"
16859
+ | "name_asc"
16860
+ | "name_desc"
16861
+ | "stock_asc"
16862
+ | "stock_desc"
16863
+ | "status_asc"
16864
+ | "status_desc"
16865
+ | "marketplace_asc"
15486
16866
  | "marketplace_desc"
15487
16867
  | "country_asc"
15488
16868
  | "country_desc"
@@ -17191,6 +18571,7 @@ interface operations {
17191
18571
  | "lazada"
17192
18572
  | "tiktok"
17193
18573
  | "shopify"
18574
+ | "whatsapp"
17194
18575
  | "zalora"
17195
18576
  | "amazon"
17196
18577
  | "ebay";
@@ -17237,6 +18618,7 @@ interface operations {
17237
18618
  | "lazada"
17238
18619
  | "tiktok"
17239
18620
  | "shopify"
18621
+ | "whatsapp"
17240
18622
  | "zalora"
17241
18623
  | "amazon"
17242
18624
  | "ebay";
@@ -17291,6 +18673,7 @@ interface operations {
17291
18673
  | "lazada"
17292
18674
  | "tiktok"
17293
18675
  | "shopify"
18676
+ | "whatsapp"
17294
18677
  | "zalora"
17295
18678
  | "amazon"
17296
18679
  | "ebay";
@@ -17468,7 +18851,10 @@ interface operations {
17468
18851
  patch_v1_products_by_productid_price: {
17469
18852
  parameters: {
17470
18853
  query?: never;
17471
- header?: never;
18854
+ header?: {
18855
+ /** @description Idempotency key for an unchanged-price marketplace refresh. Reuse it for retries of that refresh; use a new key for a new refresh. */
18856
+ "Idempotency-Key"?: string;
18857
+ };
17472
18858
  path: {
17473
18859
  /** @description OmniCommerce simple-product or variant UUID. */
17474
18860
  productId: string;
@@ -17511,6 +18897,7 @@ interface operations {
17511
18897
  | "lazada"
17512
18898
  | "tiktok"
17513
18899
  | "shopify"
18900
+ | "whatsapp"
17514
18901
  | "zalora"
17515
18902
  | "amazon"
17516
18903
  | "ebay";
@@ -17561,6 +18948,7 @@ interface operations {
17561
18948
  | "lazada"
17562
18949
  | "tiktok"
17563
18950
  | "shopify"
18951
+ | "whatsapp"
17564
18952
  | "zalora"
17565
18953
  | "amazon"
17566
18954
  | "ebay";
@@ -17617,6 +19005,7 @@ interface operations {
17617
19005
  | "lazada"
17618
19006
  | "tiktok"
17619
19007
  | "shopify"
19008
+ | "whatsapp"
17620
19009
  | "zalora"
17621
19010
  | "amazon"
17622
19011
  | "ebay";
@@ -18885,19 +20274,250 @@ interface operations {
18885
20274
  };
18886
20275
  requestBody?: never;
18887
20276
  responses: {
18888
- /** @description Matching catalog product count */
20277
+ /** @description Matching catalog product count */
20278
+ 200: {
20279
+ headers: {
20280
+ [name: string]: unknown;
20281
+ };
20282
+ content: {
20283
+ "application/json": {
20284
+ count: number;
20285
+ /** @enum {string} */
20286
+ unit: "catalog_products";
20287
+ /** @description Normalized Products page filters used for this count. */
20288
+ filters: {
20289
+ [key: string]: string;
20290
+ };
20291
+ };
20292
+ };
20293
+ };
20294
+ /** @description Unauthorized */
20295
+ 401: {
20296
+ headers: {
20297
+ [name: string]: unknown;
20298
+ };
20299
+ content?: never;
20300
+ };
20301
+ /** @description Forbidden */
20302
+ 403: {
20303
+ headers: {
20304
+ [name: string]: unknown;
20305
+ };
20306
+ content?: never;
20307
+ };
20308
+ /** @description Rate limited */
20309
+ 429: {
20310
+ headers: {
20311
+ [name: string]: unknown;
20312
+ };
20313
+ content?: never;
20314
+ };
20315
+ /** @description Internal Server Error */
20316
+ 500: {
20317
+ headers: {
20318
+ [name: string]: unknown;
20319
+ };
20320
+ content?: never;
20321
+ };
20322
+ };
20323
+ };
20324
+ post_v1_products_enrich: {
20325
+ parameters: {
20326
+ query?: never;
20327
+ header?: never;
20328
+ path?: never;
20329
+ cookie?: never;
20330
+ };
20331
+ requestBody: {
20332
+ content: {
20333
+ /**
20334
+ * @example {
20335
+ * "productIds": [
20336
+ * "omni-product-id"
20337
+ * ],
20338
+ * "selectedFields": [
20339
+ * "description"
20340
+ * ],
20341
+ * "instructions": "Do not change the title. Do not add warranty or return information.",
20342
+ * "autoApplyHighConfidence": true,
20343
+ * "enrichmentAutoApplyThreshold": 0.7
20344
+ * }
20345
+ */
20346
+ "application/json": {
20347
+ /** @description Required for session auth; derived from the credential for bearer auth. */
20348
+ organizationId?: string;
20349
+ /** @description Existing Omni product IDs. Trimmed and deduplicated in requested order; at most 1,000 entries. */
20350
+ productIds: string[];
20351
+ /** @default true */
20352
+ includeListingCopy?: boolean;
20353
+ targetMarketplaces?: (
20354
+ | "shopee"
20355
+ | "lazada"
20356
+ | "tiktok"
20357
+ | "shopify"
20358
+ | "whatsapp"
20359
+ | "zalora"
20360
+ | "amazon"
20361
+ | "ebay"
20362
+ )[];
20363
+ marketplaceStoreSelections?: {
20364
+ [key: string]: string[] | string;
20365
+ };
20366
+ /** @description Fields to enrich. Omit for all content fields. Weight and dimensions are always included by the enrichment service. Exclude name to preserve the product title. */
20367
+ selectedFields?: (
20368
+ | "name"
20369
+ | "description"
20370
+ | "highlights"
20371
+ | "seoTitle"
20372
+ | "seoDescription"
20373
+ | "weight"
20374
+ | "dimensions"
20375
+ )[];
20376
+ instructions?: string;
20377
+ title?: string;
20378
+ /** @default false */
20379
+ autoApplyHighConfidence?: boolean;
20380
+ /** @description Confidence threshold for automatic application when enabled. Omit to use the organization's threshold. */
20381
+ enrichmentAutoApplyThreshold?: number;
20382
+ };
20383
+ };
20384
+ };
20385
+ responses: {
20386
+ /** @description Jobs accepted for background processing. */
20387
+ 202: {
20388
+ headers: {
20389
+ [name: string]: unknown;
20390
+ };
20391
+ content: {
20392
+ "application/json": {
20393
+ ok: boolean;
20394
+ apiVersion?: string;
20395
+ operationId?: string;
20396
+ /** @enum {string} */
20397
+ status: "accepted";
20398
+ jobId: string;
20399
+ links: {
20400
+ [key: string]: string;
20401
+ };
20402
+ warnings?: string[];
20403
+ recommendations?: string[];
20404
+ data: {
20405
+ /** @description True when all requested targets were accepted for processing. Does not mean processing completed. */
20406
+ success: boolean;
20407
+ queued: boolean;
20408
+ productIds: string[];
20409
+ jobIds: string[];
20410
+ succeededCount: number;
20411
+ failedCount: number;
20412
+ batchJobId?: string;
20413
+ enrichmentBatchId?: string;
20414
+ results: {
20415
+ productId: string;
20416
+ success: boolean;
20417
+ jobId: string;
20418
+ }[];
20419
+ };
20420
+ };
20421
+ };
20422
+ };
20423
+ /** @description Invalid request or queue preparation failed. Inspect the error before resubmitting. */
20424
+ 400: {
20425
+ headers: {
20426
+ [name: string]: unknown;
20427
+ };
20428
+ content?: never;
20429
+ };
20430
+ /** @description Missing or invalid credentials. */
20431
+ 401: {
20432
+ headers: {
20433
+ [name: string]: unknown;
20434
+ };
20435
+ content?: never;
20436
+ };
20437
+ /** @description Missing scope, insufficient permission, organization mismatch, or inactive organization. */
20438
+ 403: {
20439
+ headers: {
20440
+ [name: string]: unknown;
20441
+ };
20442
+ content?: never;
20443
+ };
20444
+ /** @description Target not found in the authenticated organization. */
20445
+ 404: {
20446
+ headers: {
20447
+ [name: string]: unknown;
20448
+ };
20449
+ content?: never;
20450
+ };
20451
+ /** @description An import or enrichment job is already active for the target. */
20452
+ 409: {
20453
+ headers: {
20454
+ [name: string]: unknown;
20455
+ };
20456
+ content?: never;
20457
+ };
20458
+ /** @description Rate limit exceeded. */
20459
+ 429: {
20460
+ headers: {
20461
+ [name: string]: unknown;
20462
+ };
20463
+ content?: never;
20464
+ };
20465
+ };
20466
+ };
20467
+ get_v1_promotions: {
20468
+ parameters: {
20469
+ query?: {
20470
+ /** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
20471
+ organizationId?: string;
20472
+ /** @description Search promotion name. */
20473
+ q?: string;
20474
+ /** @description Effective status filter: `all`, `draft`, `scheduled`, `active`, `paused`, `ended`, or `archived`. */
20475
+ status?:
20476
+ | "all"
20477
+ | "draft"
20478
+ | "scheduled"
20479
+ | "active"
20480
+ | "paused"
20481
+ | "ended"
20482
+ | "archived";
20483
+ /** @description Comma-separated marketplaces, for example `shopee,lazada,tiktok,shopify`. */
20484
+ marketplace?: string;
20485
+ /** @description Comma-separated promotion store keys (`marketplace:country:storeId`). */
20486
+ store?: string;
20487
+ /** @description Sort field. */
20488
+ sortBy?: "createdAt" | "updatedAt" | "name" | "startsAt" | "status";
20489
+ /** @description Sort direction. */
20490
+ sortDir?: "asc" | "desc";
20491
+ /** @description Page size. Default 20, max 50. */
20492
+ limit?: number;
20493
+ /** @description Zero-based pagination offset. */
20494
+ offset?: number;
20495
+ };
20496
+ header?: never;
20497
+ path?: never;
20498
+ cookie?: never;
20499
+ };
20500
+ requestBody?: never;
20501
+ responses: {
20502
+ /** @description Promotions page returned. */
18889
20503
  200: {
18890
20504
  headers: {
18891
20505
  [name: string]: unknown;
18892
20506
  };
18893
20507
  content: {
18894
20508
  "application/json": {
18895
- count: number;
18896
- /** @enum {string} */
18897
- unit: "catalog_products";
18898
- /** @description Normalized Products page filters used for this count. */
18899
- filters: {
18900
- [key: string]: string;
20509
+ items: Record<string, never>[];
20510
+ hasMore?: boolean;
20511
+ nextOffset?: number;
20512
+ summary: Record<string, never>;
20513
+ pagination: {
20514
+ offset?: number;
20515
+ limit?: number;
20516
+ total?: number;
20517
+ hasMore?: boolean;
20518
+ nextOffset?: number | null;
20519
+ maxLimit?: number;
20520
+ defaultLimit?: number;
18901
20521
  };
18902
20522
  };
18903
20523
  };
@@ -18909,14 +20529,14 @@ interface operations {
18909
20529
  };
18910
20530
  content?: never;
18911
20531
  };
18912
- /** @description Forbidden */
20532
+ /** @description Forbidden or missing `promotions:read` scope */
18913
20533
  403: {
18914
20534
  headers: {
18915
20535
  [name: string]: unknown;
18916
20536
  };
18917
20537
  content?: never;
18918
20538
  };
18919
- /** @description Rate limited */
20539
+ /** @description Rate limit exceeded */
18920
20540
  429: {
18921
20541
  headers: {
18922
20542
  [name: string]: unknown;
@@ -18932,7 +20552,7 @@ interface operations {
18932
20552
  };
18933
20553
  };
18934
20554
  };
18935
- post_v1_products_enrich: {
20555
+ post_v1_promotions: {
18936
20556
  parameters: {
18937
20557
  query?: never;
18938
20558
  header?: never;
@@ -18943,131 +20563,285 @@ interface operations {
18943
20563
  content: {
18944
20564
  /**
18945
20565
  * @example {
18946
- * "productIds": [
18947
- * "omni-product-id"
18948
- * ],
18949
- * "selectedFields": [
18950
- * "description"
20566
+ * "name": "Christmas",
20567
+ * "discountType": "fixed_amount",
20568
+ * "discountValue": 12,
20569
+ * "targetStores": [
20570
+ * {
20571
+ * "marketplace": "shopee",
20572
+ * "country": "singapore",
20573
+ * "storeId": "115085776"
20574
+ * }
18951
20575
  * ],
18952
- * "instructions": "Do not change the title. Do not add warranty or return information.",
18953
- * "autoApplyHighConfidence": true,
18954
- * "enrichmentAutoApplyThreshold": 0.7
20576
+ * "startsAt": "2026-07-06T17:00:00.000Z",
20577
+ * "endsAt": "2026-08-02T03:59:00.000Z"
18955
20578
  * }
18956
20579
  */
18957
20580
  "application/json": {
18958
- /** @description Required for session auth; derived from the credential for bearer auth. */
20581
+ /** @description Required for session auth across multiple organizations. Optional for OAuth/API keys bound to one organization. */
18959
20582
  organizationId?: string;
18960
- /** @description Existing Omni product IDs. Trimmed and deduplicated in requested order; at most 1,000 entries. */
18961
- productIds: string[];
18962
- /** @default true */
18963
- includeListingCopy?: boolean;
18964
- targetMarketplaces?: (
18965
- | "shopee"
18966
- | "lazada"
18967
- | "tiktok"
18968
- | "shopify"
18969
- | "whatsapp"
18970
- | "zalora"
18971
- | "amazon"
18972
- | "ebay"
18973
- )[];
18974
- marketplaceStoreSelections?: {
18975
- [key: string]: string[] | string;
20583
+ name: string;
20584
+ description?: string | null;
20585
+ /** @enum {string} */
20586
+ kind?:
20587
+ | "product_discount"
20588
+ | "flash_sale"
20589
+ | "voucher"
20590
+ | "gift_with_purchase"
20591
+ | "buy_x_get_y"
20592
+ | "bundle_deal"
20593
+ | "free_shipping"
20594
+ | "early_bird_price";
20595
+ /** @enum {string} */
20596
+ discountType: "percentage" | "fixed_amount";
20597
+ /** @description Discount amount or percentage. Use 0 for gift/sample-only and free Buy-X-Get-Y mechanics. */
20598
+ discountValue: number;
20599
+ /** @description Connected stores as `{ marketplace, country, storeId }`. Copy from existing promotion targetStores or product marketplaceDetails. */
20600
+ targetStores: {
20601
+ /** @enum {string} */
20602
+ marketplace:
20603
+ | "lazada"
20604
+ | "shopee"
20605
+ | "tiktok"
20606
+ | "shopify"
20607
+ | "amazon"
20608
+ | "zalora"
20609
+ | "ebay";
20610
+ country: string;
20611
+ storeId: string;
20612
+ }[];
20613
+ /**
20614
+ * @description Defaults to active. Future start dates display as scheduled. Use draft to save without activation; explicit inactive lifecycle states are preserved.
20615
+ * @default active
20616
+ * @enum {string}
20617
+ */
20618
+ status?:
20619
+ | "draft"
20620
+ | "scheduled"
20621
+ | "active"
20622
+ | "paused"
20623
+ | "ended"
20624
+ | "archived";
20625
+ /** Format: date-time */
20626
+ startsAt?: string | null;
20627
+ /** Format: date-time */
20628
+ endsAt?: string | null;
20629
+ minSalePrice?: number | null;
20630
+ maxDiscountAmount?: number | null;
20631
+ /** @description Lazada voucher minimum spend. Defaults to 1 when unset. */
20632
+ minSpend?: number | null;
20633
+ /** @description Total redemption/order limit, or per-SKU promotional quantity for flash sales. */
20634
+ totalUsageLimit?: number | null;
20635
+ mechanicConfig?: {
20636
+ /** @description Exact Shopee campaign/session for Campaign Voucher Nomination, with reviewed participation obligations. Nomination remains a draft until Shopee approval. */
20637
+ voucherCampaign?: {
20638
+ campaignId: string;
20639
+ sessionId: string;
20640
+ termsAccepted: boolean;
20641
+ };
20642
+ /**
20643
+ * @description Exact marketplace voucher subtype. Native types use APIs; Seller Center-only types use a browser AOP with per-store eligibility checks.
20644
+ * @enum {string|null}
20645
+ */
20646
+ voucherType?:
20647
+ | "shopee_shop"
20648
+ | "shopee_product"
20649
+ | "shopee_private"
20650
+ | "shopee_live"
20651
+ | "shopee_video"
20652
+ | "shopee_new_buyer"
20653
+ | "shopee_repeat_buyer"
20654
+ | "shopee_campaign"
20655
+ | "shopee_follow_prize"
20656
+ | "shopee_exclusive_streamer"
20657
+ | "shopee_welcome"
20658
+ | "shopee_member_repeat_buyer"
20659
+ | "shopee_exclusive"
20660
+ | "shopee_redemption"
20661
+ | "shopee_exclusive_creator"
20662
+ | "lazada_store_follower"
20663
+ | "lazada_regular"
20664
+ | "lazada_store_new_buyer"
20665
+ | "lazada_live"
20666
+ | "lazada_offline"
20667
+ | "lazada_co_funded"
20668
+ | "lazada_welcome"
20669
+ | "lazada_linked_member"
20670
+ | "lazada_new_member"
20671
+ | "lazada_member_exclusive"
20672
+ | "lazada_points_redeemable"
20673
+ | "tiktok_seller_coupon"
20674
+ | "shopify_discount_code"
20675
+ | "amazon_promotion_code"
20676
+ | "zalora_seller_voucher"
20677
+ | "ebay_coded_coupon"
20678
+ | null;
20679
+ browserAutomation?: {
20680
+ /** @description Optional overrides for the selected AOP's declared variables. promotionIds, action, and storeId are supplied automatically; the AOP loads the approved promotions with get_promotions. */
20681
+ variableValues?: {
20682
+ [key: string]: string;
20683
+ };
20684
+ /** @description Optional organization AOP override. Omit to select the built-in marketplace AOP. */
20685
+ aopId?: string;
20686
+ instructions?: string;
20687
+ } | null;
20688
+ /** @enum {string} */
20689
+ voucherScope?: "products" | "shop";
20690
+ /** @enum {string} */
20691
+ voucherReward?: "discount" | "coins_cashback";
20692
+ /** @description Approved Shopee usernames targeted by an Exclusive Streamer voucher. The Seller Centre API resolves eligible streamer identities; user IDs must not be supplied here. */
20693
+ exclusiveStreamerUsernames?: string[];
20694
+ /** @enum {string} */
20695
+ voucherAudience?: "general" | "shop_follow";
20696
+ /** @description Shopee supports all, feed, live, order_page (update only), or [] for hidden. Lazada requires exactly one of all, live, followers, offline; followers requires voucherScope=shop. */
20697
+ voucherDisplayChannels?: (
20698
+ | "all"
20699
+ | "feed"
20700
+ | "live"
20701
+ | "order_page"
20702
+ | "followers"
20703
+ | "offline"
20704
+ )[];
20705
+ /** @enum {string} */
20706
+ bundlePriceType?: "discount" | "fixed_price";
20707
+ bundleTiers?: {
20708
+ minimumQuantity: number;
20709
+ discountValue: number;
20710
+ }[];
20711
+ /** @enum {string} */
20712
+ thresholdType?: "item_quantity" | "order_amount";
20713
+ thresholdValue?: number;
20714
+ /** @enum {string} */
20715
+ giftType?: "gift" | "sample";
20716
+ giftQuantity?: number;
20717
+ gifts?: {
20718
+ /** Format: uuid */
20719
+ productId: string;
20720
+ /** Format: uuid */
20721
+ variantId?: string | null;
20722
+ totalClaimLimit: number;
20723
+ }[];
20724
+ buyQuantity?: number;
20725
+ getQuantity?: number;
20726
+ benefitProductIds?: string[];
20727
+ /** @enum {string} */
20728
+ benefitType?: "free" | "percentage" | "fixed_amount";
20729
+ benefitValue?: number;
20730
+ maxApplicationsPerOrder?: number;
20731
+ bundleMinimumQuantity?: number;
20732
+ /** @description Free shipping delivery option offered by the Lazada store; defaults to STANDARD. */
20733
+ shippingDeliveryOption?: string;
20734
+ /** @description Free shipping subsidy budget in the store currency. Omit for an unlimited budget. */
20735
+ shippingBudget?: number;
18976
20736
  };
18977
- /** @description Fields to enrich. Omit for all content fields. Weight and dimensions are always included by the enrichment service. Exclude name to preserve the product title. */
18978
- selectedFields?: (
18979
- | "name"
18980
- | "description"
18981
- | "highlights"
18982
- | "seoTitle"
18983
- | "seoDescription"
18984
- | "weight"
18985
- | "dimensions"
18986
- )[];
18987
- instructions?: string;
18988
- title?: string;
18989
- /** @default false */
18990
- autoApplyHighConfidence?: boolean;
18991
- /** @description Confidence threshold for automatic application when enabled. Omit to use the organization's threshold. */
18992
- enrichmentAutoApplyThreshold?: number;
20737
+ /** @description Patch discount overrides by exact target store key. Other stores retain their terms. Null discountValue restores shared terms for that store. */
20738
+ storeDiscounts?: {
20739
+ storeKey: string;
20740
+ /** @enum {string} */
20741
+ discountType: "percentage" | "fixed_amount";
20742
+ /** @description Percentage must not exceed 100. */
20743
+ discountValue: number | null;
20744
+ }[];
18993
20745
  };
18994
20746
  };
18995
20747
  };
18996
- responses: {
18997
- /** @description Jobs accepted for background processing. */
18998
- 202: {
20748
+ responses: {
20749
+ /** @description Promotion created. */
20750
+ 201: {
18999
20751
  headers: {
19000
20752
  [name: string]: unknown;
19001
20753
  };
19002
20754
  content: {
19003
20755
  "application/json": {
19004
- ok: boolean;
19005
- apiVersion?: string;
19006
- operationId?: string;
19007
- /** @enum {string} */
19008
- status: "accepted";
19009
- jobId: string;
19010
- links: {
19011
- [key: string]: string;
19012
- };
19013
- warnings?: string[];
19014
- recommendations?: string[];
19015
- data: {
19016
- /** @description True when all requested targets were accepted for processing. Does not mean processing completed. */
19017
- success: boolean;
19018
- queued: boolean;
19019
- productIds: string[];
19020
- jobIds: string[];
19021
- succeededCount: number;
19022
- failedCount: number;
19023
- batchJobId?: string;
19024
- enrichmentBatchId?: string;
19025
- results: {
19026
- productId: string;
19027
- success: boolean;
19028
- jobId: string;
19029
- }[];
19030
- };
20756
+ promotion: Record<string, never>;
19031
20757
  };
19032
20758
  };
19033
20759
  };
19034
- /** @description Invalid request or queue preparation failed. Inspect the error before resubmitting. */
20760
+ /** @description Bad Request */
19035
20761
  400: {
19036
20762
  headers: {
19037
20763
  [name: string]: unknown;
19038
20764
  };
19039
20765
  content?: never;
19040
20766
  };
19041
- /** @description Missing or invalid credentials. */
20767
+ /** @description Unauthorized */
19042
20768
  401: {
19043
20769
  headers: {
19044
20770
  [name: string]: unknown;
19045
20771
  };
19046
20772
  content?: never;
19047
20773
  };
19048
- /** @description Missing scope, insufficient permission, organization mismatch, or inactive organization. */
20774
+ /** @description Forbidden or missing `promotions:write` scope */
19049
20775
  403: {
19050
20776
  headers: {
19051
20777
  [name: string]: unknown;
19052
20778
  };
19053
20779
  content?: never;
19054
20780
  };
19055
- /** @description Target not found in the authenticated organization. */
19056
- 404: {
20781
+ /** @description Rate limit exceeded */
20782
+ 429: {
19057
20783
  headers: {
19058
20784
  [name: string]: unknown;
19059
20785
  };
19060
20786
  content?: never;
19061
20787
  };
19062
- /** @description An import or enrichment job is already active for the target. */
19063
- 409: {
20788
+ /** @description Internal Server Error */
20789
+ 500: {
19064
20790
  headers: {
19065
20791
  [name: string]: unknown;
19066
20792
  };
19067
20793
  content?: never;
19068
20794
  };
19069
- /** @description Rate limit exceeded. */
19070
- 429: {
20795
+ };
20796
+ };
20797
+ get_v1_promotions_by_promotionid: {
20798
+ parameters: {
20799
+ query?: {
20800
+ /** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
20801
+ organizationId?: string;
20802
+ };
20803
+ header?: never;
20804
+ path: {
20805
+ promotionId: string;
20806
+ };
20807
+ cookie?: never;
20808
+ };
20809
+ requestBody?: never;
20810
+ responses: {
20811
+ /** @description Promotion returned. */
20812
+ 200: {
20813
+ headers: {
20814
+ [name: string]: unknown;
20815
+ };
20816
+ content: {
20817
+ "application/json": {
20818
+ promotion: Record<string, never>;
20819
+ };
20820
+ };
20821
+ };
20822
+ /** @description Unauthorized */
20823
+ 401: {
20824
+ headers: {
20825
+ [name: string]: unknown;
20826
+ };
20827
+ content?: never;
20828
+ };
20829
+ /** @description Forbidden or missing `promotions:read` scope */
20830
+ 403: {
20831
+ headers: {
20832
+ [name: string]: unknown;
20833
+ };
20834
+ content?: never;
20835
+ };
20836
+ /** @description Promotion not found */
20837
+ 404: {
20838
+ headers: {
20839
+ [name: string]: unknown;
20840
+ };
20841
+ content?: never;
20842
+ };
20843
+ /** @description Internal Server Error */
20844
+ 500: {
19071
20845
  headers: {
19072
20846
  [name: string]: unknown;
19073
20847
  };
@@ -19075,61 +20849,28 @@ interface operations {
19075
20849
  };
19076
20850
  };
19077
20851
  };
19078
- get_v1_promotions: {
20852
+ delete_v1_promotions_by_promotionid: {
19079
20853
  parameters: {
19080
20854
  query?: {
19081
20855
  /** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
19082
20856
  organizationId?: string;
19083
- /** @description Search promotion name. */
19084
- q?: string;
19085
- /** @description Effective status filter: `all`, `draft`, `scheduled`, `active`, `paused`, `ended`, or `archived`. */
19086
- status?:
19087
- | "all"
19088
- | "draft"
19089
- | "scheduled"
19090
- | "active"
19091
- | "paused"
19092
- | "ended"
19093
- | "archived";
19094
- /** @description Comma-separated marketplaces, for example `shopee,lazada,tiktok,shopify`. */
19095
- marketplace?: string;
19096
- /** @description Comma-separated promotion store keys (`marketplace:country:storeId`). */
19097
- store?: string;
19098
- /** @description Sort field. */
19099
- sortBy?: "createdAt" | "updatedAt" | "name" | "startsAt" | "status";
19100
- /** @description Sort direction. */
19101
- sortDir?: "asc" | "desc";
19102
- /** @description Page size. Default 20, max 50. */
19103
- limit?: number;
19104
- /** @description Zero-based pagination offset. */
19105
- offset?: number;
19106
20857
  };
19107
20858
  header?: never;
19108
- path?: never;
20859
+ path: {
20860
+ promotionId: string;
20861
+ };
19109
20862
  cookie?: never;
19110
20863
  };
19111
20864
  requestBody?: never;
19112
20865
  responses: {
19113
- /** @description Promotions page returned. */
20866
+ /** @description Promotion deleted. */
19114
20867
  200: {
19115
20868
  headers: {
19116
20869
  [name: string]: unknown;
19117
20870
  };
19118
20871
  content: {
19119
20872
  "application/json": {
19120
- items: Record<string, never>[];
19121
- hasMore?: boolean;
19122
- nextOffset?: number;
19123
- summary: Record<string, never>;
19124
- pagination: {
19125
- offset?: number;
19126
- limit?: number;
19127
- total?: number;
19128
- hasMore?: boolean;
19129
- nextOffset?: number | null;
19130
- maxLimit?: number;
19131
- defaultLimit?: number;
19132
- };
20873
+ ok: boolean;
19133
20874
  };
19134
20875
  };
19135
20876
  };
@@ -19140,15 +20881,15 @@ interface operations {
19140
20881
  };
19141
20882
  content?: never;
19142
20883
  };
19143
- /** @description Forbidden or missing `promotions:read` scope */
20884
+ /** @description Forbidden or missing `promotions:write` scope */
19144
20885
  403: {
19145
20886
  headers: {
19146
20887
  [name: string]: unknown;
19147
20888
  };
19148
20889
  content?: never;
19149
20890
  };
19150
- /** @description Rate limit exceeded */
19151
- 429: {
20891
+ /** @description Promotion not found */
20892
+ 404: {
19152
20893
  headers: {
19153
20894
  [name: string]: unknown;
19154
20895
  };
@@ -19163,35 +20904,23 @@ interface operations {
19163
20904
  };
19164
20905
  };
19165
20906
  };
19166
- post_v1_promotions: {
20907
+ patch_v1_promotions_by_promotionid: {
19167
20908
  parameters: {
19168
- query?: never;
20909
+ query?: {
20910
+ /** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
20911
+ organizationId?: string;
20912
+ };
19169
20913
  header?: never;
19170
- path?: never;
20914
+ path: {
20915
+ promotionId: string;
20916
+ };
19171
20917
  cookie?: never;
19172
20918
  };
19173
20919
  requestBody: {
19174
20920
  content: {
19175
- /**
19176
- * @example {
19177
- * "name": "Christmas",
19178
- * "discountType": "fixed_amount",
19179
- * "discountValue": 12,
19180
- * "targetStores": [
19181
- * {
19182
- * "marketplace": "shopee",
19183
- * "country": "singapore",
19184
- * "storeId": "115085776"
19185
- * }
19186
- * ],
19187
- * "startsAt": "2026-07-06T17:00:00.000Z",
19188
- * "endsAt": "2026-08-02T03:59:00.000Z"
19189
- * }
19190
- */
19191
20921
  "application/json": {
19192
- /** @description Required for session auth across multiple organizations. Optional for OAuth/API keys bound to one organization. */
19193
20922
  organizationId?: string;
19194
- name: string;
20923
+ name?: string;
19195
20924
  description?: string | null;
19196
20925
  /** @enum {string} */
19197
20926
  kind?:
@@ -19204,11 +20933,10 @@ interface operations {
19204
20933
  | "free_shipping"
19205
20934
  | "early_bird_price";
19206
20935
  /** @enum {string} */
19207
- discountType: "percentage" | "fixed_amount";
20936
+ discountType?: "percentage" | "fixed_amount";
19208
20937
  /** @description Discount amount or percentage. Use 0 for gift/sample-only and free Buy-X-Get-Y mechanics. */
19209
- discountValue: number;
19210
- /** @description Connected stores as `{ marketplace, country, storeId }`. Copy from existing promotion targetStores or product marketplaceDetails. */
19211
- targetStores: {
20938
+ discountValue?: number;
20939
+ targetStores?: {
19212
20940
  /** @enum {string} */
19213
20941
  marketplace:
19214
20942
  | "lazada"
@@ -19221,11 +20949,11 @@ interface operations {
19221
20949
  country: string;
19222
20950
  storeId: string;
19223
20951
  }[];
19224
- /**
19225
- * @description Defaults to active. Future start dates display as scheduled. Use draft to save without activation; explicit inactive lifecycle states are preserved.
19226
- * @default active
19227
- * @enum {string}
19228
- */
20952
+ /** Format: date-time */
20953
+ startsAt?: string | null;
20954
+ /** Format: date-time */
20955
+ endsAt?: string | null;
20956
+ /** @enum {string} */
19229
20957
  status?:
19230
20958
  | "draft"
19231
20959
  | "scheduled"
@@ -19233,15 +20961,9 @@ interface operations {
19233
20961
  | "paused"
19234
20962
  | "ended"
19235
20963
  | "archived";
19236
- /** Format: date-time */
19237
- startsAt?: string | null;
19238
- /** Format: date-time */
19239
- endsAt?: string | null;
19240
20964
  minSalePrice?: number | null;
19241
20965
  maxDiscountAmount?: number | null;
19242
- /** @description Lazada voucher minimum spend. Defaults to 1 when unset. */
19243
20966
  minSpend?: number | null;
19244
- /** @description Total redemption/order limit, or per-SKU promotional quantity for flash sales. */
19245
20967
  totalUsageLimit?: number | null;
19246
20968
  mechanicConfig?: {
19247
20969
  /** @description Exact Shopee campaign/session for Campaign Voucher Nomination, with reviewed participation obligations. Nomination remains a draft until Shopee approval. */
@@ -19357,8 +21079,8 @@ interface operations {
19357
21079
  };
19358
21080
  };
19359
21081
  responses: {
19360
- /** @description Promotion created. */
19361
- 201: {
21082
+ /** @description Promotion updated. */
21083
+ 200: {
19362
21084
  headers: {
19363
21085
  [name: string]: unknown;
19364
21086
  };
@@ -19373,7 +21095,62 @@ interface operations {
19373
21095
  headers: {
19374
21096
  [name: string]: unknown;
19375
21097
  };
19376
- content?: never;
21098
+ content?: never;
21099
+ };
21100
+ /** @description Unauthorized */
21101
+ 401: {
21102
+ headers: {
21103
+ [name: string]: unknown;
21104
+ };
21105
+ content?: never;
21106
+ };
21107
+ /** @description Forbidden or missing `promotions:write` scope */
21108
+ 403: {
21109
+ headers: {
21110
+ [name: string]: unknown;
21111
+ };
21112
+ content?: never;
21113
+ };
21114
+ /** @description Promotion not found */
21115
+ 404: {
21116
+ headers: {
21117
+ [name: string]: unknown;
21118
+ };
21119
+ content?: never;
21120
+ };
21121
+ /** @description Internal Server Error */
21122
+ 500: {
21123
+ headers: {
21124
+ [name: string]: unknown;
21125
+ };
21126
+ content?: never;
21127
+ };
21128
+ };
21129
+ };
21130
+ get_v1_promotions_by_promotionid_products: {
21131
+ parameters: {
21132
+ query?: {
21133
+ /** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
21134
+ organizationId?: string;
21135
+ };
21136
+ header?: never;
21137
+ path: {
21138
+ promotionId: string;
21139
+ };
21140
+ cookie?: never;
21141
+ };
21142
+ requestBody?: never;
21143
+ responses: {
21144
+ /** @description Assignments returned. */
21145
+ 200: {
21146
+ headers: {
21147
+ [name: string]: unknown;
21148
+ };
21149
+ content: {
21150
+ "application/json": {
21151
+ items: Record<string, never>[];
21152
+ };
21153
+ };
19377
21154
  };
19378
21155
  /** @description Unauthorized */
19379
21156
  401: {
@@ -19382,20 +21159,13 @@ interface operations {
19382
21159
  };
19383
21160
  content?: never;
19384
21161
  };
19385
- /** @description Forbidden or missing `promotions:write` scope */
21162
+ /** @description Forbidden or missing `promotions:read` scope */
19386
21163
  403: {
19387
21164
  headers: {
19388
21165
  [name: string]: unknown;
19389
21166
  };
19390
21167
  content?: never;
19391
21168
  };
19392
- /** @description Rate limit exceeded */
19393
- 429: {
19394
- headers: {
19395
- [name: string]: unknown;
19396
- };
19397
- content?: never;
19398
- };
19399
21169
  /** @description Internal Server Error */
19400
21170
  500: {
19401
21171
  headers: {
@@ -19405,7 +21175,7 @@ interface operations {
19405
21175
  };
19406
21176
  };
19407
21177
  };
19408
- get_v1_promotions_by_promotionid: {
21178
+ post_v1_promotions_by_promotionid_products: {
19409
21179
  parameters: {
19410
21180
  query?: {
19411
21181
  /** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
@@ -19417,35 +21187,57 @@ interface operations {
19417
21187
  };
19418
21188
  cookie?: never;
19419
21189
  };
19420
- requestBody?: never;
21190
+ requestBody: {
21191
+ content: {
21192
+ /**
21193
+ * @example {
21194
+ * "productIds": [
21195
+ * "f831911c-ba05-4c83-9a03-e026e0aaf102"
21196
+ * ],
21197
+ * "priority": 0
21198
+ * }
21199
+ */
21200
+ "application/json": {
21201
+ organizationId?: string;
21202
+ productIds: string[];
21203
+ variantSku?: string | null;
21204
+ /** @default 0 */
21205
+ priority?: number;
21206
+ /** @description Optional per-product discount for product discounts and flash sales. Uses the campaign discount type. Null restores the shared discount. Shopee and TikTok publish the resulting price. Lazada vouchers and Shopify fail sync while any product has its own discount. */
21207
+ productDiscounts?: {
21208
+ /** Format: uuid */
21209
+ productId: string;
21210
+ discountValue: number | null;
21211
+ }[];
21212
+ };
21213
+ };
21214
+ };
19421
21215
  responses: {
19422
- /** @description Promotion returned. */
19423
- 200: {
21216
+ /** @description Products assigned. */
21217
+ 201: {
19424
21218
  headers: {
19425
21219
  [name: string]: unknown;
19426
21220
  };
19427
21221
  content: {
19428
- "application/json": {
19429
- promotion: Record<string, never>;
19430
- };
21222
+ "application/json": Record<string, never>;
19431
21223
  };
19432
21224
  };
19433
- /** @description Unauthorized */
19434
- 401: {
21225
+ /** @description Bad Request */
21226
+ 400: {
19435
21227
  headers: {
19436
21228
  [name: string]: unknown;
19437
21229
  };
19438
21230
  content?: never;
19439
21231
  };
19440
- /** @description Forbidden or missing `promotions:read` scope */
19441
- 403: {
21232
+ /** @description Unauthorized */
21233
+ 401: {
19442
21234
  headers: {
19443
21235
  [name: string]: unknown;
19444
21236
  };
19445
21237
  content?: never;
19446
21238
  };
19447
- /** @description Promotion not found */
19448
- 404: {
21239
+ /** @description Forbidden or missing `promotions:write` scope */
21240
+ 403: {
19449
21241
  headers: {
19450
21242
  [name: string]: unknown;
19451
21243
  };
@@ -19460,7 +21252,7 @@ interface operations {
19460
21252
  };
19461
21253
  };
19462
21254
  };
19463
- delete_v1_promotions_by_promotionid: {
21255
+ delete_v1_promotions_by_promotionid_products: {
19464
21256
  parameters: {
19465
21257
  query?: {
19466
21258
  /** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
@@ -19472,35 +21264,41 @@ interface operations {
19472
21264
  };
19473
21265
  cookie?: never;
19474
21266
  };
19475
- requestBody?: never;
21267
+ requestBody: {
21268
+ content: {
21269
+ "application/json": {
21270
+ organizationId?: string;
21271
+ productIds: string[];
21272
+ variantSku?: string | null;
21273
+ };
21274
+ };
21275
+ };
19476
21276
  responses: {
19477
- /** @description Promotion deleted. */
21277
+ /** @description Products unassigned. */
19478
21278
  200: {
19479
21279
  headers: {
19480
21280
  [name: string]: unknown;
19481
21281
  };
19482
21282
  content: {
19483
- "application/json": {
19484
- ok: boolean;
19485
- };
21283
+ "application/json": Record<string, never>;
19486
21284
  };
19487
21285
  };
19488
- /** @description Unauthorized */
19489
- 401: {
21286
+ /** @description Bad Request */
21287
+ 400: {
19490
21288
  headers: {
19491
21289
  [name: string]: unknown;
19492
21290
  };
19493
21291
  content?: never;
19494
21292
  };
19495
- /** @description Forbidden or missing `promotions:write` scope */
19496
- 403: {
21293
+ /** @description Unauthorized */
21294
+ 401: {
19497
21295
  headers: {
19498
21296
  [name: string]: unknown;
19499
21297
  };
19500
21298
  content?: never;
19501
21299
  };
19502
- /** @description Promotion not found */
19503
- 404: {
21300
+ /** @description Forbidden or missing `promotions:write` scope */
21301
+ 403: {
19504
21302
  headers: {
19505
21303
  [name: string]: unknown;
19506
21304
  };
@@ -19515,7 +21313,7 @@ interface operations {
19515
21313
  };
19516
21314
  };
19517
21315
  };
19518
- patch_v1_promotions_by_promotionid: {
21316
+ post_v1_promotions_by_promotionid_retry: {
19519
21317
  parameters: {
19520
21318
  query?: {
19521
21319
  /** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
@@ -19529,175 +21327,43 @@ interface operations {
19529
21327
  };
19530
21328
  requestBody: {
19531
21329
  content: {
21330
+ /**
21331
+ * @example {
21332
+ * "marketplace": "shopee"
21333
+ * }
21334
+ */
19532
21335
  "application/json": {
19533
21336
  organizationId?: string;
19534
- name?: string;
19535
- description?: string | null;
19536
- /** @enum {string} */
19537
- kind?:
19538
- | "product_discount"
19539
- | "flash_sale"
19540
- | "voucher"
19541
- | "gift_with_purchase"
19542
- | "buy_x_get_y"
19543
- | "bundle_deal"
19544
- | "free_shipping"
19545
- | "early_bird_price";
19546
- /** @enum {string} */
19547
- discountType?: "percentage" | "fixed_amount";
19548
- /** @description Discount amount or percentage. Use 0 for gift/sample-only and free Buy-X-Get-Y mechanics. */
19549
- discountValue?: number;
19550
- targetStores?: {
19551
- /** @enum {string} */
19552
- marketplace:
19553
- | "lazada"
19554
- | "shopee"
19555
- | "tiktok"
19556
- | "shopify"
19557
- | "amazon"
19558
- | "zalora"
19559
- | "ebay";
19560
- country: string;
19561
- storeId: string;
19562
- }[];
19563
- /** Format: date-time */
19564
- startsAt?: string | null;
19565
- /** Format: date-time */
19566
- endsAt?: string | null;
19567
- /** @enum {string} */
19568
- status?:
19569
- | "draft"
19570
- | "scheduled"
19571
- | "active"
19572
- | "paused"
19573
- | "ended"
19574
- | "archived";
19575
- minSalePrice?: number | null;
19576
- maxDiscountAmount?: number | null;
19577
- minSpend?: number | null;
19578
- totalUsageLimit?: number | null;
19579
- mechanicConfig?: {
19580
- /** @description Exact Shopee campaign/session for Campaign Voucher Nomination, with reviewed participation obligations. Nomination remains a draft until Shopee approval. */
19581
- voucherCampaign?: {
19582
- campaignId: string;
19583
- sessionId: string;
19584
- termsAccepted: boolean;
19585
- };
19586
- /**
19587
- * @description Exact marketplace voucher subtype. Native types use APIs; Seller Center-only types use a browser AOP with per-store eligibility checks.
19588
- * @enum {string|null}
19589
- */
19590
- voucherType?:
19591
- | "shopee_shop"
19592
- | "shopee_product"
19593
- | "shopee_private"
19594
- | "shopee_live"
19595
- | "shopee_video"
19596
- | "shopee_new_buyer"
19597
- | "shopee_repeat_buyer"
19598
- | "shopee_campaign"
19599
- | "shopee_follow_prize"
19600
- | "shopee_exclusive_streamer"
19601
- | "shopee_welcome"
19602
- | "shopee_member_repeat_buyer"
19603
- | "shopee_exclusive"
19604
- | "shopee_redemption"
19605
- | "shopee_exclusive_creator"
19606
- | "lazada_store_follower"
19607
- | "lazada_regular"
19608
- | "lazada_store_new_buyer"
19609
- | "lazada_live"
19610
- | "lazada_offline"
19611
- | "lazada_co_funded"
19612
- | "lazada_welcome"
19613
- | "lazada_linked_member"
19614
- | "lazada_new_member"
19615
- | "lazada_member_exclusive"
19616
- | "lazada_points_redeemable"
19617
- | "tiktok_seller_coupon"
19618
- | "shopify_discount_code"
19619
- | "amazon_promotion_code"
19620
- | "zalora_seller_voucher"
19621
- | "ebay_coded_coupon"
19622
- | null;
19623
- browserAutomation?: {
19624
- /** @description Optional overrides for the selected AOP's declared variables. promotionIds, action, and storeId are supplied automatically; the AOP loads the approved promotions with get_promotions. */
19625
- variableValues?: {
19626
- [key: string]: string;
19627
- };
19628
- /** @description Optional organization AOP override. Omit to select the built-in marketplace AOP. */
19629
- aopId?: string;
19630
- instructions?: string;
19631
- } | null;
19632
- /** @enum {string} */
19633
- voucherScope?: "products" | "shop";
19634
- /** @enum {string} */
19635
- voucherReward?: "discount" | "coins_cashback";
19636
- /** @description Approved Shopee usernames targeted by an Exclusive Streamer voucher. The Seller Centre API resolves eligible streamer identities; user IDs must not be supplied here. */
19637
- exclusiveStreamerUsernames?: string[];
19638
- /** @enum {string} */
19639
- voucherAudience?: "general" | "shop_follow";
19640
- /** @description Shopee supports all, feed, live, order_page (update only), or [] for hidden. Lazada requires exactly one of all, live, followers, offline; followers requires voucherScope=shop. */
19641
- voucherDisplayChannels?: (
19642
- | "all"
19643
- | "feed"
19644
- | "live"
19645
- | "order_page"
19646
- | "followers"
19647
- | "offline"
19648
- )[];
19649
- /** @enum {string} */
19650
- bundlePriceType?: "discount" | "fixed_price";
19651
- bundleTiers?: {
19652
- minimumQuantity: number;
19653
- discountValue: number;
19654
- }[];
19655
- /** @enum {string} */
19656
- thresholdType?: "item_quantity" | "order_amount";
19657
- thresholdValue?: number;
19658
- /** @enum {string} */
19659
- giftType?: "gift" | "sample";
19660
- giftQuantity?: number;
19661
- gifts?: {
19662
- /** Format: uuid */
19663
- productId: string;
19664
- /** Format: uuid */
19665
- variantId?: string | null;
19666
- totalClaimLimit: number;
19667
- }[];
19668
- buyQuantity?: number;
19669
- getQuantity?: number;
19670
- benefitProductIds?: string[];
19671
- /** @enum {string} */
19672
- benefitType?: "free" | "percentage" | "fixed_amount";
19673
- benefitValue?: number;
19674
- maxApplicationsPerOrder?: number;
19675
- bundleMinimumQuantity?: number;
19676
- /** @description Free shipping delivery option offered by the Lazada store; defaults to STANDARD. */
19677
- shippingDeliveryOption?: string;
19678
- /** @description Free shipping subsidy budget in the store currency. Omit for an unlimited budget. */
19679
- shippingBudget?: number;
19680
- };
19681
- /** @description Patch discount overrides by exact target store key. Other stores retain their terms. Null discountValue restores shared terms for that store. */
19682
- storeDiscounts?: {
19683
- storeKey: string;
19684
- /** @enum {string} */
19685
- discountType: "percentage" | "fixed_amount";
19686
- /** @description Percentage must not exceed 100. */
19687
- discountValue: number | null;
19688
- }[];
21337
+ /**
21338
+ * @description Retry one marketplace. When omitted, retries every promotion marketplace.
21339
+ * @enum {string}
21340
+ */
21341
+ marketplace?:
21342
+ | "lazada"
21343
+ | "shopee"
21344
+ | "tiktok"
21345
+ | "shopify"
21346
+ | "amazon"
21347
+ | "zalora"
21348
+ | "ebay";
21349
+ /** @description Retry only these products. When omitted, retries every assigned product. */
21350
+ productIds?: string[];
19689
21351
  };
19690
21352
  };
19691
21353
  };
19692
21354
  responses: {
19693
- /** @description Promotion updated. */
19694
- 200: {
21355
+ /** @description Delivery queued again. */
21356
+ 202: {
19695
21357
  headers: {
19696
21358
  [name: string]: unknown;
19697
21359
  };
19698
21360
  content: {
19699
21361
  "application/json": {
19700
- promotion: Record<string, never>;
21362
+ ok: boolean;
21363
+ queued: boolean;
21364
+ jobId?: string;
21365
+ syncBatchId: string;
21366
+ marketplaces: string[];
19701
21367
  };
19702
21368
  };
19703
21369
  };
@@ -19722,13 +21388,6 @@ interface operations {
19722
21388
  };
19723
21389
  content?: never;
19724
21390
  };
19725
- /** @description Promotion not found */
19726
- 404: {
19727
- headers: {
19728
- [name: string]: unknown;
19729
- };
19730
- content?: never;
19731
- };
19732
21391
  /** @description Internal Server Error */
19733
21392
  500: {
19734
21393
  headers: {
@@ -19738,31 +21397,44 @@ interface operations {
19738
21397
  };
19739
21398
  };
19740
21399
  };
19741
- get_v1_promotions_by_promotionid_products: {
21400
+ get_v1_returns: {
19742
21401
  parameters: {
19743
21402
  query?: {
19744
21403
  /** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
19745
21404
  organizationId?: string;
21405
+ marketplace?: string;
21406
+ accountId?: string;
21407
+ externalOrderId?: string;
21408
+ updatedSince?: string;
21409
+ cursor?: string;
21410
+ limit?: number;
19746
21411
  };
19747
21412
  header?: never;
19748
- path: {
19749
- promotionId: string;
19750
- };
21413
+ path?: never;
19751
21414
  cookie?: never;
19752
21415
  };
19753
21416
  requestBody?: never;
19754
21417
  responses: {
19755
- /** @description Assignments returned. */
21418
+ /** @description Success */
19756
21419
  200: {
19757
21420
  headers: {
19758
21421
  [name: string]: unknown;
19759
21422
  };
19760
21423
  content: {
19761
21424
  "application/json": {
19762
- items: Record<string, never>[];
21425
+ ok?: boolean;
21426
+ /** @default developer_v1 */
21427
+ apiVersion: string;
19763
21428
  };
19764
21429
  };
19765
21430
  };
21431
+ /** @description Bad Request */
21432
+ 400: {
21433
+ headers: {
21434
+ [name: string]: unknown;
21435
+ };
21436
+ content?: never;
21437
+ };
19766
21438
  /** @description Unauthorized */
19767
21439
  401: {
19768
21440
  headers: {
@@ -19770,7 +21442,14 @@ interface operations {
19770
21442
  };
19771
21443
  content?: never;
19772
21444
  };
19773
- /** @description Forbidden or missing `promotions:read` scope */
21445
+ /** @description Insufficient Credits */
21446
+ 402: {
21447
+ headers: {
21448
+ [name: string]: unknown;
21449
+ };
21450
+ content?: never;
21451
+ };
21452
+ /** @description Forbidden */
19774
21453
  403: {
19775
21454
  headers: {
19776
21455
  [name: string]: unknown;
@@ -19786,7 +21465,7 @@ interface operations {
19786
21465
  };
19787
21466
  };
19788
21467
  };
19789
- post_v1_promotions_by_promotionid_products: {
21468
+ get_v1_returns_by_returnid: {
19790
21469
  parameters: {
19791
21470
  query?: {
19792
21471
  /** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
@@ -19794,43 +21473,23 @@ interface operations {
19794
21473
  };
19795
21474
  header?: never;
19796
21475
  path: {
19797
- promotionId: string;
21476
+ returnId: string;
19798
21477
  };
19799
21478
  cookie?: never;
19800
21479
  };
19801
- requestBody: {
19802
- content: {
19803
- /**
19804
- * @example {
19805
- * "productIds": [
19806
- * "f831911c-ba05-4c83-9a03-e026e0aaf102"
19807
- * ],
19808
- * "priority": 0
19809
- * }
19810
- */
19811
- "application/json": {
19812
- organizationId?: string;
19813
- productIds: string[];
19814
- variantSku?: string | null;
19815
- /** @default 0 */
19816
- priority?: number;
19817
- /** @description Optional per-product discount for product discounts and flash sales. Uses the campaign discount type. Null restores the shared discount. Shopee and TikTok publish the resulting price. Lazada vouchers and Shopify fail sync while any product has its own discount. */
19818
- productDiscounts?: {
19819
- /** Format: uuid */
19820
- productId: string;
19821
- discountValue: number | null;
19822
- }[];
19823
- };
19824
- };
19825
- };
21480
+ requestBody?: never;
19826
21481
  responses: {
19827
- /** @description Products assigned. */
19828
- 201: {
21482
+ /** @description Success */
21483
+ 200: {
19829
21484
  headers: {
19830
21485
  [name: string]: unknown;
19831
21486
  };
19832
21487
  content: {
19833
- "application/json": Record<string, never>;
21488
+ "application/json": {
21489
+ ok?: boolean;
21490
+ /** @default developer_v1 */
21491
+ apiVersion: string;
21492
+ };
19834
21493
  };
19835
21494
  };
19836
21495
  /** @description Bad Request */
@@ -19847,13 +21506,27 @@ interface operations {
19847
21506
  };
19848
21507
  content?: never;
19849
21508
  };
19850
- /** @description Forbidden or missing `promotions:write` scope */
21509
+ /** @description Insufficient Credits */
21510
+ 402: {
21511
+ headers: {
21512
+ [name: string]: unknown;
21513
+ };
21514
+ content?: never;
21515
+ };
21516
+ /** @description Forbidden */
19851
21517
  403: {
19852
21518
  headers: {
19853
21519
  [name: string]: unknown;
19854
21520
  };
19855
21521
  content?: never;
19856
21522
  };
21523
+ /** @description Return not found. */
21524
+ 404: {
21525
+ headers: {
21526
+ [name: string]: unknown;
21527
+ };
21528
+ content?: never;
21529
+ };
19857
21530
  /** @description Internal Server Error */
19858
21531
  500: {
19859
21532
  headers: {
@@ -19863,60 +21536,112 @@ interface operations {
19863
21536
  };
19864
21537
  };
19865
21538
  };
19866
- delete_v1_promotions_by_promotionid_products: {
21539
+ get_v1_returns_actions: {
19867
21540
  parameters: {
19868
- query?: {
19869
- /** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
21541
+ query: {
21542
+ /** @description Repeat this query parameter for each UUID. Between 1 and 50 entries, deduplicated in first-requested order. */
21543
+ returnIds: string[];
21544
+ /** @description Session callers only. API keys resolve organization scope from the credential. */
19870
21545
  organizationId?: string;
19871
21546
  };
19872
21547
  header?: never;
19873
- path: {
19874
- promotionId: string;
19875
- };
21548
+ path?: never;
19876
21549
  cookie?: never;
19877
21550
  };
19878
- requestBody: {
19879
- content: {
19880
- "application/json": {
19881
- organizationId?: string;
19882
- productIds: string[];
19883
- variantSku?: string | null;
19884
- };
19885
- };
19886
- };
21551
+ requestBody?: never;
19887
21552
  responses: {
19888
- /** @description Products unassigned. */
21553
+ /** @description Request completed. Inspect data.success, per-target results and pendingCount for processing progress. */
19889
21554
  200: {
19890
21555
  headers: {
19891
21556
  [name: string]: unknown;
19892
21557
  };
19893
21558
  content: {
19894
- "application/json": Record<string, never>;
21559
+ "application/json": {
21560
+ ok: boolean;
21561
+ apiVersion: string;
21562
+ /** Format: uuid */
21563
+ operationId: string;
21564
+ /** @enum {string} */
21565
+ status: "completed";
21566
+ data: {
21567
+ success: boolean;
21568
+ returnIds: string[];
21569
+ succeededCount: number;
21570
+ failedCount: number;
21571
+ results: (
21572
+ | {
21573
+ /** Format: uuid */
21574
+ returnId: string;
21575
+ /** @constant */
21576
+ success: true;
21577
+ /** @enum {string} */
21578
+ marketplace:
21579
+ | "shopee"
21580
+ | "lazada"
21581
+ | "tiktok"
21582
+ | "shopify"
21583
+ | "whatsapp"
21584
+ | "zalora"
21585
+ | "amazon"
21586
+ | "ebay";
21587
+ marketplaceStatus: string | null;
21588
+ externalReturnId: string;
21589
+ externalOrderId: string | null;
21590
+ actions: {
21591
+ id: string;
21592
+ label: string;
21593
+ description: string;
21594
+ }[];
21595
+ limitation?: string;
21596
+ version: string;
21597
+ }
21598
+ | {
21599
+ /** Format: uuid */
21600
+ returnId: string;
21601
+ /** @constant */
21602
+ success: false;
21603
+ error: string;
21604
+ }
21605
+ )[];
21606
+ };
21607
+ links: {
21608
+ [key: string]: string;
21609
+ };
21610
+ warnings: string[];
21611
+ recommendations: string[];
21612
+ };
19895
21613
  };
19896
21614
  };
19897
- /** @description Bad Request */
21615
+ /** @description Invalid request, conflicting operations, singular arguments or a batch exceeding the endpoint limit. */
19898
21616
  400: {
19899
21617
  headers: {
19900
21618
  [name: string]: unknown;
19901
21619
  };
19902
21620
  content?: never;
19903
21621
  };
19904
- /** @description Unauthorized */
21622
+ /** @description Missing or invalid credentials. */
19905
21623
  401: {
19906
21624
  headers: {
19907
21625
  [name: string]: unknown;
19908
21626
  };
19909
21627
  content?: never;
19910
21628
  };
19911
- /** @description Forbidden or missing `promotions:write` scope */
21629
+ /** @description Missing scope, organization mismatch, or a target outside the caller's assigned stores and markets. */
19912
21630
  403: {
19913
21631
  headers: {
19914
21632
  [name: string]: unknown;
19915
21633
  };
19916
21634
  content?: never;
19917
21635
  };
19918
- /** @description Internal Server Error */
19919
- 500: {
21636
+ /** @description Rate limit exceeded. */
21637
+ 429: {
21638
+ headers: {
21639
+ [name: string]: unknown;
21640
+ };
21641
+ content?: never;
21642
+ };
21643
+ /** @description Service unavailable. Retry a submission with the same requestId and unchanged operations. */
21644
+ 503: {
19920
21645
  headers: {
19921
21646
  [name: string]: unknown;
19922
21647
  };
@@ -19924,46 +21649,30 @@ interface operations {
19924
21649
  };
19925
21650
  };
19926
21651
  };
19927
- post_v1_promotions_by_promotionid_retry: {
21652
+ post_v1_returns_actions: {
19928
21653
  parameters: {
19929
- query?: {
19930
- /** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
19931
- organizationId?: string;
19932
- };
21654
+ query?: never;
19933
21655
  header?: never;
19934
- path: {
19935
- promotionId: string;
19936
- };
21656
+ path?: never;
19937
21657
  cookie?: never;
19938
21658
  };
19939
21659
  requestBody: {
19940
21660
  content: {
19941
- /**
19942
- * @example {
19943
- * "marketplace": "shopee"
19944
- * }
19945
- */
19946
21661
  "application/json": {
21662
+ /** Format: uuid */
21663
+ requestId: string;
21664
+ operations: {
21665
+ /** Format: uuid */
21666
+ returnId: string;
21667
+ actionId: string;
21668
+ version: string;
21669
+ }[];
19947
21670
  organizationId?: string;
19948
- /**
19949
- * @description Retry one marketplace. When omitted, retries every promotion marketplace.
19950
- * @enum {string}
19951
- */
19952
- marketplace?:
19953
- | "lazada"
19954
- | "shopee"
19955
- | "tiktok"
19956
- | "shopify"
19957
- | "amazon"
19958
- | "zalora"
19959
- | "ebay";
19960
- /** @description Retry only these products. When omitted, retries every assigned product. */
19961
- productIds?: string[];
19962
21671
  };
19963
21672
  };
19964
21673
  };
19965
21674
  responses: {
19966
- /** @description Delivery queued again. */
21675
+ /** @description Decisions queued. Inspect every job; acceptance does not mean success. */
19967
21676
  202: {
19968
21677
  headers: {
19969
21678
  [name: string]: unknown;
@@ -19971,36 +21680,92 @@ interface operations {
19971
21680
  content: {
19972
21681
  "application/json": {
19973
21682
  ok: boolean;
19974
- queued: boolean;
19975
- jobId?: string;
19976
- syncBatchId: string;
19977
- marketplaces: string[];
21683
+ apiVersion: string;
21684
+ /** Format: uuid */
21685
+ operationId: string;
21686
+ /** @enum {string} */
21687
+ status: "accepted";
21688
+ data: {
21689
+ correlations: {
21690
+ /** @constant */
21691
+ kind: "return_action";
21692
+ /** Format: uuid */
21693
+ id: string;
21694
+ }[];
21695
+ success: boolean;
21696
+ returnIds: string[];
21697
+ jobIds: string[];
21698
+ succeededCount: number;
21699
+ failedCount: number;
21700
+ pendingCount: number;
21701
+ results: {
21702
+ /** Format: uuid */
21703
+ returnId: string;
21704
+ /** Format: uuid */
21705
+ jobId: string;
21706
+ success: boolean;
21707
+ /** @enum {string} */
21708
+ status:
21709
+ | "queued"
21710
+ | "running"
21711
+ | "submitting"
21712
+ | "succeeded"
21713
+ | "failed"
21714
+ | "needs_review";
21715
+ evidence: {
21716
+ accepted?: boolean;
21717
+ verified?: boolean;
21718
+ statusBefore?: string | null;
21719
+ statusAfter?: string | null;
21720
+ } | null;
21721
+ error: string | null;
21722
+ }[];
21723
+ };
21724
+ links: {
21725
+ [key: string]: string;
21726
+ };
21727
+ warnings: string[];
21728
+ recommendations: string[];
19978
21729
  };
19979
21730
  };
19980
21731
  };
19981
- /** @description Bad Request */
21732
+ /** @description Invalid request, conflicting operations, singular arguments or a batch exceeding the endpoint limit. */
19982
21733
  400: {
19983
21734
  headers: {
19984
21735
  [name: string]: unknown;
19985
21736
  };
19986
21737
  content?: never;
19987
21738
  };
19988
- /** @description Unauthorized */
21739
+ /** @description Missing or invalid credentials. */
19989
21740
  401: {
19990
21741
  headers: {
19991
21742
  [name: string]: unknown;
19992
21743
  };
19993
21744
  content?: never;
19994
21745
  };
19995
- /** @description Forbidden or missing `promotions:write` scope */
21746
+ /** @description Missing scope, organization mismatch, or a target outside the caller's assigned stores and markets. */
19996
21747
  403: {
19997
21748
  headers: {
19998
21749
  [name: string]: unknown;
19999
21750
  };
20000
21751
  content?: never;
20001
21752
  };
20002
- /** @description Internal Server Error */
20003
- 500: {
21753
+ /** @description A conflicting decision is active or requestId was already used for a different operation. */
21754
+ 409: {
21755
+ headers: {
21756
+ [name: string]: unknown;
21757
+ };
21758
+ content?: never;
21759
+ };
21760
+ /** @description Rate limit exceeded. */
21761
+ 429: {
21762
+ headers: {
21763
+ [name: string]: unknown;
21764
+ };
21765
+ content?: never;
21766
+ };
21767
+ /** @description Service unavailable. Retry a submission with the same requestId and unchanged operations. */
21768
+ 503: {
20004
21769
  headers: {
20005
21770
  [name: string]: unknown;
20006
21771
  };
@@ -20008,17 +21773,13 @@ interface operations {
20008
21773
  };
20009
21774
  };
20010
21775
  };
20011
- get_v1_returns: {
21776
+ get_v1_returns_actions_jobs: {
20012
21777
  parameters: {
20013
- query?: {
20014
- /** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
21778
+ query: {
21779
+ /** @description Repeat this query parameter for each UUID. Between 1 and 50 entries, deduplicated in first-requested order. */
21780
+ jobIds: string[];
21781
+ /** @description Session callers only. API keys resolve organization scope from the credential. */
20015
21782
  organizationId?: string;
20016
- marketplace?: string;
20017
- accountId?: string;
20018
- externalOrderId?: string;
20019
- updatedSince?: string;
20020
- cursor?: string;
20021
- limit?: number;
20022
21783
  };
20023
21784
  header?: never;
20024
21785
  path?: never;
@@ -20026,49 +21787,100 @@ interface operations {
20026
21787
  };
20027
21788
  requestBody?: never;
20028
21789
  responses: {
20029
- /** @description Success */
21790
+ /** @description Request completed. Inspect data.success, per-target results and pendingCount for processing progress. */
20030
21791
  200: {
20031
21792
  headers: {
20032
21793
  [name: string]: unknown;
20033
21794
  };
20034
21795
  content: {
20035
21796
  "application/json": {
20036
- ok?: boolean;
20037
- /** @default developer_v1 */
21797
+ ok: boolean;
20038
21798
  apiVersion: string;
21799
+ /** Format: uuid */
21800
+ operationId: string;
21801
+ /** @enum {string} */
21802
+ status: "completed";
21803
+ data: {
21804
+ correlations: {
21805
+ /** @constant */
21806
+ kind: "return_action";
21807
+ /** Format: uuid */
21808
+ id: string;
21809
+ }[];
21810
+ success: boolean;
21811
+ returnIds: string[];
21812
+ jobIds: string[];
21813
+ succeededCount: number;
21814
+ failedCount: number;
21815
+ pendingCount: number;
21816
+ results: {
21817
+ /** Format: uuid */
21818
+ returnId: string;
21819
+ /** Format: uuid */
21820
+ jobId: string;
21821
+ success: boolean;
21822
+ /** @enum {string} */
21823
+ status:
21824
+ | "queued"
21825
+ | "running"
21826
+ | "submitting"
21827
+ | "succeeded"
21828
+ | "failed"
21829
+ | "needs_review";
21830
+ evidence: {
21831
+ accepted?: boolean;
21832
+ verified?: boolean;
21833
+ statusBefore?: string | null;
21834
+ statusAfter?: string | null;
21835
+ } | null;
21836
+ error: string | null;
21837
+ }[];
21838
+ };
21839
+ links: {
21840
+ [key: string]: string;
21841
+ };
21842
+ warnings: string[];
21843
+ recommendations: string[];
20039
21844
  };
20040
21845
  };
20041
21846
  };
20042
- /** @description Bad Request */
21847
+ /** @description Invalid request, conflicting operations, singular arguments or a batch exceeding the endpoint limit. */
20043
21848
  400: {
20044
21849
  headers: {
20045
21850
  [name: string]: unknown;
20046
21851
  };
20047
21852
  content?: never;
20048
21853
  };
20049
- /** @description Unauthorized */
21854
+ /** @description Missing or invalid credentials. */
20050
21855
  401: {
20051
21856
  headers: {
20052
21857
  [name: string]: unknown;
20053
21858
  };
20054
21859
  content?: never;
20055
21860
  };
20056
- /** @description Insufficient Credits */
20057
- 402: {
21861
+ /** @description Missing scope, organization mismatch, or a target outside the caller's assigned stores and markets. */
21862
+ 403: {
20058
21863
  headers: {
20059
21864
  [name: string]: unknown;
20060
21865
  };
20061
21866
  content?: never;
20062
21867
  };
20063
- /** @description Forbidden */
20064
- 403: {
21868
+ /** @description A requested return action job was not found in this organization. */
21869
+ 404: {
20065
21870
  headers: {
20066
21871
  [name: string]: unknown;
20067
21872
  };
20068
21873
  content?: never;
20069
21874
  };
20070
- /** @description Internal Server Error */
20071
- 500: {
21875
+ /** @description Rate limit exceeded. */
21876
+ 429: {
21877
+ headers: {
21878
+ [name: string]: unknown;
21879
+ };
21880
+ content?: never;
21881
+ };
21882
+ /** @description Service unavailable. Retry a submission with the same requestId and unchanged operations. */
21883
+ 503: {
20072
21884
  headers: {
20073
21885
  [name: string]: unknown;
20074
21886
  };
@@ -20076,70 +21888,91 @@ interface operations {
20076
21888
  };
20077
21889
  };
20078
21890
  };
20079
- get_v1_returns_by_returnid: {
21891
+ get_v1_returns_orders: {
20080
21892
  parameters: {
20081
- query?: {
20082
- /** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
21893
+ query: {
21894
+ /** @description Repeat this query parameter for each UUID. Between 1 and 50 entries, deduplicated in first-requested order. */
21895
+ orderIds: string[];
21896
+ /** @description Session callers only. API keys resolve organization scope from the credential. */
20083
21897
  organizationId?: string;
20084
21898
  };
20085
21899
  header?: never;
20086
- path: {
20087
- returnId: string;
20088
- };
21900
+ path?: never;
20089
21901
  cookie?: never;
20090
21902
  };
20091
21903
  requestBody?: never;
20092
21904
  responses: {
20093
- /** @description Success */
21905
+ /** @description Request completed. Inspect data.success, per-target results and pendingCount for processing progress. */
20094
21906
  200: {
20095
21907
  headers: {
20096
21908
  [name: string]: unknown;
20097
21909
  };
20098
21910
  content: {
20099
21911
  "application/json": {
20100
- ok?: boolean;
20101
- /** @default developer_v1 */
21912
+ ok: boolean;
20102
21913
  apiVersion: string;
21914
+ /** Format: uuid */
21915
+ operationId: string;
21916
+ /** @enum {string} */
21917
+ status: "completed";
21918
+ data: {
21919
+ success: boolean;
21920
+ orderIds: string[];
21921
+ succeededCount: number;
21922
+ failedCount: number;
21923
+ results: {
21924
+ /** Format: uuid */
21925
+ orderId: string;
21926
+ /** @constant */
21927
+ success: true;
21928
+ returns: {
21929
+ /** Format: uuid */
21930
+ returnId: string;
21931
+ marketplace: string;
21932
+ marketplaceStatus: string | null;
21933
+ externalReturnId: string;
21934
+ processingEligible: boolean;
21935
+ }[];
21936
+ }[];
21937
+ };
21938
+ links: {
21939
+ [key: string]: string;
21940
+ };
21941
+ warnings: string[];
21942
+ recommendations: string[];
20103
21943
  };
20104
21944
  };
20105
21945
  };
20106
- /** @description Bad Request */
21946
+ /** @description Invalid request, conflicting operations, singular arguments or a batch exceeding the endpoint limit. */
20107
21947
  400: {
20108
21948
  headers: {
20109
21949
  [name: string]: unknown;
20110
21950
  };
20111
21951
  content?: never;
20112
21952
  };
20113
- /** @description Unauthorized */
21953
+ /** @description Missing or invalid credentials. */
20114
21954
  401: {
20115
21955
  headers: {
20116
21956
  [name: string]: unknown;
20117
21957
  };
20118
21958
  content?: never;
20119
21959
  };
20120
- /** @description Insufficient Credits */
20121
- 402: {
20122
- headers: {
20123
- [name: string]: unknown;
20124
- };
20125
- content?: never;
20126
- };
20127
- /** @description Forbidden */
21960
+ /** @description Missing scope, organization mismatch, or a target outside the caller's assigned stores and markets. */
20128
21961
  403: {
20129
21962
  headers: {
20130
21963
  [name: string]: unknown;
20131
21964
  };
20132
21965
  content?: never;
20133
21966
  };
20134
- /** @description Return not found. */
20135
- 404: {
21967
+ /** @description Rate limit exceeded. */
21968
+ 429: {
20136
21969
  headers: {
20137
21970
  [name: string]: unknown;
20138
21971
  };
20139
21972
  content?: never;
20140
21973
  };
20141
- /** @description Internal Server Error */
20142
- 500: {
21974
+ /** @description Service unavailable. Retry a submission with the same requestId and unchanged operations. */
21975
+ 503: {
20143
21976
  headers: {
20144
21977
  [name: string]: unknown;
20145
21978
  };
@@ -21722,7 +23555,11 @@ interface operations {
21722
23555
  [key: string]: unknown;
21723
23556
  };
21724
23557
  /** @enum {string} */
21725
- status: "ready_for_complete" | "completed" | "canceled";
23558
+ status:
23559
+ | "ready_for_complete"
23560
+ | "complete_in_progress"
23561
+ | "completed"
23562
+ | "canceled";
21726
23563
  currency: string;
21727
23564
  totals: {
21728
23565
  [key: string]: unknown;
@@ -21838,7 +23675,11 @@ interface operations {
21838
23675
  [key: string]: unknown;
21839
23676
  };
21840
23677
  /** @enum {string} */
21841
- status: "ready_for_complete" | "completed" | "canceled";
23678
+ status:
23679
+ | "ready_for_complete"
23680
+ | "complete_in_progress"
23681
+ | "completed"
23682
+ | "canceled";
21842
23683
  currency: string;
21843
23684
  totals: {
21844
23685
  [key: string]: unknown;
@@ -21971,7 +23812,11 @@ interface operations {
21971
23812
  [key: string]: unknown;
21972
23813
  };
21973
23814
  /** @enum {string} */
21974
- status: "ready_for_complete" | "completed" | "canceled";
23815
+ status:
23816
+ | "ready_for_complete"
23817
+ | "complete_in_progress"
23818
+ | "completed"
23819
+ | "canceled";
21975
23820
  currency: string;
21976
23821
  totals: {
21977
23822
  [key: string]: unknown;
@@ -22118,7 +23963,11 @@ interface operations {
22118
23963
  [key: string]: unknown;
22119
23964
  };
22120
23965
  /** @enum {string} */
22121
- status: "ready_for_complete" | "completed" | "canceled";
23966
+ status:
23967
+ | "ready_for_complete"
23968
+ | "complete_in_progress"
23969
+ | "completed"
23970
+ | "canceled";
22122
23971
  currency: string;
22123
23972
  totals: {
22124
23973
  [key: string]: unknown;
@@ -22230,7 +24079,11 @@ interface operations {
22230
24079
  [key: string]: unknown;
22231
24080
  };
22232
24081
  /** @enum {string} */
22233
- status: "ready_for_complete" | "completed" | "canceled";
24082
+ status:
24083
+ | "ready_for_complete"
24084
+ | "complete_in_progress"
24085
+ | "completed"
24086
+ | "canceled";
22234
24087
  currency: string;
22235
24088
  totals: {
22236
24089
  [key: string]: unknown;
@@ -22351,7 +24204,11 @@ interface operations {
22351
24204
  [key: string]: unknown;
22352
24205
  };
22353
24206
  /** @enum {string} */
22354
- status: "ready_for_complete" | "completed" | "canceled";
24207
+ status:
24208
+ | "ready_for_complete"
24209
+ | "complete_in_progress"
24210
+ | "completed"
24211
+ | "canceled";
22355
24212
  currency: string;
22356
24213
  totals: {
22357
24214
  [key: string]: unknown;
@@ -22416,7 +24273,11 @@ interface operations {
22416
24273
  [key: string]: unknown;
22417
24274
  };
22418
24275
  /** @enum {string} */
22419
- status: "ready_for_complete" | "completed" | "canceled";
24276
+ status:
24277
+ | "ready_for_complete"
24278
+ | "complete_in_progress"
24279
+ | "completed"
24280
+ | "canceled";
22420
24281
  currency: string;
22421
24282
  totals: {
22422
24283
  [key: string]: unknown;
@@ -23890,6 +25751,58 @@ declare class AopClient {
23890
25751
  */
23891
25752
  retry(request: OperationBody<operations["post_v1_aop_retry"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_aop_retry"]>>;
23892
25753
  }
25754
+ declare class ApiClient {
25755
+ protected readonly _http: OmniHttp;
25756
+ constructor(_http: OmniHttp);
25757
+ /**
25758
+ * Discover a published merchant agent
25759
+ *
25760
+ * A2A 1.0 Agent Card for any configured agent published to a customer deployment. Private model settings, prompts and publisher identity are excluded.
25761
+ *
25762
+ * `GET /api/embed/{deploymentId}/.well-known/agent-card.json`
25763
+ */
25764
+ getEmbedwellKnownagentCardJson(request: OperationPath<operations["get_embed_by_deploymentid_well_known_agent_card_json"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_embed_by_deploymentid_well_known_agent_card_json"]>>;
25765
+ /**
25766
+ * Call a merchant agent using A2A
25767
+ *
25768
+ * Official A2A 1.0 JSON-RPC SendMessage, GetTask and CancelTask.
25769
+
25770
+ ### Authentication
25771
+
25772
+ Uses the existing customer JWT from /api/embed/{deploymentId}/session; send the same Origin when creating and using the session.
25773
+
25774
+ ### Messages
25775
+
25776
+ SendMessage accepts text user messages with a UUID messageId and up to 4000 characters. For asynchronous execution set configuration.returnImmediately=true and retrieve the task. Every task is bound to the customer session.
25777
+
25778
+ Bot verification and storefront protection apply. Payment proofs belong in the checkout completion endpoint, outside model messages.
25779
+
25780
+ ### Signed offers and buyer agents
25781
+
25782
+ Payable offers in purchase-offers artifacts include checkoutJwt when the platform signing key is configured. Requests may carry a Web Bot Auth signature; the verified agent orig
25783
+ *
25784
+ * `POST /api/embed/{deploymentId}/a2a`
25785
+ */
25786
+ embeda2a(request: OperationPath<operations["post_embed_by_deploymentid_a2a"]> & OperationBody<operations["post_embed_by_deploymentid_a2a"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_embed_by_deploymentid_a2a"]>>;
25787
+ /**
25788
+ * Manage customer-owned purchase offers
25789
+ *
25790
+ * ### Operations
25791
+
25792
+ create: offers[] (1–5), with stable requestId, exact purchasable product/variant IDs, quantities, shipping country and optional unitAmount proposals. get/cancel: sessionIds[] (1–20). complete: sessionId, paymentProof, and buyer approval of cartVersion, totalAmount and currency. pay: sessionId and the same exact approval; returns checkoutUrl for Stripe-hosted card entry.
25793
+
25794
+ ### Results and safeguards
25795
+
25796
+ Batches return ordered per-target results, succeededCount and failedCount. At most ten unpaid offers may be held per customer. Merchant-approved currency, countries, shipping and tax terms are required. Shopify-listed products return the supported Shopify checkout handoff.
25797
+
25798
+ ### Payment
25799
+
25800
+ Completion reuses the existing Stripe ACP or x402 rail. Hosted card checkout requires this org
25801
+ *
25802
+ * `POST /api/embed/{deploymentId}/checkout-sessions/{operation}`
25803
+ */
25804
+ embedcheckoutSessions(request: OperationPath<operations["post_embed_by_deploymentid_checkout_sessions_by_operation"]> & OperationBody<operations["post_embed_by_deploymentid_checkout_sessions_by_operation"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_embed_by_deploymentid_checkout_sessions_by_operation"]>>;
25805
+ }
23893
25806
  declare class BrandKitsClient {
23894
25807
  protected readonly _http: OmniHttp;
23895
25808
  constructor(_http: OmniHttp);
@@ -24084,12 +25997,32 @@ declare class CheckoutSessionsClient {
24084
25997
  /**
24085
25998
  * Complete Agentic Checkout Session
24086
25999
  *
24087
- * Settle the selected rail and create a native `agentic` order. Settlement failures return 402 and leave the session in `ready_for_payment`.
26000
+ * Settle the selected rail and create a native `agentic` order. Definitive settlement failures return 402. Pending confirmation locks the offer in `payment_pending`; durable recovery resumes the same attempt.
24088
26001
  *
24089
26002
  * `POST /api/v1/checkout-sessions/{sessionId}/complete`
24090
26003
  */
24091
26004
  complete(request: OperationPath<operations["post_v1_checkout_sessions_by_sessionid_complete"]> & OperationQuery<operations["post_v1_checkout_sessions_by_sessionid_complete"]> & OperationBody<operations["post_v1_checkout_sessions_by_sessionid_complete"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_checkout_sessions_by_sessionid_complete"]>>;
24092
26005
  }
26006
+ declare class CommerceClient {
26007
+ protected readonly _http: OmniHttp;
26008
+ constructor(_http: OmniHttp);
26009
+ /**
26010
+ * Await Commerce Jobs
26011
+ *
26012
+ * Wait for a mixed batch of returned commerce correlations: inventory_job, price_event, publish_job, delist_batch, store_switch, omni_delete, zalora_import, enrichment_batch, order_action and return_action. Maximum 50000 entries; IDs are trimmed and duplicates collapse by kind/id in first-requested order. timeoutMs=0 reads once; bounded waits allow up to 120000ms. Catalog jobs require catalog:read; order/return jobs require orders:read; mixed batches require both. Session callers include organizationId. Every job retains its target identity, status, errors and available label artifacts. Missing or inaccessible fulfillment jobs fail explicitly. needs_review is an uncertain outcome, never automatic success or authorization to resubmit. data.success describes completion; use state verification
26013
+ *
26014
+ * `POST /api/v1/commerce/jobs/await`
26015
+ */
26016
+ awaitJobs(request: OperationBody<operations["post_v1_commerce_jobs_await"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_commerce_jobs_await"]>>;
26017
+ /**
26018
+ * Verify Commerce State
26019
+ *
26020
+ * Perform fresh marketplace verification using the canonical services for every supported marketplace. For products provide productIds plus expected, or targets[{productId,expected}] for mixed values. For order and return operations provide their returned order_action/return_action correlations; product and fulfillment checks may share one request. Maximum 50000 entries per target array, with bounded concurrency. Catalog verification requires catalog:read; fulfillment verification requires orders:read; mixed batches require both. Session callers include organizationId. Missing, unauthorized, unsupported and unconfirmed targets fail explicitly. A return decision can be confirmed while later lifecycle steps remain pending. Labels confirm generated artifacts, not physical printing. Provider acc
26021
+ *
26022
+ * `POST /api/v1/commerce/state/verify`
26023
+ */
26024
+ verifyState(request: OperationBody<operations["post_v1_commerce_state_verify"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_commerce_state_verify"]>>;
26025
+ }
24093
26026
  declare class CompareClient {
24094
26027
  protected readonly _http: OmniHttp;
24095
26028
  constructor(_http: OmniHttp);
@@ -24449,6 +26382,68 @@ declare class OrdersClient {
24449
26382
  * `POST /api/v1/orders/{orderId}/actions`
24450
26383
  */
24451
26384
  queueAction(request: OperationPath<operations["post_v1_orders_by_orderid_actions"]> & OperationBody<operations["post_v1_orders_by_orderid_actions"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_orders_by_orderid_actions"]>>;
26385
+ /**
26386
+ * Check Order Action Options
26387
+ *
26388
+ * ### Authorization
26389
+
26390
+ Requires orders:write.
26391
+
26392
+ ### Choices
26393
+
26394
+ Read current marketplace choices for ship, cancel, labels or update_tracking for 1–50 order UUIDs using repeated orderIds query parameters. The shared order service checks status, store connection and marketplace capability. Results preserve first-requested order, with explicit per-order errors. Use the exact choice payload and supply any fields marked requiresInput. An unsupported marketplace operation is an explicit failure, not a silently skipped order. Ship arranges shipment; labels generates printable files. Fulfillment behavior is identical to the existing single-order API and workspace UI.
26395
+ *
26396
+ * `GET /api/v1/orders/actions`
26397
+ */
26398
+ listBatchActionOptions(request: OperationQuery<operations["get_v1_orders_actions"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_orders_actions"]>>;
26399
+ /**
26400
+ * Process Order Actions
26401
+ *
26402
+ * ### Authorization
26403
+
26404
+ Requires orders:write.
26405
+
26406
+ ### Batch submission
26407
+
26408
+ Queue 1–50 distinct order operations with a UUID requestId. Each operation has orderId, action (ship, cancel, labels or update_tracking), and optional payload. Use exact marketplace choices from GET /api/v1/orders/actions and supply required carrier, tracking, pickup/drop-off or cancellation details. One operation per order is allowed in a batch; later stages such as labels after shipment require another submission. All targets are authorized before any enqueue. Per-order failures are isolated; results retain request order and include every accepted jobId. data.success means all submissions were accepted, not that marketplace processing finished.
26409
+
26410
+ ### Recovery and completion
26411
+
26412
+ Retain requestId and unchanged operations for retr
26413
+ *
26414
+ * `POST /api/v1/orders/actions`
26415
+ */
26416
+ processActions(request: OperationBody<operations["post_v1_orders_actions"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_orders_actions"]>>;
26417
+ /**
26418
+ * Get Order Action Jobs
26419
+ *
26420
+ * ### Authorization
26421
+
26422
+ Requires orders:read.
26423
+
26424
+ ### Outcomes and labels
26425
+
26426
+ Read every requested order action job in one batch of 1–50 UUIDs using repeated jobIds parameters. Results preserve first-requested order. data.success is true only when every requested job succeeded; failedCount includes failed and not_supported, while pendingCount includes queued and running. Successful label jobs contain downloadable files in labels[]. A missing or cross-organization job returns 404; current store restrictions apply to all targets. The top-level completed status describes the lookup, not job completion. No raw provider acknowledgements are exposed.
26427
+ *
26428
+ * `GET /api/v1/orders/actions/jobs`
26429
+ */
26430
+ getActionJobs(request: OperationQuery<operations["get_v1_orders_actions_jobs"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_orders_actions_jobs"]>>;
26431
+ /**
26432
+ * Create Picking List
26433
+ *
26434
+ * ### Authorization
26435
+
26436
+ Requires orders:read. API keys resolve organization scope from their credential; session callers include organizationId.
26437
+
26438
+ ### PDF output
26439
+
26440
+ Create a private PDF picking list for 1–500 order UUIDs, trimmed and deduplicated in first-requested order. Missing or inaccessible orders fail the complete selection without creating a partial document. The same grouping, product quantities, SKU/variation and currency-labeled prices as the workspace Orders page are used. timeZone accepts an IANA time zone; omitted API requests use UTC. This does not arrange shipment or change orders.
26441
+
26442
+ The result contains structured list data, every orderId, a saved documentId and a signed HTTPS downloadUrl valid until expiresAt (five minutes). Generate a fresh list for a new download URL. Download the
26443
+ *
26444
+ * `POST /api/v1/orders/picking-list`
26445
+ */
26446
+ createPickingList(request: OperationBody<operations["post_v1_orders_picking_list"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_orders_picking_list"]>>;
24452
26447
  }
24453
26448
  declare class OrganizationsClient {
24454
26449
  protected readonly _http: OmniHttp;
@@ -24910,6 +26905,60 @@ declare class ReturnsClient {
24910
26905
  * `GET /api/v1/returns/{returnId}`
24911
26906
  */
24912
26907
  get(request: OperationPath<operations["get_v1_returns_by_returnid"]> & OperationQuery<operations["get_v1_returns_by_returnid"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_returns_by_returnid"]>>;
26908
+ /**
26909
+ * Check Return Actions
26910
+ *
26911
+ * ### Authorization
26912
+
26913
+ Requires orders:write.
26914
+
26915
+ ### Eligibility
26916
+
26917
+ Read live marketplace decisions for 1–50 OmniCommerce return UUIDs using repeated returnIds query parameters. Refreshes the saved return state through the same service as the order UI. All targets are organization- and store-scoped before marketplace access. Results preserve first-requested order; one provider failure does not block another store. data.success describes eligibility checks, not whether an action is available. Completed, cancelled and other terminal returns have no actions. Check actions.length and limitation; never infer eligibility from status alone. Amazon and WhatsApp currently return explicit processing limitations. Other marketplaces expose only decisions supported by their current API state. No buyer remarks,
26918
+ *
26919
+ * `GET /api/v1/returns/actions`
26920
+ */
26921
+ listActions(request: OperationQuery<operations["get_v1_returns_actions"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_returns_actions"]>>;
26922
+ /**
26923
+ * Process Returns
26924
+ *
26925
+ * ### Authorization
26926
+
26927
+ Requires orders:write.
26928
+
26929
+ ### Submit decisions
26930
+
26931
+ Queue 1–50 selected return decisions, including a one-element batch for a single return. Use only actionId/version pairs from a fresh eligibility check. Identical duplicate return operations are deduplicated in first-requested order; conflicting duplicates are rejected. requestId is a UUID idempotency key: retry the same key and unchanged operations after a transport failure. An active matching decision is reused; conflicting active decisions return 409. Returns HTTP 202 with every returnId and jobId. The durable worker rechecks current permissions, store identity, eligibility and version immediately before writing, then verifies the marketplace result. Follow links.poll or GET /api/v1/returns/actions/jobs with every jobIds e
26932
+ *
26933
+ * `POST /api/v1/returns/actions`
26934
+ */
26935
+ process(request: OperationBody<operations["post_v1_returns_actions"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_returns_actions"]>>;
26936
+ /**
26937
+ * Get Return Action Jobs
26938
+ *
26939
+ * ### Authorization
26940
+
26941
+ Requires orders:read.
26942
+
26943
+ ### Job outcomes
26944
+
26945
+ Read the current state of 1–50 return-processing job UUIDs in one request using repeated jobIds parameters. Use every job ID returned by submission. Results preserve first-requested order. pendingCount counts queued, running and submitting; succeededCount counts succeeded; failedCount includes failed and needs_review. data.success is true only if every requested job succeeded. The top-level completed status refers to this lookup, not to the jobs. Missing or cross-organization jobs return 404; jobs outside assigned stores are forbidden. Evidence contains accepted/verified flags and before/after marketplace statuses, without raw provider payloads.
26946
+ *
26947
+ * `GET /api/v1/returns/actions/jobs`
26948
+ */
26949
+ getActionJobs(request: OperationQuery<operations["get_v1_returns_actions_jobs"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_returns_actions_jobs"]>>;
26950
+ /**
26951
+ * Get Order Returns
26952
+ *
26953
+ * Requires orders:read. Read stored return requests for 1–50 order UUIDs using repeated orderIds query parameters.
26954
+
26955
+ ### Return identity
26956
+
26957
+ Results preserve first-requested order and include distinct active and historical return requests. processingEligible is a local candidate flag, not live eligibility. Pass returnId values to GET /api/v1/returns/actions before choosing a decision. Every order is authorized before reading returns, including store restrictions; no buyer data is exposed.
26958
+ *
26959
+ * `GET /api/v1/returns/orders`
26960
+ */
26961
+ listForOrders(request: OperationQuery<operations["get_v1_returns_orders"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_returns_orders"]>>;
24913
26962
  }
24914
26963
  declare class ReviewsClient {
24915
26964
  protected readonly _http: OmniHttp;
@@ -25168,11 +27217,13 @@ declare class OmniGeneratedClient {
25168
27217
  readonly agents: AgentsClient;
25169
27218
  readonly analytics: AnalyticsClient;
25170
27219
  readonly aop: AopClient;
27220
+ readonly api: ApiClient;
25171
27221
  readonly brandKits: BrandKitsClient;
25172
27222
  readonly brandsgateway: BrandsgatewayClient;
25173
27223
  readonly campaigns: CampaignsClient;
25174
27224
  readonly catalog: CatalogClient;
25175
27225
  readonly checkoutSessions: CheckoutSessionsClient;
27226
+ readonly commerce: CommerceClient;
25176
27227
  readonly compare: CompareClient;
25177
27228
  readonly directory: DirectoryClient;
25178
27229
  readonly documents: DocumentsClient;
@@ -25208,11 +27259,13 @@ type OmniResources = {
25208
27259
  agents: AgentsClient;
25209
27260
  analytics: AnalyticsClient;
25210
27261
  aop: AopClient;
27262
+ api: ApiClient;
25211
27263
  brandKits: BrandKitsClient;
25212
27264
  brandsgateway: BrandsgatewayClient;
25213
27265
  campaigns: CampaignsClient;
25214
27266
  catalog: CatalogClient;
25215
27267
  checkoutSessions: CheckoutSessionsClient;
27268
+ commerce: CommerceClient;
25216
27269
  compare: CompareClient;
25217
27270
  directory: DirectoryClient;
25218
27271
  documents: DocumentsClient;
@@ -25285,7 +27338,7 @@ declare function constructEvent(payload: string | Uint8Array, headers: WebhookHe
25285
27338
  toleranceInSeconds?: number;
25286
27339
  }): Promise<ConstructedWebhookEvent>;
25287
27340
 
25288
- declare const SDK_VERSION = "0.17.0";
27341
+ declare const SDK_VERSION = "0.19.0";
25289
27342
 
25290
27343
  type ProductCreatedWebhookEvent = components["schemas"]["ProductCreatedWebhookEvent"];
25291
27344
  type ProductUpdatedWebhookEvent = components["schemas"]["ProductUpdatedWebhookEvent"];