@ratio-mcp/dev-server 1.5.1 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +0 -0
- package/dist/schemas/app-distribution.json +36 -0
- package/dist/schemas/customers.json +26 -0
- package/dist/schemas/discounts.json +81 -0
- package/dist/schemas/draft_orders.json +112 -0
- package/dist/schemas/loyalty.json +147 -0
- package/dist/schemas/oauth.json +71 -0
- package/dist/schemas/orders.json +601 -106
- package/dist/schemas/product_reviews.json +45 -0
- package/dist/schemas/products.json +405 -122
- package/dist/schemas/tags.json +98 -0
- package/dist/schemas/variants.json +112 -0
- package/dist/schemas/webhooks.json +148 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +39 -5
- package/dist/server.js.map +1 -1
- package/dist/services/app-state-sync.d.ts +34 -0
- package/dist/services/app-state-sync.d.ts.map +1 -0
- package/dist/services/app-state-sync.js +85 -0
- package/dist/services/app-state-sync.js.map +1 -0
- package/dist/services/elicitation.d.ts +25 -0
- package/dist/services/elicitation.d.ts.map +1 -0
- package/dist/services/elicitation.js +101 -0
- package/dist/services/elicitation.js.map +1 -0
- package/dist/services/flow-profiles.d.ts +46 -0
- package/dist/services/flow-profiles.d.ts.map +1 -0
- package/dist/services/flow-profiles.js +100 -0
- package/dist/services/flow-profiles.js.map +1 -0
- package/dist/services/questionnaire.d.ts +89 -0
- package/dist/services/questionnaire.d.ts.map +1 -0
- package/dist/services/questionnaire.js +167 -0
- package/dist/services/questionnaire.js.map +1 -0
- package/dist/services/session-state.d.ts +17 -0
- package/dist/services/session-state.d.ts.map +1 -1
- package/dist/services/session-state.js +26 -1
- package/dist/services/session-state.js.map +1 -1
- package/dist/services/tool-guard.d.ts +15 -18
- package/dist/services/tool-guard.d.ts.map +1 -1
- package/dist/services/tool-guard.js +150 -97
- package/dist/services/tool-guard.js.map +1 -1
- package/dist/tools/app-management.d.ts.map +1 -1
- package/dist/tools/app-management.js +181 -33
- package/dist/tools/app-management.js.map +1 -1
- package/dist/tools/gather-requirements.d.ts.map +1 -1
- package/dist/tools/gather-requirements.js +5 -3
- package/dist/tools/gather-requirements.js.map +1 -1
- package/dist/tools/get-status.d.ts.map +1 -1
- package/dist/tools/get-status.js +45 -34
- package/dist/tools/get-status.js.map +1 -1
- package/dist/tools/index.js +1 -1
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/lifecycle.d.ts.map +1 -1
- package/dist/tools/lifecycle.js +6 -3
- package/dist/tools/lifecycle.js.map +1 -1
- package/dist/tools/reference-data.d.ts +16 -0
- package/dist/tools/reference-data.d.ts.map +1 -1
- package/dist/tools/reference-data.js +12 -8
- package/dist/tools/reference-data.js.map +1 -1
- package/dist/tools/requirements.d.ts.map +1 -1
- package/dist/tools/requirements.js +17 -9
- package/dist/tools/requirements.js.map +1 -1
- package/dist/tools/submission.d.ts.map +1 -1
- package/dist/tools/submission.js +50 -13
- package/dist/tools/submission.js.map +1 -1
- package/dist/tools/webhooks.d.ts.map +1 -1
- package/dist/tools/webhooks.js +3 -1
- package/dist/tools/webhooks.js.map +1 -1
- package/dist/utils/logger.d.ts +3 -2
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +19 -10
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/schema-resources.d.ts +8 -0
- package/dist/utils/schema-resources.d.ts.map +1 -0
- package/dist/utils/schema-resources.js +25 -0
- package/dist/utils/schema-resources.js.map +1 -0
- package/package.json +12 -13
package/dist/schemas/orders.json
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"resource": "orders",
|
|
3
|
-
"base_url": "https://gkx.gokwik.co/aes",
|
|
4
3
|
"auth": {
|
|
5
4
|
"type": "bearer",
|
|
6
5
|
"header": "Authorization",
|
|
7
6
|
"format": "Bearer <access_token>"
|
|
8
7
|
},
|
|
8
|
+
"common_headers": {
|
|
9
|
+
"merchant-mid": "Merchant ID for filtering orders",
|
|
10
|
+
"Gk-Request-Id": "Request ID for tracing",
|
|
11
|
+
"Gk-Customer-Id": "Customer ID for authorization"
|
|
12
|
+
},
|
|
13
|
+
"_generated": "by scripts/sync-schemas.mjs from backend OpenAPI (x-required-scope). Do not hand-edit.",
|
|
9
14
|
"endpoints": [
|
|
10
15
|
{
|
|
11
16
|
"method": "GET",
|
|
@@ -13,155 +18,645 @@
|
|
|
13
18
|
"controller_order": 1,
|
|
14
19
|
"handler_name": "getOrders",
|
|
15
20
|
"required_scope": "read_orders",
|
|
16
|
-
"summary": "
|
|
17
|
-
"description": "Retrieve a paginated list of orders from the merchant's store. Supports filtering by status, financial status, fulfillment status, and search.",
|
|
21
|
+
"summary": "Get a list of orders.",
|
|
18
22
|
"query_params": [
|
|
19
|
-
{
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
{
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
{
|
|
24
|
+
"name": "limit",
|
|
25
|
+
"type": "number",
|
|
26
|
+
"required": false
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "page",
|
|
30
|
+
"type": "number",
|
|
31
|
+
"required": false
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "status",
|
|
35
|
+
"type": "string",
|
|
36
|
+
"required": false
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "fulfillment_status",
|
|
40
|
+
"type": "string",
|
|
41
|
+
"required": false
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "financial_status",
|
|
45
|
+
"type": "string",
|
|
46
|
+
"required": false
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "sort_field",
|
|
50
|
+
"type": "string",
|
|
51
|
+
"required": false
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"name": "sort_direction",
|
|
55
|
+
"type": "string",
|
|
56
|
+
"required": false,
|
|
57
|
+
"enum": [
|
|
58
|
+
"asc",
|
|
59
|
+
"desc"
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "search",
|
|
64
|
+
"type": "string",
|
|
65
|
+
"required": false
|
|
66
|
+
}
|
|
27
67
|
],
|
|
28
|
-
"request_body": null
|
|
29
|
-
"response_schema": "OrderListResponse"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"method": "GET",
|
|
33
|
-
"path": "/api/v1/orders/:id",
|
|
34
|
-
"controller_order": 2,
|
|
35
|
-
"handler_name": "getOrderById",
|
|
36
|
-
"required_scope": "read_orders",
|
|
37
|
-
"summary": "Get a single order by ID",
|
|
38
|
-
"description": "Retrieve the full details of a single order including line items, customer info, addresses, and payment status.",
|
|
39
|
-
"path_params": [
|
|
40
|
-
{ "name": "id", "type": "string", "required": true, "description": "The order ID" }
|
|
41
|
-
],
|
|
42
|
-
"request_body": null,
|
|
43
|
-
"response_schema": "Order"
|
|
68
|
+
"request_body": null
|
|
44
69
|
},
|
|
45
70
|
{
|
|
46
71
|
"method": "POST",
|
|
47
72
|
"path": "/api/v1/orders",
|
|
48
|
-
"controller_order":
|
|
73
|
+
"controller_order": 2,
|
|
49
74
|
"handler_name": "createOrder",
|
|
50
|
-
"required_scope": "
|
|
51
|
-
"summary": "Create a new order",
|
|
52
|
-
"description": "Create an order in the merchant's store.",
|
|
75
|
+
"required_scope": "order-create",
|
|
76
|
+
"summary": "Create a new order.",
|
|
53
77
|
"request_body": {
|
|
54
78
|
"content_type": "application/json",
|
|
55
79
|
"fields": [
|
|
56
|
-
{
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
{
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
80
|
+
{
|
|
81
|
+
"name": "draft_id",
|
|
82
|
+
"type": "string",
|
|
83
|
+
"required": false,
|
|
84
|
+
"description": "The draft order ID to convert to an order"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "order_id",
|
|
88
|
+
"type": "string",
|
|
89
|
+
"required": false,
|
|
90
|
+
"description": "The order ID order"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": "checkout_id",
|
|
94
|
+
"type": "number",
|
|
95
|
+
"required": false,
|
|
96
|
+
"description": "The checkout ID"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"name": "cart_token",
|
|
100
|
+
"type": "string",
|
|
101
|
+
"required": false,
|
|
102
|
+
"description": "The cart token"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"name": "email",
|
|
106
|
+
"type": "string",
|
|
107
|
+
"required": false,
|
|
108
|
+
"description": "The email of the customer"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"name": "phone",
|
|
112
|
+
"type": "string",
|
|
113
|
+
"required": false,
|
|
114
|
+
"description": "The phone of the customer"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"name": "user_id",
|
|
118
|
+
"type": "number",
|
|
119
|
+
"required": false,
|
|
120
|
+
"description": "The user ID"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"name": "customer_locale",
|
|
124
|
+
"type": "string",
|
|
125
|
+
"required": false,
|
|
126
|
+
"description": "The customer locale"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"name": "landing_site",
|
|
130
|
+
"type": "string",
|
|
131
|
+
"required": false,
|
|
132
|
+
"description": "The landing site"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"name": "landing_site_ref",
|
|
136
|
+
"type": "string",
|
|
137
|
+
"required": false,
|
|
138
|
+
"description": "The landing site reference"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"name": "referring_site",
|
|
142
|
+
"type": "string",
|
|
143
|
+
"required": false,
|
|
144
|
+
"description": "The referring site"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"name": "source_identifier",
|
|
148
|
+
"type": "string",
|
|
149
|
+
"required": false,
|
|
150
|
+
"description": "The source identifier"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"name": "source_name",
|
|
154
|
+
"type": "string",
|
|
155
|
+
"required": false,
|
|
156
|
+
"description": "The source name"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"name": "source_url",
|
|
160
|
+
"type": "string",
|
|
161
|
+
"required": false,
|
|
162
|
+
"description": "The source URL"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"name": "merchant_business_entity_id",
|
|
166
|
+
"type": "string",
|
|
167
|
+
"required": false,
|
|
168
|
+
"description": "The merchant business entity ID"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"name": "merchant_of_record_app_id",
|
|
172
|
+
"type": "number",
|
|
173
|
+
"required": false,
|
|
174
|
+
"description": "The merchant of record agent ID"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"name": "note_attributes",
|
|
178
|
+
"type": "object",
|
|
179
|
+
"required": false,
|
|
180
|
+
"description": "The note attributes of the order"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"name": "tags",
|
|
184
|
+
"type": "string",
|
|
185
|
+
"required": false,
|
|
186
|
+
"description": "The tags of the order"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"name": "tag_ids",
|
|
190
|
+
"type": "string[]",
|
|
191
|
+
"required": false,
|
|
192
|
+
"description": "Array of tag IDs to associate with the order"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"name": "payment_gateway_names",
|
|
196
|
+
"type": "string[]",
|
|
197
|
+
"required": true,
|
|
198
|
+
"description": "The payment gateway names"
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"name": "confirmed",
|
|
202
|
+
"type": "boolean",
|
|
203
|
+
"required": false,
|
|
204
|
+
"description": "Whether the order is confirmed (defaults to true)"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"name": "order_number",
|
|
208
|
+
"type": "object",
|
|
209
|
+
"required": false,
|
|
210
|
+
"description": "The order number (will be generated if not provided)"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"name": "fulfillment_status",
|
|
214
|
+
"type": "string",
|
|
215
|
+
"required": false,
|
|
216
|
+
"description": "The fulfillment status of the order (defaults to UNFULFILLED)",
|
|
217
|
+
"enum": [
|
|
218
|
+
"fulfilled",
|
|
219
|
+
"unfulfilled",
|
|
220
|
+
"partially_fulfilled",
|
|
221
|
+
"restocked",
|
|
222
|
+
"pending_fulfillment"
|
|
223
|
+
]
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"name": "status",
|
|
227
|
+
"type": "string",
|
|
228
|
+
"required": false,
|
|
229
|
+
"description": "The status of the order (defaults to OPEN)",
|
|
230
|
+
"enum": [
|
|
231
|
+
"open",
|
|
232
|
+
"closed",
|
|
233
|
+
"cancelled"
|
|
234
|
+
]
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"name": "financial_status",
|
|
238
|
+
"type": "string",
|
|
239
|
+
"required": true,
|
|
240
|
+
"description": "The financial status of the order",
|
|
241
|
+
"enum": [
|
|
242
|
+
"pending",
|
|
243
|
+
"paid",
|
|
244
|
+
"partially_paid",
|
|
245
|
+
"refunded",
|
|
246
|
+
"voided",
|
|
247
|
+
"partially_refunded",
|
|
248
|
+
"authorized"
|
|
249
|
+
]
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"name": "presentment_currency",
|
|
253
|
+
"type": "string",
|
|
254
|
+
"required": false,
|
|
255
|
+
"description": "The presentment currency"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"name": "customer",
|
|
259
|
+
"type": "string",
|
|
260
|
+
"required": false,
|
|
261
|
+
"description": "The customer object"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"name": "test",
|
|
265
|
+
"type": "boolean",
|
|
266
|
+
"required": true,
|
|
267
|
+
"description": "Whether the order is a test order"
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"name": "billing_address",
|
|
271
|
+
"type": "string",
|
|
272
|
+
"required": false,
|
|
273
|
+
"description": "The billing address"
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"name": "shipping_address",
|
|
277
|
+
"type": "string",
|
|
278
|
+
"required": false,
|
|
279
|
+
"description": "The shipping address"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"name": "discount_codes",
|
|
283
|
+
"type": "array",
|
|
284
|
+
"required": false,
|
|
285
|
+
"description": "The discount codes"
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"name": "discount_applications",
|
|
289
|
+
"type": "array",
|
|
290
|
+
"required": false,
|
|
291
|
+
"description": "The discount applications"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"name": "name",
|
|
295
|
+
"type": "string",
|
|
296
|
+
"required": false,
|
|
297
|
+
"description": "The name of the order (will be generated if not provided)"
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"name": "note",
|
|
301
|
+
"type": "string",
|
|
302
|
+
"required": false,
|
|
303
|
+
"description": "The note of the order"
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"name": "line_items",
|
|
307
|
+
"type": "array",
|
|
308
|
+
"required": true,
|
|
309
|
+
"description": "The line items of the order"
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"name": "subtotal_price",
|
|
313
|
+
"type": "string",
|
|
314
|
+
"required": false,
|
|
315
|
+
"description": "The subtotal price of the order"
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"name": "total_line_items_price",
|
|
319
|
+
"type": "string",
|
|
320
|
+
"required": false,
|
|
321
|
+
"description": "The total line items price of the order"
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"name": "total_line_items_price_set",
|
|
325
|
+
"type": "string",
|
|
326
|
+
"required": false,
|
|
327
|
+
"description": "The total line items price set of the order"
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"name": "total_outstanding",
|
|
331
|
+
"type": "number",
|
|
332
|
+
"required": false,
|
|
333
|
+
"description": "The total outstanding of the order"
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
"name": "total_weight",
|
|
337
|
+
"type": "number",
|
|
338
|
+
"required": false,
|
|
339
|
+
"description": "The total weight of the order in grams"
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
"name": "total_tip_received",
|
|
343
|
+
"type": "number",
|
|
344
|
+
"required": false,
|
|
345
|
+
"description": "The total tip received for the order"
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
"name": "current_total_discounts",
|
|
349
|
+
"type": "number",
|
|
350
|
+
"required": false,
|
|
351
|
+
"description": "The current total discounts of the order"
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"name": "total_discounts",
|
|
355
|
+
"type": "number",
|
|
356
|
+
"required": false,
|
|
357
|
+
"description": "The total discounts of the order"
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"name": "estimated_taxes",
|
|
361
|
+
"type": "boolean",
|
|
362
|
+
"required": false,
|
|
363
|
+
"description": "Whether taxes are estimated"
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
"name": "total_price",
|
|
367
|
+
"type": "number",
|
|
368
|
+
"required": false,
|
|
369
|
+
"description": "The total price of the order"
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
"name": "total_price_set",
|
|
373
|
+
"type": "string",
|
|
374
|
+
"required": false,
|
|
375
|
+
"description": "The total price set of the order"
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
"name": "subtotal_price_set",
|
|
379
|
+
"type": "string",
|
|
380
|
+
"required": false,
|
|
381
|
+
"description": "The subtotal price set of the order"
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
"name": "current_total_tax",
|
|
385
|
+
"type": "number",
|
|
386
|
+
"required": false,
|
|
387
|
+
"description": "The current total tax of the order"
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
"name": "current_total_tax_set",
|
|
391
|
+
"type": "string",
|
|
392
|
+
"required": false,
|
|
393
|
+
"description": "The current total tax set of the order"
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
"name": "total_tax_set",
|
|
397
|
+
"type": "string",
|
|
398
|
+
"required": false,
|
|
399
|
+
"description": "The total tax set of the order"
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"name": "taxes_included",
|
|
403
|
+
"type": "boolean",
|
|
404
|
+
"required": false,
|
|
405
|
+
"description": "Whether taxes are included"
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
"name": "tax_exempt",
|
|
409
|
+
"type": "boolean",
|
|
410
|
+
"required": false,
|
|
411
|
+
"description": "Whether the order is tax exempt"
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
"name": "tax_lines",
|
|
415
|
+
"type": "array",
|
|
416
|
+
"required": false,
|
|
417
|
+
"description": "The tax lines of the order"
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
"name": "total_tax",
|
|
421
|
+
"type": "number",
|
|
422
|
+
"required": false,
|
|
423
|
+
"description": "The total tax of the order"
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
"name": "duties_included",
|
|
427
|
+
"type": "boolean",
|
|
428
|
+
"required": false,
|
|
429
|
+
"description": "Whether duties are included in the order"
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
"name": "current_total_price_set",
|
|
433
|
+
"type": "string",
|
|
434
|
+
"required": false,
|
|
435
|
+
"description": "The current total price set of the order"
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
"name": "currency",
|
|
439
|
+
"type": "string",
|
|
440
|
+
"required": true,
|
|
441
|
+
"description": "The currency of the order"
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
"name": "payment_details",
|
|
445
|
+
"type": "string",
|
|
446
|
+
"required": false,
|
|
447
|
+
"description": "The payment details"
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
"name": "shipping_lines",
|
|
451
|
+
"type": "array",
|
|
452
|
+
"required": false,
|
|
453
|
+
"description": "The shipping lines of the order"
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
"name": "external_order_id",
|
|
457
|
+
"type": "string",
|
|
458
|
+
"required": false,
|
|
459
|
+
"description": "The external order ID"
|
|
460
|
+
}
|
|
68
461
|
]
|
|
69
|
-
}
|
|
70
|
-
|
|
462
|
+
}
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
"method": "GET",
|
|
466
|
+
"path": "/api/v1/orders/:id",
|
|
467
|
+
"controller_order": 3,
|
|
468
|
+
"handler_name": "getOrderById",
|
|
469
|
+
"required_scope": "read_orders",
|
|
470
|
+
"summary": "Get a single order by id.",
|
|
471
|
+
"path_params": [
|
|
472
|
+
{
|
|
473
|
+
"name": "id",
|
|
474
|
+
"type": "string",
|
|
475
|
+
"required": true
|
|
476
|
+
}
|
|
477
|
+
],
|
|
478
|
+
"request_body": null
|
|
71
479
|
},
|
|
72
480
|
{
|
|
73
481
|
"method": "PATCH",
|
|
74
482
|
"path": "/api/v1/orders/:id",
|
|
75
483
|
"controller_order": 4,
|
|
76
484
|
"handler_name": "updateOrder",
|
|
77
|
-
"required_scope": "
|
|
78
|
-
"summary": "Update an existing order",
|
|
79
|
-
"description": "Update order fields. Only provided fields are modified.",
|
|
485
|
+
"required_scope": "order-create",
|
|
486
|
+
"summary": "Update an existing order.",
|
|
80
487
|
"path_params": [
|
|
81
|
-
{
|
|
488
|
+
{
|
|
489
|
+
"name": "id",
|
|
490
|
+
"type": "string",
|
|
491
|
+
"required": true
|
|
492
|
+
}
|
|
82
493
|
],
|
|
83
494
|
"request_body": {
|
|
84
495
|
"content_type": "application/json",
|
|
85
496
|
"fields": [
|
|
86
|
-
{
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
{
|
|
93
|
-
|
|
94
|
-
|
|
497
|
+
{
|
|
498
|
+
"name": "buyer_accepts_marketing",
|
|
499
|
+
"type": "boolean",
|
|
500
|
+
"required": false,
|
|
501
|
+
"description": "Whether the buyer accepts marketing"
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
"name": "email",
|
|
505
|
+
"type": "string",
|
|
506
|
+
"required": false,
|
|
507
|
+
"description": "The email of the order"
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
"name": "phone",
|
|
511
|
+
"type": "string",
|
|
512
|
+
"required": false,
|
|
513
|
+
"description": "The phone of the order"
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
"name": "note",
|
|
517
|
+
"type": "string",
|
|
518
|
+
"required": false,
|
|
519
|
+
"description": "The note of the order"
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
"name": "tags",
|
|
523
|
+
"type": "string",
|
|
524
|
+
"required": false,
|
|
525
|
+
"description": "The tags of the order"
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
"name": "tag_ids",
|
|
529
|
+
"type": "string[]",
|
|
530
|
+
"required": false,
|
|
531
|
+
"description": "Array of tag IDs to associate with the order"
|
|
532
|
+
},
|
|
533
|
+
{
|
|
534
|
+
"name": "status",
|
|
535
|
+
"type": "string",
|
|
536
|
+
"required": false,
|
|
537
|
+
"description": "The status of the order",
|
|
538
|
+
"enum": [
|
|
539
|
+
"open",
|
|
540
|
+
"closed",
|
|
541
|
+
"cancelled"
|
|
542
|
+
]
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
"name": "financial_status",
|
|
546
|
+
"type": "string",
|
|
547
|
+
"required": false,
|
|
548
|
+
"description": "The financial status of the order",
|
|
549
|
+
"enum": [
|
|
550
|
+
"pending",
|
|
551
|
+
"authorized",
|
|
552
|
+
"partially_paid",
|
|
553
|
+
"paid",
|
|
554
|
+
"partially_refunded",
|
|
555
|
+
"refunded",
|
|
556
|
+
"voided"
|
|
557
|
+
]
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
"name": "fulfillment_status",
|
|
561
|
+
"type": "string",
|
|
562
|
+
"required": false,
|
|
563
|
+
"description": "The fulfillment status of the order",
|
|
564
|
+
"enum": [
|
|
565
|
+
"fulfilled",
|
|
566
|
+
"partial",
|
|
567
|
+
"partially_fulfilled",
|
|
568
|
+
"unfulfilled",
|
|
569
|
+
"restocked",
|
|
570
|
+
"pending",
|
|
571
|
+
"refunded",
|
|
572
|
+
"returned"
|
|
573
|
+
]
|
|
574
|
+
},
|
|
575
|
+
{
|
|
576
|
+
"name": "metafields",
|
|
577
|
+
"type": "array",
|
|
578
|
+
"required": false,
|
|
579
|
+
"description": "The metafields of the order"
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
"name": "shipping_address",
|
|
583
|
+
"type": "string",
|
|
584
|
+
"required": false,
|
|
585
|
+
"description": "The shipping address of the order"
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
"name": "billing_address",
|
|
589
|
+
"type": "string",
|
|
590
|
+
"required": false,
|
|
591
|
+
"description": "The billing address of the order"
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
"name": "customer",
|
|
595
|
+
"type": "string",
|
|
596
|
+
"required": false,
|
|
597
|
+
"description": "The customer information for the order"
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
"name": "total_outstanding",
|
|
601
|
+
"type": "object",
|
|
602
|
+
"required": false,
|
|
603
|
+
"description": "The total outstanding amount on the order"
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
"name": "line_items",
|
|
607
|
+
"type": "array",
|
|
608
|
+
"required": false,
|
|
609
|
+
"description": "The line items of the order. Can include existing items with updated quantities or new items. Set to an empty array [] to remove all line items."
|
|
610
|
+
}
|
|
95
611
|
]
|
|
96
|
-
}
|
|
97
|
-
"response_schema": "Order"
|
|
612
|
+
}
|
|
98
613
|
},
|
|
99
614
|
{
|
|
100
615
|
"method": "PATCH",
|
|
101
616
|
"path": "/api/v1/orders/:id/cancel",
|
|
102
617
|
"controller_order": 5,
|
|
103
618
|
"handler_name": "cancelOrder",
|
|
104
|
-
"required_scope": "
|
|
105
|
-
"summary": "Cancel an existing order",
|
|
106
|
-
"description": "Cancel an existing order with optional reason and restock settings.",
|
|
619
|
+
"required_scope": "order-create",
|
|
620
|
+
"summary": "Cancel an existing order.",
|
|
107
621
|
"path_params": [
|
|
108
|
-
{
|
|
622
|
+
{
|
|
623
|
+
"name": "id",
|
|
624
|
+
"type": "string",
|
|
625
|
+
"required": true
|
|
626
|
+
}
|
|
109
627
|
],
|
|
110
628
|
"request_body": {
|
|
111
629
|
"content_type": "application/json",
|
|
112
|
-
"fields": [
|
|
113
|
-
|
|
114
|
-
{ "name": "staff_note", "type": "string", "required": false, "description": "Internal note about the cancellation" },
|
|
115
|
-
{ "name": "restock_inventory", "type": "boolean", "required": false, "description": "Whether to restock inventory" },
|
|
116
|
-
{ "name": "send_notification", "type": "boolean", "required": false, "description": "Whether to send notification to customer" }
|
|
117
|
-
]
|
|
118
|
-
},
|
|
119
|
-
"response_schema": "Order"
|
|
630
|
+
"fields": []
|
|
631
|
+
}
|
|
120
632
|
},
|
|
121
633
|
{
|
|
122
634
|
"method": "PATCH",
|
|
123
635
|
"path": "/api/v1/orders/:id/external-id",
|
|
124
636
|
"controller_order": 6,
|
|
125
637
|
"handler_name": "updateOrderExternalId",
|
|
126
|
-
"required_scope": "
|
|
127
|
-
"summary": "Update external ID for
|
|
128
|
-
"description": "Updates the external_order_id field for a single order.
|
|
638
|
+
"required_scope": "order-create",
|
|
639
|
+
"summary": "Update external ID for a specific order",
|
|
640
|
+
"description": "Updates the external_order_id field for a single order. This is useful for syncing with external systems or correcting mismatches.",
|
|
129
641
|
"path_params": [
|
|
130
|
-
{
|
|
642
|
+
{
|
|
643
|
+
"name": "id",
|
|
644
|
+
"type": "string",
|
|
645
|
+
"required": true,
|
|
646
|
+
"description": "Order ID"
|
|
647
|
+
}
|
|
131
648
|
],
|
|
132
649
|
"request_body": {
|
|
133
650
|
"content_type": "application/json",
|
|
134
651
|
"fields": [
|
|
135
|
-
{
|
|
652
|
+
{
|
|
653
|
+
"name": "external_id",
|
|
654
|
+
"type": "string",
|
|
655
|
+
"required": true,
|
|
656
|
+
"description": "The external ID to sync with"
|
|
657
|
+
}
|
|
136
658
|
]
|
|
137
|
-
}
|
|
138
|
-
"response_schema": "Order"
|
|
139
|
-
}
|
|
140
|
-
],
|
|
141
|
-
"schemas": {
|
|
142
|
-
"Order": {
|
|
143
|
-
"id": "string — unique order identifier",
|
|
144
|
-
"order_number": "number — sequential order number",
|
|
145
|
-
"email": "string | null — customer email",
|
|
146
|
-
"phone": "string | null — customer phone",
|
|
147
|
-
"financial_status": "'pending' | 'authorized' | 'partially_paid' | 'paid' | 'partially_refunded' | 'refunded' | 'voided'",
|
|
148
|
-
"fulfillment_status": "'unfulfilled' | 'partial' | 'fulfilled' | 'partially_fulfilled' | 'restocked' | 'pending' | 'refunded' | 'returned'",
|
|
149
|
-
"status": "'open' | 'closed' | 'cancelled' | 'archived'",
|
|
150
|
-
"currency": "string — currency code (e.g. 'INR')",
|
|
151
|
-
"total_price": "number — final total price",
|
|
152
|
-
"subtotal_price": "number — subtotal before tax and discounts",
|
|
153
|
-
"total_tax": "number — total tax amount",
|
|
154
|
-
"total_discounts": "number — total discount amount",
|
|
155
|
-
"line_items": "LineItem[] — items in the order",
|
|
156
|
-
"customer": "Customer object",
|
|
157
|
-
"shipping_address": "Address | null",
|
|
158
|
-
"billing_address": "Address | null",
|
|
159
|
-
"note": "string | null — internal note",
|
|
160
|
-
"tags": "string — comma-separated tags",
|
|
161
|
-
"created_at": "string — ISO 8601 timestamp",
|
|
162
|
-
"updated_at": "string — ISO 8601 timestamp",
|
|
163
|
-
"cancelled_at": "string | null — ISO 8601 timestamp if cancelled"
|
|
659
|
+
}
|
|
164
660
|
}
|
|
165
|
-
|
|
166
|
-
"statuses": ["pending", "confirmed", "processing", "shipped", "delivered", "cancelled", "refunded"]
|
|
661
|
+
]
|
|
167
662
|
}
|