@redotech/redo-api-schema 2.2.447 → 2.2.449
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/lib/openapi.d.ts +547 -0
- package/lib/openapi.yaml +756 -0
- package/package.json +1 -1
package/lib/openapi.d.ts
CHANGED
|
@@ -184,6 +184,71 @@ export interface paths {
|
|
|
184
184
|
*/
|
|
185
185
|
get: operations["Invoice list"];
|
|
186
186
|
};
|
|
187
|
+
"/stores/{storeId}/orders": {
|
|
188
|
+
/**
|
|
189
|
+
* Create Order
|
|
190
|
+
* @description Create a new order in the system with line items, customer information, and shipping details.
|
|
191
|
+
*/
|
|
192
|
+
post: operations["Order create"];
|
|
193
|
+
parameters: {
|
|
194
|
+
path: {
|
|
195
|
+
storeId: components["parameters"]["store-id.param"];
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
"/stores/{storeId}/orders/{orderId}": {
|
|
200
|
+
/**
|
|
201
|
+
* Get Order
|
|
202
|
+
* @description Retrieve an existing order from the system, including all fulfillments. The orderId parameter can be either the external order ID you provided when creating the order, or the internal Redo order ID returned from the create order response.
|
|
203
|
+
*/
|
|
204
|
+
get: operations["Order get"];
|
|
205
|
+
/**
|
|
206
|
+
* Delete Order
|
|
207
|
+
* @description Delete an order from the system. The orderId parameter can be either the external order ID you provided when creating the order, or the internal Redo order ID returned from the create order response.
|
|
208
|
+
*/
|
|
209
|
+
delete: operations["Order delete"];
|
|
210
|
+
parameters: {
|
|
211
|
+
path: {
|
|
212
|
+
storeId: components["parameters"]["store-id.param"];
|
|
213
|
+
orderId: components["parameters"]["order-id.param"];
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
"/stores/{storeId}/orders/{orderId}/fulfillments": {
|
|
218
|
+
/**
|
|
219
|
+
* Create Fulfillment
|
|
220
|
+
* @description Create a fulfillment for specific line items within an order, including tracking information. The orderId parameter can be either the external order ID you provided when creating the order, or the internal Redo order ID returned from the create order response.
|
|
221
|
+
*/
|
|
222
|
+
post: operations["Fulfillment create"];
|
|
223
|
+
parameters: {
|
|
224
|
+
path: {
|
|
225
|
+
storeId: components["parameters"]["store-id.param"];
|
|
226
|
+
orderId: components["parameters"]["order-id.param"];
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
"/stores/{storeId}/orders/{orderId}/fulfillments/{fulfillmentId}/shipment-status": {
|
|
231
|
+
/**
|
|
232
|
+
* Update Fulfillment Status
|
|
233
|
+
* @description Post a shipment status update or trigger an automation event for a fulfillment.
|
|
234
|
+
*
|
|
235
|
+
* The status field accepts two types of values:
|
|
236
|
+
*
|
|
237
|
+
* **Statuses** (e.g., `in_transit`, `delivered`): Real carrier tracking statuses that update the shipment's current status. When you send these, the fulfillment's current status is updated to reflect the new state. Triggers any configured automations for that status.
|
|
238
|
+
*
|
|
239
|
+
* **Events** (e.g., `stalled_in_transit`, `delayed`, `arriving_early`): Special event types that trigger automations without changing the current shipment status. The status field remains unchanged, but you can still update estimated delivery date and add tracking history entries. Use these to trigger event-based automations.
|
|
240
|
+
*
|
|
241
|
+
* Both statuses and events can update other fields like estimated delivery date and tracking history.
|
|
242
|
+
*/
|
|
243
|
+
post: operations["Fulfillment status update"];
|
|
244
|
+
parameters: {
|
|
245
|
+
path: {
|
|
246
|
+
storeId: components["parameters"]["store-id.param"];
|
|
247
|
+
orderId: components["parameters"]["order-id.param"];
|
|
248
|
+
fulfillmentId: components["parameters"]["fulfillment-id.param"];
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
};
|
|
187
252
|
"/stores/{storeId}/products/bulk-upload": {
|
|
188
253
|
/**
|
|
189
254
|
* Bulk upload products (Beta)
|
|
@@ -1136,6 +1201,253 @@ export interface components {
|
|
|
1136
1201
|
*/
|
|
1137
1202
|
total: components["schemas"]["money.schema"];
|
|
1138
1203
|
};
|
|
1204
|
+
/** @description Request body for creating a fulfillment. */
|
|
1205
|
+
"orders-api-create-fulfillment-request.schema": {
|
|
1206
|
+
/** @description Unique identifier for the fulfillment. If not provided, will be auto-generated. */
|
|
1207
|
+
fulfillmentId?: string;
|
|
1208
|
+
/** @description Initial tracking information for the dummy tracker. Only used when useDummyTracking is true. If not specified, defaults to status "pre_transit". */
|
|
1209
|
+
initialTracking?: {
|
|
1210
|
+
/**
|
|
1211
|
+
* Format: date-time
|
|
1212
|
+
* @description Timestamp of the tracking event in ISO 8601 format.
|
|
1213
|
+
*/
|
|
1214
|
+
datetime?: string | null;
|
|
1215
|
+
/**
|
|
1216
|
+
* Format: date-time
|
|
1217
|
+
* @description Estimated delivery date in ISO 8601 format.
|
|
1218
|
+
*/
|
|
1219
|
+
estimatedDeliveryDate?: string | null;
|
|
1220
|
+
location?: components["schemas"]["orders-api-tracking-location.schema"];
|
|
1221
|
+
/** @description Tracking event message. */
|
|
1222
|
+
message?: string | null;
|
|
1223
|
+
/**
|
|
1224
|
+
* @description Initial shipment status for the dummy tracker. Only actual statuses are allowed (not automation events).
|
|
1225
|
+
* @enum {string}
|
|
1226
|
+
*/
|
|
1227
|
+
status: "pre_transit" | "unknown" | "in_transit" | "out_for_delivery" | "available_for_pickup" | "delivered" | "return_to_sender" | "failure" | "cancelled" | "error";
|
|
1228
|
+
};
|
|
1229
|
+
/** @description List of line items to fulfill. */
|
|
1230
|
+
lineItems: {
|
|
1231
|
+
/** @description Line item ID to fulfill. */
|
|
1232
|
+
id: string;
|
|
1233
|
+
/** @description Quantity to fulfill for this line item. */
|
|
1234
|
+
quantity: number;
|
|
1235
|
+
}[];
|
|
1236
|
+
/** @description Optional tracking information for the shipment. */
|
|
1237
|
+
tracking?: {
|
|
1238
|
+
/** @description Name of the shipping carrier (e.g., FedEx, UPS, USPS). */
|
|
1239
|
+
carrier: string;
|
|
1240
|
+
/** @description Tracking number/code for the shipment. */
|
|
1241
|
+
code: string;
|
|
1242
|
+
} | null;
|
|
1243
|
+
/** @description If true, creates a dummy tracker for testing without calling external tracking APIs. Useful for development and testing the fulfillment status update endpoint. */
|
|
1244
|
+
useDummyTracking?: boolean;
|
|
1245
|
+
};
|
|
1246
|
+
/** @description Request body for creating an order. */
|
|
1247
|
+
"orders-api-create-order-request.schema": {
|
|
1248
|
+
/**
|
|
1249
|
+
* Format: date-time
|
|
1250
|
+
* @description ISO 8601 date string for when the order was created.
|
|
1251
|
+
*/
|
|
1252
|
+
createdAt: string;
|
|
1253
|
+
/** @description Currency code from the ISO 4217 standard (e.g., USD, EUR, GBP). */
|
|
1254
|
+
currencyCode?: string | null;
|
|
1255
|
+
customer?: components["schemas"]["orders-api-customer.schema"];
|
|
1256
|
+
/** @description List of line items in the order. */
|
|
1257
|
+
lineItems: components["schemas"]["orders-api-line-item.schema"][];
|
|
1258
|
+
/** @description Unique identifier for the order. */
|
|
1259
|
+
orderId: string;
|
|
1260
|
+
shipping?: components["schemas"]["orders-api-shipping.schema"];
|
|
1261
|
+
/** @description Subtotal price excluding tax and shipping. */
|
|
1262
|
+
subtotalPrice?: number | null;
|
|
1263
|
+
/** @description Optional tags associated with the order. */
|
|
1264
|
+
tags?: string[] | null;
|
|
1265
|
+
/** @description Total order price including tax and shipping. */
|
|
1266
|
+
totalPrice?: number | null;
|
|
1267
|
+
/** @description Total tax amount. */
|
|
1268
|
+
totalTax?: number | null;
|
|
1269
|
+
};
|
|
1270
|
+
/** @description Successful order creation response. */
|
|
1271
|
+
"orders-api-create-order-response.schema": {
|
|
1272
|
+
/** @description Original external order ID provided in the request. */
|
|
1273
|
+
externalOrderId: string;
|
|
1274
|
+
/** @description Internal Redo order ID. */
|
|
1275
|
+
orderId: string;
|
|
1276
|
+
};
|
|
1277
|
+
/** @description Customer information. */
|
|
1278
|
+
"orders-api-customer.schema": {
|
|
1279
|
+
/** @description Customer email address. */
|
|
1280
|
+
email?: string | null;
|
|
1281
|
+
/** @description Customer first name. */
|
|
1282
|
+
firstName?: string | null;
|
|
1283
|
+
/** @description Customer ID from the external system. */
|
|
1284
|
+
id?: string | null;
|
|
1285
|
+
/** @description Customer last name. */
|
|
1286
|
+
lastName?: string | null;
|
|
1287
|
+
/** @description Customer full name. */
|
|
1288
|
+
name?: string | null;
|
|
1289
|
+
/** @description Customer phone number. */
|
|
1290
|
+
phoneNumber?: string | null;
|
|
1291
|
+
};
|
|
1292
|
+
/** @description Successful order deletion response. */
|
|
1293
|
+
"orders-api-delete-order-response.schema": {
|
|
1294
|
+
/** @description External order ID that was deleted. */
|
|
1295
|
+
externalOrderId: string;
|
|
1296
|
+
/** @description Internal Redo order ID. */
|
|
1297
|
+
orderId: string;
|
|
1298
|
+
/** @description Indicates successful deletion. */
|
|
1299
|
+
success: boolean;
|
|
1300
|
+
};
|
|
1301
|
+
/** @description Orders API error response. */
|
|
1302
|
+
"orders-api-error.schema": {
|
|
1303
|
+
/** @description Error message describing what went wrong. */
|
|
1304
|
+
error: string;
|
|
1305
|
+
};
|
|
1306
|
+
/** @description Fulfilled line item details. */
|
|
1307
|
+
"orders-api-fulfillment-line-item.schema": {
|
|
1308
|
+
/** @description Line item ID that was fulfilled. */
|
|
1309
|
+
id: string;
|
|
1310
|
+
/** @description Product ID. */
|
|
1311
|
+
productId: string;
|
|
1312
|
+
/** @description Quantity fulfilled for this line item. */
|
|
1313
|
+
quantity: number;
|
|
1314
|
+
/** @description SKU of the product. */
|
|
1315
|
+
sku?: string | null;
|
|
1316
|
+
/** @description Title/name of the product. */
|
|
1317
|
+
title: string;
|
|
1318
|
+
/** @description Product variant ID. */
|
|
1319
|
+
variantId?: string | null;
|
|
1320
|
+
};
|
|
1321
|
+
/** @description Successful fulfillment operation response. */
|
|
1322
|
+
"orders-api-fulfillment-response.schema": {
|
|
1323
|
+
fulfillment: components["schemas"]["orders-api-fulfillment.schema"];
|
|
1324
|
+
/** @constant */
|
|
1325
|
+
success: true;
|
|
1326
|
+
};
|
|
1327
|
+
/** @description Fulfillment information. */
|
|
1328
|
+
"orders-api-fulfillment.schema": {
|
|
1329
|
+
/**
|
|
1330
|
+
* Format: date-time
|
|
1331
|
+
* @description ISO 8601 date string for when the fulfillment was created.
|
|
1332
|
+
*/
|
|
1333
|
+
createdAt: string;
|
|
1334
|
+
/** @description Unique fulfillment ID. */
|
|
1335
|
+
id: string;
|
|
1336
|
+
/** @description List of line items in this fulfillment. */
|
|
1337
|
+
lineItems: components["schemas"]["orders-api-fulfillment-line-item.schema"][];
|
|
1338
|
+
/**
|
|
1339
|
+
* @description Current shipment status.
|
|
1340
|
+
* @enum {string}
|
|
1341
|
+
*/
|
|
1342
|
+
status: "pre_transit" | "unknown" | "in_transit" | "out_for_delivery" | "available_for_pickup" | "delivered" | "return_to_sender" | "failure" | "cancelled" | "error";
|
|
1343
|
+
/** @description Shipping carrier name (e.g., FedEx, UPS). */
|
|
1344
|
+
trackingCompany?: string | null;
|
|
1345
|
+
/** @description List of tracking events in chronological order. */
|
|
1346
|
+
trackingHistory: components["schemas"]["orders-api-tracking-event.schema"][];
|
|
1347
|
+
/** @description Tracking number for the shipment. */
|
|
1348
|
+
trackingNumber?: string | null;
|
|
1349
|
+
};
|
|
1350
|
+
/** @description Response for getting an order, including fulfillments. */
|
|
1351
|
+
"orders-api-get-order-response.schema": components["schemas"]["orders-api-create-order-request.schema"] & {
|
|
1352
|
+
/** @description List of fulfillments for this order. */
|
|
1353
|
+
fulfillments: components["schemas"]["orders-api-fulfillment.schema"][];
|
|
1354
|
+
};
|
|
1355
|
+
/** @description Line item in the order. */
|
|
1356
|
+
"orders-api-line-item.schema": {
|
|
1357
|
+
/** @description Unique identifier for the line item. */
|
|
1358
|
+
id: string;
|
|
1359
|
+
/** @description Price per unit of the product. */
|
|
1360
|
+
price?: number | null;
|
|
1361
|
+
/** @description Identifier for the product. */
|
|
1362
|
+
productId: string;
|
|
1363
|
+
/** @description Quantity of the product ordered. */
|
|
1364
|
+
quantity: number;
|
|
1365
|
+
/** @description SKU of the product. */
|
|
1366
|
+
sku?: string | null;
|
|
1367
|
+
/** @description Title/name of the product. */
|
|
1368
|
+
title: string;
|
|
1369
|
+
/** @description Identifier for the product variant. */
|
|
1370
|
+
variantId?: string | null;
|
|
1371
|
+
};
|
|
1372
|
+
/** @description Shipping address. */
|
|
1373
|
+
"orders-api-shipping-address.schema": {
|
|
1374
|
+
/** @description Primary address line. */
|
|
1375
|
+
address1?: string | null;
|
|
1376
|
+
/** @description Secondary address line. */
|
|
1377
|
+
address2?: string | null;
|
|
1378
|
+
/** @description City. */
|
|
1379
|
+
city?: string | null;
|
|
1380
|
+
/** @description Country. */
|
|
1381
|
+
country?: string | null;
|
|
1382
|
+
/** @description Postal or zip code. */
|
|
1383
|
+
postalCode?: string | null;
|
|
1384
|
+
/** @description State or province. */
|
|
1385
|
+
province?: string | null;
|
|
1386
|
+
};
|
|
1387
|
+
/** @description Shipping information. */
|
|
1388
|
+
"orders-api-shipping.schema": {
|
|
1389
|
+
address?: components["schemas"]["orders-api-shipping-address.schema"];
|
|
1390
|
+
/** @description Shipping cost. */
|
|
1391
|
+
cost?: number | null;
|
|
1392
|
+
/** @description Shipping method name. */
|
|
1393
|
+
method?: string | null;
|
|
1394
|
+
};
|
|
1395
|
+
/** @description Tracking event details. */
|
|
1396
|
+
"orders-api-tracking-event.schema": {
|
|
1397
|
+
/**
|
|
1398
|
+
* Format: date-time
|
|
1399
|
+
* @description ISO 8601 timestamp of the tracking event.
|
|
1400
|
+
*/
|
|
1401
|
+
datetime: string;
|
|
1402
|
+
location?: components["schemas"]["orders-api-tracking-location.schema"];
|
|
1403
|
+
/** @description Tracking event message. */
|
|
1404
|
+
message: string;
|
|
1405
|
+
/** @description Status at this tracking event. */
|
|
1406
|
+
status: string;
|
|
1407
|
+
};
|
|
1408
|
+
/** @description Location information for a tracking event. */
|
|
1409
|
+
"orders-api-tracking-location.schema": {
|
|
1410
|
+
city?: string | null;
|
|
1411
|
+
country?: string | null;
|
|
1412
|
+
postalCode?: string | null;
|
|
1413
|
+
state?: string | null;
|
|
1414
|
+
};
|
|
1415
|
+
/**
|
|
1416
|
+
* @description Request body for updating a fulfillment's tracking status.
|
|
1417
|
+
*
|
|
1418
|
+
* The status field accepts two types of values:
|
|
1419
|
+
* - **Statuses** (e.g., `in_transit`, `delivered`): Update the shipment's current status and trigger configured automations.
|
|
1420
|
+
* - **Events** (e.g., `stalled_in_transit`, `delayed`, `arriving_early`): Trigger automations without changing the current shipment status.
|
|
1421
|
+
*
|
|
1422
|
+
* Both can update other fields like estimated delivery date and tracking history.
|
|
1423
|
+
*/
|
|
1424
|
+
"orders-api-update-fulfillment-status-request.schema": {
|
|
1425
|
+
/**
|
|
1426
|
+
* Format: date-time
|
|
1427
|
+
* @description Timestamp of the tracking event in ISO 8601 format.
|
|
1428
|
+
*/
|
|
1429
|
+
datetime?: string | null;
|
|
1430
|
+
/**
|
|
1431
|
+
* Format: date-time
|
|
1432
|
+
* @description Estimated delivery date in ISO 8601 format.
|
|
1433
|
+
*/
|
|
1434
|
+
estimatedDeliveryDate?: string | null;
|
|
1435
|
+
location?: components["schemas"]["orders-api-tracking-location.schema"];
|
|
1436
|
+
/** @description Tracking event message (e.g., "Departed shipping partner facility"). */
|
|
1437
|
+
message?: string | null;
|
|
1438
|
+
/**
|
|
1439
|
+
* @description Shipment status or automation event.
|
|
1440
|
+
*
|
|
1441
|
+
* Statuses update the current shipment status and trigger automations:
|
|
1442
|
+
* `pre_transit`, `in_transit`, `out_for_delivery`, `available_for_pickup`, `delivered`, `return_to_sender`, `failure`, `cancelled`, `error`.
|
|
1443
|
+
*
|
|
1444
|
+
* Events trigger automations without changing the current status:
|
|
1445
|
+
* `stalled_in_transit`, `delayed`, `arriving_early`.
|
|
1446
|
+
*
|
|
1447
|
+
* @enum {string}
|
|
1448
|
+
*/
|
|
1449
|
+
status: "pre_transit" | "in_transit" | "out_for_delivery" | "available_for_pickup" | "delivered" | "return_to_sender" | "failure" | "cancelled" | "error" | "stalled_in_transit" | "delayed" | "arriving_early";
|
|
1450
|
+
};
|
|
1139
1451
|
/**
|
|
1140
1452
|
* Person name
|
|
1141
1453
|
* @description Person name.
|
|
@@ -1955,10 +2267,14 @@ export interface components {
|
|
|
1955
2267
|
};
|
|
1956
2268
|
responses: never;
|
|
1957
2269
|
parameters: {
|
|
2270
|
+
/** @description Unique fulfillment identifier. */
|
|
2271
|
+
"fulfillment-id.param": string;
|
|
1958
2272
|
/** @description Optional idempotency key for safely retrying create requests. */
|
|
1959
2273
|
"idempotency-key.param"?: string;
|
|
1960
2274
|
/** @description Invoice ID */
|
|
1961
2275
|
"invoice-id.param": string;
|
|
2276
|
+
/** @description Order ID. Can be either the external order ID provided when creating the order, or the internal Redo order ID. */
|
|
2277
|
+
"order-id.param": string;
|
|
1962
2278
|
/**
|
|
1963
2279
|
* @description Page marker, from X-Page-Next header
|
|
1964
2280
|
* @example 64df700931a04885276c3364
|
|
@@ -2683,6 +2999,237 @@ export interface operations {
|
|
|
2683
2999
|
};
|
|
2684
3000
|
};
|
|
2685
3001
|
};
|
|
3002
|
+
/**
|
|
3003
|
+
* Create Order
|
|
3004
|
+
* @description Create a new order in the system with line items, customer information, and shipping details.
|
|
3005
|
+
*/
|
|
3006
|
+
"Order create": {
|
|
3007
|
+
parameters: {
|
|
3008
|
+
path: {
|
|
3009
|
+
storeId: components["parameters"]["store-id.param"];
|
|
3010
|
+
};
|
|
3011
|
+
};
|
|
3012
|
+
requestBody: {
|
|
3013
|
+
content: {
|
|
3014
|
+
"application/json": components["schemas"]["orders-api-create-order-request.schema"];
|
|
3015
|
+
};
|
|
3016
|
+
};
|
|
3017
|
+
responses: {
|
|
3018
|
+
/** @description Success */
|
|
3019
|
+
200: {
|
|
3020
|
+
content: {
|
|
3021
|
+
"application/json": components["schemas"]["orders-api-create-order-response.schema"];
|
|
3022
|
+
};
|
|
3023
|
+
};
|
|
3024
|
+
/** @description Bad Request (validation error) */
|
|
3025
|
+
400: {
|
|
3026
|
+
content: {
|
|
3027
|
+
"application/json": components["schemas"]["orders-api-error.schema"];
|
|
3028
|
+
};
|
|
3029
|
+
};
|
|
3030
|
+
/** @description Unauthorized (invalid or missing API token) */
|
|
3031
|
+
401: {
|
|
3032
|
+
content: {
|
|
3033
|
+
"application/json": components["schemas"]["orders-api-error.schema"];
|
|
3034
|
+
};
|
|
3035
|
+
};
|
|
3036
|
+
/** @description Conflict (duplicate order ID) */
|
|
3037
|
+
409: {
|
|
3038
|
+
content: {
|
|
3039
|
+
"application/json": components["schemas"]["orders-api-error.schema"];
|
|
3040
|
+
};
|
|
3041
|
+
};
|
|
3042
|
+
/** @description Error */
|
|
3043
|
+
default: {
|
|
3044
|
+
content: {
|
|
3045
|
+
"application/problem+json": components["schemas"]["error.schema"];
|
|
3046
|
+
};
|
|
3047
|
+
};
|
|
3048
|
+
};
|
|
3049
|
+
};
|
|
3050
|
+
/**
|
|
3051
|
+
* Get Order
|
|
3052
|
+
* @description Retrieve an existing order from the system, including all fulfillments. The orderId parameter can be either the external order ID you provided when creating the order, or the internal Redo order ID returned from the create order response.
|
|
3053
|
+
*/
|
|
3054
|
+
"Order get": {
|
|
3055
|
+
parameters: {
|
|
3056
|
+
path: {
|
|
3057
|
+
storeId: components["parameters"]["store-id.param"];
|
|
3058
|
+
orderId: components["parameters"]["order-id.param"];
|
|
3059
|
+
};
|
|
3060
|
+
};
|
|
3061
|
+
responses: {
|
|
3062
|
+
/** @description Success */
|
|
3063
|
+
200: {
|
|
3064
|
+
content: {
|
|
3065
|
+
"application/json": components["schemas"]["orders-api-get-order-response.schema"];
|
|
3066
|
+
};
|
|
3067
|
+
};
|
|
3068
|
+
/** @description Unauthorized (invalid or missing API token) */
|
|
3069
|
+
401: {
|
|
3070
|
+
content: {
|
|
3071
|
+
"application/json": components["schemas"]["orders-api-error.schema"];
|
|
3072
|
+
};
|
|
3073
|
+
};
|
|
3074
|
+
/** @description Order not found */
|
|
3075
|
+
404: {
|
|
3076
|
+
content: {
|
|
3077
|
+
"application/json": components["schemas"]["orders-api-error.schema"];
|
|
3078
|
+
};
|
|
3079
|
+
};
|
|
3080
|
+
/** @description Error */
|
|
3081
|
+
default: {
|
|
3082
|
+
content: {
|
|
3083
|
+
"application/problem+json": components["schemas"]["error.schema"];
|
|
3084
|
+
};
|
|
3085
|
+
};
|
|
3086
|
+
};
|
|
3087
|
+
};
|
|
3088
|
+
/**
|
|
3089
|
+
* Delete Order
|
|
3090
|
+
* @description Delete an order from the system. The orderId parameter can be either the external order ID you provided when creating the order, or the internal Redo order ID returned from the create order response.
|
|
3091
|
+
*/
|
|
3092
|
+
"Order delete": {
|
|
3093
|
+
parameters: {
|
|
3094
|
+
path: {
|
|
3095
|
+
storeId: components["parameters"]["store-id.param"];
|
|
3096
|
+
orderId: components["parameters"]["order-id.param"];
|
|
3097
|
+
};
|
|
3098
|
+
};
|
|
3099
|
+
responses: {
|
|
3100
|
+
/** @description Success */
|
|
3101
|
+
200: {
|
|
3102
|
+
content: {
|
|
3103
|
+
"application/json": components["schemas"]["orders-api-delete-order-response.schema"];
|
|
3104
|
+
};
|
|
3105
|
+
};
|
|
3106
|
+
/** @description Unauthorized (invalid or missing API token) */
|
|
3107
|
+
401: {
|
|
3108
|
+
content: {
|
|
3109
|
+
"application/json": components["schemas"]["orders-api-error.schema"];
|
|
3110
|
+
};
|
|
3111
|
+
};
|
|
3112
|
+
/** @description Order not found */
|
|
3113
|
+
404: {
|
|
3114
|
+
content: {
|
|
3115
|
+
"application/json": components["schemas"]["orders-api-error.schema"];
|
|
3116
|
+
};
|
|
3117
|
+
};
|
|
3118
|
+
/** @description Error */
|
|
3119
|
+
default: {
|
|
3120
|
+
content: {
|
|
3121
|
+
"application/problem+json": components["schemas"]["error.schema"];
|
|
3122
|
+
};
|
|
3123
|
+
};
|
|
3124
|
+
};
|
|
3125
|
+
};
|
|
3126
|
+
/**
|
|
3127
|
+
* Create Fulfillment
|
|
3128
|
+
* @description Create a fulfillment for specific line items within an order, including tracking information. The orderId parameter can be either the external order ID you provided when creating the order, or the internal Redo order ID returned from the create order response.
|
|
3129
|
+
*/
|
|
3130
|
+
"Fulfillment create": {
|
|
3131
|
+
parameters: {
|
|
3132
|
+
path: {
|
|
3133
|
+
storeId: components["parameters"]["store-id.param"];
|
|
3134
|
+
orderId: components["parameters"]["order-id.param"];
|
|
3135
|
+
};
|
|
3136
|
+
};
|
|
3137
|
+
requestBody: {
|
|
3138
|
+
content: {
|
|
3139
|
+
"application/json": components["schemas"]["orders-api-create-fulfillment-request.schema"];
|
|
3140
|
+
};
|
|
3141
|
+
};
|
|
3142
|
+
responses: {
|
|
3143
|
+
/** @description Success */
|
|
3144
|
+
200: {
|
|
3145
|
+
content: {
|
|
3146
|
+
"application/json": components["schemas"]["orders-api-fulfillment-response.schema"];
|
|
3147
|
+
};
|
|
3148
|
+
};
|
|
3149
|
+
/** @description Bad Request (validation error) */
|
|
3150
|
+
400: {
|
|
3151
|
+
content: {
|
|
3152
|
+
"application/json": components["schemas"]["orders-api-error.schema"];
|
|
3153
|
+
};
|
|
3154
|
+
};
|
|
3155
|
+
/** @description Unauthorized (invalid or missing API token) */
|
|
3156
|
+
401: {
|
|
3157
|
+
content: {
|
|
3158
|
+
"application/json": components["schemas"]["orders-api-error.schema"];
|
|
3159
|
+
};
|
|
3160
|
+
};
|
|
3161
|
+
/** @description Order not found */
|
|
3162
|
+
404: {
|
|
3163
|
+
content: {
|
|
3164
|
+
"application/json": components["schemas"]["orders-api-error.schema"];
|
|
3165
|
+
};
|
|
3166
|
+
};
|
|
3167
|
+
/** @description Error */
|
|
3168
|
+
default: {
|
|
3169
|
+
content: {
|
|
3170
|
+
"application/problem+json": components["schemas"]["error.schema"];
|
|
3171
|
+
};
|
|
3172
|
+
};
|
|
3173
|
+
};
|
|
3174
|
+
};
|
|
3175
|
+
/**
|
|
3176
|
+
* Update Fulfillment Status
|
|
3177
|
+
* @description Post a shipment status update or trigger an automation event for a fulfillment.
|
|
3178
|
+
*
|
|
3179
|
+
* The status field accepts two types of values:
|
|
3180
|
+
*
|
|
3181
|
+
* **Statuses** (e.g., `in_transit`, `delivered`): Real carrier tracking statuses that update the shipment's current status. When you send these, the fulfillment's current status is updated to reflect the new state. Triggers any configured automations for that status.
|
|
3182
|
+
*
|
|
3183
|
+
* **Events** (e.g., `stalled_in_transit`, `delayed`, `arriving_early`): Special event types that trigger automations without changing the current shipment status. The status field remains unchanged, but you can still update estimated delivery date and add tracking history entries. Use these to trigger event-based automations.
|
|
3184
|
+
*
|
|
3185
|
+
* Both statuses and events can update other fields like estimated delivery date and tracking history.
|
|
3186
|
+
*/
|
|
3187
|
+
"Fulfillment status update": {
|
|
3188
|
+
parameters: {
|
|
3189
|
+
path: {
|
|
3190
|
+
storeId: components["parameters"]["store-id.param"];
|
|
3191
|
+
orderId: components["parameters"]["order-id.param"];
|
|
3192
|
+
fulfillmentId: components["parameters"]["fulfillment-id.param"];
|
|
3193
|
+
};
|
|
3194
|
+
};
|
|
3195
|
+
requestBody: {
|
|
3196
|
+
content: {
|
|
3197
|
+
"application/json": components["schemas"]["orders-api-update-fulfillment-status-request.schema"];
|
|
3198
|
+
};
|
|
3199
|
+
};
|
|
3200
|
+
responses: {
|
|
3201
|
+
/** @description Success */
|
|
3202
|
+
200: {
|
|
3203
|
+
content: {
|
|
3204
|
+
"application/json": components["schemas"]["orders-api-fulfillment-response.schema"];
|
|
3205
|
+
};
|
|
3206
|
+
};
|
|
3207
|
+
/** @description Bad Request (validation error) */
|
|
3208
|
+
400: {
|
|
3209
|
+
content: {
|
|
3210
|
+
"application/json": components["schemas"]["orders-api-error.schema"];
|
|
3211
|
+
};
|
|
3212
|
+
};
|
|
3213
|
+
/** @description Unauthorized (invalid or missing API token) */
|
|
3214
|
+
401: {
|
|
3215
|
+
content: {
|
|
3216
|
+
"application/json": components["schemas"]["orders-api-error.schema"];
|
|
3217
|
+
};
|
|
3218
|
+
};
|
|
3219
|
+
/** @description Fulfillment not found */
|
|
3220
|
+
404: {
|
|
3221
|
+
content: {
|
|
3222
|
+
"application/json": components["schemas"]["orders-api-error.schema"];
|
|
3223
|
+
};
|
|
3224
|
+
};
|
|
3225
|
+
/** @description Error */
|
|
3226
|
+
default: {
|
|
3227
|
+
content: {
|
|
3228
|
+
"application/problem+json": components["schemas"]["error.schema"];
|
|
3229
|
+
};
|
|
3230
|
+
};
|
|
3231
|
+
};
|
|
3232
|
+
};
|
|
2686
3233
|
/**
|
|
2687
3234
|
* Bulk upload products (Beta)
|
|
2688
3235
|
* @description Bulk create or update product families and their variants.
|
package/lib/openapi.yaml
CHANGED
|
@@ -45,6 +45,7 @@ tags:
|
|
|
45
45
|
- name: Customers
|
|
46
46
|
- name: Invoices
|
|
47
47
|
- name: Merchant Admin
|
|
48
|
+
- name: Orders
|
|
48
49
|
- name: Products
|
|
49
50
|
- name: Returns
|
|
50
51
|
- name: Storefront
|
|
@@ -620,6 +621,240 @@ paths:
|
|
|
620
621
|
tags:
|
|
621
622
|
- Merchant Admin
|
|
622
623
|
summary: Merchant admin
|
|
624
|
+
/stores/{storeId}/orders:
|
|
625
|
+
description: Orders collection.
|
|
626
|
+
post:
|
|
627
|
+
description: Create a new order in the system with line items, customer information, and shipping details.
|
|
628
|
+
operationId: Order create
|
|
629
|
+
requestBody:
|
|
630
|
+
content:
|
|
631
|
+
application/json:
|
|
632
|
+
schema:
|
|
633
|
+
$ref: '#/components/schemas/orders-api-create-order-request.schema'
|
|
634
|
+
required: true
|
|
635
|
+
responses:
|
|
636
|
+
'200':
|
|
637
|
+
content:
|
|
638
|
+
application/json:
|
|
639
|
+
schema:
|
|
640
|
+
$ref: '#/components/schemas/orders-api-create-order-response.schema'
|
|
641
|
+
description: Success
|
|
642
|
+
'400':
|
|
643
|
+
content:
|
|
644
|
+
application/json:
|
|
645
|
+
schema:
|
|
646
|
+
$ref: '#/components/schemas/orders-api-error.schema'
|
|
647
|
+
description: Bad Request (validation error)
|
|
648
|
+
'401':
|
|
649
|
+
content:
|
|
650
|
+
application/json:
|
|
651
|
+
schema:
|
|
652
|
+
$ref: '#/components/schemas/orders-api-error.schema'
|
|
653
|
+
description: Unauthorized (invalid or missing API token)
|
|
654
|
+
'409':
|
|
655
|
+
content:
|
|
656
|
+
application/json:
|
|
657
|
+
schema:
|
|
658
|
+
$ref: '#/components/schemas/orders-api-error.schema'
|
|
659
|
+
description: Conflict (duplicate order ID)
|
|
660
|
+
default:
|
|
661
|
+
content:
|
|
662
|
+
application/problem+json:
|
|
663
|
+
schema:
|
|
664
|
+
$ref: '#/components/schemas/error.schema'
|
|
665
|
+
description: Error
|
|
666
|
+
security:
|
|
667
|
+
- Bearer: []
|
|
668
|
+
summary: Create Order
|
|
669
|
+
tags:
|
|
670
|
+
- Orders
|
|
671
|
+
parameters:
|
|
672
|
+
- $ref: '#/components/parameters/store-id.param'
|
|
673
|
+
summary: Orders
|
|
674
|
+
/stores/{storeId}/orders/{orderId}:
|
|
675
|
+
description: Single order operations.
|
|
676
|
+
get:
|
|
677
|
+
description: Retrieve an existing order from the system, including all fulfillments. The orderId parameter can be either the external order ID you provided when creating the order, or the internal Redo order ID returned from the create order response.
|
|
678
|
+
operationId: Order get
|
|
679
|
+
responses:
|
|
680
|
+
'200':
|
|
681
|
+
content:
|
|
682
|
+
application/json:
|
|
683
|
+
schema:
|
|
684
|
+
$ref: '#/components/schemas/orders-api-get-order-response.schema'
|
|
685
|
+
description: Success
|
|
686
|
+
'401':
|
|
687
|
+
content:
|
|
688
|
+
application/json:
|
|
689
|
+
schema:
|
|
690
|
+
$ref: '#/components/schemas/orders-api-error.schema'
|
|
691
|
+
description: Unauthorized (invalid or missing API token)
|
|
692
|
+
'404':
|
|
693
|
+
content:
|
|
694
|
+
application/json:
|
|
695
|
+
schema:
|
|
696
|
+
$ref: '#/components/schemas/orders-api-error.schema'
|
|
697
|
+
description: Order not found
|
|
698
|
+
default:
|
|
699
|
+
content:
|
|
700
|
+
application/problem+json:
|
|
701
|
+
schema:
|
|
702
|
+
$ref: '#/components/schemas/error.schema'
|
|
703
|
+
description: Error
|
|
704
|
+
security:
|
|
705
|
+
- Bearer: []
|
|
706
|
+
summary: Get Order
|
|
707
|
+
tags:
|
|
708
|
+
- Orders
|
|
709
|
+
delete:
|
|
710
|
+
description: Delete an order from the system. The orderId parameter can be either the external order ID you provided when creating the order, or the internal Redo order ID returned from the create order response.
|
|
711
|
+
operationId: Order delete
|
|
712
|
+
responses:
|
|
713
|
+
'200':
|
|
714
|
+
content:
|
|
715
|
+
application/json:
|
|
716
|
+
schema:
|
|
717
|
+
$ref: '#/components/schemas/orders-api-delete-order-response.schema'
|
|
718
|
+
description: Success
|
|
719
|
+
'401':
|
|
720
|
+
content:
|
|
721
|
+
application/json:
|
|
722
|
+
schema:
|
|
723
|
+
$ref: '#/components/schemas/orders-api-error.schema'
|
|
724
|
+
description: Unauthorized (invalid or missing API token)
|
|
725
|
+
'404':
|
|
726
|
+
content:
|
|
727
|
+
application/json:
|
|
728
|
+
schema:
|
|
729
|
+
$ref: '#/components/schemas/orders-api-error.schema'
|
|
730
|
+
description: Order not found
|
|
731
|
+
default:
|
|
732
|
+
content:
|
|
733
|
+
application/problem+json:
|
|
734
|
+
schema:
|
|
735
|
+
$ref: '#/components/schemas/error.schema'
|
|
736
|
+
description: Error
|
|
737
|
+
security:
|
|
738
|
+
- Bearer: []
|
|
739
|
+
summary: Delete Order
|
|
740
|
+
tags:
|
|
741
|
+
- Orders
|
|
742
|
+
parameters:
|
|
743
|
+
- $ref: '#/components/parameters/store-id.param'
|
|
744
|
+
- $ref: '#/components/parameters/order-id.param'
|
|
745
|
+
summary: Order
|
|
746
|
+
/stores/{storeId}/orders/{orderId}/fulfillments:
|
|
747
|
+
description: Order fulfillments collection.
|
|
748
|
+
post:
|
|
749
|
+
description: Create a fulfillment for specific line items within an order, including tracking information. The orderId parameter can be either the external order ID you provided when creating the order, or the internal Redo order ID returned from the create order response.
|
|
750
|
+
operationId: Fulfillment create
|
|
751
|
+
requestBody:
|
|
752
|
+
content:
|
|
753
|
+
application/json:
|
|
754
|
+
schema:
|
|
755
|
+
$ref: '#/components/schemas/orders-api-create-fulfillment-request.schema'
|
|
756
|
+
required: true
|
|
757
|
+
responses:
|
|
758
|
+
'200':
|
|
759
|
+
content:
|
|
760
|
+
application/json:
|
|
761
|
+
schema:
|
|
762
|
+
$ref: '#/components/schemas/orders-api-fulfillment-response.schema'
|
|
763
|
+
description: Success
|
|
764
|
+
'400':
|
|
765
|
+
content:
|
|
766
|
+
application/json:
|
|
767
|
+
schema:
|
|
768
|
+
$ref: '#/components/schemas/orders-api-error.schema'
|
|
769
|
+
description: Bad Request (validation error)
|
|
770
|
+
'401':
|
|
771
|
+
content:
|
|
772
|
+
application/json:
|
|
773
|
+
schema:
|
|
774
|
+
$ref: '#/components/schemas/orders-api-error.schema'
|
|
775
|
+
description: Unauthorized (invalid or missing API token)
|
|
776
|
+
'404':
|
|
777
|
+
content:
|
|
778
|
+
application/json:
|
|
779
|
+
schema:
|
|
780
|
+
$ref: '#/components/schemas/orders-api-error.schema'
|
|
781
|
+
description: Order not found
|
|
782
|
+
default:
|
|
783
|
+
content:
|
|
784
|
+
application/problem+json:
|
|
785
|
+
schema:
|
|
786
|
+
$ref: '#/components/schemas/error.schema'
|
|
787
|
+
description: Error
|
|
788
|
+
security:
|
|
789
|
+
- Bearer: []
|
|
790
|
+
summary: Create Fulfillment
|
|
791
|
+
tags:
|
|
792
|
+
- Orders
|
|
793
|
+
parameters:
|
|
794
|
+
- $ref: '#/components/parameters/store-id.param'
|
|
795
|
+
- $ref: '#/components/parameters/order-id.param'
|
|
796
|
+
summary: Order Fulfillments
|
|
797
|
+
/stores/{storeId}/orders/{orderId}/fulfillments/{fulfillmentId}/shipment-status:
|
|
798
|
+
description: Update fulfillment shipment status.
|
|
799
|
+
post:
|
|
800
|
+
description: |
|
|
801
|
+
Post a shipment status update or trigger an automation event for a fulfillment.
|
|
802
|
+
|
|
803
|
+
The status field accepts two types of values:
|
|
804
|
+
|
|
805
|
+
**Statuses** (e.g., `in_transit`, `delivered`): Real carrier tracking statuses that update the shipment's current status. When you send these, the fulfillment's current status is updated to reflect the new state. Triggers any configured automations for that status.
|
|
806
|
+
|
|
807
|
+
**Events** (e.g., `stalled_in_transit`, `delayed`, `arriving_early`): Special event types that trigger automations without changing the current shipment status. The status field remains unchanged, but you can still update estimated delivery date and add tracking history entries. Use these to trigger event-based automations.
|
|
808
|
+
|
|
809
|
+
Both statuses and events can update other fields like estimated delivery date and tracking history.
|
|
810
|
+
operationId: Fulfillment status update
|
|
811
|
+
requestBody:
|
|
812
|
+
content:
|
|
813
|
+
application/json:
|
|
814
|
+
schema:
|
|
815
|
+
$ref: '#/components/schemas/orders-api-update-fulfillment-status-request.schema'
|
|
816
|
+
required: true
|
|
817
|
+
responses:
|
|
818
|
+
'200':
|
|
819
|
+
content:
|
|
820
|
+
application/json:
|
|
821
|
+
schema:
|
|
822
|
+
$ref: '#/components/schemas/orders-api-fulfillment-response.schema'
|
|
823
|
+
description: Success
|
|
824
|
+
'400':
|
|
825
|
+
content:
|
|
826
|
+
application/json:
|
|
827
|
+
schema:
|
|
828
|
+
$ref: '#/components/schemas/orders-api-error.schema'
|
|
829
|
+
description: Bad Request (validation error)
|
|
830
|
+
'401':
|
|
831
|
+
content:
|
|
832
|
+
application/json:
|
|
833
|
+
schema:
|
|
834
|
+
$ref: '#/components/schemas/orders-api-error.schema'
|
|
835
|
+
description: Unauthorized (invalid or missing API token)
|
|
836
|
+
'404':
|
|
837
|
+
content:
|
|
838
|
+
application/json:
|
|
839
|
+
schema:
|
|
840
|
+
$ref: '#/components/schemas/orders-api-error.schema'
|
|
841
|
+
description: Fulfillment not found
|
|
842
|
+
default:
|
|
843
|
+
content:
|
|
844
|
+
application/problem+json:
|
|
845
|
+
schema:
|
|
846
|
+
$ref: '#/components/schemas/error.schema'
|
|
847
|
+
description: Error
|
|
848
|
+
security:
|
|
849
|
+
- Bearer: []
|
|
850
|
+
summary: Update Fulfillment Status
|
|
851
|
+
tags:
|
|
852
|
+
- Orders
|
|
853
|
+
parameters:
|
|
854
|
+
- $ref: '#/components/parameters/store-id.param'
|
|
855
|
+
- $ref: '#/components/parameters/order-id.param'
|
|
856
|
+
- $ref: '#/components/parameters/fulfillment-id.param'
|
|
857
|
+
summary: Fulfillment Shipment Status
|
|
623
858
|
/stores/{storeId}/products/bulk-upload:
|
|
624
859
|
post:
|
|
625
860
|
description: |
|
|
@@ -1389,6 +1624,20 @@ components:
|
|
|
1389
1624
|
schema:
|
|
1390
1625
|
example: 64e4d5e837572a4813b73e40
|
|
1391
1626
|
type: string
|
|
1627
|
+
order-id.param:
|
|
1628
|
+
description: Order ID. Can be either the external order ID provided when creating the order, or the internal Redo order ID.
|
|
1629
|
+
in: path
|
|
1630
|
+
name: orderId
|
|
1631
|
+
required: true
|
|
1632
|
+
schema:
|
|
1633
|
+
type: string
|
|
1634
|
+
fulfillment-id.param:
|
|
1635
|
+
description: Unique fulfillment identifier.
|
|
1636
|
+
in: path
|
|
1637
|
+
name: fulfillmentId
|
|
1638
|
+
required: true
|
|
1639
|
+
schema:
|
|
1640
|
+
type: string
|
|
1392
1641
|
return-id.param:
|
|
1393
1642
|
description: Return ID
|
|
1394
1643
|
in: path
|
|
@@ -2079,6 +2328,513 @@ components:
|
|
|
2079
2328
|
- createdAt
|
|
2080
2329
|
- charge
|
|
2081
2330
|
type: object
|
|
2331
|
+
orders-api-line-item.schema:
|
|
2332
|
+
description: Line item in the order.
|
|
2333
|
+
properties:
|
|
2334
|
+
id:
|
|
2335
|
+
description: Unique identifier for the line item.
|
|
2336
|
+
type: string
|
|
2337
|
+
productId:
|
|
2338
|
+
description: Identifier for the product.
|
|
2339
|
+
type: string
|
|
2340
|
+
variantId:
|
|
2341
|
+
description: Identifier for the product variant.
|
|
2342
|
+
type:
|
|
2343
|
+
- string
|
|
2344
|
+
- 'null'
|
|
2345
|
+
title:
|
|
2346
|
+
description: Title/name of the product.
|
|
2347
|
+
type: string
|
|
2348
|
+
sku:
|
|
2349
|
+
description: SKU of the product.
|
|
2350
|
+
type:
|
|
2351
|
+
- string
|
|
2352
|
+
- 'null'
|
|
2353
|
+
quantity:
|
|
2354
|
+
description: Quantity of the product ordered.
|
|
2355
|
+
minimum: 1
|
|
2356
|
+
maximum: 1000
|
|
2357
|
+
type: integer
|
|
2358
|
+
price:
|
|
2359
|
+
description: Price per unit of the product.
|
|
2360
|
+
minimum: 0
|
|
2361
|
+
type:
|
|
2362
|
+
- number
|
|
2363
|
+
- 'null'
|
|
2364
|
+
required:
|
|
2365
|
+
- id
|
|
2366
|
+
- productId
|
|
2367
|
+
- title
|
|
2368
|
+
- quantity
|
|
2369
|
+
type: object
|
|
2370
|
+
orders-api-customer.schema:
|
|
2371
|
+
description: Customer information.
|
|
2372
|
+
properties:
|
|
2373
|
+
id:
|
|
2374
|
+
description: Customer ID from the external system.
|
|
2375
|
+
type:
|
|
2376
|
+
- string
|
|
2377
|
+
- 'null'
|
|
2378
|
+
email:
|
|
2379
|
+
description: Customer email address.
|
|
2380
|
+
type:
|
|
2381
|
+
- string
|
|
2382
|
+
- 'null'
|
|
2383
|
+
phoneNumber:
|
|
2384
|
+
description: Customer phone number.
|
|
2385
|
+
type:
|
|
2386
|
+
- string
|
|
2387
|
+
- 'null'
|
|
2388
|
+
name:
|
|
2389
|
+
description: Customer full name.
|
|
2390
|
+
type:
|
|
2391
|
+
- string
|
|
2392
|
+
- 'null'
|
|
2393
|
+
firstName:
|
|
2394
|
+
description: Customer first name.
|
|
2395
|
+
type:
|
|
2396
|
+
- string
|
|
2397
|
+
- 'null'
|
|
2398
|
+
lastName:
|
|
2399
|
+
description: Customer last name.
|
|
2400
|
+
type:
|
|
2401
|
+
- string
|
|
2402
|
+
- 'null'
|
|
2403
|
+
type: object
|
|
2404
|
+
orders-api-shipping-address.schema:
|
|
2405
|
+
description: Shipping address.
|
|
2406
|
+
properties:
|
|
2407
|
+
address1:
|
|
2408
|
+
description: Primary address line.
|
|
2409
|
+
type:
|
|
2410
|
+
- string
|
|
2411
|
+
- 'null'
|
|
2412
|
+
address2:
|
|
2413
|
+
description: Secondary address line.
|
|
2414
|
+
type:
|
|
2415
|
+
- string
|
|
2416
|
+
- 'null'
|
|
2417
|
+
city:
|
|
2418
|
+
description: City.
|
|
2419
|
+
type:
|
|
2420
|
+
- string
|
|
2421
|
+
- 'null'
|
|
2422
|
+
province:
|
|
2423
|
+
description: State or province.
|
|
2424
|
+
type:
|
|
2425
|
+
- string
|
|
2426
|
+
- 'null'
|
|
2427
|
+
country:
|
|
2428
|
+
description: Country.
|
|
2429
|
+
type:
|
|
2430
|
+
- string
|
|
2431
|
+
- 'null'
|
|
2432
|
+
postalCode:
|
|
2433
|
+
description: Postal or zip code.
|
|
2434
|
+
type:
|
|
2435
|
+
- string
|
|
2436
|
+
- 'null'
|
|
2437
|
+
type: object
|
|
2438
|
+
orders-api-shipping.schema:
|
|
2439
|
+
description: Shipping information.
|
|
2440
|
+
properties:
|
|
2441
|
+
method:
|
|
2442
|
+
description: Shipping method name.
|
|
2443
|
+
type:
|
|
2444
|
+
- string
|
|
2445
|
+
- 'null'
|
|
2446
|
+
cost:
|
|
2447
|
+
description: Shipping cost.
|
|
2448
|
+
minimum: 0
|
|
2449
|
+
type:
|
|
2450
|
+
- number
|
|
2451
|
+
- 'null'
|
|
2452
|
+
address:
|
|
2453
|
+
$ref: '#/components/schemas/orders-api-shipping-address.schema'
|
|
2454
|
+
type: object
|
|
2455
|
+
orders-api-create-order-request.schema:
|
|
2456
|
+
description: Request body for creating an order.
|
|
2457
|
+
properties:
|
|
2458
|
+
orderId:
|
|
2459
|
+
description: Unique identifier for the order.
|
|
2460
|
+
type: string
|
|
2461
|
+
createdAt:
|
|
2462
|
+
description: ISO 8601 date string for when the order was created.
|
|
2463
|
+
format: date-time
|
|
2464
|
+
type: string
|
|
2465
|
+
lineItems:
|
|
2466
|
+
description: List of line items in the order.
|
|
2467
|
+
items:
|
|
2468
|
+
$ref: '#/components/schemas/orders-api-line-item.schema'
|
|
2469
|
+
minItems: 1
|
|
2470
|
+
type: array
|
|
2471
|
+
customer:
|
|
2472
|
+
$ref: '#/components/schemas/orders-api-customer.schema'
|
|
2473
|
+
shipping:
|
|
2474
|
+
$ref: '#/components/schemas/orders-api-shipping.schema'
|
|
2475
|
+
totalPrice:
|
|
2476
|
+
description: Total order price including tax and shipping.
|
|
2477
|
+
minimum: 0
|
|
2478
|
+
type:
|
|
2479
|
+
- number
|
|
2480
|
+
- 'null'
|
|
2481
|
+
subtotalPrice:
|
|
2482
|
+
description: Subtotal price excluding tax and shipping.
|
|
2483
|
+
minimum: 0
|
|
2484
|
+
type:
|
|
2485
|
+
- number
|
|
2486
|
+
- 'null'
|
|
2487
|
+
totalTax:
|
|
2488
|
+
description: Total tax amount.
|
|
2489
|
+
minimum: 0
|
|
2490
|
+
type:
|
|
2491
|
+
- number
|
|
2492
|
+
- 'null'
|
|
2493
|
+
tags:
|
|
2494
|
+
description: Optional tags associated with the order.
|
|
2495
|
+
items:
|
|
2496
|
+
type: string
|
|
2497
|
+
type:
|
|
2498
|
+
- array
|
|
2499
|
+
- 'null'
|
|
2500
|
+
currencyCode:
|
|
2501
|
+
description: Currency code from the ISO 4217 standard (e.g., USD, EUR, GBP).
|
|
2502
|
+
type:
|
|
2503
|
+
- string
|
|
2504
|
+
- 'null'
|
|
2505
|
+
required:
|
|
2506
|
+
- orderId
|
|
2507
|
+
- createdAt
|
|
2508
|
+
- lineItems
|
|
2509
|
+
type: object
|
|
2510
|
+
orders-api-create-order-response.schema:
|
|
2511
|
+
description: Successful order creation response.
|
|
2512
|
+
properties:
|
|
2513
|
+
orderId:
|
|
2514
|
+
description: Internal Redo order ID.
|
|
2515
|
+
type: string
|
|
2516
|
+
externalOrderId:
|
|
2517
|
+
description: Original external order ID provided in the request.
|
|
2518
|
+
type: string
|
|
2519
|
+
required:
|
|
2520
|
+
- orderId
|
|
2521
|
+
- externalOrderId
|
|
2522
|
+
type: object
|
|
2523
|
+
orders-api-error.schema:
|
|
2524
|
+
description: Orders API error response.
|
|
2525
|
+
properties:
|
|
2526
|
+
error:
|
|
2527
|
+
description: Error message describing what went wrong.
|
|
2528
|
+
type: string
|
|
2529
|
+
required:
|
|
2530
|
+
- error
|
|
2531
|
+
type: object
|
|
2532
|
+
orders-api-fulfillment-line-item.schema:
|
|
2533
|
+
description: Fulfilled line item details.
|
|
2534
|
+
properties:
|
|
2535
|
+
id:
|
|
2536
|
+
description: Line item ID that was fulfilled.
|
|
2537
|
+
type: string
|
|
2538
|
+
quantity:
|
|
2539
|
+
description: Quantity fulfilled for this line item.
|
|
2540
|
+
minimum: 1
|
|
2541
|
+
maximum: 1000
|
|
2542
|
+
type: integer
|
|
2543
|
+
title:
|
|
2544
|
+
description: Title/name of the product.
|
|
2545
|
+
type: string
|
|
2546
|
+
productId:
|
|
2547
|
+
description: Product ID.
|
|
2548
|
+
type: string
|
|
2549
|
+
variantId:
|
|
2550
|
+
description: Product variant ID.
|
|
2551
|
+
type:
|
|
2552
|
+
- string
|
|
2553
|
+
- 'null'
|
|
2554
|
+
sku:
|
|
2555
|
+
description: SKU of the product.
|
|
2556
|
+
type:
|
|
2557
|
+
- string
|
|
2558
|
+
- 'null'
|
|
2559
|
+
required:
|
|
2560
|
+
- id
|
|
2561
|
+
- quantity
|
|
2562
|
+
- title
|
|
2563
|
+
- productId
|
|
2564
|
+
type: object
|
|
2565
|
+
orders-api-tracking-location.schema:
|
|
2566
|
+
description: Location information for a tracking event.
|
|
2567
|
+
properties:
|
|
2568
|
+
city:
|
|
2569
|
+
type:
|
|
2570
|
+
- string
|
|
2571
|
+
- 'null'
|
|
2572
|
+
state:
|
|
2573
|
+
type:
|
|
2574
|
+
- string
|
|
2575
|
+
- 'null'
|
|
2576
|
+
country:
|
|
2577
|
+
type:
|
|
2578
|
+
- string
|
|
2579
|
+
- 'null'
|
|
2580
|
+
postalCode:
|
|
2581
|
+
type:
|
|
2582
|
+
- string
|
|
2583
|
+
- 'null'
|
|
2584
|
+
type: object
|
|
2585
|
+
orders-api-tracking-event.schema:
|
|
2586
|
+
description: Tracking event details.
|
|
2587
|
+
properties:
|
|
2588
|
+
message:
|
|
2589
|
+
description: Tracking event message.
|
|
2590
|
+
type: string
|
|
2591
|
+
status:
|
|
2592
|
+
description: Status at this tracking event.
|
|
2593
|
+
type: string
|
|
2594
|
+
datetime:
|
|
2595
|
+
description: ISO 8601 timestamp of the tracking event.
|
|
2596
|
+
format: date-time
|
|
2597
|
+
type: string
|
|
2598
|
+
location:
|
|
2599
|
+
$ref: '#/components/schemas/orders-api-tracking-location.schema'
|
|
2600
|
+
required:
|
|
2601
|
+
- message
|
|
2602
|
+
- status
|
|
2603
|
+
- datetime
|
|
2604
|
+
type: object
|
|
2605
|
+
orders-api-fulfillment.schema:
|
|
2606
|
+
description: Fulfillment information.
|
|
2607
|
+
properties:
|
|
2608
|
+
id:
|
|
2609
|
+
description: Unique fulfillment ID.
|
|
2610
|
+
type: string
|
|
2611
|
+
createdAt:
|
|
2612
|
+
description: ISO 8601 date string for when the fulfillment was created.
|
|
2613
|
+
format: date-time
|
|
2614
|
+
type: string
|
|
2615
|
+
lineItems:
|
|
2616
|
+
description: List of line items in this fulfillment.
|
|
2617
|
+
items:
|
|
2618
|
+
$ref: '#/components/schemas/orders-api-fulfillment-line-item.schema'
|
|
2619
|
+
type: array
|
|
2620
|
+
trackingCompany:
|
|
2621
|
+
description: Shipping carrier name (e.g., FedEx, UPS).
|
|
2622
|
+
type:
|
|
2623
|
+
- string
|
|
2624
|
+
- 'null'
|
|
2625
|
+
trackingNumber:
|
|
2626
|
+
description: Tracking number for the shipment.
|
|
2627
|
+
type:
|
|
2628
|
+
- string
|
|
2629
|
+
- 'null'
|
|
2630
|
+
status:
|
|
2631
|
+
description: Current shipment status.
|
|
2632
|
+
enum:
|
|
2633
|
+
- pre_transit
|
|
2634
|
+
- unknown
|
|
2635
|
+
- in_transit
|
|
2636
|
+
- out_for_delivery
|
|
2637
|
+
- available_for_pickup
|
|
2638
|
+
- delivered
|
|
2639
|
+
- return_to_sender
|
|
2640
|
+
- failure
|
|
2641
|
+
- cancelled
|
|
2642
|
+
- error
|
|
2643
|
+
type: string
|
|
2644
|
+
trackingHistory:
|
|
2645
|
+
description: List of tracking events in chronological order.
|
|
2646
|
+
items:
|
|
2647
|
+
$ref: '#/components/schemas/orders-api-tracking-event.schema'
|
|
2648
|
+
type: array
|
|
2649
|
+
required:
|
|
2650
|
+
- id
|
|
2651
|
+
- createdAt
|
|
2652
|
+
- lineItems
|
|
2653
|
+
- status
|
|
2654
|
+
- trackingHistory
|
|
2655
|
+
type: object
|
|
2656
|
+
orders-api-get-order-response.schema:
|
|
2657
|
+
description: Response for getting an order, including fulfillments.
|
|
2658
|
+
allOf:
|
|
2659
|
+
- $ref: '#/components/schemas/orders-api-create-order-request.schema'
|
|
2660
|
+
- properties:
|
|
2661
|
+
fulfillments:
|
|
2662
|
+
description: List of fulfillments for this order.
|
|
2663
|
+
items:
|
|
2664
|
+
$ref: '#/components/schemas/orders-api-fulfillment.schema'
|
|
2665
|
+
type: array
|
|
2666
|
+
required:
|
|
2667
|
+
- fulfillments
|
|
2668
|
+
type: object
|
|
2669
|
+
orders-api-delete-order-response.schema:
|
|
2670
|
+
description: Successful order deletion response.
|
|
2671
|
+
properties:
|
|
2672
|
+
success:
|
|
2673
|
+
description: Indicates successful deletion.
|
|
2674
|
+
type: boolean
|
|
2675
|
+
orderId:
|
|
2676
|
+
description: Internal Redo order ID.
|
|
2677
|
+
type: string
|
|
2678
|
+
externalOrderId:
|
|
2679
|
+
description: External order ID that was deleted.
|
|
2680
|
+
type: string
|
|
2681
|
+
required:
|
|
2682
|
+
- success
|
|
2683
|
+
- orderId
|
|
2684
|
+
- externalOrderId
|
|
2685
|
+
type: object
|
|
2686
|
+
orders-api-create-fulfillment-request.schema:
|
|
2687
|
+
description: Request body for creating a fulfillment.
|
|
2688
|
+
properties:
|
|
2689
|
+
fulfillmentId:
|
|
2690
|
+
description: Unique identifier for the fulfillment. If not provided, will be auto-generated.
|
|
2691
|
+
type: string
|
|
2692
|
+
lineItems:
|
|
2693
|
+
description: List of line items to fulfill.
|
|
2694
|
+
items:
|
|
2695
|
+
description: Line item fulfillment details.
|
|
2696
|
+
properties:
|
|
2697
|
+
id:
|
|
2698
|
+
description: Line item ID to fulfill.
|
|
2699
|
+
type: string
|
|
2700
|
+
quantity:
|
|
2701
|
+
description: Quantity to fulfill for this line item.
|
|
2702
|
+
minimum: 1
|
|
2703
|
+
maximum: 1000
|
|
2704
|
+
type: integer
|
|
2705
|
+
required:
|
|
2706
|
+
- id
|
|
2707
|
+
- quantity
|
|
2708
|
+
type: object
|
|
2709
|
+
minItems: 1
|
|
2710
|
+
type: array
|
|
2711
|
+
tracking:
|
|
2712
|
+
description: Optional tracking information for the shipment.
|
|
2713
|
+
properties:
|
|
2714
|
+
carrier:
|
|
2715
|
+
description: Name of the shipping carrier (e.g., FedEx, UPS, USPS).
|
|
2716
|
+
type: string
|
|
2717
|
+
code:
|
|
2718
|
+
description: Tracking number/code for the shipment.
|
|
2719
|
+
type: string
|
|
2720
|
+
required:
|
|
2721
|
+
- carrier
|
|
2722
|
+
- code
|
|
2723
|
+
type:
|
|
2724
|
+
- object
|
|
2725
|
+
- 'null'
|
|
2726
|
+
useDummyTracking:
|
|
2727
|
+
description: If true, creates a dummy tracker for testing without calling external tracking APIs. Useful for development and testing the fulfillment status update endpoint.
|
|
2728
|
+
type: boolean
|
|
2729
|
+
initialTracking:
|
|
2730
|
+
description: Initial tracking information for the dummy tracker. Only used when useDummyTracking is true. If not specified, defaults to status "pre_transit".
|
|
2731
|
+
properties:
|
|
2732
|
+
status:
|
|
2733
|
+
description: Initial shipment status for the dummy tracker. Only actual statuses are allowed (not automation events).
|
|
2734
|
+
enum:
|
|
2735
|
+
- pre_transit
|
|
2736
|
+
- unknown
|
|
2737
|
+
- in_transit
|
|
2738
|
+
- out_for_delivery
|
|
2739
|
+
- available_for_pickup
|
|
2740
|
+
- delivered
|
|
2741
|
+
- return_to_sender
|
|
2742
|
+
- failure
|
|
2743
|
+
- cancelled
|
|
2744
|
+
- error
|
|
2745
|
+
type: string
|
|
2746
|
+
estimatedDeliveryDate:
|
|
2747
|
+
description: Estimated delivery date in ISO 8601 format.
|
|
2748
|
+
format: date-time
|
|
2749
|
+
type:
|
|
2750
|
+
- string
|
|
2751
|
+
- 'null'
|
|
2752
|
+
message:
|
|
2753
|
+
description: Tracking event message.
|
|
2754
|
+
type:
|
|
2755
|
+
- string
|
|
2756
|
+
- 'null'
|
|
2757
|
+
datetime:
|
|
2758
|
+
description: Timestamp of the tracking event in ISO 8601 format.
|
|
2759
|
+
format: date-time
|
|
2760
|
+
type:
|
|
2761
|
+
- string
|
|
2762
|
+
- 'null'
|
|
2763
|
+
location:
|
|
2764
|
+
$ref: '#/components/schemas/orders-api-tracking-location.schema'
|
|
2765
|
+
required:
|
|
2766
|
+
- status
|
|
2767
|
+
type: object
|
|
2768
|
+
required:
|
|
2769
|
+
- lineItems
|
|
2770
|
+
type: object
|
|
2771
|
+
orders-api-fulfillment-response.schema:
|
|
2772
|
+
description: Successful fulfillment operation response.
|
|
2773
|
+
properties:
|
|
2774
|
+
success:
|
|
2775
|
+
const: true
|
|
2776
|
+
type: boolean
|
|
2777
|
+
fulfillment:
|
|
2778
|
+
$ref: '#/components/schemas/orders-api-fulfillment.schema'
|
|
2779
|
+
required:
|
|
2780
|
+
- success
|
|
2781
|
+
- fulfillment
|
|
2782
|
+
type: object
|
|
2783
|
+
orders-api-update-fulfillment-status-request.schema:
|
|
2784
|
+
description: |
|
|
2785
|
+
Request body for updating a fulfillment's tracking status.
|
|
2786
|
+
|
|
2787
|
+
The status field accepts two types of values:
|
|
2788
|
+
- **Statuses** (e.g., `in_transit`, `delivered`): Update the shipment's current status and trigger configured automations.
|
|
2789
|
+
- **Events** (e.g., `stalled_in_transit`, `delayed`, `arriving_early`): Trigger automations without changing the current shipment status.
|
|
2790
|
+
|
|
2791
|
+
Both can update other fields like estimated delivery date and tracking history.
|
|
2792
|
+
properties:
|
|
2793
|
+
status:
|
|
2794
|
+
description: |
|
|
2795
|
+
Shipment status or automation event.
|
|
2796
|
+
|
|
2797
|
+
Statuses update the current shipment status and trigger automations:
|
|
2798
|
+
`pre_transit`, `in_transit`, `out_for_delivery`, `available_for_pickup`, `delivered`, `return_to_sender`, `failure`, `cancelled`, `error`.
|
|
2799
|
+
|
|
2800
|
+
Events trigger automations without changing the current status:
|
|
2801
|
+
`stalled_in_transit`, `delayed`, `arriving_early`.
|
|
2802
|
+
enum:
|
|
2803
|
+
- pre_transit
|
|
2804
|
+
- in_transit
|
|
2805
|
+
- out_for_delivery
|
|
2806
|
+
- available_for_pickup
|
|
2807
|
+
- delivered
|
|
2808
|
+
- return_to_sender
|
|
2809
|
+
- failure
|
|
2810
|
+
- cancelled
|
|
2811
|
+
- error
|
|
2812
|
+
- stalled_in_transit
|
|
2813
|
+
- delayed
|
|
2814
|
+
- arriving_early
|
|
2815
|
+
type: string
|
|
2816
|
+
estimatedDeliveryDate:
|
|
2817
|
+
description: Estimated delivery date in ISO 8601 format.
|
|
2818
|
+
format: date-time
|
|
2819
|
+
type:
|
|
2820
|
+
- string
|
|
2821
|
+
- 'null'
|
|
2822
|
+
message:
|
|
2823
|
+
description: Tracking event message (e.g., "Departed shipping partner facility").
|
|
2824
|
+
type:
|
|
2825
|
+
- string
|
|
2826
|
+
- 'null'
|
|
2827
|
+
datetime:
|
|
2828
|
+
description: Timestamp of the tracking event in ISO 8601 format.
|
|
2829
|
+
format: date-time
|
|
2830
|
+
type:
|
|
2831
|
+
- string
|
|
2832
|
+
- 'null'
|
|
2833
|
+
location:
|
|
2834
|
+
$ref: '#/components/schemas/orders-api-tracking-location.schema'
|
|
2835
|
+
required:
|
|
2836
|
+
- status
|
|
2837
|
+
type: object
|
|
2082
2838
|
bulk-product-family-option.schema:
|
|
2083
2839
|
description: A product option (e.g. Size, Color) with its possible values.
|
|
2084
2840
|
properties:
|
package/package.json
CHANGED