@omni-commerce/sdk 0.17.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +65 -0
- package/dist/index.cjs +272 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2424 -850
- package/dist/index.d.ts +2424 -850
- package/dist/index.js +272 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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.
|
|
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;
|
|
@@ -1393,6 +1481,100 @@ interface paths {
|
|
|
1393
1481
|
patch?: never;
|
|
1394
1482
|
trace?: never;
|
|
1395
1483
|
};
|
|
1484
|
+
"/api/v1/orders/actions": {
|
|
1485
|
+
parameters: {
|
|
1486
|
+
query?: never;
|
|
1487
|
+
header?: never;
|
|
1488
|
+
path?: never;
|
|
1489
|
+
cookie?: never;
|
|
1490
|
+
};
|
|
1491
|
+
/**
|
|
1492
|
+
* Check Order Action Options
|
|
1493
|
+
* @description ### Authorization
|
|
1494
|
+
*
|
|
1495
|
+
* Requires orders:write.
|
|
1496
|
+
*
|
|
1497
|
+
* ### Choices
|
|
1498
|
+
*
|
|
1499
|
+
* 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.
|
|
1500
|
+
*/
|
|
1501
|
+
get: operations["get_v1_orders_actions"];
|
|
1502
|
+
put?: never;
|
|
1503
|
+
/**
|
|
1504
|
+
* Process Order Actions
|
|
1505
|
+
* @description ### Authorization
|
|
1506
|
+
*
|
|
1507
|
+
* Requires orders:write.
|
|
1508
|
+
*
|
|
1509
|
+
* ### Batch submission
|
|
1510
|
+
*
|
|
1511
|
+
* 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.
|
|
1512
|
+
*
|
|
1513
|
+
* ### Recovery and completion
|
|
1514
|
+
*
|
|
1515
|
+
* 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.
|
|
1516
|
+
*/
|
|
1517
|
+
post: operations["post_v1_orders_actions"];
|
|
1518
|
+
delete?: never;
|
|
1519
|
+
options?: never;
|
|
1520
|
+
head?: never;
|
|
1521
|
+
patch?: never;
|
|
1522
|
+
trace?: never;
|
|
1523
|
+
};
|
|
1524
|
+
"/api/v1/orders/actions/jobs": {
|
|
1525
|
+
parameters: {
|
|
1526
|
+
query?: never;
|
|
1527
|
+
header?: never;
|
|
1528
|
+
path?: never;
|
|
1529
|
+
cookie?: never;
|
|
1530
|
+
};
|
|
1531
|
+
/**
|
|
1532
|
+
* Get Order Action Jobs
|
|
1533
|
+
* @description ### Authorization
|
|
1534
|
+
*
|
|
1535
|
+
* Requires orders:read.
|
|
1536
|
+
*
|
|
1537
|
+
* ### Outcomes and labels
|
|
1538
|
+
*
|
|
1539
|
+
* 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.
|
|
1540
|
+
*/
|
|
1541
|
+
get: operations["get_v1_orders_actions_jobs"];
|
|
1542
|
+
put?: never;
|
|
1543
|
+
post?: never;
|
|
1544
|
+
delete?: never;
|
|
1545
|
+
options?: never;
|
|
1546
|
+
head?: never;
|
|
1547
|
+
patch?: never;
|
|
1548
|
+
trace?: never;
|
|
1549
|
+
};
|
|
1550
|
+
"/api/v1/orders/picking-list": {
|
|
1551
|
+
parameters: {
|
|
1552
|
+
query?: never;
|
|
1553
|
+
header?: never;
|
|
1554
|
+
path?: never;
|
|
1555
|
+
cookie?: never;
|
|
1556
|
+
};
|
|
1557
|
+
get?: never;
|
|
1558
|
+
put?: never;
|
|
1559
|
+
/**
|
|
1560
|
+
* Create Picking List
|
|
1561
|
+
* @description ### Authorization
|
|
1562
|
+
*
|
|
1563
|
+
* Requires orders:read. API keys resolve organization scope from their credential; session callers include organizationId.
|
|
1564
|
+
*
|
|
1565
|
+
* ### PDF output
|
|
1566
|
+
*
|
|
1567
|
+
* 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.
|
|
1568
|
+
*
|
|
1569
|
+
* 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.
|
|
1570
|
+
*/
|
|
1571
|
+
post: operations["post_v1_orders_picking_list"];
|
|
1572
|
+
delete?: never;
|
|
1573
|
+
options?: never;
|
|
1574
|
+
head?: never;
|
|
1575
|
+
patch?: never;
|
|
1576
|
+
trace?: never;
|
|
1577
|
+
};
|
|
1396
1578
|
"/api/v1/organizations": {
|
|
1397
1579
|
parameters: {
|
|
1398
1580
|
query?: never;
|
|
@@ -1705,6 +1887,8 @@ interface paths {
|
|
|
1705
1887
|
* ### Marketplace sync
|
|
1706
1888
|
*
|
|
1707
1889
|
* 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.
|
|
1890
|
+
*
|
|
1891
|
+
* 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
1892
|
*/
|
|
1709
1893
|
patch: operations["patch_v1_products_by_productid_price"];
|
|
1710
1894
|
trace?: never;
|
|
@@ -2112,6 +2296,92 @@ interface paths {
|
|
|
2112
2296
|
patch?: never;
|
|
2113
2297
|
trace?: never;
|
|
2114
2298
|
};
|
|
2299
|
+
"/api/v1/returns/actions": {
|
|
2300
|
+
parameters: {
|
|
2301
|
+
query?: never;
|
|
2302
|
+
header?: never;
|
|
2303
|
+
path?: never;
|
|
2304
|
+
cookie?: never;
|
|
2305
|
+
};
|
|
2306
|
+
/**
|
|
2307
|
+
* Check Return Actions
|
|
2308
|
+
* @description ### Authorization
|
|
2309
|
+
*
|
|
2310
|
+
* Requires orders:write.
|
|
2311
|
+
*
|
|
2312
|
+
* ### Eligibility
|
|
2313
|
+
*
|
|
2314
|
+
* 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.
|
|
2315
|
+
*/
|
|
2316
|
+
get: operations["get_v1_returns_actions"];
|
|
2317
|
+
put?: never;
|
|
2318
|
+
/**
|
|
2319
|
+
* Process Returns
|
|
2320
|
+
* @description ### Authorization
|
|
2321
|
+
*
|
|
2322
|
+
* Requires orders:write.
|
|
2323
|
+
*
|
|
2324
|
+
* ### Submit decisions
|
|
2325
|
+
*
|
|
2326
|
+
* 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.
|
|
2327
|
+
*/
|
|
2328
|
+
post: operations["post_v1_returns_actions"];
|
|
2329
|
+
delete?: never;
|
|
2330
|
+
options?: never;
|
|
2331
|
+
head?: never;
|
|
2332
|
+
patch?: never;
|
|
2333
|
+
trace?: never;
|
|
2334
|
+
};
|
|
2335
|
+
"/api/v1/returns/actions/jobs": {
|
|
2336
|
+
parameters: {
|
|
2337
|
+
query?: never;
|
|
2338
|
+
header?: never;
|
|
2339
|
+
path?: never;
|
|
2340
|
+
cookie?: never;
|
|
2341
|
+
};
|
|
2342
|
+
/**
|
|
2343
|
+
* Get Return Action Jobs
|
|
2344
|
+
* @description ### Authorization
|
|
2345
|
+
*
|
|
2346
|
+
* Requires orders:read.
|
|
2347
|
+
*
|
|
2348
|
+
* ### Job outcomes
|
|
2349
|
+
*
|
|
2350
|
+
* 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.
|
|
2351
|
+
*/
|
|
2352
|
+
get: operations["get_v1_returns_actions_jobs"];
|
|
2353
|
+
put?: never;
|
|
2354
|
+
post?: never;
|
|
2355
|
+
delete?: never;
|
|
2356
|
+
options?: never;
|
|
2357
|
+
head?: never;
|
|
2358
|
+
patch?: never;
|
|
2359
|
+
trace?: never;
|
|
2360
|
+
};
|
|
2361
|
+
"/api/v1/returns/orders": {
|
|
2362
|
+
parameters: {
|
|
2363
|
+
query?: never;
|
|
2364
|
+
header?: never;
|
|
2365
|
+
path?: never;
|
|
2366
|
+
cookie?: never;
|
|
2367
|
+
};
|
|
2368
|
+
/**
|
|
2369
|
+
* Get Order Returns
|
|
2370
|
+
* @description Requires orders:read. Read stored return requests for 1–50 order UUIDs using repeated orderIds query parameters.
|
|
2371
|
+
*
|
|
2372
|
+
* ### Return identity
|
|
2373
|
+
*
|
|
2374
|
+
* 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.
|
|
2375
|
+
*/
|
|
2376
|
+
get: operations["get_v1_returns_orders"];
|
|
2377
|
+
put?: never;
|
|
2378
|
+
post?: never;
|
|
2379
|
+
delete?: never;
|
|
2380
|
+
options?: never;
|
|
2381
|
+
head?: never;
|
|
2382
|
+
patch?: never;
|
|
2383
|
+
trace?: never;
|
|
2384
|
+
};
|
|
2115
2385
|
"/api/v1/reviews": {
|
|
2116
2386
|
parameters: {
|
|
2117
2387
|
query?: never;
|
|
@@ -5060,81 +5330,302 @@ interface components {
|
|
|
5060
5330
|
pathItems: never;
|
|
5061
5331
|
}
|
|
5062
5332
|
interface operations {
|
|
5063
|
-
|
|
5333
|
+
get_embed_by_deploymentid_well_known_agent_card_json: {
|
|
5064
5334
|
parameters: {
|
|
5065
5335
|
query?: never;
|
|
5066
5336
|
header?: never;
|
|
5067
|
-
path
|
|
5068
|
-
|
|
5069
|
-
};
|
|
5070
|
-
requestBody: {
|
|
5071
|
-
content: {
|
|
5072
|
-
/**
|
|
5073
|
-
* @example {
|
|
5074
|
-
* "messages": [
|
|
5075
|
-
* {
|
|
5076
|
-
* "role": "user",
|
|
5077
|
-
* "content": "How many products are missing a price?"
|
|
5078
|
-
* }
|
|
5079
|
-
* ]
|
|
5080
|
-
* }
|
|
5081
|
-
*/
|
|
5082
|
-
"application/json": {
|
|
5083
|
-
organizationId?: string;
|
|
5084
|
-
thread_id?: string | null;
|
|
5085
|
-
channel?: string;
|
|
5086
|
-
messages?: {
|
|
5087
|
-
/** @enum {string} */
|
|
5088
|
-
role?: "user" | "assistant" | "system";
|
|
5089
|
-
content:
|
|
5090
|
-
| string
|
|
5091
|
-
| (
|
|
5092
|
-
| {
|
|
5093
|
-
/** @constant */
|
|
5094
|
-
type: "text";
|
|
5095
|
-
text: string;
|
|
5096
|
-
}
|
|
5097
|
-
| {
|
|
5098
|
-
/** @constant */
|
|
5099
|
-
type: "image";
|
|
5100
|
-
url: string;
|
|
5101
|
-
filename?: string;
|
|
5102
|
-
}
|
|
5103
|
-
)[];
|
|
5104
|
-
id?: string;
|
|
5105
|
-
name?: string;
|
|
5106
|
-
}[];
|
|
5107
|
-
config?: {
|
|
5108
|
-
enabled_tools?: string[];
|
|
5109
|
-
model?: string | null;
|
|
5110
|
-
system_prompt?: string;
|
|
5111
|
-
structured_output?: {
|
|
5112
|
-
[key: string]: unknown;
|
|
5113
|
-
} | null;
|
|
5114
|
-
};
|
|
5115
|
-
decisions?: {
|
|
5116
|
-
/** @enum {string} */
|
|
5117
|
-
action: "approve" | "reject";
|
|
5118
|
-
reason?: string;
|
|
5119
|
-
}[];
|
|
5120
|
-
};
|
|
5337
|
+
path: {
|
|
5338
|
+
deploymentId: string;
|
|
5121
5339
|
};
|
|
5340
|
+
cookie?: never;
|
|
5122
5341
|
};
|
|
5342
|
+
requestBody?: never;
|
|
5123
5343
|
responses: {
|
|
5124
|
-
/** @description
|
|
5344
|
+
/** @description Official A2A Agent Card. */
|
|
5125
5345
|
200: {
|
|
5126
5346
|
headers: {
|
|
5127
5347
|
[name: string]: unknown;
|
|
5128
5348
|
};
|
|
5129
|
-
content
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5349
|
+
content?: never;
|
|
5350
|
+
};
|
|
5351
|
+
/** @description Customer deployment unavailable. */
|
|
5352
|
+
404: {
|
|
5353
|
+
headers: {
|
|
5354
|
+
[name: string]: unknown;
|
|
5355
|
+
};
|
|
5356
|
+
content?: never;
|
|
5357
|
+
};
|
|
5358
|
+
};
|
|
5359
|
+
};
|
|
5360
|
+
post_embed_by_deploymentid_a2a: {
|
|
5361
|
+
parameters: {
|
|
5362
|
+
query?: never;
|
|
5363
|
+
header?: never;
|
|
5364
|
+
path: {
|
|
5365
|
+
deploymentId: string;
|
|
5366
|
+
};
|
|
5367
|
+
cookie?: never;
|
|
5368
|
+
};
|
|
5369
|
+
requestBody: {
|
|
5370
|
+
content: {
|
|
5371
|
+
"application/json": Record<string, never>;
|
|
5372
|
+
};
|
|
5373
|
+
};
|
|
5374
|
+
responses: {
|
|
5375
|
+
/** @description A2A JSON-RPC task or protocol error. */
|
|
5376
|
+
200: {
|
|
5377
|
+
headers: {
|
|
5378
|
+
[name: string]: unknown;
|
|
5379
|
+
};
|
|
5380
|
+
content?: never;
|
|
5381
|
+
};
|
|
5382
|
+
/** @description Invalid customer session or buyer-agent signature. */
|
|
5383
|
+
401: {
|
|
5384
|
+
headers: {
|
|
5385
|
+
[name: string]: unknown;
|
|
5386
|
+
};
|
|
5387
|
+
content?: never;
|
|
5388
|
+
};
|
|
5389
|
+
/** @description Deployment or origin mismatch. */
|
|
5390
|
+
403: {
|
|
5391
|
+
headers: {
|
|
5392
|
+
[name: string]: unknown;
|
|
5393
|
+
};
|
|
5394
|
+
content?: never;
|
|
5395
|
+
};
|
|
5396
|
+
/** @description Storefront protection limit. */
|
|
5397
|
+
429: {
|
|
5398
|
+
headers: {
|
|
5399
|
+
[name: string]: unknown;
|
|
5400
|
+
};
|
|
5401
|
+
content?: never;
|
|
5402
|
+
};
|
|
5403
|
+
};
|
|
5404
|
+
};
|
|
5405
|
+
post_embed_by_deploymentid_checkout_sessions_by_operation: {
|
|
5406
|
+
parameters: {
|
|
5407
|
+
query?: never;
|
|
5408
|
+
header?: never;
|
|
5409
|
+
path: {
|
|
5410
|
+
deploymentId: string;
|
|
5411
|
+
operation: "create" | "get" | "cancel" | "complete" | "pay";
|
|
5412
|
+
};
|
|
5413
|
+
cookie?: never;
|
|
5414
|
+
};
|
|
5415
|
+
requestBody: {
|
|
5416
|
+
content: {
|
|
5417
|
+
"application/json":
|
|
5418
|
+
| {
|
|
5419
|
+
offers: {
|
|
5420
|
+
/**
|
|
5421
|
+
* @default acp_stripe
|
|
5422
|
+
* @enum {string}
|
|
5423
|
+
*/
|
|
5424
|
+
paymentRail?: "acp_stripe" | "x402";
|
|
5425
|
+
items: {
|
|
5426
|
+
productId: string;
|
|
5427
|
+
quantity: number;
|
|
5428
|
+
unitAmount?: number;
|
|
5429
|
+
}[];
|
|
5430
|
+
buyer?: {
|
|
5431
|
+
name?: string;
|
|
5432
|
+
/** Format: email */
|
|
5433
|
+
email?: string;
|
|
5434
|
+
phone?: string;
|
|
5435
|
+
} & {
|
|
5436
|
+
[key: string]: unknown;
|
|
5437
|
+
};
|
|
5438
|
+
shippingAddress?: {
|
|
5439
|
+
name?: string;
|
|
5440
|
+
line1?: string;
|
|
5441
|
+
line2?: string;
|
|
5442
|
+
city?: string;
|
|
5443
|
+
region?: string;
|
|
5444
|
+
postalCode?: string;
|
|
5445
|
+
country?: string;
|
|
5446
|
+
} & {
|
|
5447
|
+
[key: string]: unknown;
|
|
5448
|
+
};
|
|
5449
|
+
billingAddress?: {
|
|
5450
|
+
name?: string;
|
|
5451
|
+
line1?: string;
|
|
5452
|
+
line2?: string;
|
|
5453
|
+
city?: string;
|
|
5454
|
+
region?: string;
|
|
5455
|
+
postalCode?: string;
|
|
5456
|
+
country?: string;
|
|
5457
|
+
} & {
|
|
5458
|
+
[key: string]: unknown;
|
|
5459
|
+
};
|
|
5460
|
+
requestId: string;
|
|
5461
|
+
}[];
|
|
5462
|
+
}
|
|
5463
|
+
| {
|
|
5464
|
+
sessionIds: string[];
|
|
5465
|
+
}
|
|
5466
|
+
| {
|
|
5467
|
+
approval: {
|
|
5468
|
+
cartVersion: number;
|
|
5469
|
+
totalAmount: number;
|
|
5470
|
+
currency: string;
|
|
5471
|
+
};
|
|
5472
|
+
idempotencyKey?: string;
|
|
5473
|
+
paymentProof: {
|
|
5474
|
+
[key: string]: unknown;
|
|
5475
|
+
};
|
|
5476
|
+
sessionId: string;
|
|
5477
|
+
}
|
|
5478
|
+
| {
|
|
5479
|
+
sessionId: string;
|
|
5480
|
+
approval: {
|
|
5481
|
+
cartVersion: number;
|
|
5482
|
+
totalAmount: number;
|
|
5483
|
+
currency: string;
|
|
5484
|
+
};
|
|
5485
|
+
};
|
|
5486
|
+
};
|
|
5487
|
+
};
|
|
5488
|
+
responses: {
|
|
5489
|
+
/** @description Buyer-safe offers or completion result; costs, private metadata and payment proofs are excluded. */
|
|
5490
|
+
200: {
|
|
5491
|
+
headers: {
|
|
5492
|
+
[name: string]: unknown;
|
|
5493
|
+
};
|
|
5494
|
+
content?: never;
|
|
5495
|
+
};
|
|
5496
|
+
/** @description Invalid operation or request. */
|
|
5497
|
+
400: {
|
|
5498
|
+
headers: {
|
|
5499
|
+
[name: string]: unknown;
|
|
5500
|
+
};
|
|
5501
|
+
content?: never;
|
|
5502
|
+
};
|
|
5503
|
+
/** @description Invalid customer session or buyer-agent signature. */
|
|
5504
|
+
401: {
|
|
5505
|
+
headers: {
|
|
5506
|
+
[name: string]: unknown;
|
|
5507
|
+
};
|
|
5508
|
+
content?: never;
|
|
5509
|
+
};
|
|
5510
|
+
/** @description Definitive payment failure. */
|
|
5511
|
+
402: {
|
|
5512
|
+
headers: {
|
|
5513
|
+
[name: string]: unknown;
|
|
5514
|
+
};
|
|
5515
|
+
content?: never;
|
|
5516
|
+
};
|
|
5517
|
+
/** @description Invalid customer scope or merchant checkout disabled. */
|
|
5518
|
+
403: {
|
|
5519
|
+
headers: {
|
|
5520
|
+
[name: string]: unknown;
|
|
5521
|
+
};
|
|
5522
|
+
content?: never;
|
|
5523
|
+
};
|
|
5524
|
+
/** @description Offer not found or belongs to another buyer. */
|
|
5525
|
+
404: {
|
|
5526
|
+
headers: {
|
|
5527
|
+
[name: string]: unknown;
|
|
5528
|
+
};
|
|
5529
|
+
content?: never;
|
|
5530
|
+
};
|
|
5531
|
+
/** @description Approval mismatch, payment in progress, or payment reconciliation required. */
|
|
5532
|
+
409: {
|
|
5533
|
+
headers: {
|
|
5534
|
+
[name: string]: unknown;
|
|
5535
|
+
};
|
|
5536
|
+
content?: never;
|
|
5537
|
+
};
|
|
5538
|
+
/** @description Storefront or active offer limit. */
|
|
5539
|
+
429: {
|
|
5540
|
+
headers: {
|
|
5541
|
+
[name: string]: unknown;
|
|
5542
|
+
};
|
|
5543
|
+
content?: never;
|
|
5544
|
+
};
|
|
5545
|
+
/** @description Payment confirmation pending durable retry. */
|
|
5546
|
+
503: {
|
|
5547
|
+
headers: {
|
|
5548
|
+
[name: string]: unknown;
|
|
5549
|
+
};
|
|
5550
|
+
content?: never;
|
|
5551
|
+
};
|
|
5552
|
+
};
|
|
5553
|
+
};
|
|
5554
|
+
post_v1_agents_general_invoke: {
|
|
5555
|
+
parameters: {
|
|
5556
|
+
query?: never;
|
|
5557
|
+
header?: never;
|
|
5558
|
+
path?: never;
|
|
5559
|
+
cookie?: never;
|
|
5560
|
+
};
|
|
5561
|
+
requestBody: {
|
|
5562
|
+
content: {
|
|
5563
|
+
/**
|
|
5564
|
+
* @example {
|
|
5565
|
+
* "messages": [
|
|
5566
|
+
* {
|
|
5567
|
+
* "role": "user",
|
|
5568
|
+
* "content": "How many products are missing a price?"
|
|
5569
|
+
* }
|
|
5570
|
+
* ]
|
|
5571
|
+
* }
|
|
5572
|
+
*/
|
|
5573
|
+
"application/json": {
|
|
5574
|
+
organizationId?: string;
|
|
5575
|
+
thread_id?: string | null;
|
|
5576
|
+
channel?: string;
|
|
5577
|
+
messages?: {
|
|
5578
|
+
/** @enum {string} */
|
|
5579
|
+
role?: "user" | "assistant" | "system";
|
|
5580
|
+
content:
|
|
5581
|
+
| string
|
|
5582
|
+
| (
|
|
5583
|
+
| {
|
|
5584
|
+
/** @constant */
|
|
5585
|
+
type: "text";
|
|
5586
|
+
text: string;
|
|
5587
|
+
}
|
|
5588
|
+
| {
|
|
5589
|
+
/** @constant */
|
|
5590
|
+
type: "image";
|
|
5591
|
+
url: string;
|
|
5592
|
+
filename?: string;
|
|
5593
|
+
}
|
|
5594
|
+
)[];
|
|
5595
|
+
id?: string;
|
|
5596
|
+
name?: string;
|
|
5597
|
+
}[];
|
|
5598
|
+
config?: {
|
|
5599
|
+
enabled_tools?: string[];
|
|
5600
|
+
model?: string | null;
|
|
5601
|
+
system_prompt?: string;
|
|
5602
|
+
structured_output?: {
|
|
5603
|
+
[key: string]: unknown;
|
|
5604
|
+
} | null;
|
|
5605
|
+
};
|
|
5606
|
+
decisions?: {
|
|
5607
|
+
/** @enum {string} */
|
|
5608
|
+
action: "approve" | "reject";
|
|
5609
|
+
reason?: string;
|
|
5610
|
+
}[];
|
|
5611
|
+
};
|
|
5612
|
+
};
|
|
5613
|
+
};
|
|
5614
|
+
responses: {
|
|
5615
|
+
/** @description The agent finished or is waiting for approval. */
|
|
5616
|
+
200: {
|
|
5617
|
+
headers: {
|
|
5618
|
+
[name: string]: unknown;
|
|
5619
|
+
};
|
|
5620
|
+
content: {
|
|
5621
|
+
"application/json": {
|
|
5622
|
+
run_id: string;
|
|
5623
|
+
thread_id: string;
|
|
5624
|
+
/** @enum {string} */
|
|
5625
|
+
status:
|
|
5626
|
+
| "queued"
|
|
5627
|
+
| "running"
|
|
5628
|
+
| "completed"
|
|
5138
5629
|
| "awaiting_approval"
|
|
5139
5630
|
| "failed";
|
|
5140
5631
|
messages: {
|
|
@@ -10953,6 +11444,8 @@ interface operations {
|
|
|
10953
11444
|
items: {
|
|
10954
11445
|
/** @description OmniCommerce product UUID. */
|
|
10955
11446
|
productId: string;
|
|
11447
|
+
/** @description Optional proposed unit price. Merchant-agent discount, price and margin guardrails are enforced server-side. */
|
|
11448
|
+
unitAmount?: number;
|
|
10956
11449
|
quantity: number;
|
|
10957
11450
|
}[];
|
|
10958
11451
|
buyer?: {
|
|
@@ -11007,6 +11500,7 @@ interface operations {
|
|
|
11007
11500
|
/** @enum {string} */
|
|
11008
11501
|
status:
|
|
11009
11502
|
| "ready_for_payment"
|
|
11503
|
+
| "payment_pending"
|
|
11010
11504
|
| "completed"
|
|
11011
11505
|
| "cancelled"
|
|
11012
11506
|
| "expired";
|
|
@@ -11120,6 +11614,7 @@ interface operations {
|
|
|
11120
11614
|
/** @enum {string} */
|
|
11121
11615
|
status:
|
|
11122
11616
|
| "ready_for_payment"
|
|
11617
|
+
| "payment_pending"
|
|
11123
11618
|
| "completed"
|
|
11124
11619
|
| "cancelled"
|
|
11125
11620
|
| "expired";
|
|
@@ -11216,6 +11711,8 @@ interface operations {
|
|
|
11216
11711
|
items?: {
|
|
11217
11712
|
/** @description OmniCommerce product UUID. */
|
|
11218
11713
|
productId: string;
|
|
11714
|
+
/** @description Optional proposed unit price. Merchant-agent discount, price and margin guardrails are enforced server-side. */
|
|
11715
|
+
unitAmount?: number;
|
|
11219
11716
|
quantity: number;
|
|
11220
11717
|
}[];
|
|
11221
11718
|
buyer?: {
|
|
@@ -11270,6 +11767,7 @@ interface operations {
|
|
|
11270
11767
|
/** @enum {string} */
|
|
11271
11768
|
status:
|
|
11272
11769
|
| "ready_for_payment"
|
|
11770
|
+
| "payment_pending"
|
|
11273
11771
|
| "completed"
|
|
11274
11772
|
| "cancelled"
|
|
11275
11773
|
| "expired";
|
|
@@ -11380,6 +11878,8 @@ interface operations {
|
|
|
11380
11878
|
items?: {
|
|
11381
11879
|
/** @description OmniCommerce product UUID. */
|
|
11382
11880
|
productId: string;
|
|
11881
|
+
/** @description Optional proposed unit price. Merchant-agent discount, price and margin guardrails are enforced server-side. */
|
|
11882
|
+
unitAmount?: number;
|
|
11383
11883
|
quantity: number;
|
|
11384
11884
|
}[];
|
|
11385
11885
|
buyer?: {
|
|
@@ -11434,6 +11934,7 @@ interface operations {
|
|
|
11434
11934
|
/** @enum {string} */
|
|
11435
11935
|
status:
|
|
11436
11936
|
| "ready_for_payment"
|
|
11937
|
+
| "payment_pending"
|
|
11437
11938
|
| "completed"
|
|
11438
11939
|
| "cancelled"
|
|
11439
11940
|
| "expired";
|
|
@@ -11554,6 +12055,7 @@ interface operations {
|
|
|
11554
12055
|
/** @enum {string} */
|
|
11555
12056
|
status:
|
|
11556
12057
|
| "ready_for_payment"
|
|
12058
|
+
| "payment_pending"
|
|
11557
12059
|
| "completed"
|
|
11558
12060
|
| "cancelled"
|
|
11559
12061
|
| "expired";
|
|
@@ -11655,6 +12157,11 @@ interface operations {
|
|
|
11655
12157
|
requestBody: {
|
|
11656
12158
|
content: {
|
|
11657
12159
|
"application/json": {
|
|
12160
|
+
approval?: {
|
|
12161
|
+
cartVersion: number;
|
|
12162
|
+
totalAmount: number;
|
|
12163
|
+
currency: string;
|
|
12164
|
+
};
|
|
11658
12165
|
idempotencyKey?: string;
|
|
11659
12166
|
/** @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
12167
|
paymentProof: {
|
|
@@ -11680,6 +12187,7 @@ interface operations {
|
|
|
11680
12187
|
/** @enum {string} */
|
|
11681
12188
|
status:
|
|
11682
12189
|
| "ready_for_payment"
|
|
12190
|
+
| "payment_pending"
|
|
11683
12191
|
| "completed"
|
|
11684
12192
|
| "cancelled"
|
|
11685
12193
|
| "expired";
|
|
@@ -11765,6 +12273,7 @@ interface operations {
|
|
|
11765
12273
|
/** @enum {string} */
|
|
11766
12274
|
status:
|
|
11767
12275
|
| "ready_for_payment"
|
|
12276
|
+
| "payment_pending"
|
|
11768
12277
|
| "completed"
|
|
11769
12278
|
| "cancelled"
|
|
11770
12279
|
| "expired";
|
|
@@ -14901,139 +15410,95 @@ interface operations {
|
|
|
14901
15410
|
};
|
|
14902
15411
|
};
|
|
14903
15412
|
};
|
|
14904
|
-
|
|
15413
|
+
get_v1_orders_actions: {
|
|
14905
15414
|
parameters: {
|
|
14906
|
-
query
|
|
15415
|
+
query: {
|
|
15416
|
+
/** @description Repeat this query parameter for each UUID. Between 1 and 50 entries, deduplicated in first-requested order. */
|
|
15417
|
+
orderIds: string[];
|
|
15418
|
+
action: "ship" | "cancel" | "labels" | "update_tracking";
|
|
15419
|
+
/** @description Session callers only. API keys resolve organization scope from the credential. */
|
|
15420
|
+
organizationId?: string;
|
|
15421
|
+
};
|
|
14907
15422
|
header?: never;
|
|
14908
15423
|
path?: never;
|
|
14909
15424
|
cookie?: never;
|
|
14910
15425
|
};
|
|
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
|
-
};
|
|
15426
|
+
requestBody?: never;
|
|
14929
15427
|
responses: {
|
|
14930
|
-
/** @description
|
|
14931
|
-
|
|
15428
|
+
/** @description Request completed. Inspect data.success, per-target results and pendingCount for processing progress. */
|
|
15429
|
+
200: {
|
|
14932
15430
|
headers: {
|
|
14933
15431
|
[name: string]: unknown;
|
|
14934
15432
|
};
|
|
14935
15433
|
content: {
|
|
14936
15434
|
"application/json": {
|
|
14937
15435
|
ok: boolean;
|
|
14938
|
-
|
|
14939
|
-
|
|
14940
|
-
|
|
14941
|
-
|
|
14942
|
-
|
|
14943
|
-
|
|
15436
|
+
apiVersion: string;
|
|
15437
|
+
/** Format: uuid */
|
|
15438
|
+
operationId: string;
|
|
15439
|
+
/** @enum {string} */
|
|
15440
|
+
status: "completed";
|
|
15441
|
+
data: {
|
|
15442
|
+
success: boolean;
|
|
15443
|
+
orderIds: string[];
|
|
15444
|
+
succeededCount: number;
|
|
15445
|
+
failedCount: number;
|
|
15446
|
+
results: {
|
|
15447
|
+
/** Format: uuid */
|
|
15448
|
+
orderId: string;
|
|
15449
|
+
success: boolean;
|
|
15450
|
+
choices: {
|
|
15451
|
+
id: string;
|
|
15452
|
+
label: string;
|
|
15453
|
+
description?: string;
|
|
15454
|
+
/** @description Send this as the action `payload` to use the choice. */
|
|
15455
|
+
payload?: {
|
|
15456
|
+
[key: string]: unknown;
|
|
15457
|
+
};
|
|
15458
|
+
/** @description The choice needs extra fields, such as a tracking number. */
|
|
15459
|
+
requiresInput?: boolean;
|
|
15460
|
+
}[];
|
|
15461
|
+
error?: string;
|
|
15462
|
+
}[];
|
|
14944
15463
|
};
|
|
15464
|
+
links: {
|
|
15465
|
+
[key: string]: string;
|
|
15466
|
+
};
|
|
15467
|
+
warnings: string[];
|
|
15468
|
+
recommendations: string[];
|
|
14945
15469
|
};
|
|
14946
15470
|
};
|
|
14947
15471
|
};
|
|
14948
|
-
/** @description
|
|
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;
|
|
15004
|
-
};
|
|
15005
|
-
};
|
|
15006
|
-
};
|
|
15007
|
-
/** @description Bad Request (invalid platform filter) */
|
|
15472
|
+
/** @description Invalid request, conflicting operations, singular arguments or a batch exceeding the endpoint limit. */
|
|
15008
15473
|
400: {
|
|
15009
15474
|
headers: {
|
|
15010
15475
|
[name: string]: unknown;
|
|
15011
15476
|
};
|
|
15012
15477
|
content?: never;
|
|
15013
15478
|
};
|
|
15014
|
-
/** @description
|
|
15479
|
+
/** @description Missing or invalid credentials. */
|
|
15015
15480
|
401: {
|
|
15016
15481
|
headers: {
|
|
15017
15482
|
[name: string]: unknown;
|
|
15018
15483
|
};
|
|
15019
15484
|
content?: never;
|
|
15020
15485
|
};
|
|
15021
|
-
/** @description
|
|
15486
|
+
/** @description Missing scope, organization mismatch, or a target outside the caller's assigned stores and markets. */
|
|
15022
15487
|
403: {
|
|
15023
15488
|
headers: {
|
|
15024
15489
|
[name: string]: unknown;
|
|
15025
15490
|
};
|
|
15026
15491
|
content?: never;
|
|
15027
15492
|
};
|
|
15028
|
-
/** @description Rate limit exceeded */
|
|
15493
|
+
/** @description Rate limit exceeded. */
|
|
15029
15494
|
429: {
|
|
15030
15495
|
headers: {
|
|
15031
15496
|
[name: string]: unknown;
|
|
15032
15497
|
};
|
|
15033
15498
|
content?: never;
|
|
15034
15499
|
};
|
|
15035
|
-
/** @description
|
|
15036
|
-
|
|
15500
|
+
/** @description Service unavailable. Retry a submission with the same requestId and unchanged operations. */
|
|
15501
|
+
503: {
|
|
15037
15502
|
headers: {
|
|
15038
15503
|
[name: string]: unknown;
|
|
15039
15504
|
};
|
|
@@ -15041,7 +15506,7 @@ interface operations {
|
|
|
15041
15506
|
};
|
|
15042
15507
|
};
|
|
15043
15508
|
};
|
|
15044
|
-
|
|
15509
|
+
post_v1_orders_actions: {
|
|
15045
15510
|
parameters: {
|
|
15046
15511
|
query?: never;
|
|
15047
15512
|
header?: never;
|
|
@@ -15050,94 +15515,93 @@ interface operations {
|
|
|
15050
15515
|
};
|
|
15051
15516
|
requestBody: {
|
|
15052
15517
|
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
15518
|
"application/json": {
|
|
15064
|
-
/**
|
|
15519
|
+
/** Format: uuid */
|
|
15520
|
+
requestId: string;
|
|
15521
|
+
operations: {
|
|
15522
|
+
/** Format: uuid */
|
|
15523
|
+
orderId: string;
|
|
15524
|
+
/** @enum {string} */
|
|
15525
|
+
action: "ship" | "cancel" | "labels" | "update_tracking";
|
|
15526
|
+
/** @default {} */
|
|
15527
|
+
payload?: {
|
|
15528
|
+
[key: string]: unknown;
|
|
15529
|
+
};
|
|
15530
|
+
}[];
|
|
15531
|
+
/** @description Session callers only. API keys resolve organization scope from the credential. */
|
|
15065
15532
|
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
15533
|
};
|
|
15097
15534
|
};
|
|
15098
15535
|
};
|
|
15099
15536
|
responses: {
|
|
15100
|
-
/** @description
|
|
15101
|
-
|
|
15537
|
+
/** @description Decisions queued. Inspect every job; acceptance does not mean success. */
|
|
15538
|
+
202: {
|
|
15102
15539
|
headers: {
|
|
15103
15540
|
[name: string]: unknown;
|
|
15104
15541
|
};
|
|
15105
15542
|
content: {
|
|
15106
15543
|
"application/json": {
|
|
15107
|
-
|
|
15544
|
+
ok: boolean;
|
|
15545
|
+
apiVersion: string;
|
|
15546
|
+
/** Format: uuid */
|
|
15547
|
+
operationId: string;
|
|
15548
|
+
/** @enum {string} */
|
|
15549
|
+
status: "accepted";
|
|
15550
|
+
data: {
|
|
15551
|
+
success: boolean;
|
|
15552
|
+
orderIds: string[];
|
|
15553
|
+
succeededCount: number;
|
|
15554
|
+
failedCount: number;
|
|
15555
|
+
jobIds: string[];
|
|
15556
|
+
results: {
|
|
15557
|
+
/** Format: uuid */
|
|
15558
|
+
orderId: string;
|
|
15559
|
+
success: boolean;
|
|
15560
|
+
/** Format: uuid */
|
|
15561
|
+
jobId?: string;
|
|
15562
|
+
jobStatus?: string;
|
|
15563
|
+
duplicate?: boolean;
|
|
15564
|
+
error?: string;
|
|
15565
|
+
}[];
|
|
15566
|
+
};
|
|
15567
|
+
links: {
|
|
15568
|
+
[key: string]: string;
|
|
15569
|
+
};
|
|
15570
|
+
warnings: string[];
|
|
15571
|
+
recommendations: string[];
|
|
15108
15572
|
};
|
|
15109
15573
|
};
|
|
15110
15574
|
};
|
|
15111
|
-
/** @description
|
|
15575
|
+
/** @description Invalid request, conflicting operations, singular arguments or a batch exceeding the endpoint limit. */
|
|
15112
15576
|
400: {
|
|
15113
15577
|
headers: {
|
|
15114
15578
|
[name: string]: unknown;
|
|
15115
15579
|
};
|
|
15116
15580
|
content?: never;
|
|
15117
15581
|
};
|
|
15118
|
-
/** @description
|
|
15582
|
+
/** @description Missing or invalid credentials. */
|
|
15119
15583
|
401: {
|
|
15120
15584
|
headers: {
|
|
15121
15585
|
[name: string]: unknown;
|
|
15122
15586
|
};
|
|
15123
15587
|
content?: never;
|
|
15124
15588
|
};
|
|
15125
|
-
/** @description
|
|
15589
|
+
/** @description Missing scope, organization mismatch, or a target outside the caller's assigned stores and markets. */
|
|
15126
15590
|
403: {
|
|
15127
15591
|
headers: {
|
|
15128
15592
|
[name: string]: unknown;
|
|
15129
15593
|
};
|
|
15130
15594
|
content?: never;
|
|
15131
15595
|
};
|
|
15132
|
-
/** @description Rate limit exceeded */
|
|
15596
|
+
/** @description Rate limit exceeded. */
|
|
15133
15597
|
429: {
|
|
15134
15598
|
headers: {
|
|
15135
15599
|
[name: string]: unknown;
|
|
15136
15600
|
};
|
|
15137
15601
|
content?: never;
|
|
15138
15602
|
};
|
|
15139
|
-
/** @description
|
|
15140
|
-
|
|
15603
|
+
/** @description Service unavailable. Retry a submission with the same requestId and unchanged operations. */
|
|
15604
|
+
503: {
|
|
15141
15605
|
headers: {
|
|
15142
15606
|
[name: string]: unknown;
|
|
15143
15607
|
};
|
|
@@ -15145,54 +15609,112 @@ interface operations {
|
|
|
15145
15609
|
};
|
|
15146
15610
|
};
|
|
15147
15611
|
};
|
|
15148
|
-
|
|
15612
|
+
get_v1_orders_actions_jobs: {
|
|
15149
15613
|
parameters: {
|
|
15150
|
-
query
|
|
15151
|
-
/** @description
|
|
15614
|
+
query: {
|
|
15615
|
+
/** @description Repeat this query parameter for each UUID. Between 1 and 50 entries, deduplicated in first-requested order. */
|
|
15616
|
+
jobIds: string[];
|
|
15617
|
+
/** @description Session callers only. API keys resolve organization scope from the credential. */
|
|
15152
15618
|
organizationId?: string;
|
|
15153
15619
|
};
|
|
15154
15620
|
header?: never;
|
|
15155
|
-
path
|
|
15156
|
-
ruleId: string;
|
|
15157
|
-
};
|
|
15621
|
+
path?: never;
|
|
15158
15622
|
cookie?: never;
|
|
15159
15623
|
};
|
|
15160
15624
|
requestBody?: never;
|
|
15161
15625
|
responses: {
|
|
15162
|
-
/** @description
|
|
15626
|
+
/** @description Request completed. Inspect data.success, per-target results and pendingCount for processing progress. */
|
|
15163
15627
|
200: {
|
|
15164
15628
|
headers: {
|
|
15165
15629
|
[name: string]: unknown;
|
|
15166
15630
|
};
|
|
15167
15631
|
content: {
|
|
15168
15632
|
"application/json": {
|
|
15169
|
-
|
|
15633
|
+
ok: boolean;
|
|
15634
|
+
apiVersion: string;
|
|
15635
|
+
/** Format: uuid */
|
|
15636
|
+
operationId: string;
|
|
15637
|
+
/** @enum {string} */
|
|
15638
|
+
status: "completed";
|
|
15639
|
+
data: {
|
|
15640
|
+
success: boolean;
|
|
15641
|
+
orderIds: string[];
|
|
15642
|
+
succeededCount: number;
|
|
15643
|
+
failedCount: number;
|
|
15644
|
+
jobIds: string[];
|
|
15645
|
+
pendingCount: number;
|
|
15646
|
+
results: {
|
|
15647
|
+
id: string;
|
|
15648
|
+
orderId: string;
|
|
15649
|
+
/** @enum {string} */
|
|
15650
|
+
action: "ship" | "cancel" | "labels" | "update_tracking";
|
|
15651
|
+
/** @enum {string} */
|
|
15652
|
+
status:
|
|
15653
|
+
| "queued"
|
|
15654
|
+
| "running"
|
|
15655
|
+
| "succeeded"
|
|
15656
|
+
| "failed"
|
|
15657
|
+
| "not_supported";
|
|
15658
|
+
errorMessage: string | null;
|
|
15659
|
+
updatedAt: string | null;
|
|
15660
|
+
completedAt: string | null;
|
|
15661
|
+
/** @description Shipping label files. Filled when a `labels` job has succeeded. */
|
|
15662
|
+
labels: {
|
|
15663
|
+
/** @description Download URL of the label file. */
|
|
15664
|
+
url: string;
|
|
15665
|
+
name: string | null;
|
|
15666
|
+
mimeType: string | null;
|
|
15667
|
+
}[];
|
|
15668
|
+
/** Format: uuid */
|
|
15669
|
+
jobId: string;
|
|
15670
|
+
success: boolean;
|
|
15671
|
+
}[];
|
|
15672
|
+
};
|
|
15673
|
+
links: {
|
|
15674
|
+
[key: string]: string;
|
|
15675
|
+
};
|
|
15676
|
+
warnings: string[];
|
|
15677
|
+
recommendations: string[];
|
|
15170
15678
|
};
|
|
15171
15679
|
};
|
|
15172
15680
|
};
|
|
15173
|
-
/** @description
|
|
15681
|
+
/** @description Invalid request, conflicting operations, singular arguments or a batch exceeding the endpoint limit. */
|
|
15682
|
+
400: {
|
|
15683
|
+
headers: {
|
|
15684
|
+
[name: string]: unknown;
|
|
15685
|
+
};
|
|
15686
|
+
content?: never;
|
|
15687
|
+
};
|
|
15688
|
+
/** @description Missing or invalid credentials. */
|
|
15174
15689
|
401: {
|
|
15175
15690
|
headers: {
|
|
15176
15691
|
[name: string]: unknown;
|
|
15177
15692
|
};
|
|
15178
15693
|
content?: never;
|
|
15179
15694
|
};
|
|
15180
|
-
/** @description
|
|
15695
|
+
/** @description Missing scope, organization mismatch, or a target outside the caller's assigned stores and markets. */
|
|
15181
15696
|
403: {
|
|
15182
15697
|
headers: {
|
|
15183
15698
|
[name: string]: unknown;
|
|
15184
15699
|
};
|
|
15185
15700
|
content?: never;
|
|
15186
15701
|
};
|
|
15187
|
-
/** @description
|
|
15702
|
+
/** @description A job was not found in the authenticated organization. */
|
|
15188
15703
|
404: {
|
|
15189
15704
|
headers: {
|
|
15190
15705
|
[name: string]: unknown;
|
|
15191
15706
|
};
|
|
15192
15707
|
content?: never;
|
|
15193
15708
|
};
|
|
15194
|
-
/** @description
|
|
15195
|
-
|
|
15709
|
+
/** @description Rate limit exceeded. */
|
|
15710
|
+
429: {
|
|
15711
|
+
headers: {
|
|
15712
|
+
[name: string]: unknown;
|
|
15713
|
+
};
|
|
15714
|
+
content?: never;
|
|
15715
|
+
};
|
|
15716
|
+
/** @description Service unavailable. Retry a submission with the same requestId and unchanged operations. */
|
|
15717
|
+
503: {
|
|
15196
15718
|
headers: {
|
|
15197
15719
|
[name: string]: unknown;
|
|
15198
15720
|
};
|
|
@@ -15200,21 +15722,25 @@ interface operations {
|
|
|
15200
15722
|
};
|
|
15201
15723
|
};
|
|
15202
15724
|
};
|
|
15203
|
-
|
|
15725
|
+
post_v1_orders_picking_list: {
|
|
15204
15726
|
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
|
-
};
|
|
15727
|
+
query?: never;
|
|
15209
15728
|
header?: never;
|
|
15210
|
-
path
|
|
15211
|
-
ruleId: string;
|
|
15212
|
-
};
|
|
15729
|
+
path?: never;
|
|
15213
15730
|
cookie?: never;
|
|
15214
15731
|
};
|
|
15215
|
-
requestBody
|
|
15732
|
+
requestBody: {
|
|
15733
|
+
content: {
|
|
15734
|
+
"application/json": {
|
|
15735
|
+
orderIds: string[];
|
|
15736
|
+
timeZone?: string;
|
|
15737
|
+
/** @description Session callers only. API keys resolve organization scope from the credential. */
|
|
15738
|
+
organizationId?: string;
|
|
15739
|
+
};
|
|
15740
|
+
};
|
|
15741
|
+
};
|
|
15216
15742
|
responses: {
|
|
15217
|
-
/** @description
|
|
15743
|
+
/** @description Request completed. Inspect data.success, per-target results and pendingCount for processing progress. */
|
|
15218
15744
|
200: {
|
|
15219
15745
|
headers: {
|
|
15220
15746
|
[name: string]: unknown;
|
|
@@ -15222,32 +15748,87 @@ interface operations {
|
|
|
15222
15748
|
content: {
|
|
15223
15749
|
"application/json": {
|
|
15224
15750
|
ok: boolean;
|
|
15751
|
+
apiVersion: string;
|
|
15752
|
+
/** Format: uuid */
|
|
15753
|
+
operationId: string;
|
|
15754
|
+
/** @enum {string} */
|
|
15755
|
+
status: "completed";
|
|
15756
|
+
data: {
|
|
15757
|
+
success: boolean;
|
|
15758
|
+
orderIds: string[];
|
|
15759
|
+
succeededCount: number;
|
|
15760
|
+
failedCount: number;
|
|
15761
|
+
documentIds: string[];
|
|
15762
|
+
documentId: string;
|
|
15763
|
+
fileName: string;
|
|
15764
|
+
/** @constant */
|
|
15765
|
+
mimeType: "application/pdf";
|
|
15766
|
+
/** Format: uri */
|
|
15767
|
+
downloadUrl: string;
|
|
15768
|
+
/** Format: date-time */
|
|
15769
|
+
expiresAt: string;
|
|
15770
|
+
results: {
|
|
15771
|
+
/** Format: uuid */
|
|
15772
|
+
orderId: string;
|
|
15773
|
+
/** @constant */
|
|
15774
|
+
success: true;
|
|
15775
|
+
}[];
|
|
15776
|
+
list: {
|
|
15777
|
+
storeLabel: string;
|
|
15778
|
+
userLabel: string;
|
|
15779
|
+
printedAtLabel: string;
|
|
15780
|
+
orderQuantity: number;
|
|
15781
|
+
productQuantity: number;
|
|
15782
|
+
itemQuantity: number;
|
|
15783
|
+
rows: {
|
|
15784
|
+
productName: string;
|
|
15785
|
+
imageUrl: string | null;
|
|
15786
|
+
sku: string;
|
|
15787
|
+
variation: string | null;
|
|
15788
|
+
priceLabel: string;
|
|
15789
|
+
quantity: number;
|
|
15790
|
+
orderIds: string[];
|
|
15791
|
+
}[];
|
|
15792
|
+
};
|
|
15793
|
+
};
|
|
15794
|
+
links: {
|
|
15795
|
+
[key: string]: string;
|
|
15796
|
+
};
|
|
15797
|
+
warnings: string[];
|
|
15798
|
+
recommendations: string[];
|
|
15225
15799
|
};
|
|
15226
15800
|
};
|
|
15227
15801
|
};
|
|
15228
|
-
/** @description
|
|
15802
|
+
/** @description Invalid request, conflicting operations, singular arguments or a batch exceeding the endpoint limit. */
|
|
15803
|
+
400: {
|
|
15804
|
+
headers: {
|
|
15805
|
+
[name: string]: unknown;
|
|
15806
|
+
};
|
|
15807
|
+
content?: never;
|
|
15808
|
+
};
|
|
15809
|
+
/** @description Missing or invalid credentials. */
|
|
15229
15810
|
401: {
|
|
15230
15811
|
headers: {
|
|
15231
15812
|
[name: string]: unknown;
|
|
15232
15813
|
};
|
|
15233
15814
|
content?: never;
|
|
15234
15815
|
};
|
|
15235
|
-
/** @description
|
|
15816
|
+
/** @description Missing scope, organization mismatch, or a target outside the caller's assigned stores and markets. */
|
|
15236
15817
|
403: {
|
|
15237
15818
|
headers: {
|
|
15238
15819
|
[name: string]: unknown;
|
|
15239
15820
|
};
|
|
15240
15821
|
content?: never;
|
|
15241
15822
|
};
|
|
15242
|
-
/** @description
|
|
15243
|
-
|
|
15823
|
+
/** @description Rate limit exceeded. */
|
|
15824
|
+
429: {
|
|
15244
15825
|
headers: {
|
|
15245
15826
|
[name: string]: unknown;
|
|
15246
15827
|
};
|
|
15247
15828
|
content?: never;
|
|
15248
15829
|
};
|
|
15249
|
-
/** @description
|
|
15250
|
-
|
|
15830
|
+
/** @description Service unavailable. Retry a submission with the same requestId and unchanged operations. */
|
|
15831
|
+
503: {
|
|
15251
15832
|
headers: {
|
|
15252
15833
|
[name: string]: unknown;
|
|
15253
15834
|
};
|
|
@@ -15255,53 +15836,110 @@ interface operations {
|
|
|
15255
15836
|
};
|
|
15256
15837
|
};
|
|
15257
15838
|
};
|
|
15258
|
-
|
|
15839
|
+
post_v1_organizations: {
|
|
15259
15840
|
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
|
-
};
|
|
15841
|
+
query?: never;
|
|
15264
15842
|
header?: never;
|
|
15265
|
-
path
|
|
15266
|
-
ruleId: string;
|
|
15267
|
-
};
|
|
15843
|
+
path?: never;
|
|
15268
15844
|
cookie?: never;
|
|
15269
15845
|
};
|
|
15270
15846
|
requestBody: {
|
|
15271
15847
|
content: {
|
|
15272
15848
|
/**
|
|
15273
15849
|
* @example {
|
|
15274
|
-
* "
|
|
15275
|
-
* "enabled": true
|
|
15850
|
+
* "name": "Acme Team"
|
|
15276
15851
|
* }
|
|
15277
15852
|
*/
|
|
15278
15853
|
"application/json": {
|
|
15279
|
-
|
|
15280
|
-
|
|
15281
|
-
|
|
15282
|
-
|
|
15283
|
-
|
|
15284
|
-
|
|
15285
|
-
|
|
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;
|
|
15854
|
+
/** @description Organization display name. */
|
|
15855
|
+
name: string;
|
|
15856
|
+
/**
|
|
15857
|
+
* @description When true, Better Auth keeps the current active organization instead of switching active context.
|
|
15858
|
+
* @default false
|
|
15859
|
+
*/
|
|
15860
|
+
keepCurrentActiveOrganization?: boolean;
|
|
15289
15861
|
};
|
|
15290
15862
|
};
|
|
15291
15863
|
};
|
|
15292
15864
|
responses: {
|
|
15293
|
-
/** @description
|
|
15865
|
+
/** @description Organization created */
|
|
15866
|
+
201: {
|
|
15867
|
+
headers: {
|
|
15868
|
+
[name: string]: unknown;
|
|
15869
|
+
};
|
|
15870
|
+
content: {
|
|
15871
|
+
"application/json": {
|
|
15872
|
+
ok: boolean;
|
|
15873
|
+
organizationId: string;
|
|
15874
|
+
redirectUrl?: string;
|
|
15875
|
+
organization: {
|
|
15876
|
+
id: string;
|
|
15877
|
+
name: string;
|
|
15878
|
+
slug: string;
|
|
15879
|
+
};
|
|
15880
|
+
};
|
|
15881
|
+
};
|
|
15882
|
+
};
|
|
15883
|
+
/** @description Bad Request - Invalid organization name or JSON */
|
|
15884
|
+
400: {
|
|
15885
|
+
headers: {
|
|
15886
|
+
[name: string]: unknown;
|
|
15887
|
+
};
|
|
15888
|
+
content?: never;
|
|
15889
|
+
};
|
|
15890
|
+
/** @description Unauthorized - Sign in is required */
|
|
15891
|
+
401: {
|
|
15892
|
+
headers: {
|
|
15893
|
+
[name: string]: unknown;
|
|
15894
|
+
};
|
|
15895
|
+
content?: never;
|
|
15896
|
+
};
|
|
15897
|
+
/** @description Internal Server Error */
|
|
15898
|
+
500: {
|
|
15899
|
+
headers: {
|
|
15900
|
+
[name: string]: unknown;
|
|
15901
|
+
};
|
|
15902
|
+
content?: never;
|
|
15903
|
+
};
|
|
15904
|
+
};
|
|
15905
|
+
};
|
|
15906
|
+
get_v1_price_books: {
|
|
15907
|
+
parameters: {
|
|
15908
|
+
query?: {
|
|
15909
|
+
/** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
|
|
15910
|
+
organizationId?: string;
|
|
15911
|
+
/** @description Filter by marketplace platform: `shopee`, `lazada`, `tiktok`, `shopify`, `whatsapp`, `zalora`, `amazon`, or `ebay`. */
|
|
15912
|
+
platform?:
|
|
15913
|
+
| "shopee"
|
|
15914
|
+
| "lazada"
|
|
15915
|
+
| "tiktok"
|
|
15916
|
+
| "shopify"
|
|
15917
|
+
| "whatsapp"
|
|
15918
|
+
| "zalora"
|
|
15919
|
+
| "amazon"
|
|
15920
|
+
| "ebay";
|
|
15921
|
+
/** @description When `true`, return only enabled rules. */
|
|
15922
|
+
enabledOnly?: boolean;
|
|
15923
|
+
};
|
|
15924
|
+
header?: never;
|
|
15925
|
+
path?: never;
|
|
15926
|
+
cookie?: never;
|
|
15927
|
+
};
|
|
15928
|
+
requestBody?: never;
|
|
15929
|
+
responses: {
|
|
15930
|
+
/** @description Price book rules returned. */
|
|
15294
15931
|
200: {
|
|
15295
15932
|
headers: {
|
|
15296
15933
|
[name: string]: unknown;
|
|
15297
15934
|
};
|
|
15298
15935
|
content: {
|
|
15299
15936
|
"application/json": {
|
|
15300
|
-
|
|
15937
|
+
rules: Record<string, never>[];
|
|
15938
|
+
total: number;
|
|
15301
15939
|
};
|
|
15302
15940
|
};
|
|
15303
15941
|
};
|
|
15304
|
-
/** @description Bad Request */
|
|
15942
|
+
/** @description Bad Request (invalid platform filter) */
|
|
15305
15943
|
400: {
|
|
15306
15944
|
headers: {
|
|
15307
15945
|
[name: string]: unknown;
|
|
@@ -15315,15 +15953,15 @@ interface operations {
|
|
|
15315
15953
|
};
|
|
15316
15954
|
content?: never;
|
|
15317
15955
|
};
|
|
15318
|
-
/** @description Forbidden or missing `price_books:
|
|
15956
|
+
/** @description Forbidden or missing `price_books:read` scope */
|
|
15319
15957
|
403: {
|
|
15320
15958
|
headers: {
|
|
15321
15959
|
[name: string]: unknown;
|
|
15322
15960
|
};
|
|
15323
15961
|
content?: never;
|
|
15324
15962
|
};
|
|
15325
|
-
/** @description
|
|
15326
|
-
|
|
15963
|
+
/** @description Rate limit exceeded */
|
|
15964
|
+
429: {
|
|
15327
15965
|
headers: {
|
|
15328
15966
|
[name: string]: unknown;
|
|
15329
15967
|
};
|
|
@@ -15338,7 +15976,7 @@ interface operations {
|
|
|
15338
15976
|
};
|
|
15339
15977
|
};
|
|
15340
15978
|
};
|
|
15341
|
-
|
|
15979
|
+
post_v1_price_books: {
|
|
15342
15980
|
parameters: {
|
|
15343
15981
|
query?: never;
|
|
15344
15982
|
header?: never;
|
|
@@ -15350,9 +15988,11 @@ interface operations {
|
|
|
15350
15988
|
/**
|
|
15351
15989
|
* @example {
|
|
15352
15990
|
* "platform": "shopee",
|
|
15353
|
-
* "
|
|
15991
|
+
* "marginValue": 10,
|
|
15354
15992
|
* "country": "singapore",
|
|
15355
|
-
* "
|
|
15993
|
+
* "rounding": "currency_minor",
|
|
15994
|
+
* "currency": "SGD",
|
|
15995
|
+
* "enabled": true
|
|
15356
15996
|
* }
|
|
15357
15997
|
*/
|
|
15358
15998
|
"application/json": {
|
|
@@ -15368,45 +16008,42 @@ interface operations {
|
|
|
15368
16008
|
| "zalora"
|
|
15369
16009
|
| "amazon"
|
|
15370
16010
|
| "ebay";
|
|
15371
|
-
/** @description
|
|
15372
|
-
listPrice: number;
|
|
16011
|
+
/** @description Optional connected store ID. Null/omit applies to all stores for the platform. */
|
|
15373
16012
|
storeId?: string | null;
|
|
16013
|
+
/** @description Optional country scope (name or code). Null/omit applies to all countries. */
|
|
15374
16014
|
country?: string | null;
|
|
16015
|
+
/** @description Markup percent applied to the catalog price. Ignored when `expression` is set. */
|
|
16016
|
+
marginValue: number;
|
|
16017
|
+
/** @description Buyer formula. `price` is the catalog price. Supports arithmetic, percentages, CEILING, IF, and CURRENCY(rate, "USD"). Replaces markup percent. */
|
|
16018
|
+
expression?: string | null;
|
|
16019
|
+
/**
|
|
16020
|
+
* @description Defaults to `currency_minor` when omitted.
|
|
16021
|
+
* @enum {string}
|
|
16022
|
+
*/
|
|
16023
|
+
rounding?: "none" | "currency_minor" | "nearest_0_05" | "nearest_1";
|
|
16024
|
+
/** @description Optional ISO 4217 currency for `currency_minor` rounding. */
|
|
15375
16025
|
currency?: string | null;
|
|
15376
16026
|
/**
|
|
15377
|
-
*
|
|
15378
|
-
* @
|
|
16027
|
+
* @description Whether the rule is active. Defaults to true.
|
|
16028
|
+
* @default true
|
|
15379
16029
|
*/
|
|
15380
|
-
|
|
16030
|
+
enabled?: boolean;
|
|
15381
16031
|
};
|
|
15382
16032
|
};
|
|
15383
16033
|
};
|
|
15384
16034
|
responses: {
|
|
15385
|
-
/** @description
|
|
15386
|
-
|
|
16035
|
+
/** @description Price book rule created. */
|
|
16036
|
+
201: {
|
|
15387
16037
|
headers: {
|
|
15388
16038
|
[name: string]: unknown;
|
|
15389
16039
|
};
|
|
15390
16040
|
content: {
|
|
15391
16041
|
"application/json": {
|
|
15392
|
-
|
|
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;
|
|
16042
|
+
rule: Record<string, never>;
|
|
15406
16043
|
};
|
|
15407
16044
|
};
|
|
15408
16045
|
};
|
|
15409
|
-
/** @description Bad Request
|
|
16046
|
+
/** @description Bad Request (invalid payload, markup range, or duplicate platform/store/country scope) */
|
|
15410
16047
|
400: {
|
|
15411
16048
|
headers: {
|
|
15412
16049
|
[name: string]: unknown;
|
|
@@ -15420,15 +16057,15 @@ interface operations {
|
|
|
15420
16057
|
};
|
|
15421
16058
|
content?: never;
|
|
15422
16059
|
};
|
|
15423
|
-
/** @description Forbidden or missing `price_books:
|
|
16060
|
+
/** @description Forbidden or missing `price_books:write` scope */
|
|
15424
16061
|
403: {
|
|
15425
16062
|
headers: {
|
|
15426
16063
|
[name: string]: unknown;
|
|
15427
16064
|
};
|
|
15428
16065
|
content?: never;
|
|
15429
16066
|
};
|
|
15430
|
-
/** @description
|
|
15431
|
-
|
|
16067
|
+
/** @description Rate limit exceeded */
|
|
16068
|
+
429: {
|
|
15432
16069
|
headers: {
|
|
15433
16070
|
[name: string]: unknown;
|
|
15434
16071
|
};
|
|
@@ -15443,36 +16080,334 @@ interface operations {
|
|
|
15443
16080
|
};
|
|
15444
16081
|
};
|
|
15445
16082
|
};
|
|
15446
|
-
|
|
16083
|
+
get_v1_price_books_by_ruleid: {
|
|
15447
16084
|
parameters: {
|
|
15448
16085
|
query?: {
|
|
15449
|
-
/** @description
|
|
15450
|
-
|
|
15451
|
-
|
|
15452
|
-
|
|
15453
|
-
|
|
15454
|
-
|
|
15455
|
-
|
|
15456
|
-
|
|
15457
|
-
|
|
15458
|
-
|
|
15459
|
-
|
|
15460
|
-
|
|
15461
|
-
|
|
15462
|
-
|
|
15463
|
-
|
|
15464
|
-
|
|
15465
|
-
|
|
15466
|
-
|
|
15467
|
-
|
|
15468
|
-
|
|
15469
|
-
|
|
15470
|
-
|
|
15471
|
-
|
|
15472
|
-
|
|
15473
|
-
|
|
15474
|
-
|
|
15475
|
-
|
|
16086
|
+
/** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
|
|
16087
|
+
organizationId?: string;
|
|
16088
|
+
};
|
|
16089
|
+
header?: never;
|
|
16090
|
+
path: {
|
|
16091
|
+
ruleId: string;
|
|
16092
|
+
};
|
|
16093
|
+
cookie?: never;
|
|
16094
|
+
};
|
|
16095
|
+
requestBody?: never;
|
|
16096
|
+
responses: {
|
|
16097
|
+
/** @description Price book rule returned. */
|
|
16098
|
+
200: {
|
|
16099
|
+
headers: {
|
|
16100
|
+
[name: string]: unknown;
|
|
16101
|
+
};
|
|
16102
|
+
content: {
|
|
16103
|
+
"application/json": {
|
|
16104
|
+
rule: Record<string, never>;
|
|
16105
|
+
};
|
|
16106
|
+
};
|
|
16107
|
+
};
|
|
16108
|
+
/** @description Unauthorized */
|
|
16109
|
+
401: {
|
|
16110
|
+
headers: {
|
|
16111
|
+
[name: string]: unknown;
|
|
16112
|
+
};
|
|
16113
|
+
content?: never;
|
|
16114
|
+
};
|
|
16115
|
+
/** @description Forbidden or missing `price_books:read` scope */
|
|
16116
|
+
403: {
|
|
16117
|
+
headers: {
|
|
16118
|
+
[name: string]: unknown;
|
|
16119
|
+
};
|
|
16120
|
+
content?: never;
|
|
16121
|
+
};
|
|
16122
|
+
/** @description Price book rule not found */
|
|
16123
|
+
404: {
|
|
16124
|
+
headers: {
|
|
16125
|
+
[name: string]: unknown;
|
|
16126
|
+
};
|
|
16127
|
+
content?: never;
|
|
16128
|
+
};
|
|
16129
|
+
/** @description Internal Server Error */
|
|
16130
|
+
500: {
|
|
16131
|
+
headers: {
|
|
16132
|
+
[name: string]: unknown;
|
|
16133
|
+
};
|
|
16134
|
+
content?: never;
|
|
16135
|
+
};
|
|
16136
|
+
};
|
|
16137
|
+
};
|
|
16138
|
+
delete_v1_price_books_by_ruleid: {
|
|
16139
|
+
parameters: {
|
|
16140
|
+
query?: {
|
|
16141
|
+
/** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
|
|
16142
|
+
organizationId?: string;
|
|
16143
|
+
};
|
|
16144
|
+
header?: never;
|
|
16145
|
+
path: {
|
|
16146
|
+
ruleId: string;
|
|
16147
|
+
};
|
|
16148
|
+
cookie?: never;
|
|
16149
|
+
};
|
|
16150
|
+
requestBody?: never;
|
|
16151
|
+
responses: {
|
|
16152
|
+
/** @description Price book rule deleted. */
|
|
16153
|
+
200: {
|
|
16154
|
+
headers: {
|
|
16155
|
+
[name: string]: unknown;
|
|
16156
|
+
};
|
|
16157
|
+
content: {
|
|
16158
|
+
"application/json": {
|
|
16159
|
+
ok: boolean;
|
|
16160
|
+
};
|
|
16161
|
+
};
|
|
16162
|
+
};
|
|
16163
|
+
/** @description Unauthorized */
|
|
16164
|
+
401: {
|
|
16165
|
+
headers: {
|
|
16166
|
+
[name: string]: unknown;
|
|
16167
|
+
};
|
|
16168
|
+
content?: never;
|
|
16169
|
+
};
|
|
16170
|
+
/** @description Forbidden or missing `price_books:write` scope */
|
|
16171
|
+
403: {
|
|
16172
|
+
headers: {
|
|
16173
|
+
[name: string]: unknown;
|
|
16174
|
+
};
|
|
16175
|
+
content?: never;
|
|
16176
|
+
};
|
|
16177
|
+
/** @description Price book rule not found */
|
|
16178
|
+
404: {
|
|
16179
|
+
headers: {
|
|
16180
|
+
[name: string]: unknown;
|
|
16181
|
+
};
|
|
16182
|
+
content?: never;
|
|
16183
|
+
};
|
|
16184
|
+
/** @description Internal Server Error */
|
|
16185
|
+
500: {
|
|
16186
|
+
headers: {
|
|
16187
|
+
[name: string]: unknown;
|
|
16188
|
+
};
|
|
16189
|
+
content?: never;
|
|
16190
|
+
};
|
|
16191
|
+
};
|
|
16192
|
+
};
|
|
16193
|
+
patch_v1_price_books_by_ruleid: {
|
|
16194
|
+
parameters: {
|
|
16195
|
+
query?: {
|
|
16196
|
+
/** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
|
|
16197
|
+
organizationId?: string;
|
|
16198
|
+
};
|
|
16199
|
+
header?: never;
|
|
16200
|
+
path: {
|
|
16201
|
+
ruleId: string;
|
|
16202
|
+
};
|
|
16203
|
+
cookie?: never;
|
|
16204
|
+
};
|
|
16205
|
+
requestBody: {
|
|
16206
|
+
content: {
|
|
16207
|
+
/**
|
|
16208
|
+
* @example {
|
|
16209
|
+
* "marginValue": 12.5,
|
|
16210
|
+
* "enabled": true
|
|
16211
|
+
* }
|
|
16212
|
+
*/
|
|
16213
|
+
"application/json": {
|
|
16214
|
+
organizationId?: string;
|
|
16215
|
+
storeId?: string | null;
|
|
16216
|
+
country?: string | null;
|
|
16217
|
+
marginValue?: number;
|
|
16218
|
+
/** @enum {string} */
|
|
16219
|
+
rounding?: "none" | "currency_minor" | "nearest_0_05" | "nearest_1";
|
|
16220
|
+
currency?: string | null;
|
|
16221
|
+
/** @description Buyer formula. `price` is the catalog price. Null clears the formula and markup percent applies again. */
|
|
16222
|
+
expression?: string | null;
|
|
16223
|
+
enabled?: boolean;
|
|
16224
|
+
};
|
|
16225
|
+
};
|
|
16226
|
+
};
|
|
16227
|
+
responses: {
|
|
16228
|
+
/** @description Price book rule updated. */
|
|
16229
|
+
200: {
|
|
16230
|
+
headers: {
|
|
16231
|
+
[name: string]: unknown;
|
|
16232
|
+
};
|
|
16233
|
+
content: {
|
|
16234
|
+
"application/json": {
|
|
16235
|
+
rule: Record<string, never>;
|
|
16236
|
+
};
|
|
16237
|
+
};
|
|
16238
|
+
};
|
|
16239
|
+
/** @description Bad Request */
|
|
16240
|
+
400: {
|
|
16241
|
+
headers: {
|
|
16242
|
+
[name: string]: unknown;
|
|
16243
|
+
};
|
|
16244
|
+
content?: never;
|
|
16245
|
+
};
|
|
16246
|
+
/** @description Unauthorized */
|
|
16247
|
+
401: {
|
|
16248
|
+
headers: {
|
|
16249
|
+
[name: string]: unknown;
|
|
16250
|
+
};
|
|
16251
|
+
content?: never;
|
|
16252
|
+
};
|
|
16253
|
+
/** @description Forbidden or missing `price_books:write` scope */
|
|
16254
|
+
403: {
|
|
16255
|
+
headers: {
|
|
16256
|
+
[name: string]: unknown;
|
|
16257
|
+
};
|
|
16258
|
+
content?: never;
|
|
16259
|
+
};
|
|
16260
|
+
/** @description Price book rule not found */
|
|
16261
|
+
404: {
|
|
16262
|
+
headers: {
|
|
16263
|
+
[name: string]: unknown;
|
|
16264
|
+
};
|
|
16265
|
+
content?: never;
|
|
16266
|
+
};
|
|
16267
|
+
/** @description Internal Server Error */
|
|
16268
|
+
500: {
|
|
16269
|
+
headers: {
|
|
16270
|
+
[name: string]: unknown;
|
|
16271
|
+
};
|
|
16272
|
+
content?: never;
|
|
16273
|
+
};
|
|
16274
|
+
};
|
|
16275
|
+
};
|
|
16276
|
+
post_v1_price_books_preview: {
|
|
16277
|
+
parameters: {
|
|
16278
|
+
query?: never;
|
|
16279
|
+
header?: never;
|
|
16280
|
+
path?: never;
|
|
16281
|
+
cookie?: never;
|
|
16282
|
+
};
|
|
16283
|
+
requestBody: {
|
|
16284
|
+
content: {
|
|
16285
|
+
/**
|
|
16286
|
+
* @example {
|
|
16287
|
+
* "platform": "shopee",
|
|
16288
|
+
* "listPrice": 100,
|
|
16289
|
+
* "country": "singapore",
|
|
16290
|
+
* "currency": "SGD"
|
|
16291
|
+
* }
|
|
16292
|
+
*/
|
|
16293
|
+
"application/json": {
|
|
16294
|
+
/** @description Required for session auth across multiple organizations. Optional for OAuth/API keys bound to one organization. */
|
|
16295
|
+
organizationId?: string;
|
|
16296
|
+
/** @enum {string} */
|
|
16297
|
+
platform:
|
|
16298
|
+
| "shopee"
|
|
16299
|
+
| "lazada"
|
|
16300
|
+
| "tiktok"
|
|
16301
|
+
| "shopify"
|
|
16302
|
+
| "whatsapp"
|
|
16303
|
+
| "zalora"
|
|
16304
|
+
| "amazon"
|
|
16305
|
+
| "ebay";
|
|
16306
|
+
/** @description Canonical list price to mark up. */
|
|
16307
|
+
listPrice: number;
|
|
16308
|
+
storeId?: string | null;
|
|
16309
|
+
country?: string | null;
|
|
16310
|
+
currency?: string | null;
|
|
16311
|
+
/**
|
|
16312
|
+
* Format: uuid
|
|
16313
|
+
* @description Optional force a specific rule instead of specificity matching.
|
|
16314
|
+
*/
|
|
16315
|
+
ruleId?: string;
|
|
16316
|
+
};
|
|
16317
|
+
};
|
|
16318
|
+
};
|
|
16319
|
+
responses: {
|
|
16320
|
+
/** @description Preview computed. */
|
|
16321
|
+
200: {
|
|
16322
|
+
headers: {
|
|
16323
|
+
[name: string]: unknown;
|
|
16324
|
+
};
|
|
16325
|
+
content: {
|
|
16326
|
+
"application/json": {
|
|
16327
|
+
listPrice: number;
|
|
16328
|
+
channelListPrice: number;
|
|
16329
|
+
applied: boolean;
|
|
16330
|
+
/** @enum {string} */
|
|
16331
|
+
source: "price_book" | "canonical";
|
|
16332
|
+
markupPercent?: number;
|
|
16333
|
+
/** @description Listed currency when known. A buyer formula with CURRENCY sets it. */
|
|
16334
|
+
currency?: string;
|
|
16335
|
+
/** @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. */
|
|
16336
|
+
belowCatalogPrice?: boolean;
|
|
16337
|
+
/** @description Set when the matched buyer formula cannot price this list price. Publish fails for that listing instead of using the catalog price. */
|
|
16338
|
+
formulaError?: string;
|
|
16339
|
+
rule?: Record<string, never> | null;
|
|
16340
|
+
message?: string;
|
|
16341
|
+
};
|
|
16342
|
+
};
|
|
16343
|
+
};
|
|
16344
|
+
/** @description Bad Request, or the forced `ruleId` has a buyer formula that cannot price this list price */
|
|
16345
|
+
400: {
|
|
16346
|
+
headers: {
|
|
16347
|
+
[name: string]: unknown;
|
|
16348
|
+
};
|
|
16349
|
+
content?: never;
|
|
16350
|
+
};
|
|
16351
|
+
/** @description Unauthorized */
|
|
16352
|
+
401: {
|
|
16353
|
+
headers: {
|
|
16354
|
+
[name: string]: unknown;
|
|
16355
|
+
};
|
|
16356
|
+
content?: never;
|
|
16357
|
+
};
|
|
16358
|
+
/** @description Forbidden or missing `price_books:read` scope */
|
|
16359
|
+
403: {
|
|
16360
|
+
headers: {
|
|
16361
|
+
[name: string]: unknown;
|
|
16362
|
+
};
|
|
16363
|
+
content?: never;
|
|
16364
|
+
};
|
|
16365
|
+
/** @description Price book rule not found (when ruleId is set) */
|
|
16366
|
+
404: {
|
|
16367
|
+
headers: {
|
|
16368
|
+
[name: string]: unknown;
|
|
16369
|
+
};
|
|
16370
|
+
content?: never;
|
|
16371
|
+
};
|
|
16372
|
+
/** @description Internal Server Error */
|
|
16373
|
+
500: {
|
|
16374
|
+
headers: {
|
|
16375
|
+
[name: string]: unknown;
|
|
16376
|
+
};
|
|
16377
|
+
content?: never;
|
|
16378
|
+
};
|
|
16379
|
+
};
|
|
16380
|
+
};
|
|
16381
|
+
get_v1_products: {
|
|
16382
|
+
parameters: {
|
|
16383
|
+
query?: {
|
|
16384
|
+
/** @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. */
|
|
16385
|
+
status?: string;
|
|
16386
|
+
/** @description Filter by enabled marketplace. */
|
|
16387
|
+
marketplace?:
|
|
16388
|
+
| "shopee"
|
|
16389
|
+
| "lazada"
|
|
16390
|
+
| "tiktok"
|
|
16391
|
+
| "shopify"
|
|
16392
|
+
| "whatsapp"
|
|
16393
|
+
| "zalora"
|
|
16394
|
+
| "amazon"
|
|
16395
|
+
| "ebay";
|
|
16396
|
+
/** @description Filter by marketplace country (e.g., Singapore, Malaysia). */
|
|
16397
|
+
country?: string;
|
|
16398
|
+
/** @description Search query for product name or SKU. */
|
|
16399
|
+
q?: string;
|
|
16400
|
+
/** @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. */
|
|
16401
|
+
sku?: string;
|
|
16402
|
+
/** @description Minimum price filter. */
|
|
16403
|
+
minPrice?: number;
|
|
16404
|
+
/** @description Maximum price filter. */
|
|
16405
|
+
maxPrice?: number;
|
|
16406
|
+
/** @description Sort order for results. */
|
|
16407
|
+
sortBy?:
|
|
16408
|
+
| "updated_desc"
|
|
16409
|
+
| "updated_asc"
|
|
16410
|
+
| "created_desc"
|
|
15476
16411
|
| "created_asc"
|
|
15477
16412
|
| "price_asc"
|
|
15478
16413
|
| "price_desc"
|
|
@@ -17191,6 +18126,7 @@ interface operations {
|
|
|
17191
18126
|
| "lazada"
|
|
17192
18127
|
| "tiktok"
|
|
17193
18128
|
| "shopify"
|
|
18129
|
+
| "whatsapp"
|
|
17194
18130
|
| "zalora"
|
|
17195
18131
|
| "amazon"
|
|
17196
18132
|
| "ebay";
|
|
@@ -17237,6 +18173,7 @@ interface operations {
|
|
|
17237
18173
|
| "lazada"
|
|
17238
18174
|
| "tiktok"
|
|
17239
18175
|
| "shopify"
|
|
18176
|
+
| "whatsapp"
|
|
17240
18177
|
| "zalora"
|
|
17241
18178
|
| "amazon"
|
|
17242
18179
|
| "ebay";
|
|
@@ -17291,6 +18228,7 @@ interface operations {
|
|
|
17291
18228
|
| "lazada"
|
|
17292
18229
|
| "tiktok"
|
|
17293
18230
|
| "shopify"
|
|
18231
|
+
| "whatsapp"
|
|
17294
18232
|
| "zalora"
|
|
17295
18233
|
| "amazon"
|
|
17296
18234
|
| "ebay";
|
|
@@ -17468,7 +18406,10 @@ interface operations {
|
|
|
17468
18406
|
patch_v1_products_by_productid_price: {
|
|
17469
18407
|
parameters: {
|
|
17470
18408
|
query?: never;
|
|
17471
|
-
header?:
|
|
18409
|
+
header?: {
|
|
18410
|
+
/** @description Idempotency key for an unchanged-price marketplace refresh. Reuse it for retries of that refresh; use a new key for a new refresh. */
|
|
18411
|
+
"Idempotency-Key"?: string;
|
|
18412
|
+
};
|
|
17472
18413
|
path: {
|
|
17473
18414
|
/** @description OmniCommerce simple-product or variant UUID. */
|
|
17474
18415
|
productId: string;
|
|
@@ -17511,6 +18452,7 @@ interface operations {
|
|
|
17511
18452
|
| "lazada"
|
|
17512
18453
|
| "tiktok"
|
|
17513
18454
|
| "shopify"
|
|
18455
|
+
| "whatsapp"
|
|
17514
18456
|
| "zalora"
|
|
17515
18457
|
| "amazon"
|
|
17516
18458
|
| "ebay";
|
|
@@ -17561,6 +18503,7 @@ interface operations {
|
|
|
17561
18503
|
| "lazada"
|
|
17562
18504
|
| "tiktok"
|
|
17563
18505
|
| "shopify"
|
|
18506
|
+
| "whatsapp"
|
|
17564
18507
|
| "zalora"
|
|
17565
18508
|
| "amazon"
|
|
17566
18509
|
| "ebay";
|
|
@@ -17617,6 +18560,7 @@ interface operations {
|
|
|
17617
18560
|
| "lazada"
|
|
17618
18561
|
| "tiktok"
|
|
17619
18562
|
| "shopify"
|
|
18563
|
+
| "whatsapp"
|
|
17620
18564
|
| "zalora"
|
|
17621
18565
|
| "amazon"
|
|
17622
18566
|
| "ebay";
|
|
@@ -18885,19 +19829,250 @@ interface operations {
|
|
|
18885
19829
|
};
|
|
18886
19830
|
requestBody?: never;
|
|
18887
19831
|
responses: {
|
|
18888
|
-
/** @description Matching catalog product count */
|
|
19832
|
+
/** @description Matching catalog product count */
|
|
19833
|
+
200: {
|
|
19834
|
+
headers: {
|
|
19835
|
+
[name: string]: unknown;
|
|
19836
|
+
};
|
|
19837
|
+
content: {
|
|
19838
|
+
"application/json": {
|
|
19839
|
+
count: number;
|
|
19840
|
+
/** @enum {string} */
|
|
19841
|
+
unit: "catalog_products";
|
|
19842
|
+
/** @description Normalized Products page filters used for this count. */
|
|
19843
|
+
filters: {
|
|
19844
|
+
[key: string]: string;
|
|
19845
|
+
};
|
|
19846
|
+
};
|
|
19847
|
+
};
|
|
19848
|
+
};
|
|
19849
|
+
/** @description Unauthorized */
|
|
19850
|
+
401: {
|
|
19851
|
+
headers: {
|
|
19852
|
+
[name: string]: unknown;
|
|
19853
|
+
};
|
|
19854
|
+
content?: never;
|
|
19855
|
+
};
|
|
19856
|
+
/** @description Forbidden */
|
|
19857
|
+
403: {
|
|
19858
|
+
headers: {
|
|
19859
|
+
[name: string]: unknown;
|
|
19860
|
+
};
|
|
19861
|
+
content?: never;
|
|
19862
|
+
};
|
|
19863
|
+
/** @description Rate limited */
|
|
19864
|
+
429: {
|
|
19865
|
+
headers: {
|
|
19866
|
+
[name: string]: unknown;
|
|
19867
|
+
};
|
|
19868
|
+
content?: never;
|
|
19869
|
+
};
|
|
19870
|
+
/** @description Internal Server Error */
|
|
19871
|
+
500: {
|
|
19872
|
+
headers: {
|
|
19873
|
+
[name: string]: unknown;
|
|
19874
|
+
};
|
|
19875
|
+
content?: never;
|
|
19876
|
+
};
|
|
19877
|
+
};
|
|
19878
|
+
};
|
|
19879
|
+
post_v1_products_enrich: {
|
|
19880
|
+
parameters: {
|
|
19881
|
+
query?: never;
|
|
19882
|
+
header?: never;
|
|
19883
|
+
path?: never;
|
|
19884
|
+
cookie?: never;
|
|
19885
|
+
};
|
|
19886
|
+
requestBody: {
|
|
19887
|
+
content: {
|
|
19888
|
+
/**
|
|
19889
|
+
* @example {
|
|
19890
|
+
* "productIds": [
|
|
19891
|
+
* "omni-product-id"
|
|
19892
|
+
* ],
|
|
19893
|
+
* "selectedFields": [
|
|
19894
|
+
* "description"
|
|
19895
|
+
* ],
|
|
19896
|
+
* "instructions": "Do not change the title. Do not add warranty or return information.",
|
|
19897
|
+
* "autoApplyHighConfidence": true,
|
|
19898
|
+
* "enrichmentAutoApplyThreshold": 0.7
|
|
19899
|
+
* }
|
|
19900
|
+
*/
|
|
19901
|
+
"application/json": {
|
|
19902
|
+
/** @description Required for session auth; derived from the credential for bearer auth. */
|
|
19903
|
+
organizationId?: string;
|
|
19904
|
+
/** @description Existing Omni product IDs. Trimmed and deduplicated in requested order; at most 1,000 entries. */
|
|
19905
|
+
productIds: string[];
|
|
19906
|
+
/** @default true */
|
|
19907
|
+
includeListingCopy?: boolean;
|
|
19908
|
+
targetMarketplaces?: (
|
|
19909
|
+
| "shopee"
|
|
19910
|
+
| "lazada"
|
|
19911
|
+
| "tiktok"
|
|
19912
|
+
| "shopify"
|
|
19913
|
+
| "whatsapp"
|
|
19914
|
+
| "zalora"
|
|
19915
|
+
| "amazon"
|
|
19916
|
+
| "ebay"
|
|
19917
|
+
)[];
|
|
19918
|
+
marketplaceStoreSelections?: {
|
|
19919
|
+
[key: string]: string[] | string;
|
|
19920
|
+
};
|
|
19921
|
+
/** @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. */
|
|
19922
|
+
selectedFields?: (
|
|
19923
|
+
| "name"
|
|
19924
|
+
| "description"
|
|
19925
|
+
| "highlights"
|
|
19926
|
+
| "seoTitle"
|
|
19927
|
+
| "seoDescription"
|
|
19928
|
+
| "weight"
|
|
19929
|
+
| "dimensions"
|
|
19930
|
+
)[];
|
|
19931
|
+
instructions?: string;
|
|
19932
|
+
title?: string;
|
|
19933
|
+
/** @default false */
|
|
19934
|
+
autoApplyHighConfidence?: boolean;
|
|
19935
|
+
/** @description Confidence threshold for automatic application when enabled. Omit to use the organization's threshold. */
|
|
19936
|
+
enrichmentAutoApplyThreshold?: number;
|
|
19937
|
+
};
|
|
19938
|
+
};
|
|
19939
|
+
};
|
|
19940
|
+
responses: {
|
|
19941
|
+
/** @description Jobs accepted for background processing. */
|
|
19942
|
+
202: {
|
|
19943
|
+
headers: {
|
|
19944
|
+
[name: string]: unknown;
|
|
19945
|
+
};
|
|
19946
|
+
content: {
|
|
19947
|
+
"application/json": {
|
|
19948
|
+
ok: boolean;
|
|
19949
|
+
apiVersion?: string;
|
|
19950
|
+
operationId?: string;
|
|
19951
|
+
/** @enum {string} */
|
|
19952
|
+
status: "accepted";
|
|
19953
|
+
jobId: string;
|
|
19954
|
+
links: {
|
|
19955
|
+
[key: string]: string;
|
|
19956
|
+
};
|
|
19957
|
+
warnings?: string[];
|
|
19958
|
+
recommendations?: string[];
|
|
19959
|
+
data: {
|
|
19960
|
+
/** @description True when all requested targets were accepted for processing. Does not mean processing completed. */
|
|
19961
|
+
success: boolean;
|
|
19962
|
+
queued: boolean;
|
|
19963
|
+
productIds: string[];
|
|
19964
|
+
jobIds: string[];
|
|
19965
|
+
succeededCount: number;
|
|
19966
|
+
failedCount: number;
|
|
19967
|
+
batchJobId?: string;
|
|
19968
|
+
enrichmentBatchId?: string;
|
|
19969
|
+
results: {
|
|
19970
|
+
productId: string;
|
|
19971
|
+
success: boolean;
|
|
19972
|
+
jobId: string;
|
|
19973
|
+
}[];
|
|
19974
|
+
};
|
|
19975
|
+
};
|
|
19976
|
+
};
|
|
19977
|
+
};
|
|
19978
|
+
/** @description Invalid request or queue preparation failed. Inspect the error before resubmitting. */
|
|
19979
|
+
400: {
|
|
19980
|
+
headers: {
|
|
19981
|
+
[name: string]: unknown;
|
|
19982
|
+
};
|
|
19983
|
+
content?: never;
|
|
19984
|
+
};
|
|
19985
|
+
/** @description Missing or invalid credentials. */
|
|
19986
|
+
401: {
|
|
19987
|
+
headers: {
|
|
19988
|
+
[name: string]: unknown;
|
|
19989
|
+
};
|
|
19990
|
+
content?: never;
|
|
19991
|
+
};
|
|
19992
|
+
/** @description Missing scope, insufficient permission, organization mismatch, or inactive organization. */
|
|
19993
|
+
403: {
|
|
19994
|
+
headers: {
|
|
19995
|
+
[name: string]: unknown;
|
|
19996
|
+
};
|
|
19997
|
+
content?: never;
|
|
19998
|
+
};
|
|
19999
|
+
/** @description Target not found in the authenticated organization. */
|
|
20000
|
+
404: {
|
|
20001
|
+
headers: {
|
|
20002
|
+
[name: string]: unknown;
|
|
20003
|
+
};
|
|
20004
|
+
content?: never;
|
|
20005
|
+
};
|
|
20006
|
+
/** @description An import or enrichment job is already active for the target. */
|
|
20007
|
+
409: {
|
|
20008
|
+
headers: {
|
|
20009
|
+
[name: string]: unknown;
|
|
20010
|
+
};
|
|
20011
|
+
content?: never;
|
|
20012
|
+
};
|
|
20013
|
+
/** @description Rate limit exceeded. */
|
|
20014
|
+
429: {
|
|
20015
|
+
headers: {
|
|
20016
|
+
[name: string]: unknown;
|
|
20017
|
+
};
|
|
20018
|
+
content?: never;
|
|
20019
|
+
};
|
|
20020
|
+
};
|
|
20021
|
+
};
|
|
20022
|
+
get_v1_promotions: {
|
|
20023
|
+
parameters: {
|
|
20024
|
+
query?: {
|
|
20025
|
+
/** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
|
|
20026
|
+
organizationId?: string;
|
|
20027
|
+
/** @description Search promotion name. */
|
|
20028
|
+
q?: string;
|
|
20029
|
+
/** @description Effective status filter: `all`, `draft`, `scheduled`, `active`, `paused`, `ended`, or `archived`. */
|
|
20030
|
+
status?:
|
|
20031
|
+
| "all"
|
|
20032
|
+
| "draft"
|
|
20033
|
+
| "scheduled"
|
|
20034
|
+
| "active"
|
|
20035
|
+
| "paused"
|
|
20036
|
+
| "ended"
|
|
20037
|
+
| "archived";
|
|
20038
|
+
/** @description Comma-separated marketplaces, for example `shopee,lazada,tiktok,shopify`. */
|
|
20039
|
+
marketplace?: string;
|
|
20040
|
+
/** @description Comma-separated promotion store keys (`marketplace:country:storeId`). */
|
|
20041
|
+
store?: string;
|
|
20042
|
+
/** @description Sort field. */
|
|
20043
|
+
sortBy?: "createdAt" | "updatedAt" | "name" | "startsAt" | "status";
|
|
20044
|
+
/** @description Sort direction. */
|
|
20045
|
+
sortDir?: "asc" | "desc";
|
|
20046
|
+
/** @description Page size. Default 20, max 50. */
|
|
20047
|
+
limit?: number;
|
|
20048
|
+
/** @description Zero-based pagination offset. */
|
|
20049
|
+
offset?: number;
|
|
20050
|
+
};
|
|
20051
|
+
header?: never;
|
|
20052
|
+
path?: never;
|
|
20053
|
+
cookie?: never;
|
|
20054
|
+
};
|
|
20055
|
+
requestBody?: never;
|
|
20056
|
+
responses: {
|
|
20057
|
+
/** @description Promotions page returned. */
|
|
18889
20058
|
200: {
|
|
18890
20059
|
headers: {
|
|
18891
20060
|
[name: string]: unknown;
|
|
18892
20061
|
};
|
|
18893
20062
|
content: {
|
|
18894
20063
|
"application/json": {
|
|
18895
|
-
|
|
18896
|
-
|
|
18897
|
-
|
|
18898
|
-
|
|
18899
|
-
|
|
18900
|
-
|
|
20064
|
+
items: Record<string, never>[];
|
|
20065
|
+
hasMore?: boolean;
|
|
20066
|
+
nextOffset?: number;
|
|
20067
|
+
summary: Record<string, never>;
|
|
20068
|
+
pagination: {
|
|
20069
|
+
offset?: number;
|
|
20070
|
+
limit?: number;
|
|
20071
|
+
total?: number;
|
|
20072
|
+
hasMore?: boolean;
|
|
20073
|
+
nextOffset?: number | null;
|
|
20074
|
+
maxLimit?: number;
|
|
20075
|
+
defaultLimit?: number;
|
|
18901
20076
|
};
|
|
18902
20077
|
};
|
|
18903
20078
|
};
|
|
@@ -18909,14 +20084,14 @@ interface operations {
|
|
|
18909
20084
|
};
|
|
18910
20085
|
content?: never;
|
|
18911
20086
|
};
|
|
18912
|
-
/** @description Forbidden */
|
|
20087
|
+
/** @description Forbidden or missing `promotions:read` scope */
|
|
18913
20088
|
403: {
|
|
18914
20089
|
headers: {
|
|
18915
20090
|
[name: string]: unknown;
|
|
18916
20091
|
};
|
|
18917
20092
|
content?: never;
|
|
18918
20093
|
};
|
|
18919
|
-
/** @description Rate
|
|
20094
|
+
/** @description Rate limit exceeded */
|
|
18920
20095
|
429: {
|
|
18921
20096
|
headers: {
|
|
18922
20097
|
[name: string]: unknown;
|
|
@@ -18932,7 +20107,7 @@ interface operations {
|
|
|
18932
20107
|
};
|
|
18933
20108
|
};
|
|
18934
20109
|
};
|
|
18935
|
-
|
|
20110
|
+
post_v1_promotions: {
|
|
18936
20111
|
parameters: {
|
|
18937
20112
|
query?: never;
|
|
18938
20113
|
header?: never;
|
|
@@ -18943,131 +20118,285 @@ interface operations {
|
|
|
18943
20118
|
content: {
|
|
18944
20119
|
/**
|
|
18945
20120
|
* @example {
|
|
18946
|
-
* "
|
|
18947
|
-
*
|
|
18948
|
-
*
|
|
18949
|
-
* "
|
|
18950
|
-
*
|
|
20121
|
+
* "name": "Christmas",
|
|
20122
|
+
* "discountType": "fixed_amount",
|
|
20123
|
+
* "discountValue": 12,
|
|
20124
|
+
* "targetStores": [
|
|
20125
|
+
* {
|
|
20126
|
+
* "marketplace": "shopee",
|
|
20127
|
+
* "country": "singapore",
|
|
20128
|
+
* "storeId": "115085776"
|
|
20129
|
+
* }
|
|
18951
20130
|
* ],
|
|
18952
|
-
* "
|
|
18953
|
-
* "
|
|
18954
|
-
* "enrichmentAutoApplyThreshold": 0.7
|
|
20131
|
+
* "startsAt": "2026-07-06T17:00:00.000Z",
|
|
20132
|
+
* "endsAt": "2026-08-02T03:59:00.000Z"
|
|
18955
20133
|
* }
|
|
18956
20134
|
*/
|
|
18957
20135
|
"application/json": {
|
|
18958
|
-
/** @description Required for session auth
|
|
20136
|
+
/** @description Required for session auth across multiple organizations. Optional for OAuth/API keys bound to one organization. */
|
|
18959
20137
|
organizationId?: string;
|
|
18960
|
-
|
|
18961
|
-
|
|
18962
|
-
/** @
|
|
18963
|
-
|
|
18964
|
-
|
|
18965
|
-
| "
|
|
18966
|
-
| "
|
|
18967
|
-
| "
|
|
18968
|
-
| "
|
|
18969
|
-
| "
|
|
18970
|
-
| "
|
|
18971
|
-
| "
|
|
18972
|
-
|
|
18973
|
-
|
|
18974
|
-
|
|
18975
|
-
|
|
20138
|
+
name: string;
|
|
20139
|
+
description?: string | null;
|
|
20140
|
+
/** @enum {string} */
|
|
20141
|
+
kind?:
|
|
20142
|
+
| "product_discount"
|
|
20143
|
+
| "flash_sale"
|
|
20144
|
+
| "voucher"
|
|
20145
|
+
| "gift_with_purchase"
|
|
20146
|
+
| "buy_x_get_y"
|
|
20147
|
+
| "bundle_deal"
|
|
20148
|
+
| "free_shipping"
|
|
20149
|
+
| "early_bird_price";
|
|
20150
|
+
/** @enum {string} */
|
|
20151
|
+
discountType: "percentage" | "fixed_amount";
|
|
20152
|
+
/** @description Discount amount or percentage. Use 0 for gift/sample-only and free Buy-X-Get-Y mechanics. */
|
|
20153
|
+
discountValue: number;
|
|
20154
|
+
/** @description Connected stores as `{ marketplace, country, storeId }`. Copy from existing promotion targetStores or product marketplaceDetails. */
|
|
20155
|
+
targetStores: {
|
|
20156
|
+
/** @enum {string} */
|
|
20157
|
+
marketplace:
|
|
20158
|
+
| "lazada"
|
|
20159
|
+
| "shopee"
|
|
20160
|
+
| "tiktok"
|
|
20161
|
+
| "shopify"
|
|
20162
|
+
| "amazon"
|
|
20163
|
+
| "zalora"
|
|
20164
|
+
| "ebay";
|
|
20165
|
+
country: string;
|
|
20166
|
+
storeId: string;
|
|
20167
|
+
}[];
|
|
20168
|
+
/**
|
|
20169
|
+
* @description Defaults to active. Future start dates display as scheduled. Use draft to save without activation; explicit inactive lifecycle states are preserved.
|
|
20170
|
+
* @default active
|
|
20171
|
+
* @enum {string}
|
|
20172
|
+
*/
|
|
20173
|
+
status?:
|
|
20174
|
+
| "draft"
|
|
20175
|
+
| "scheduled"
|
|
20176
|
+
| "active"
|
|
20177
|
+
| "paused"
|
|
20178
|
+
| "ended"
|
|
20179
|
+
| "archived";
|
|
20180
|
+
/** Format: date-time */
|
|
20181
|
+
startsAt?: string | null;
|
|
20182
|
+
/** Format: date-time */
|
|
20183
|
+
endsAt?: string | null;
|
|
20184
|
+
minSalePrice?: number | null;
|
|
20185
|
+
maxDiscountAmount?: number | null;
|
|
20186
|
+
/** @description Lazada voucher minimum spend. Defaults to 1 when unset. */
|
|
20187
|
+
minSpend?: number | null;
|
|
20188
|
+
/** @description Total redemption/order limit, or per-SKU promotional quantity for flash sales. */
|
|
20189
|
+
totalUsageLimit?: number | null;
|
|
20190
|
+
mechanicConfig?: {
|
|
20191
|
+
/** @description Exact Shopee campaign/session for Campaign Voucher Nomination, with reviewed participation obligations. Nomination remains a draft until Shopee approval. */
|
|
20192
|
+
voucherCampaign?: {
|
|
20193
|
+
campaignId: string;
|
|
20194
|
+
sessionId: string;
|
|
20195
|
+
termsAccepted: boolean;
|
|
20196
|
+
};
|
|
20197
|
+
/**
|
|
20198
|
+
* @description Exact marketplace voucher subtype. Native types use APIs; Seller Center-only types use a browser AOP with per-store eligibility checks.
|
|
20199
|
+
* @enum {string|null}
|
|
20200
|
+
*/
|
|
20201
|
+
voucherType?:
|
|
20202
|
+
| "shopee_shop"
|
|
20203
|
+
| "shopee_product"
|
|
20204
|
+
| "shopee_private"
|
|
20205
|
+
| "shopee_live"
|
|
20206
|
+
| "shopee_video"
|
|
20207
|
+
| "shopee_new_buyer"
|
|
20208
|
+
| "shopee_repeat_buyer"
|
|
20209
|
+
| "shopee_campaign"
|
|
20210
|
+
| "shopee_follow_prize"
|
|
20211
|
+
| "shopee_exclusive_streamer"
|
|
20212
|
+
| "shopee_welcome"
|
|
20213
|
+
| "shopee_member_repeat_buyer"
|
|
20214
|
+
| "shopee_exclusive"
|
|
20215
|
+
| "shopee_redemption"
|
|
20216
|
+
| "shopee_exclusive_creator"
|
|
20217
|
+
| "lazada_store_follower"
|
|
20218
|
+
| "lazada_regular"
|
|
20219
|
+
| "lazada_store_new_buyer"
|
|
20220
|
+
| "lazada_live"
|
|
20221
|
+
| "lazada_offline"
|
|
20222
|
+
| "lazada_co_funded"
|
|
20223
|
+
| "lazada_welcome"
|
|
20224
|
+
| "lazada_linked_member"
|
|
20225
|
+
| "lazada_new_member"
|
|
20226
|
+
| "lazada_member_exclusive"
|
|
20227
|
+
| "lazada_points_redeemable"
|
|
20228
|
+
| "tiktok_seller_coupon"
|
|
20229
|
+
| "shopify_discount_code"
|
|
20230
|
+
| "amazon_promotion_code"
|
|
20231
|
+
| "zalora_seller_voucher"
|
|
20232
|
+
| "ebay_coded_coupon"
|
|
20233
|
+
| null;
|
|
20234
|
+
browserAutomation?: {
|
|
20235
|
+
/** @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. */
|
|
20236
|
+
variableValues?: {
|
|
20237
|
+
[key: string]: string;
|
|
20238
|
+
};
|
|
20239
|
+
/** @description Optional organization AOP override. Omit to select the built-in marketplace AOP. */
|
|
20240
|
+
aopId?: string;
|
|
20241
|
+
instructions?: string;
|
|
20242
|
+
} | null;
|
|
20243
|
+
/** @enum {string} */
|
|
20244
|
+
voucherScope?: "products" | "shop";
|
|
20245
|
+
/** @enum {string} */
|
|
20246
|
+
voucherReward?: "discount" | "coins_cashback";
|
|
20247
|
+
/** @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. */
|
|
20248
|
+
exclusiveStreamerUsernames?: string[];
|
|
20249
|
+
/** @enum {string} */
|
|
20250
|
+
voucherAudience?: "general" | "shop_follow";
|
|
20251
|
+
/** @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. */
|
|
20252
|
+
voucherDisplayChannels?: (
|
|
20253
|
+
| "all"
|
|
20254
|
+
| "feed"
|
|
20255
|
+
| "live"
|
|
20256
|
+
| "order_page"
|
|
20257
|
+
| "followers"
|
|
20258
|
+
| "offline"
|
|
20259
|
+
)[];
|
|
20260
|
+
/** @enum {string} */
|
|
20261
|
+
bundlePriceType?: "discount" | "fixed_price";
|
|
20262
|
+
bundleTiers?: {
|
|
20263
|
+
minimumQuantity: number;
|
|
20264
|
+
discountValue: number;
|
|
20265
|
+
}[];
|
|
20266
|
+
/** @enum {string} */
|
|
20267
|
+
thresholdType?: "item_quantity" | "order_amount";
|
|
20268
|
+
thresholdValue?: number;
|
|
20269
|
+
/** @enum {string} */
|
|
20270
|
+
giftType?: "gift" | "sample";
|
|
20271
|
+
giftQuantity?: number;
|
|
20272
|
+
gifts?: {
|
|
20273
|
+
/** Format: uuid */
|
|
20274
|
+
productId: string;
|
|
20275
|
+
/** Format: uuid */
|
|
20276
|
+
variantId?: string | null;
|
|
20277
|
+
totalClaimLimit: number;
|
|
20278
|
+
}[];
|
|
20279
|
+
buyQuantity?: number;
|
|
20280
|
+
getQuantity?: number;
|
|
20281
|
+
benefitProductIds?: string[];
|
|
20282
|
+
/** @enum {string} */
|
|
20283
|
+
benefitType?: "free" | "percentage" | "fixed_amount";
|
|
20284
|
+
benefitValue?: number;
|
|
20285
|
+
maxApplicationsPerOrder?: number;
|
|
20286
|
+
bundleMinimumQuantity?: number;
|
|
20287
|
+
/** @description Free shipping delivery option offered by the Lazada store; defaults to STANDARD. */
|
|
20288
|
+
shippingDeliveryOption?: string;
|
|
20289
|
+
/** @description Free shipping subsidy budget in the store currency. Omit for an unlimited budget. */
|
|
20290
|
+
shippingBudget?: number;
|
|
18976
20291
|
};
|
|
18977
|
-
/** @description
|
|
18978
|
-
|
|
18979
|
-
|
|
18980
|
-
|
|
18981
|
-
| "
|
|
18982
|
-
|
|
18983
|
-
|
|
|
18984
|
-
|
|
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;
|
|
20292
|
+
/** @description Patch discount overrides by exact target store key. Other stores retain their terms. Null discountValue restores shared terms for that store. */
|
|
20293
|
+
storeDiscounts?: {
|
|
20294
|
+
storeKey: string;
|
|
20295
|
+
/** @enum {string} */
|
|
20296
|
+
discountType: "percentage" | "fixed_amount";
|
|
20297
|
+
/** @description Percentage must not exceed 100. */
|
|
20298
|
+
discountValue: number | null;
|
|
20299
|
+
}[];
|
|
18993
20300
|
};
|
|
18994
20301
|
};
|
|
18995
20302
|
};
|
|
18996
20303
|
responses: {
|
|
18997
|
-
/** @description
|
|
18998
|
-
|
|
20304
|
+
/** @description Promotion created. */
|
|
20305
|
+
201: {
|
|
18999
20306
|
headers: {
|
|
19000
20307
|
[name: string]: unknown;
|
|
19001
20308
|
};
|
|
19002
20309
|
content: {
|
|
19003
20310
|
"application/json": {
|
|
19004
|
-
|
|
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
|
-
};
|
|
20311
|
+
promotion: Record<string, never>;
|
|
19031
20312
|
};
|
|
19032
20313
|
};
|
|
19033
20314
|
};
|
|
19034
|
-
/** @description
|
|
20315
|
+
/** @description Bad Request */
|
|
19035
20316
|
400: {
|
|
19036
20317
|
headers: {
|
|
19037
20318
|
[name: string]: unknown;
|
|
19038
20319
|
};
|
|
19039
20320
|
content?: never;
|
|
19040
20321
|
};
|
|
19041
|
-
/** @description
|
|
20322
|
+
/** @description Unauthorized */
|
|
19042
20323
|
401: {
|
|
19043
20324
|
headers: {
|
|
19044
20325
|
[name: string]: unknown;
|
|
19045
20326
|
};
|
|
19046
20327
|
content?: never;
|
|
19047
20328
|
};
|
|
19048
|
-
/** @description
|
|
20329
|
+
/** @description Forbidden or missing `promotions:write` scope */
|
|
19049
20330
|
403: {
|
|
19050
20331
|
headers: {
|
|
19051
20332
|
[name: string]: unknown;
|
|
19052
20333
|
};
|
|
19053
20334
|
content?: never;
|
|
19054
20335
|
};
|
|
19055
|
-
/** @description
|
|
19056
|
-
|
|
20336
|
+
/** @description Rate limit exceeded */
|
|
20337
|
+
429: {
|
|
19057
20338
|
headers: {
|
|
19058
20339
|
[name: string]: unknown;
|
|
19059
20340
|
};
|
|
19060
20341
|
content?: never;
|
|
19061
20342
|
};
|
|
19062
|
-
/** @description
|
|
19063
|
-
|
|
20343
|
+
/** @description Internal Server Error */
|
|
20344
|
+
500: {
|
|
19064
20345
|
headers: {
|
|
19065
20346
|
[name: string]: unknown;
|
|
19066
20347
|
};
|
|
19067
20348
|
content?: never;
|
|
19068
20349
|
};
|
|
19069
|
-
|
|
19070
|
-
|
|
20350
|
+
};
|
|
20351
|
+
};
|
|
20352
|
+
get_v1_promotions_by_promotionid: {
|
|
20353
|
+
parameters: {
|
|
20354
|
+
query?: {
|
|
20355
|
+
/** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
|
|
20356
|
+
organizationId?: string;
|
|
20357
|
+
};
|
|
20358
|
+
header?: never;
|
|
20359
|
+
path: {
|
|
20360
|
+
promotionId: string;
|
|
20361
|
+
};
|
|
20362
|
+
cookie?: never;
|
|
20363
|
+
};
|
|
20364
|
+
requestBody?: never;
|
|
20365
|
+
responses: {
|
|
20366
|
+
/** @description Promotion returned. */
|
|
20367
|
+
200: {
|
|
20368
|
+
headers: {
|
|
20369
|
+
[name: string]: unknown;
|
|
20370
|
+
};
|
|
20371
|
+
content: {
|
|
20372
|
+
"application/json": {
|
|
20373
|
+
promotion: Record<string, never>;
|
|
20374
|
+
};
|
|
20375
|
+
};
|
|
20376
|
+
};
|
|
20377
|
+
/** @description Unauthorized */
|
|
20378
|
+
401: {
|
|
20379
|
+
headers: {
|
|
20380
|
+
[name: string]: unknown;
|
|
20381
|
+
};
|
|
20382
|
+
content?: never;
|
|
20383
|
+
};
|
|
20384
|
+
/** @description Forbidden or missing `promotions:read` scope */
|
|
20385
|
+
403: {
|
|
20386
|
+
headers: {
|
|
20387
|
+
[name: string]: unknown;
|
|
20388
|
+
};
|
|
20389
|
+
content?: never;
|
|
20390
|
+
};
|
|
20391
|
+
/** @description Promotion not found */
|
|
20392
|
+
404: {
|
|
20393
|
+
headers: {
|
|
20394
|
+
[name: string]: unknown;
|
|
20395
|
+
};
|
|
20396
|
+
content?: never;
|
|
20397
|
+
};
|
|
20398
|
+
/** @description Internal Server Error */
|
|
20399
|
+
500: {
|
|
19071
20400
|
headers: {
|
|
19072
20401
|
[name: string]: unknown;
|
|
19073
20402
|
};
|
|
@@ -19075,61 +20404,28 @@ interface operations {
|
|
|
19075
20404
|
};
|
|
19076
20405
|
};
|
|
19077
20406
|
};
|
|
19078
|
-
|
|
20407
|
+
delete_v1_promotions_by_promotionid: {
|
|
19079
20408
|
parameters: {
|
|
19080
20409
|
query?: {
|
|
19081
20410
|
/** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
|
|
19082
20411
|
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
20412
|
};
|
|
19107
20413
|
header?: never;
|
|
19108
|
-
path
|
|
20414
|
+
path: {
|
|
20415
|
+
promotionId: string;
|
|
20416
|
+
};
|
|
19109
20417
|
cookie?: never;
|
|
19110
20418
|
};
|
|
19111
20419
|
requestBody?: never;
|
|
19112
20420
|
responses: {
|
|
19113
|
-
/** @description
|
|
20421
|
+
/** @description Promotion deleted. */
|
|
19114
20422
|
200: {
|
|
19115
20423
|
headers: {
|
|
19116
20424
|
[name: string]: unknown;
|
|
19117
20425
|
};
|
|
19118
20426
|
content: {
|
|
19119
20427
|
"application/json": {
|
|
19120
|
-
|
|
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
|
-
};
|
|
20428
|
+
ok: boolean;
|
|
19133
20429
|
};
|
|
19134
20430
|
};
|
|
19135
20431
|
};
|
|
@@ -19140,15 +20436,15 @@ interface operations {
|
|
|
19140
20436
|
};
|
|
19141
20437
|
content?: never;
|
|
19142
20438
|
};
|
|
19143
|
-
/** @description Forbidden or missing `promotions:
|
|
20439
|
+
/** @description Forbidden or missing `promotions:write` scope */
|
|
19144
20440
|
403: {
|
|
19145
20441
|
headers: {
|
|
19146
20442
|
[name: string]: unknown;
|
|
19147
20443
|
};
|
|
19148
20444
|
content?: never;
|
|
19149
20445
|
};
|
|
19150
|
-
/** @description
|
|
19151
|
-
|
|
20446
|
+
/** @description Promotion not found */
|
|
20447
|
+
404: {
|
|
19152
20448
|
headers: {
|
|
19153
20449
|
[name: string]: unknown;
|
|
19154
20450
|
};
|
|
@@ -19163,35 +20459,23 @@ interface operations {
|
|
|
19163
20459
|
};
|
|
19164
20460
|
};
|
|
19165
20461
|
};
|
|
19166
|
-
|
|
20462
|
+
patch_v1_promotions_by_promotionid: {
|
|
19167
20463
|
parameters: {
|
|
19168
|
-
query?:
|
|
20464
|
+
query?: {
|
|
20465
|
+
/** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
|
|
20466
|
+
organizationId?: string;
|
|
20467
|
+
};
|
|
19169
20468
|
header?: never;
|
|
19170
|
-
path
|
|
20469
|
+
path: {
|
|
20470
|
+
promotionId: string;
|
|
20471
|
+
};
|
|
19171
20472
|
cookie?: never;
|
|
19172
20473
|
};
|
|
19173
20474
|
requestBody: {
|
|
19174
20475
|
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
20476
|
"application/json": {
|
|
19192
|
-
/** @description Required for session auth across multiple organizations. Optional for OAuth/API keys bound to one organization. */
|
|
19193
20477
|
organizationId?: string;
|
|
19194
|
-
name
|
|
20478
|
+
name?: string;
|
|
19195
20479
|
description?: string | null;
|
|
19196
20480
|
/** @enum {string} */
|
|
19197
20481
|
kind?:
|
|
@@ -19204,11 +20488,10 @@ interface operations {
|
|
|
19204
20488
|
| "free_shipping"
|
|
19205
20489
|
| "early_bird_price";
|
|
19206
20490
|
/** @enum {string} */
|
|
19207
|
-
discountType
|
|
20491
|
+
discountType?: "percentage" | "fixed_amount";
|
|
19208
20492
|
/** @description Discount amount or percentage. Use 0 for gift/sample-only and free Buy-X-Get-Y mechanics. */
|
|
19209
|
-
discountValue
|
|
19210
|
-
|
|
19211
|
-
targetStores: {
|
|
20493
|
+
discountValue?: number;
|
|
20494
|
+
targetStores?: {
|
|
19212
20495
|
/** @enum {string} */
|
|
19213
20496
|
marketplace:
|
|
19214
20497
|
| "lazada"
|
|
@@ -19221,11 +20504,11 @@ interface operations {
|
|
|
19221
20504
|
country: string;
|
|
19222
20505
|
storeId: string;
|
|
19223
20506
|
}[];
|
|
19224
|
-
/**
|
|
19225
|
-
|
|
19226
|
-
|
|
19227
|
-
|
|
19228
|
-
|
|
20507
|
+
/** Format: date-time */
|
|
20508
|
+
startsAt?: string | null;
|
|
20509
|
+
/** Format: date-time */
|
|
20510
|
+
endsAt?: string | null;
|
|
20511
|
+
/** @enum {string} */
|
|
19229
20512
|
status?:
|
|
19230
20513
|
| "draft"
|
|
19231
20514
|
| "scheduled"
|
|
@@ -19233,15 +20516,9 @@ interface operations {
|
|
|
19233
20516
|
| "paused"
|
|
19234
20517
|
| "ended"
|
|
19235
20518
|
| "archived";
|
|
19236
|
-
/** Format: date-time */
|
|
19237
|
-
startsAt?: string | null;
|
|
19238
|
-
/** Format: date-time */
|
|
19239
|
-
endsAt?: string | null;
|
|
19240
20519
|
minSalePrice?: number | null;
|
|
19241
20520
|
maxDiscountAmount?: number | null;
|
|
19242
|
-
/** @description Lazada voucher minimum spend. Defaults to 1 when unset. */
|
|
19243
20521
|
minSpend?: number | null;
|
|
19244
|
-
/** @description Total redemption/order limit, or per-SKU promotional quantity for flash sales. */
|
|
19245
20522
|
totalUsageLimit?: number | null;
|
|
19246
20523
|
mechanicConfig?: {
|
|
19247
20524
|
/** @description Exact Shopee campaign/session for Campaign Voucher Nomination, with reviewed participation obligations. Nomination remains a draft until Shopee approval. */
|
|
@@ -19357,8 +20634,8 @@ interface operations {
|
|
|
19357
20634
|
};
|
|
19358
20635
|
};
|
|
19359
20636
|
responses: {
|
|
19360
|
-
/** @description Promotion
|
|
19361
|
-
|
|
20637
|
+
/** @description Promotion updated. */
|
|
20638
|
+
200: {
|
|
19362
20639
|
headers: {
|
|
19363
20640
|
[name: string]: unknown;
|
|
19364
20641
|
};
|
|
@@ -19373,7 +20650,62 @@ interface operations {
|
|
|
19373
20650
|
headers: {
|
|
19374
20651
|
[name: string]: unknown;
|
|
19375
20652
|
};
|
|
19376
|
-
content?: never;
|
|
20653
|
+
content?: never;
|
|
20654
|
+
};
|
|
20655
|
+
/** @description Unauthorized */
|
|
20656
|
+
401: {
|
|
20657
|
+
headers: {
|
|
20658
|
+
[name: string]: unknown;
|
|
20659
|
+
};
|
|
20660
|
+
content?: never;
|
|
20661
|
+
};
|
|
20662
|
+
/** @description Forbidden or missing `promotions:write` scope */
|
|
20663
|
+
403: {
|
|
20664
|
+
headers: {
|
|
20665
|
+
[name: string]: unknown;
|
|
20666
|
+
};
|
|
20667
|
+
content?: never;
|
|
20668
|
+
};
|
|
20669
|
+
/** @description Promotion not found */
|
|
20670
|
+
404: {
|
|
20671
|
+
headers: {
|
|
20672
|
+
[name: string]: unknown;
|
|
20673
|
+
};
|
|
20674
|
+
content?: never;
|
|
20675
|
+
};
|
|
20676
|
+
/** @description Internal Server Error */
|
|
20677
|
+
500: {
|
|
20678
|
+
headers: {
|
|
20679
|
+
[name: string]: unknown;
|
|
20680
|
+
};
|
|
20681
|
+
content?: never;
|
|
20682
|
+
};
|
|
20683
|
+
};
|
|
20684
|
+
};
|
|
20685
|
+
get_v1_promotions_by_promotionid_products: {
|
|
20686
|
+
parameters: {
|
|
20687
|
+
query?: {
|
|
20688
|
+
/** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
|
|
20689
|
+
organizationId?: string;
|
|
20690
|
+
};
|
|
20691
|
+
header?: never;
|
|
20692
|
+
path: {
|
|
20693
|
+
promotionId: string;
|
|
20694
|
+
};
|
|
20695
|
+
cookie?: never;
|
|
20696
|
+
};
|
|
20697
|
+
requestBody?: never;
|
|
20698
|
+
responses: {
|
|
20699
|
+
/** @description Assignments returned. */
|
|
20700
|
+
200: {
|
|
20701
|
+
headers: {
|
|
20702
|
+
[name: string]: unknown;
|
|
20703
|
+
};
|
|
20704
|
+
content: {
|
|
20705
|
+
"application/json": {
|
|
20706
|
+
items: Record<string, never>[];
|
|
20707
|
+
};
|
|
20708
|
+
};
|
|
19377
20709
|
};
|
|
19378
20710
|
/** @description Unauthorized */
|
|
19379
20711
|
401: {
|
|
@@ -19382,20 +20714,13 @@ interface operations {
|
|
|
19382
20714
|
};
|
|
19383
20715
|
content?: never;
|
|
19384
20716
|
};
|
|
19385
|
-
/** @description Forbidden or missing `promotions:
|
|
20717
|
+
/** @description Forbidden or missing `promotions:read` scope */
|
|
19386
20718
|
403: {
|
|
19387
20719
|
headers: {
|
|
19388
20720
|
[name: string]: unknown;
|
|
19389
20721
|
};
|
|
19390
20722
|
content?: never;
|
|
19391
20723
|
};
|
|
19392
|
-
/** @description Rate limit exceeded */
|
|
19393
|
-
429: {
|
|
19394
|
-
headers: {
|
|
19395
|
-
[name: string]: unknown;
|
|
19396
|
-
};
|
|
19397
|
-
content?: never;
|
|
19398
|
-
};
|
|
19399
20724
|
/** @description Internal Server Error */
|
|
19400
20725
|
500: {
|
|
19401
20726
|
headers: {
|
|
@@ -19405,7 +20730,7 @@ interface operations {
|
|
|
19405
20730
|
};
|
|
19406
20731
|
};
|
|
19407
20732
|
};
|
|
19408
|
-
|
|
20733
|
+
post_v1_promotions_by_promotionid_products: {
|
|
19409
20734
|
parameters: {
|
|
19410
20735
|
query?: {
|
|
19411
20736
|
/** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
|
|
@@ -19417,35 +20742,57 @@ interface operations {
|
|
|
19417
20742
|
};
|
|
19418
20743
|
cookie?: never;
|
|
19419
20744
|
};
|
|
19420
|
-
requestBody
|
|
20745
|
+
requestBody: {
|
|
20746
|
+
content: {
|
|
20747
|
+
/**
|
|
20748
|
+
* @example {
|
|
20749
|
+
* "productIds": [
|
|
20750
|
+
* "f831911c-ba05-4c83-9a03-e026e0aaf102"
|
|
20751
|
+
* ],
|
|
20752
|
+
* "priority": 0
|
|
20753
|
+
* }
|
|
20754
|
+
*/
|
|
20755
|
+
"application/json": {
|
|
20756
|
+
organizationId?: string;
|
|
20757
|
+
productIds: string[];
|
|
20758
|
+
variantSku?: string | null;
|
|
20759
|
+
/** @default 0 */
|
|
20760
|
+
priority?: number;
|
|
20761
|
+
/** @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. */
|
|
20762
|
+
productDiscounts?: {
|
|
20763
|
+
/** Format: uuid */
|
|
20764
|
+
productId: string;
|
|
20765
|
+
discountValue: number | null;
|
|
20766
|
+
}[];
|
|
20767
|
+
};
|
|
20768
|
+
};
|
|
20769
|
+
};
|
|
19421
20770
|
responses: {
|
|
19422
|
-
/** @description
|
|
19423
|
-
|
|
20771
|
+
/** @description Products assigned. */
|
|
20772
|
+
201: {
|
|
19424
20773
|
headers: {
|
|
19425
20774
|
[name: string]: unknown;
|
|
19426
20775
|
};
|
|
19427
20776
|
content: {
|
|
19428
|
-
"application/json":
|
|
19429
|
-
promotion: Record<string, never>;
|
|
19430
|
-
};
|
|
20777
|
+
"application/json": Record<string, never>;
|
|
19431
20778
|
};
|
|
19432
20779
|
};
|
|
19433
|
-
/** @description
|
|
19434
|
-
|
|
20780
|
+
/** @description Bad Request */
|
|
20781
|
+
400: {
|
|
19435
20782
|
headers: {
|
|
19436
20783
|
[name: string]: unknown;
|
|
19437
20784
|
};
|
|
19438
20785
|
content?: never;
|
|
19439
20786
|
};
|
|
19440
|
-
/** @description
|
|
19441
|
-
|
|
20787
|
+
/** @description Unauthorized */
|
|
20788
|
+
401: {
|
|
19442
20789
|
headers: {
|
|
19443
20790
|
[name: string]: unknown;
|
|
19444
20791
|
};
|
|
19445
20792
|
content?: never;
|
|
19446
20793
|
};
|
|
19447
|
-
/** @description
|
|
19448
|
-
|
|
20794
|
+
/** @description Forbidden or missing `promotions:write` scope */
|
|
20795
|
+
403: {
|
|
19449
20796
|
headers: {
|
|
19450
20797
|
[name: string]: unknown;
|
|
19451
20798
|
};
|
|
@@ -19460,7 +20807,7 @@ interface operations {
|
|
|
19460
20807
|
};
|
|
19461
20808
|
};
|
|
19462
20809
|
};
|
|
19463
|
-
|
|
20810
|
+
delete_v1_promotions_by_promotionid_products: {
|
|
19464
20811
|
parameters: {
|
|
19465
20812
|
query?: {
|
|
19466
20813
|
/** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
|
|
@@ -19472,35 +20819,41 @@ interface operations {
|
|
|
19472
20819
|
};
|
|
19473
20820
|
cookie?: never;
|
|
19474
20821
|
};
|
|
19475
|
-
requestBody
|
|
20822
|
+
requestBody: {
|
|
20823
|
+
content: {
|
|
20824
|
+
"application/json": {
|
|
20825
|
+
organizationId?: string;
|
|
20826
|
+
productIds: string[];
|
|
20827
|
+
variantSku?: string | null;
|
|
20828
|
+
};
|
|
20829
|
+
};
|
|
20830
|
+
};
|
|
19476
20831
|
responses: {
|
|
19477
|
-
/** @description
|
|
20832
|
+
/** @description Products unassigned. */
|
|
19478
20833
|
200: {
|
|
19479
20834
|
headers: {
|
|
19480
20835
|
[name: string]: unknown;
|
|
19481
20836
|
};
|
|
19482
20837
|
content: {
|
|
19483
|
-
"application/json":
|
|
19484
|
-
ok: boolean;
|
|
19485
|
-
};
|
|
20838
|
+
"application/json": Record<string, never>;
|
|
19486
20839
|
};
|
|
19487
20840
|
};
|
|
19488
|
-
/** @description
|
|
19489
|
-
|
|
20841
|
+
/** @description Bad Request */
|
|
20842
|
+
400: {
|
|
19490
20843
|
headers: {
|
|
19491
20844
|
[name: string]: unknown;
|
|
19492
20845
|
};
|
|
19493
20846
|
content?: never;
|
|
19494
20847
|
};
|
|
19495
|
-
/** @description
|
|
19496
|
-
|
|
20848
|
+
/** @description Unauthorized */
|
|
20849
|
+
401: {
|
|
19497
20850
|
headers: {
|
|
19498
20851
|
[name: string]: unknown;
|
|
19499
20852
|
};
|
|
19500
20853
|
content?: never;
|
|
19501
20854
|
};
|
|
19502
|
-
/** @description
|
|
19503
|
-
|
|
20855
|
+
/** @description Forbidden or missing `promotions:write` scope */
|
|
20856
|
+
403: {
|
|
19504
20857
|
headers: {
|
|
19505
20858
|
[name: string]: unknown;
|
|
19506
20859
|
};
|
|
@@ -19515,7 +20868,7 @@ interface operations {
|
|
|
19515
20868
|
};
|
|
19516
20869
|
};
|
|
19517
20870
|
};
|
|
19518
|
-
|
|
20871
|
+
post_v1_promotions_by_promotionid_retry: {
|
|
19519
20872
|
parameters: {
|
|
19520
20873
|
query?: {
|
|
19521
20874
|
/** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
|
|
@@ -19529,175 +20882,43 @@ interface operations {
|
|
|
19529
20882
|
};
|
|
19530
20883
|
requestBody: {
|
|
19531
20884
|
content: {
|
|
20885
|
+
/**
|
|
20886
|
+
* @example {
|
|
20887
|
+
* "marketplace": "shopee"
|
|
20888
|
+
* }
|
|
20889
|
+
*/
|
|
19532
20890
|
"application/json": {
|
|
19533
20891
|
organizationId?: string;
|
|
19534
|
-
|
|
19535
|
-
|
|
19536
|
-
|
|
19537
|
-
|
|
19538
|
-
|
|
19539
|
-
| "
|
|
19540
|
-
| "
|
|
19541
|
-
| "
|
|
19542
|
-
| "
|
|
19543
|
-
| "
|
|
19544
|
-
| "
|
|
19545
|
-
| "
|
|
19546
|
-
/** @
|
|
19547
|
-
|
|
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
|
-
}[];
|
|
20892
|
+
/**
|
|
20893
|
+
* @description Retry one marketplace. When omitted, retries every promotion marketplace.
|
|
20894
|
+
* @enum {string}
|
|
20895
|
+
*/
|
|
20896
|
+
marketplace?:
|
|
20897
|
+
| "lazada"
|
|
20898
|
+
| "shopee"
|
|
20899
|
+
| "tiktok"
|
|
20900
|
+
| "shopify"
|
|
20901
|
+
| "amazon"
|
|
20902
|
+
| "zalora"
|
|
20903
|
+
| "ebay";
|
|
20904
|
+
/** @description Retry only these products. When omitted, retries every assigned product. */
|
|
20905
|
+
productIds?: string[];
|
|
19689
20906
|
};
|
|
19690
20907
|
};
|
|
19691
20908
|
};
|
|
19692
20909
|
responses: {
|
|
19693
|
-
/** @description
|
|
19694
|
-
|
|
20910
|
+
/** @description Delivery queued again. */
|
|
20911
|
+
202: {
|
|
19695
20912
|
headers: {
|
|
19696
20913
|
[name: string]: unknown;
|
|
19697
20914
|
};
|
|
19698
20915
|
content: {
|
|
19699
20916
|
"application/json": {
|
|
19700
|
-
|
|
20917
|
+
ok: boolean;
|
|
20918
|
+
queued: boolean;
|
|
20919
|
+
jobId?: string;
|
|
20920
|
+
syncBatchId: string;
|
|
20921
|
+
marketplaces: string[];
|
|
19701
20922
|
};
|
|
19702
20923
|
};
|
|
19703
20924
|
};
|
|
@@ -19722,13 +20943,6 @@ interface operations {
|
|
|
19722
20943
|
};
|
|
19723
20944
|
content?: never;
|
|
19724
20945
|
};
|
|
19725
|
-
/** @description Promotion not found */
|
|
19726
|
-
404: {
|
|
19727
|
-
headers: {
|
|
19728
|
-
[name: string]: unknown;
|
|
19729
|
-
};
|
|
19730
|
-
content?: never;
|
|
19731
|
-
};
|
|
19732
20946
|
/** @description Internal Server Error */
|
|
19733
20947
|
500: {
|
|
19734
20948
|
headers: {
|
|
@@ -19738,31 +20952,44 @@ interface operations {
|
|
|
19738
20952
|
};
|
|
19739
20953
|
};
|
|
19740
20954
|
};
|
|
19741
|
-
|
|
20955
|
+
get_v1_returns: {
|
|
19742
20956
|
parameters: {
|
|
19743
20957
|
query?: {
|
|
19744
20958
|
/** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
|
|
19745
20959
|
organizationId?: string;
|
|
20960
|
+
marketplace?: string;
|
|
20961
|
+
accountId?: string;
|
|
20962
|
+
externalOrderId?: string;
|
|
20963
|
+
updatedSince?: string;
|
|
20964
|
+
cursor?: string;
|
|
20965
|
+
limit?: number;
|
|
19746
20966
|
};
|
|
19747
20967
|
header?: never;
|
|
19748
|
-
path
|
|
19749
|
-
promotionId: string;
|
|
19750
|
-
};
|
|
20968
|
+
path?: never;
|
|
19751
20969
|
cookie?: never;
|
|
19752
20970
|
};
|
|
19753
20971
|
requestBody?: never;
|
|
19754
20972
|
responses: {
|
|
19755
|
-
/** @description
|
|
20973
|
+
/** @description Success */
|
|
19756
20974
|
200: {
|
|
19757
20975
|
headers: {
|
|
19758
20976
|
[name: string]: unknown;
|
|
19759
20977
|
};
|
|
19760
20978
|
content: {
|
|
19761
20979
|
"application/json": {
|
|
19762
|
-
|
|
20980
|
+
ok?: boolean;
|
|
20981
|
+
/** @default developer_v1 */
|
|
20982
|
+
apiVersion: string;
|
|
19763
20983
|
};
|
|
19764
20984
|
};
|
|
19765
20985
|
};
|
|
20986
|
+
/** @description Bad Request */
|
|
20987
|
+
400: {
|
|
20988
|
+
headers: {
|
|
20989
|
+
[name: string]: unknown;
|
|
20990
|
+
};
|
|
20991
|
+
content?: never;
|
|
20992
|
+
};
|
|
19766
20993
|
/** @description Unauthorized */
|
|
19767
20994
|
401: {
|
|
19768
20995
|
headers: {
|
|
@@ -19770,7 +20997,14 @@ interface operations {
|
|
|
19770
20997
|
};
|
|
19771
20998
|
content?: never;
|
|
19772
20999
|
};
|
|
19773
|
-
/** @description
|
|
21000
|
+
/** @description Insufficient Credits */
|
|
21001
|
+
402: {
|
|
21002
|
+
headers: {
|
|
21003
|
+
[name: string]: unknown;
|
|
21004
|
+
};
|
|
21005
|
+
content?: never;
|
|
21006
|
+
};
|
|
21007
|
+
/** @description Forbidden */
|
|
19774
21008
|
403: {
|
|
19775
21009
|
headers: {
|
|
19776
21010
|
[name: string]: unknown;
|
|
@@ -19786,7 +21020,7 @@ interface operations {
|
|
|
19786
21020
|
};
|
|
19787
21021
|
};
|
|
19788
21022
|
};
|
|
19789
|
-
|
|
21023
|
+
get_v1_returns_by_returnid: {
|
|
19790
21024
|
parameters: {
|
|
19791
21025
|
query?: {
|
|
19792
21026
|
/** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
|
|
@@ -19794,43 +21028,23 @@ interface operations {
|
|
|
19794
21028
|
};
|
|
19795
21029
|
header?: never;
|
|
19796
21030
|
path: {
|
|
19797
|
-
|
|
21031
|
+
returnId: string;
|
|
19798
21032
|
};
|
|
19799
21033
|
cookie?: never;
|
|
19800
21034
|
};
|
|
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
|
-
};
|
|
21035
|
+
requestBody?: never;
|
|
19826
21036
|
responses: {
|
|
19827
|
-
/** @description
|
|
19828
|
-
|
|
21037
|
+
/** @description Success */
|
|
21038
|
+
200: {
|
|
19829
21039
|
headers: {
|
|
19830
21040
|
[name: string]: unknown;
|
|
19831
21041
|
};
|
|
19832
21042
|
content: {
|
|
19833
|
-
"application/json":
|
|
21043
|
+
"application/json": {
|
|
21044
|
+
ok?: boolean;
|
|
21045
|
+
/** @default developer_v1 */
|
|
21046
|
+
apiVersion: string;
|
|
21047
|
+
};
|
|
19834
21048
|
};
|
|
19835
21049
|
};
|
|
19836
21050
|
/** @description Bad Request */
|
|
@@ -19847,13 +21061,27 @@ interface operations {
|
|
|
19847
21061
|
};
|
|
19848
21062
|
content?: never;
|
|
19849
21063
|
};
|
|
19850
|
-
/** @description
|
|
21064
|
+
/** @description Insufficient Credits */
|
|
21065
|
+
402: {
|
|
21066
|
+
headers: {
|
|
21067
|
+
[name: string]: unknown;
|
|
21068
|
+
};
|
|
21069
|
+
content?: never;
|
|
21070
|
+
};
|
|
21071
|
+
/** @description Forbidden */
|
|
19851
21072
|
403: {
|
|
19852
21073
|
headers: {
|
|
19853
21074
|
[name: string]: unknown;
|
|
19854
21075
|
};
|
|
19855
21076
|
content?: never;
|
|
19856
21077
|
};
|
|
21078
|
+
/** @description Return not found. */
|
|
21079
|
+
404: {
|
|
21080
|
+
headers: {
|
|
21081
|
+
[name: string]: unknown;
|
|
21082
|
+
};
|
|
21083
|
+
content?: never;
|
|
21084
|
+
};
|
|
19857
21085
|
/** @description Internal Server Error */
|
|
19858
21086
|
500: {
|
|
19859
21087
|
headers: {
|
|
@@ -19863,60 +21091,112 @@ interface operations {
|
|
|
19863
21091
|
};
|
|
19864
21092
|
};
|
|
19865
21093
|
};
|
|
19866
|
-
|
|
21094
|
+
get_v1_returns_actions: {
|
|
19867
21095
|
parameters: {
|
|
19868
|
-
query
|
|
19869
|
-
/** @description
|
|
21096
|
+
query: {
|
|
21097
|
+
/** @description Repeat this query parameter for each UUID. Between 1 and 50 entries, deduplicated in first-requested order. */
|
|
21098
|
+
returnIds: string[];
|
|
21099
|
+
/** @description Session callers only. API keys resolve organization scope from the credential. */
|
|
19870
21100
|
organizationId?: string;
|
|
19871
21101
|
};
|
|
19872
21102
|
header?: never;
|
|
19873
|
-
path
|
|
19874
|
-
promotionId: string;
|
|
19875
|
-
};
|
|
21103
|
+
path?: never;
|
|
19876
21104
|
cookie?: never;
|
|
19877
21105
|
};
|
|
19878
|
-
requestBody
|
|
19879
|
-
content: {
|
|
19880
|
-
"application/json": {
|
|
19881
|
-
organizationId?: string;
|
|
19882
|
-
productIds: string[];
|
|
19883
|
-
variantSku?: string | null;
|
|
19884
|
-
};
|
|
19885
|
-
};
|
|
19886
|
-
};
|
|
21106
|
+
requestBody?: never;
|
|
19887
21107
|
responses: {
|
|
19888
|
-
/** @description
|
|
21108
|
+
/** @description Request completed. Inspect data.success, per-target results and pendingCount for processing progress. */
|
|
19889
21109
|
200: {
|
|
19890
21110
|
headers: {
|
|
19891
21111
|
[name: string]: unknown;
|
|
19892
21112
|
};
|
|
19893
21113
|
content: {
|
|
19894
|
-
"application/json":
|
|
21114
|
+
"application/json": {
|
|
21115
|
+
ok: boolean;
|
|
21116
|
+
apiVersion: string;
|
|
21117
|
+
/** Format: uuid */
|
|
21118
|
+
operationId: string;
|
|
21119
|
+
/** @enum {string} */
|
|
21120
|
+
status: "completed";
|
|
21121
|
+
data: {
|
|
21122
|
+
success: boolean;
|
|
21123
|
+
returnIds: string[];
|
|
21124
|
+
succeededCount: number;
|
|
21125
|
+
failedCount: number;
|
|
21126
|
+
results: (
|
|
21127
|
+
| {
|
|
21128
|
+
/** Format: uuid */
|
|
21129
|
+
returnId: string;
|
|
21130
|
+
/** @constant */
|
|
21131
|
+
success: true;
|
|
21132
|
+
/** @enum {string} */
|
|
21133
|
+
marketplace:
|
|
21134
|
+
| "shopee"
|
|
21135
|
+
| "lazada"
|
|
21136
|
+
| "tiktok"
|
|
21137
|
+
| "shopify"
|
|
21138
|
+
| "whatsapp"
|
|
21139
|
+
| "zalora"
|
|
21140
|
+
| "amazon"
|
|
21141
|
+
| "ebay";
|
|
21142
|
+
marketplaceStatus: string | null;
|
|
21143
|
+
externalReturnId: string;
|
|
21144
|
+
externalOrderId: string | null;
|
|
21145
|
+
actions: {
|
|
21146
|
+
id: string;
|
|
21147
|
+
label: string;
|
|
21148
|
+
description: string;
|
|
21149
|
+
}[];
|
|
21150
|
+
limitation?: string;
|
|
21151
|
+
version: string;
|
|
21152
|
+
}
|
|
21153
|
+
| {
|
|
21154
|
+
/** Format: uuid */
|
|
21155
|
+
returnId: string;
|
|
21156
|
+
/** @constant */
|
|
21157
|
+
success: false;
|
|
21158
|
+
error: string;
|
|
21159
|
+
}
|
|
21160
|
+
)[];
|
|
21161
|
+
};
|
|
21162
|
+
links: {
|
|
21163
|
+
[key: string]: string;
|
|
21164
|
+
};
|
|
21165
|
+
warnings: string[];
|
|
21166
|
+
recommendations: string[];
|
|
21167
|
+
};
|
|
19895
21168
|
};
|
|
19896
21169
|
};
|
|
19897
|
-
/** @description
|
|
21170
|
+
/** @description Invalid request, conflicting operations, singular arguments or a batch exceeding the endpoint limit. */
|
|
19898
21171
|
400: {
|
|
19899
21172
|
headers: {
|
|
19900
21173
|
[name: string]: unknown;
|
|
19901
21174
|
};
|
|
19902
21175
|
content?: never;
|
|
19903
21176
|
};
|
|
19904
|
-
/** @description
|
|
21177
|
+
/** @description Missing or invalid credentials. */
|
|
19905
21178
|
401: {
|
|
19906
21179
|
headers: {
|
|
19907
21180
|
[name: string]: unknown;
|
|
19908
21181
|
};
|
|
19909
21182
|
content?: never;
|
|
19910
21183
|
};
|
|
19911
|
-
/** @description
|
|
21184
|
+
/** @description Missing scope, organization mismatch, or a target outside the caller's assigned stores and markets. */
|
|
19912
21185
|
403: {
|
|
19913
21186
|
headers: {
|
|
19914
21187
|
[name: string]: unknown;
|
|
19915
21188
|
};
|
|
19916
21189
|
content?: never;
|
|
19917
21190
|
};
|
|
19918
|
-
/** @description
|
|
19919
|
-
|
|
21191
|
+
/** @description Rate limit exceeded. */
|
|
21192
|
+
429: {
|
|
21193
|
+
headers: {
|
|
21194
|
+
[name: string]: unknown;
|
|
21195
|
+
};
|
|
21196
|
+
content?: never;
|
|
21197
|
+
};
|
|
21198
|
+
/** @description Service unavailable. Retry a submission with the same requestId and unchanged operations. */
|
|
21199
|
+
503: {
|
|
19920
21200
|
headers: {
|
|
19921
21201
|
[name: string]: unknown;
|
|
19922
21202
|
};
|
|
@@ -19924,83 +21204,117 @@ interface operations {
|
|
|
19924
21204
|
};
|
|
19925
21205
|
};
|
|
19926
21206
|
};
|
|
19927
|
-
|
|
21207
|
+
post_v1_returns_actions: {
|
|
19928
21208
|
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
|
-
};
|
|
21209
|
+
query?: never;
|
|
19933
21210
|
header?: never;
|
|
19934
|
-
path
|
|
19935
|
-
promotionId: string;
|
|
19936
|
-
};
|
|
21211
|
+
path?: never;
|
|
19937
21212
|
cookie?: never;
|
|
19938
21213
|
};
|
|
19939
21214
|
requestBody: {
|
|
19940
21215
|
content: {
|
|
19941
|
-
/**
|
|
19942
|
-
* @example {
|
|
19943
|
-
* "marketplace": "shopee"
|
|
19944
|
-
* }
|
|
19945
|
-
*/
|
|
19946
21216
|
"application/json": {
|
|
21217
|
+
/** Format: uuid */
|
|
21218
|
+
requestId: string;
|
|
21219
|
+
operations: {
|
|
21220
|
+
/** Format: uuid */
|
|
21221
|
+
returnId: string;
|
|
21222
|
+
actionId: string;
|
|
21223
|
+
version: string;
|
|
21224
|
+
}[];
|
|
19947
21225
|
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
21226
|
};
|
|
19963
21227
|
};
|
|
19964
|
-
};
|
|
19965
|
-
responses: {
|
|
19966
|
-
/** @description
|
|
19967
|
-
202: {
|
|
21228
|
+
};
|
|
21229
|
+
responses: {
|
|
21230
|
+
/** @description Decisions queued. Inspect every job; acceptance does not mean success. */
|
|
21231
|
+
202: {
|
|
21232
|
+
headers: {
|
|
21233
|
+
[name: string]: unknown;
|
|
21234
|
+
};
|
|
21235
|
+
content: {
|
|
21236
|
+
"application/json": {
|
|
21237
|
+
ok: boolean;
|
|
21238
|
+
apiVersion: string;
|
|
21239
|
+
/** Format: uuid */
|
|
21240
|
+
operationId: string;
|
|
21241
|
+
/** @enum {string} */
|
|
21242
|
+
status: "accepted";
|
|
21243
|
+
data: {
|
|
21244
|
+
success: boolean;
|
|
21245
|
+
returnIds: string[];
|
|
21246
|
+
jobIds: string[];
|
|
21247
|
+
succeededCount: number;
|
|
21248
|
+
failedCount: number;
|
|
21249
|
+
pendingCount: number;
|
|
21250
|
+
results: {
|
|
21251
|
+
/** Format: uuid */
|
|
21252
|
+
returnId: string;
|
|
21253
|
+
/** Format: uuid */
|
|
21254
|
+
jobId: string;
|
|
21255
|
+
success: boolean;
|
|
21256
|
+
/** @enum {string} */
|
|
21257
|
+
status:
|
|
21258
|
+
| "queued"
|
|
21259
|
+
| "running"
|
|
21260
|
+
| "submitting"
|
|
21261
|
+
| "succeeded"
|
|
21262
|
+
| "failed"
|
|
21263
|
+
| "needs_review";
|
|
21264
|
+
evidence: {
|
|
21265
|
+
accepted?: boolean;
|
|
21266
|
+
verified?: boolean;
|
|
21267
|
+
statusBefore?: string | null;
|
|
21268
|
+
statusAfter?: string | null;
|
|
21269
|
+
} | null;
|
|
21270
|
+
error: string | null;
|
|
21271
|
+
}[];
|
|
21272
|
+
};
|
|
21273
|
+
links: {
|
|
21274
|
+
[key: string]: string;
|
|
21275
|
+
};
|
|
21276
|
+
warnings: string[];
|
|
21277
|
+
recommendations: string[];
|
|
21278
|
+
};
|
|
21279
|
+
};
|
|
21280
|
+
};
|
|
21281
|
+
/** @description Invalid request, conflicting operations, singular arguments or a batch exceeding the endpoint limit. */
|
|
21282
|
+
400: {
|
|
19968
21283
|
headers: {
|
|
19969
21284
|
[name: string]: unknown;
|
|
19970
21285
|
};
|
|
19971
|
-
content
|
|
19972
|
-
|
|
19973
|
-
|
|
19974
|
-
|
|
19975
|
-
|
|
19976
|
-
|
|
19977
|
-
marketplaces: string[];
|
|
19978
|
-
};
|
|
21286
|
+
content?: never;
|
|
21287
|
+
};
|
|
21288
|
+
/** @description Missing or invalid credentials. */
|
|
21289
|
+
401: {
|
|
21290
|
+
headers: {
|
|
21291
|
+
[name: string]: unknown;
|
|
19979
21292
|
};
|
|
21293
|
+
content?: never;
|
|
19980
21294
|
};
|
|
19981
|
-
/** @description
|
|
19982
|
-
|
|
21295
|
+
/** @description Missing scope, organization mismatch, or a target outside the caller's assigned stores and markets. */
|
|
21296
|
+
403: {
|
|
19983
21297
|
headers: {
|
|
19984
21298
|
[name: string]: unknown;
|
|
19985
21299
|
};
|
|
19986
21300
|
content?: never;
|
|
19987
21301
|
};
|
|
19988
|
-
/** @description
|
|
19989
|
-
|
|
21302
|
+
/** @description A conflicting decision is active or requestId was already used for a different operation. */
|
|
21303
|
+
409: {
|
|
19990
21304
|
headers: {
|
|
19991
21305
|
[name: string]: unknown;
|
|
19992
21306
|
};
|
|
19993
21307
|
content?: never;
|
|
19994
21308
|
};
|
|
19995
|
-
/** @description
|
|
19996
|
-
|
|
21309
|
+
/** @description Rate limit exceeded. */
|
|
21310
|
+
429: {
|
|
19997
21311
|
headers: {
|
|
19998
21312
|
[name: string]: unknown;
|
|
19999
21313
|
};
|
|
20000
21314
|
content?: never;
|
|
20001
21315
|
};
|
|
20002
|
-
/** @description
|
|
20003
|
-
|
|
21316
|
+
/** @description Service unavailable. Retry a submission with the same requestId and unchanged operations. */
|
|
21317
|
+
503: {
|
|
20004
21318
|
headers: {
|
|
20005
21319
|
[name: string]: unknown;
|
|
20006
21320
|
};
|
|
@@ -20008,17 +21322,13 @@ interface operations {
|
|
|
20008
21322
|
};
|
|
20009
21323
|
};
|
|
20010
21324
|
};
|
|
20011
|
-
|
|
21325
|
+
get_v1_returns_actions_jobs: {
|
|
20012
21326
|
parameters: {
|
|
20013
|
-
query
|
|
20014
|
-
/** @description
|
|
21327
|
+
query: {
|
|
21328
|
+
/** @description Repeat this query parameter for each UUID. Between 1 and 50 entries, deduplicated in first-requested order. */
|
|
21329
|
+
jobIds: string[];
|
|
21330
|
+
/** @description Session callers only. API keys resolve organization scope from the credential. */
|
|
20015
21331
|
organizationId?: string;
|
|
20016
|
-
marketplace?: string;
|
|
20017
|
-
accountId?: string;
|
|
20018
|
-
externalOrderId?: string;
|
|
20019
|
-
updatedSince?: string;
|
|
20020
|
-
cursor?: string;
|
|
20021
|
-
limit?: number;
|
|
20022
21332
|
};
|
|
20023
21333
|
header?: never;
|
|
20024
21334
|
path?: never;
|
|
@@ -20026,49 +21336,94 @@ interface operations {
|
|
|
20026
21336
|
};
|
|
20027
21337
|
requestBody?: never;
|
|
20028
21338
|
responses: {
|
|
20029
|
-
/** @description
|
|
21339
|
+
/** @description Request completed. Inspect data.success, per-target results and pendingCount for processing progress. */
|
|
20030
21340
|
200: {
|
|
20031
21341
|
headers: {
|
|
20032
21342
|
[name: string]: unknown;
|
|
20033
21343
|
};
|
|
20034
21344
|
content: {
|
|
20035
21345
|
"application/json": {
|
|
20036
|
-
ok
|
|
20037
|
-
/** @default developer_v1 */
|
|
21346
|
+
ok: boolean;
|
|
20038
21347
|
apiVersion: string;
|
|
21348
|
+
/** Format: uuid */
|
|
21349
|
+
operationId: string;
|
|
21350
|
+
/** @enum {string} */
|
|
21351
|
+
status: "completed";
|
|
21352
|
+
data: {
|
|
21353
|
+
success: boolean;
|
|
21354
|
+
returnIds: string[];
|
|
21355
|
+
jobIds: string[];
|
|
21356
|
+
succeededCount: number;
|
|
21357
|
+
failedCount: number;
|
|
21358
|
+
pendingCount: number;
|
|
21359
|
+
results: {
|
|
21360
|
+
/** Format: uuid */
|
|
21361
|
+
returnId: string;
|
|
21362
|
+
/** Format: uuid */
|
|
21363
|
+
jobId: string;
|
|
21364
|
+
success: boolean;
|
|
21365
|
+
/** @enum {string} */
|
|
21366
|
+
status:
|
|
21367
|
+
| "queued"
|
|
21368
|
+
| "running"
|
|
21369
|
+
| "submitting"
|
|
21370
|
+
| "succeeded"
|
|
21371
|
+
| "failed"
|
|
21372
|
+
| "needs_review";
|
|
21373
|
+
evidence: {
|
|
21374
|
+
accepted?: boolean;
|
|
21375
|
+
verified?: boolean;
|
|
21376
|
+
statusBefore?: string | null;
|
|
21377
|
+
statusAfter?: string | null;
|
|
21378
|
+
} | null;
|
|
21379
|
+
error: string | null;
|
|
21380
|
+
}[];
|
|
21381
|
+
};
|
|
21382
|
+
links: {
|
|
21383
|
+
[key: string]: string;
|
|
21384
|
+
};
|
|
21385
|
+
warnings: string[];
|
|
21386
|
+
recommendations: string[];
|
|
20039
21387
|
};
|
|
20040
21388
|
};
|
|
20041
21389
|
};
|
|
20042
|
-
/** @description
|
|
21390
|
+
/** @description Invalid request, conflicting operations, singular arguments or a batch exceeding the endpoint limit. */
|
|
20043
21391
|
400: {
|
|
20044
21392
|
headers: {
|
|
20045
21393
|
[name: string]: unknown;
|
|
20046
21394
|
};
|
|
20047
21395
|
content?: never;
|
|
20048
21396
|
};
|
|
20049
|
-
/** @description
|
|
21397
|
+
/** @description Missing or invalid credentials. */
|
|
20050
21398
|
401: {
|
|
20051
21399
|
headers: {
|
|
20052
21400
|
[name: string]: unknown;
|
|
20053
21401
|
};
|
|
20054
21402
|
content?: never;
|
|
20055
21403
|
};
|
|
20056
|
-
/** @description
|
|
20057
|
-
|
|
21404
|
+
/** @description Missing scope, organization mismatch, or a target outside the caller's assigned stores and markets. */
|
|
21405
|
+
403: {
|
|
20058
21406
|
headers: {
|
|
20059
21407
|
[name: string]: unknown;
|
|
20060
21408
|
};
|
|
20061
21409
|
content?: never;
|
|
20062
21410
|
};
|
|
20063
|
-
/** @description
|
|
20064
|
-
|
|
21411
|
+
/** @description A requested return action job was not found in this organization. */
|
|
21412
|
+
404: {
|
|
20065
21413
|
headers: {
|
|
20066
21414
|
[name: string]: unknown;
|
|
20067
21415
|
};
|
|
20068
21416
|
content?: never;
|
|
20069
21417
|
};
|
|
20070
|
-
/** @description
|
|
20071
|
-
|
|
21418
|
+
/** @description Rate limit exceeded. */
|
|
21419
|
+
429: {
|
|
21420
|
+
headers: {
|
|
21421
|
+
[name: string]: unknown;
|
|
21422
|
+
};
|
|
21423
|
+
content?: never;
|
|
21424
|
+
};
|
|
21425
|
+
/** @description Service unavailable. Retry a submission with the same requestId and unchanged operations. */
|
|
21426
|
+
503: {
|
|
20072
21427
|
headers: {
|
|
20073
21428
|
[name: string]: unknown;
|
|
20074
21429
|
};
|
|
@@ -20076,70 +21431,91 @@ interface operations {
|
|
|
20076
21431
|
};
|
|
20077
21432
|
};
|
|
20078
21433
|
};
|
|
20079
|
-
|
|
21434
|
+
get_v1_returns_orders: {
|
|
20080
21435
|
parameters: {
|
|
20081
|
-
query
|
|
20082
|
-
/** @description
|
|
21436
|
+
query: {
|
|
21437
|
+
/** @description Repeat this query parameter for each UUID. Between 1 and 50 entries, deduplicated in first-requested order. */
|
|
21438
|
+
orderIds: string[];
|
|
21439
|
+
/** @description Session callers only. API keys resolve organization scope from the credential. */
|
|
20083
21440
|
organizationId?: string;
|
|
20084
21441
|
};
|
|
20085
21442
|
header?: never;
|
|
20086
|
-
path
|
|
20087
|
-
returnId: string;
|
|
20088
|
-
};
|
|
21443
|
+
path?: never;
|
|
20089
21444
|
cookie?: never;
|
|
20090
21445
|
};
|
|
20091
21446
|
requestBody?: never;
|
|
20092
21447
|
responses: {
|
|
20093
|
-
/** @description
|
|
21448
|
+
/** @description Request completed. Inspect data.success, per-target results and pendingCount for processing progress. */
|
|
20094
21449
|
200: {
|
|
20095
21450
|
headers: {
|
|
20096
21451
|
[name: string]: unknown;
|
|
20097
21452
|
};
|
|
20098
21453
|
content: {
|
|
20099
21454
|
"application/json": {
|
|
20100
|
-
ok
|
|
20101
|
-
/** @default developer_v1 */
|
|
21455
|
+
ok: boolean;
|
|
20102
21456
|
apiVersion: string;
|
|
21457
|
+
/** Format: uuid */
|
|
21458
|
+
operationId: string;
|
|
21459
|
+
/** @enum {string} */
|
|
21460
|
+
status: "completed";
|
|
21461
|
+
data: {
|
|
21462
|
+
success: boolean;
|
|
21463
|
+
orderIds: string[];
|
|
21464
|
+
succeededCount: number;
|
|
21465
|
+
failedCount: number;
|
|
21466
|
+
results: {
|
|
21467
|
+
/** Format: uuid */
|
|
21468
|
+
orderId: string;
|
|
21469
|
+
/** @constant */
|
|
21470
|
+
success: true;
|
|
21471
|
+
returns: {
|
|
21472
|
+
/** Format: uuid */
|
|
21473
|
+
returnId: string;
|
|
21474
|
+
marketplace: string;
|
|
21475
|
+
marketplaceStatus: string | null;
|
|
21476
|
+
externalReturnId: string;
|
|
21477
|
+
processingEligible: boolean;
|
|
21478
|
+
}[];
|
|
21479
|
+
}[];
|
|
21480
|
+
};
|
|
21481
|
+
links: {
|
|
21482
|
+
[key: string]: string;
|
|
21483
|
+
};
|
|
21484
|
+
warnings: string[];
|
|
21485
|
+
recommendations: string[];
|
|
20103
21486
|
};
|
|
20104
21487
|
};
|
|
20105
21488
|
};
|
|
20106
|
-
/** @description
|
|
21489
|
+
/** @description Invalid request, conflicting operations, singular arguments or a batch exceeding the endpoint limit. */
|
|
20107
21490
|
400: {
|
|
20108
21491
|
headers: {
|
|
20109
21492
|
[name: string]: unknown;
|
|
20110
21493
|
};
|
|
20111
21494
|
content?: never;
|
|
20112
21495
|
};
|
|
20113
|
-
/** @description
|
|
21496
|
+
/** @description Missing or invalid credentials. */
|
|
20114
21497
|
401: {
|
|
20115
21498
|
headers: {
|
|
20116
21499
|
[name: string]: unknown;
|
|
20117
21500
|
};
|
|
20118
21501
|
content?: never;
|
|
20119
21502
|
};
|
|
20120
|
-
/** @description
|
|
20121
|
-
402: {
|
|
20122
|
-
headers: {
|
|
20123
|
-
[name: string]: unknown;
|
|
20124
|
-
};
|
|
20125
|
-
content?: never;
|
|
20126
|
-
};
|
|
20127
|
-
/** @description Forbidden */
|
|
21503
|
+
/** @description Missing scope, organization mismatch, or a target outside the caller's assigned stores and markets. */
|
|
20128
21504
|
403: {
|
|
20129
21505
|
headers: {
|
|
20130
21506
|
[name: string]: unknown;
|
|
20131
21507
|
};
|
|
20132
21508
|
content?: never;
|
|
20133
21509
|
};
|
|
20134
|
-
/** @description
|
|
20135
|
-
|
|
21510
|
+
/** @description Rate limit exceeded. */
|
|
21511
|
+
429: {
|
|
20136
21512
|
headers: {
|
|
20137
21513
|
[name: string]: unknown;
|
|
20138
21514
|
};
|
|
20139
21515
|
content?: never;
|
|
20140
21516
|
};
|
|
20141
|
-
/** @description
|
|
20142
|
-
|
|
21517
|
+
/** @description Service unavailable. Retry a submission with the same requestId and unchanged operations. */
|
|
21518
|
+
503: {
|
|
20143
21519
|
headers: {
|
|
20144
21520
|
[name: string]: unknown;
|
|
20145
21521
|
};
|
|
@@ -21722,7 +23098,11 @@ interface operations {
|
|
|
21722
23098
|
[key: string]: unknown;
|
|
21723
23099
|
};
|
|
21724
23100
|
/** @enum {string} */
|
|
21725
|
-
status:
|
|
23101
|
+
status:
|
|
23102
|
+
| "ready_for_complete"
|
|
23103
|
+
| "complete_in_progress"
|
|
23104
|
+
| "completed"
|
|
23105
|
+
| "canceled";
|
|
21726
23106
|
currency: string;
|
|
21727
23107
|
totals: {
|
|
21728
23108
|
[key: string]: unknown;
|
|
@@ -21838,7 +23218,11 @@ interface operations {
|
|
|
21838
23218
|
[key: string]: unknown;
|
|
21839
23219
|
};
|
|
21840
23220
|
/** @enum {string} */
|
|
21841
|
-
status:
|
|
23221
|
+
status:
|
|
23222
|
+
| "ready_for_complete"
|
|
23223
|
+
| "complete_in_progress"
|
|
23224
|
+
| "completed"
|
|
23225
|
+
| "canceled";
|
|
21842
23226
|
currency: string;
|
|
21843
23227
|
totals: {
|
|
21844
23228
|
[key: string]: unknown;
|
|
@@ -21971,7 +23355,11 @@ interface operations {
|
|
|
21971
23355
|
[key: string]: unknown;
|
|
21972
23356
|
};
|
|
21973
23357
|
/** @enum {string} */
|
|
21974
|
-
status:
|
|
23358
|
+
status:
|
|
23359
|
+
| "ready_for_complete"
|
|
23360
|
+
| "complete_in_progress"
|
|
23361
|
+
| "completed"
|
|
23362
|
+
| "canceled";
|
|
21975
23363
|
currency: string;
|
|
21976
23364
|
totals: {
|
|
21977
23365
|
[key: string]: unknown;
|
|
@@ -22118,7 +23506,11 @@ interface operations {
|
|
|
22118
23506
|
[key: string]: unknown;
|
|
22119
23507
|
};
|
|
22120
23508
|
/** @enum {string} */
|
|
22121
|
-
status:
|
|
23509
|
+
status:
|
|
23510
|
+
| "ready_for_complete"
|
|
23511
|
+
| "complete_in_progress"
|
|
23512
|
+
| "completed"
|
|
23513
|
+
| "canceled";
|
|
22122
23514
|
currency: string;
|
|
22123
23515
|
totals: {
|
|
22124
23516
|
[key: string]: unknown;
|
|
@@ -22230,7 +23622,11 @@ interface operations {
|
|
|
22230
23622
|
[key: string]: unknown;
|
|
22231
23623
|
};
|
|
22232
23624
|
/** @enum {string} */
|
|
22233
|
-
status:
|
|
23625
|
+
status:
|
|
23626
|
+
| "ready_for_complete"
|
|
23627
|
+
| "complete_in_progress"
|
|
23628
|
+
| "completed"
|
|
23629
|
+
| "canceled";
|
|
22234
23630
|
currency: string;
|
|
22235
23631
|
totals: {
|
|
22236
23632
|
[key: string]: unknown;
|
|
@@ -22351,7 +23747,11 @@ interface operations {
|
|
|
22351
23747
|
[key: string]: unknown;
|
|
22352
23748
|
};
|
|
22353
23749
|
/** @enum {string} */
|
|
22354
|
-
status:
|
|
23750
|
+
status:
|
|
23751
|
+
| "ready_for_complete"
|
|
23752
|
+
| "complete_in_progress"
|
|
23753
|
+
| "completed"
|
|
23754
|
+
| "canceled";
|
|
22355
23755
|
currency: string;
|
|
22356
23756
|
totals: {
|
|
22357
23757
|
[key: string]: unknown;
|
|
@@ -22416,7 +23816,11 @@ interface operations {
|
|
|
22416
23816
|
[key: string]: unknown;
|
|
22417
23817
|
};
|
|
22418
23818
|
/** @enum {string} */
|
|
22419
|
-
status:
|
|
23819
|
+
status:
|
|
23820
|
+
| "ready_for_complete"
|
|
23821
|
+
| "complete_in_progress"
|
|
23822
|
+
| "completed"
|
|
23823
|
+
| "canceled";
|
|
22420
23824
|
currency: string;
|
|
22421
23825
|
totals: {
|
|
22422
23826
|
[key: string]: unknown;
|
|
@@ -23890,6 +25294,58 @@ declare class AopClient {
|
|
|
23890
25294
|
*/
|
|
23891
25295
|
retry(request: OperationBody<operations["post_v1_aop_retry"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_aop_retry"]>>;
|
|
23892
25296
|
}
|
|
25297
|
+
declare class ApiClient {
|
|
25298
|
+
protected readonly _http: OmniHttp;
|
|
25299
|
+
constructor(_http: OmniHttp);
|
|
25300
|
+
/**
|
|
25301
|
+
* Discover a published merchant agent
|
|
25302
|
+
*
|
|
25303
|
+
* A2A 1.0 Agent Card for any configured agent published to a customer deployment. Private model settings, prompts and publisher identity are excluded.
|
|
25304
|
+
*
|
|
25305
|
+
* `GET /api/embed/{deploymentId}/.well-known/agent-card.json`
|
|
25306
|
+
*/
|
|
25307
|
+
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"]>>;
|
|
25308
|
+
/**
|
|
25309
|
+
* Call a merchant agent using A2A
|
|
25310
|
+
*
|
|
25311
|
+
* Official A2A 1.0 JSON-RPC SendMessage, GetTask and CancelTask.
|
|
25312
|
+
|
|
25313
|
+
### Authentication
|
|
25314
|
+
|
|
25315
|
+
Uses the existing customer JWT from /api/embed/{deploymentId}/session; send the same Origin when creating and using the session.
|
|
25316
|
+
|
|
25317
|
+
### Messages
|
|
25318
|
+
|
|
25319
|
+
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.
|
|
25320
|
+
|
|
25321
|
+
Bot verification and storefront protection apply. Payment proofs belong in the checkout completion endpoint, outside model messages.
|
|
25322
|
+
|
|
25323
|
+
### Signed offers and buyer agents
|
|
25324
|
+
|
|
25325
|
+
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
|
|
25326
|
+
*
|
|
25327
|
+
* `POST /api/embed/{deploymentId}/a2a`
|
|
25328
|
+
*/
|
|
25329
|
+
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"]>>;
|
|
25330
|
+
/**
|
|
25331
|
+
* Manage customer-owned purchase offers
|
|
25332
|
+
*
|
|
25333
|
+
* ### Operations
|
|
25334
|
+
|
|
25335
|
+
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.
|
|
25336
|
+
|
|
25337
|
+
### Results and safeguards
|
|
25338
|
+
|
|
25339
|
+
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.
|
|
25340
|
+
|
|
25341
|
+
### Payment
|
|
25342
|
+
|
|
25343
|
+
Completion reuses the existing Stripe ACP or x402 rail. Hosted card checkout requires this org
|
|
25344
|
+
*
|
|
25345
|
+
* `POST /api/embed/{deploymentId}/checkout-sessions/{operation}`
|
|
25346
|
+
*/
|
|
25347
|
+
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"]>>;
|
|
25348
|
+
}
|
|
23893
25349
|
declare class BrandKitsClient {
|
|
23894
25350
|
protected readonly _http: OmniHttp;
|
|
23895
25351
|
constructor(_http: OmniHttp);
|
|
@@ -24084,7 +25540,7 @@ declare class CheckoutSessionsClient {
|
|
|
24084
25540
|
/**
|
|
24085
25541
|
* Complete Agentic Checkout Session
|
|
24086
25542
|
*
|
|
24087
|
-
* Settle the selected rail and create a native `agentic` order.
|
|
25543
|
+
* 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
25544
|
*
|
|
24089
25545
|
* `POST /api/v1/checkout-sessions/{sessionId}/complete`
|
|
24090
25546
|
*/
|
|
@@ -24449,6 +25905,68 @@ declare class OrdersClient {
|
|
|
24449
25905
|
* `POST /api/v1/orders/{orderId}/actions`
|
|
24450
25906
|
*/
|
|
24451
25907
|
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"]>>;
|
|
25908
|
+
/**
|
|
25909
|
+
* Check Order Action Options
|
|
25910
|
+
*
|
|
25911
|
+
* ### Authorization
|
|
25912
|
+
|
|
25913
|
+
Requires orders:write.
|
|
25914
|
+
|
|
25915
|
+
### Choices
|
|
25916
|
+
|
|
25917
|
+
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.
|
|
25918
|
+
*
|
|
25919
|
+
* `GET /api/v1/orders/actions`
|
|
25920
|
+
*/
|
|
25921
|
+
listBatchActionOptions(request: OperationQuery<operations["get_v1_orders_actions"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_orders_actions"]>>;
|
|
25922
|
+
/**
|
|
25923
|
+
* Process Order Actions
|
|
25924
|
+
*
|
|
25925
|
+
* ### Authorization
|
|
25926
|
+
|
|
25927
|
+
Requires orders:write.
|
|
25928
|
+
|
|
25929
|
+
### Batch submission
|
|
25930
|
+
|
|
25931
|
+
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.
|
|
25932
|
+
|
|
25933
|
+
### Recovery and completion
|
|
25934
|
+
|
|
25935
|
+
Retain requestId and unchanged operations for retr
|
|
25936
|
+
*
|
|
25937
|
+
* `POST /api/v1/orders/actions`
|
|
25938
|
+
*/
|
|
25939
|
+
processActions(request: OperationBody<operations["post_v1_orders_actions"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_orders_actions"]>>;
|
|
25940
|
+
/**
|
|
25941
|
+
* Get Order Action Jobs
|
|
25942
|
+
*
|
|
25943
|
+
* ### Authorization
|
|
25944
|
+
|
|
25945
|
+
Requires orders:read.
|
|
25946
|
+
|
|
25947
|
+
### Outcomes and labels
|
|
25948
|
+
|
|
25949
|
+
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.
|
|
25950
|
+
*
|
|
25951
|
+
* `GET /api/v1/orders/actions/jobs`
|
|
25952
|
+
*/
|
|
25953
|
+
getActionJobs(request: OperationQuery<operations["get_v1_orders_actions_jobs"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_orders_actions_jobs"]>>;
|
|
25954
|
+
/**
|
|
25955
|
+
* Create Picking List
|
|
25956
|
+
*
|
|
25957
|
+
* ### Authorization
|
|
25958
|
+
|
|
25959
|
+
Requires orders:read. API keys resolve organization scope from their credential; session callers include organizationId.
|
|
25960
|
+
|
|
25961
|
+
### PDF output
|
|
25962
|
+
|
|
25963
|
+
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.
|
|
25964
|
+
|
|
25965
|
+
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
|
|
25966
|
+
*
|
|
25967
|
+
* `POST /api/v1/orders/picking-list`
|
|
25968
|
+
*/
|
|
25969
|
+
createPickingList(request: OperationBody<operations["post_v1_orders_picking_list"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_orders_picking_list"]>>;
|
|
24452
25970
|
}
|
|
24453
25971
|
declare class OrganizationsClient {
|
|
24454
25972
|
protected readonly _http: OmniHttp;
|
|
@@ -24910,6 +26428,60 @@ declare class ReturnsClient {
|
|
|
24910
26428
|
* `GET /api/v1/returns/{returnId}`
|
|
24911
26429
|
*/
|
|
24912
26430
|
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"]>>;
|
|
26431
|
+
/**
|
|
26432
|
+
* Check Return Actions
|
|
26433
|
+
*
|
|
26434
|
+
* ### Authorization
|
|
26435
|
+
|
|
26436
|
+
Requires orders:write.
|
|
26437
|
+
|
|
26438
|
+
### Eligibility
|
|
26439
|
+
|
|
26440
|
+
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,
|
|
26441
|
+
*
|
|
26442
|
+
* `GET /api/v1/returns/actions`
|
|
26443
|
+
*/
|
|
26444
|
+
listActions(request: OperationQuery<operations["get_v1_returns_actions"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_returns_actions"]>>;
|
|
26445
|
+
/**
|
|
26446
|
+
* Process Returns
|
|
26447
|
+
*
|
|
26448
|
+
* ### Authorization
|
|
26449
|
+
|
|
26450
|
+
Requires orders:write.
|
|
26451
|
+
|
|
26452
|
+
### Submit decisions
|
|
26453
|
+
|
|
26454
|
+
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
|
|
26455
|
+
*
|
|
26456
|
+
* `POST /api/v1/returns/actions`
|
|
26457
|
+
*/
|
|
26458
|
+
process(request: OperationBody<operations["post_v1_returns_actions"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_returns_actions"]>>;
|
|
26459
|
+
/**
|
|
26460
|
+
* Get Return Action Jobs
|
|
26461
|
+
*
|
|
26462
|
+
* ### Authorization
|
|
26463
|
+
|
|
26464
|
+
Requires orders:read.
|
|
26465
|
+
|
|
26466
|
+
### Job outcomes
|
|
26467
|
+
|
|
26468
|
+
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.
|
|
26469
|
+
*
|
|
26470
|
+
* `GET /api/v1/returns/actions/jobs`
|
|
26471
|
+
*/
|
|
26472
|
+
getActionJobs(request: OperationQuery<operations["get_v1_returns_actions_jobs"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_returns_actions_jobs"]>>;
|
|
26473
|
+
/**
|
|
26474
|
+
* Get Order Returns
|
|
26475
|
+
*
|
|
26476
|
+
* Requires orders:read. Read stored return requests for 1–50 order UUIDs using repeated orderIds query parameters.
|
|
26477
|
+
|
|
26478
|
+
### Return identity
|
|
26479
|
+
|
|
26480
|
+
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.
|
|
26481
|
+
*
|
|
26482
|
+
* `GET /api/v1/returns/orders`
|
|
26483
|
+
*/
|
|
26484
|
+
listForOrders(request: OperationQuery<operations["get_v1_returns_orders"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_returns_orders"]>>;
|
|
24913
26485
|
}
|
|
24914
26486
|
declare class ReviewsClient {
|
|
24915
26487
|
protected readonly _http: OmniHttp;
|
|
@@ -25168,6 +26740,7 @@ declare class OmniGeneratedClient {
|
|
|
25168
26740
|
readonly agents: AgentsClient;
|
|
25169
26741
|
readonly analytics: AnalyticsClient;
|
|
25170
26742
|
readonly aop: AopClient;
|
|
26743
|
+
readonly api: ApiClient;
|
|
25171
26744
|
readonly brandKits: BrandKitsClient;
|
|
25172
26745
|
readonly brandsgateway: BrandsgatewayClient;
|
|
25173
26746
|
readonly campaigns: CampaignsClient;
|
|
@@ -25208,6 +26781,7 @@ type OmniResources = {
|
|
|
25208
26781
|
agents: AgentsClient;
|
|
25209
26782
|
analytics: AnalyticsClient;
|
|
25210
26783
|
aop: AopClient;
|
|
26784
|
+
api: ApiClient;
|
|
25211
26785
|
brandKits: BrandKitsClient;
|
|
25212
26786
|
brandsgateway: BrandsgatewayClient;
|
|
25213
26787
|
campaigns: CampaignsClient;
|
|
@@ -25285,7 +26859,7 @@ declare function constructEvent(payload: string | Uint8Array, headers: WebhookHe
|
|
|
25285
26859
|
toleranceInSeconds?: number;
|
|
25286
26860
|
}): Promise<ConstructedWebhookEvent>;
|
|
25287
26861
|
|
|
25288
|
-
declare const SDK_VERSION = "0.
|
|
26862
|
+
declare const SDK_VERSION = "0.18.0";
|
|
25289
26863
|
|
|
25290
26864
|
type ProductCreatedWebhookEvent = components["schemas"]["ProductCreatedWebhookEvent"];
|
|
25291
26865
|
type ProductUpdatedWebhookEvent = components["schemas"]["ProductUpdatedWebhookEvent"];
|