@redotech/redo-api-schema 2.2.447 → 2.2.476

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 CHANGED
@@ -165,18 +165,53 @@ export interface paths {
165
165
  * @description Create a custom event to trigger flows with merchant-defined event names and properties.
166
166
  *
167
167
  * Custom events allow merchants to trigger flows based on events from their own systems.
168
- * Events can include custom properties that are accessible in email and SMS templates.
168
+ * Events can include custom properties that are accessible in email and SMS templates,
169
+ * and are persisted for segmentation and historical queries.
169
170
  *
170
- * ## Customer Matching
171
- * The API matches customers by email or phone number. At least one must be provided.
171
+ * ## Identity Resolution
172
+ * The API resolves customers using the following priority order:
173
+ * 1. `customer.id` — Redo customer ObjectId (highest priority)
174
+ * 2. `customer.email` — customer email address
175
+ * 3. `customer.phoneNumber` — customer phone number
172
176
  *
173
- * If no matching customer is found, the request will fail with a 404 error.
177
+ * At least one identifier must be provided. If no matching customer is found, one will
178
+ * be created automatically. If `customer.id` is provided but not found, the API falls
179
+ * back to email/phone rather than returning 404.
180
+ *
181
+ * ## Datetime Formatting
182
+ * All datetime values must be formatted as ISO 8601 (RFC 3339) strings, e.g., `2026-04-02T12:00:00Z`.
183
+ * This applies to `eventTimestamp`, any date-valued properties in `data`, and any date-valued `customFields`.
184
+ * Strings matching this format are automatically detected and indexed as dates for segmentation.
174
185
  *
175
186
  * ## Rate Limiting
176
187
  * This endpoint is rate-limited to 100 requests per second per store.
177
188
  */
178
189
  post: operations["Custom event create"];
179
190
  };
191
+ "/stores/{storeId}/events/bulk": {
192
+ /**
193
+ * Bulk create custom events
194
+ * @description Create multiple custom events in a single request. Accepts up to 100 events per request.
195
+ *
196
+ * Each event is validated independently. The response includes per-event results, allowing
197
+ * partial failures — some events may be accepted while others are rejected due to validation
198
+ * errors.
199
+ *
200
+ * ## Identity Resolution
201
+ * Each event resolves customers independently using the same priority order as the
202
+ * single-event endpoint:
203
+ * 1. `customer.id` — Redo customer ObjectId (highest priority)
204
+ * 2. `customer.email` — customer email address
205
+ * 3. `customer.phoneNumber` — customer phone number
206
+ *
207
+ * At least one identifier must be provided per event. If no matching customer is found,
208
+ * one will be created automatically.
209
+ *
210
+ * ## Rate Limiting
211
+ * This endpoint is rate-limited to 100 requests per second per store.
212
+ */
213
+ post: operations["Bulk create custom events"];
214
+ };
180
215
  "/stores/{storeId}/invoices": {
181
216
  /**
182
217
  * List Invoices
@@ -184,6 +219,71 @@ export interface paths {
184
219
  */
185
220
  get: operations["Invoice list"];
186
221
  };
222
+ "/stores/{storeId}/orders": {
223
+ /**
224
+ * Create Order
225
+ * @description Create a new order in the system with line items, customer information, and shipping details.
226
+ */
227
+ post: operations["Order create"];
228
+ parameters: {
229
+ path: {
230
+ storeId: components["parameters"]["store-id.param"];
231
+ };
232
+ };
233
+ };
234
+ "/stores/{storeId}/orders/{orderId}": {
235
+ /**
236
+ * Get Order
237
+ * @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.
238
+ */
239
+ get: operations["Order get"];
240
+ /**
241
+ * Delete Order
242
+ * @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.
243
+ */
244
+ delete: operations["Order delete"];
245
+ parameters: {
246
+ path: {
247
+ storeId: components["parameters"]["store-id.param"];
248
+ orderId: components["parameters"]["order-id.param"];
249
+ };
250
+ };
251
+ };
252
+ "/stores/{storeId}/orders/{orderId}/fulfillments": {
253
+ /**
254
+ * Create Fulfillment
255
+ * @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.
256
+ */
257
+ post: operations["Fulfillment create"];
258
+ parameters: {
259
+ path: {
260
+ storeId: components["parameters"]["store-id.param"];
261
+ orderId: components["parameters"]["order-id.param"];
262
+ };
263
+ };
264
+ };
265
+ "/stores/{storeId}/orders/{orderId}/fulfillments/{fulfillmentId}/shipment-status": {
266
+ /**
267
+ * Update Fulfillment Status
268
+ * @description Post a shipment status update or trigger an automation event for a fulfillment.
269
+ *
270
+ * The status field accepts two types of values:
271
+ *
272
+ * **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.
273
+ *
274
+ * **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.
275
+ *
276
+ * Both statuses and events can update other fields like estimated delivery date and tracking history.
277
+ */
278
+ post: operations["Fulfillment status update"];
279
+ parameters: {
280
+ path: {
281
+ storeId: components["parameters"]["store-id.param"];
282
+ orderId: components["parameters"]["order-id.param"];
283
+ fulfillmentId: components["parameters"]["fulfillment-id.param"];
284
+ };
285
+ };
286
+ };
187
287
  "/stores/{storeId}/products/bulk-upload": {
188
288
  /**
189
289
  * Bulk upload products (Beta)
@@ -327,6 +427,14 @@ export interface components {
327
427
  */
328
428
  state: string;
329
429
  };
430
+ /**
431
+ * Bulk Custom Event Request
432
+ * @description Request body for sending multiple custom events in a single request.
433
+ */
434
+ "bulk-custom-event-request.schema": {
435
+ /** @description Array of custom events to create. */
436
+ events: components["schemas"]["custom-event-request.schema"][];
437
+ };
330
438
  /**
331
439
  * Product Family Image
332
440
  * @description An image associated with a product family or variant.
@@ -730,49 +838,77 @@ export interface components {
730
838
  * @description Custom event to trigger flows with merchant-defined event names and properties.
731
839
  */
732
840
  "custom-event-request.schema": {
733
- /** @description Cart context for product recommendations in triggered emails. If not provided, no cart-aware recommendations will be made. */
734
- cart_context?: ({
735
- /** @description Items already in the customer's cart. */
736
- alreadyInCart: {
737
- productId: string;
738
- quantity?: number;
739
- variantId: string;
740
- }[];
741
- /** @description The ID of an existing cart to use for recommendations. */
742
- existingCartId: string | null;
743
- /** @description Product IDs to use as the basis for recommendations. */
744
- productIdsForRecommendations: string[];
745
- }) | null;
746
- /** @description Customer email address (one of email or phone is required). */
747
- email?: string;
748
- /** @description The name of the custom event (e.g., 'user_registered', 'purchase_completed'). */
749
- event_name: string;
750
- /**
751
- * Format: date-time
752
- * @description ISO 8601 timestamp when the event occurred. Defaults to current time if not provided.
841
+ /** @description Customer identity and profile fields. At least one of `id`, `email`, or `phoneNumber` is required for identity resolution. */
842
+ customer: {
843
+ /** @description Merchant-defined customer attributes as key-value pairs. Values can be strings, numbers, or booleans. Date values should be passed as ISO 8601 strings (e.g., "2026-04-02T12:00:00Z") and are automatically detected and indexed as dates. */
844
+ customFields?: {
845
+ [key: string]: string | number | boolean;
846
+ };
847
+ /**
848
+ * Format: email
849
+ * @description Customer email address. Used for identity resolution.
850
+ */
851
+ email?: string;
852
+ /** @description Customer first name. Applied with patch semantics — does not erase existing value if omitted. */
853
+ firstName?: string;
854
+ /** @description Redo customer ObjectId. Used for identity resolution. Takes priority over email and phoneNumber when provided. */
855
+ id?: string;
856
+ /** @description Customer last name. Applied with patch semantics does not erase existing value if omitted. */
857
+ lastName?: string;
858
+ /** @description Customer location for profile enrichment. All fields are optional. */
859
+ location?: {
860
+ /** @description City name. */
861
+ city?: string;
862
+ /** @description Country name. */
863
+ country?: string;
864
+ /** @description ISO 3166-1 alpha-2 country code (e.g., "US", "GB"). */
865
+ countryCode?: string;
866
+ /** @description IANA time zone identifier (e.g., "America/New_York"). */
867
+ ianaTimeZoneName?: string;
868
+ /** @description Geographic latitude coordinate. */
869
+ latitude?: number;
870
+ /** @description Geographic longitude coordinate. */
871
+ longitude?: number;
872
+ /** @description Postal or ZIP code. */
873
+ postalCode?: string;
874
+ /** @description State or province name. */
875
+ state?: string;
876
+ /** @description State or province abbreviation (e.g., "CA", "NY"). */
877
+ stateCode?: string;
878
+ /** @description Primary street address. */
879
+ street1?: string;
880
+ /** @description Secondary address line (apartment, suite, etc.). */
881
+ street2?: string;
882
+ };
883
+ /** @description Customer phone number in E.164 format. Used for identity resolution. */
884
+ phoneNumber?: string;
885
+ };
886
+ /**
887
+ * @description Custom properties for this event (must not exceed 400 properties). The size of the event payload must not exceed 5 MB, and each string cannot be larger than 100 KB. For a full list of data limits on event payloads, see [Limitations](/docs/guides/integrations/custom-events#rate-limits).
888
+ *
889
+ * Note any top-level property that is not an object can be used to create segments. The `$extra` property records any non-segmentable values that can be referenced later, e.g., HTML templates are useful on a segment but are not used to create a segment.
753
890
  */
754
- event_timestamp?: string;
755
- /** @description Customer phone number (one of email or phone is required). */
756
- phone?: string;
757
- /** @description Custom properties for this event. Access in templates using dot notation (e.g., {{ properties.product_name }}). */
758
- properties?: {
759
- [key: string]: unknown;
891
+ data?: {
892
+ /** @description Non-segmentable metadata bucket. Values inside `$extra` are stored on the event but excluded from segmentation indexes. Unlike top-level data properties, values of 0, null, and empty string are NOT stripped inside `$extra`. Use this for large text, debug info, nested objects, arrays, or any data you want to reference in templates but not segment on. */
893
+ $extra?: {
894
+ [key: string]: unknown;
895
+ };
896
+ [key: string]: (string | number | boolean) | undefined;
760
897
  };
761
- };
762
- /**
763
- * Custom Event Response
764
- * @description Response after successfully creating a custom event.
765
- */
766
- "custom-event-response.schema": {
767
- /** @description The unique identifier for the created event. */
768
- event_id: string;
769
- /** @description The name of the custom event that was created. */
770
- event_name: string;
898
+ /** @description The name of the custom event (e.g., 'User Registered', 'Loyalty Reward Earned'). */
899
+ eventName: string;
771
900
  /**
772
- * @description Status of the event processing.
773
- * @enum {string}
901
+ * Format: date-time
902
+ * @description ISO 8601 timestamp when the event occurred. Defaults to current time if not provided.
774
903
  */
775
- status: "processed";
904
+ eventTimestamp?: string;
905
+ /** @description Merchant-controlled deduplication key (1-255 characters). If provided, subsequent events with the same uniqueId for the same store are silently deduplicated. Use this for safe retries and at-least-once delivery patterns. */
906
+ uniqueId?: string;
907
+ /** @description Monetary or conversion value associated with the event (e.g., purchase amount). */
908
+ value?: number;
909
+ /** @description ISO 4217 currency code for the value field (e.g., "USD", "EUR"). */
910
+ valueCurrency?: string;
911
+ [key: string]: unknown;
776
912
  };
777
913
  /**
778
914
  * Customer Location
@@ -1136,6 +1272,253 @@ export interface components {
1136
1272
  */
1137
1273
  total: components["schemas"]["money.schema"];
1138
1274
  };
1275
+ /** @description Request body for creating a fulfillment. */
1276
+ "orders-api-create-fulfillment-request.schema": {
1277
+ /** @description Unique identifier for the fulfillment. If not provided, will be auto-generated. */
1278
+ fulfillmentId?: string;
1279
+ /** @description Initial tracking information for the dummy tracker. Only used when useDummyTracking is true. If not specified, defaults to status "pre_transit". */
1280
+ initialTracking?: {
1281
+ /**
1282
+ * Format: date-time
1283
+ * @description Timestamp of the tracking event in ISO 8601 format.
1284
+ */
1285
+ datetime?: string | null;
1286
+ /**
1287
+ * Format: date-time
1288
+ * @description Estimated delivery date in ISO 8601 format.
1289
+ */
1290
+ estimatedDeliveryDate?: string | null;
1291
+ location?: components["schemas"]["orders-api-tracking-location.schema"];
1292
+ /** @description Tracking event message. */
1293
+ message?: string | null;
1294
+ /**
1295
+ * @description Initial shipment status for the dummy tracker. Only actual statuses are allowed (not automation events).
1296
+ * @enum {string}
1297
+ */
1298
+ status: "pre_transit" | "unknown" | "in_transit" | "out_for_delivery" | "available_for_pickup" | "delivered" | "return_to_sender" | "failure" | "cancelled" | "error";
1299
+ };
1300
+ /** @description List of line items to fulfill. */
1301
+ lineItems: {
1302
+ /** @description Line item ID to fulfill. */
1303
+ id: string;
1304
+ /** @description Quantity to fulfill for this line item. */
1305
+ quantity: number;
1306
+ }[];
1307
+ /** @description Optional tracking information for the shipment. */
1308
+ tracking?: {
1309
+ /** @description Name of the shipping carrier (e.g., FedEx, UPS, USPS). */
1310
+ carrier: string;
1311
+ /** @description Tracking number/code for the shipment. */
1312
+ code: string;
1313
+ } | null;
1314
+ /** @description If true, creates a dummy tracker for testing without calling external tracking APIs. Useful for development and testing the fulfillment status update endpoint. */
1315
+ useDummyTracking?: boolean;
1316
+ };
1317
+ /** @description Request body for creating an order. */
1318
+ "orders-api-create-order-request.schema": {
1319
+ /**
1320
+ * Format: date-time
1321
+ * @description ISO 8601 date string for when the order was created.
1322
+ */
1323
+ createdAt: string;
1324
+ /** @description Currency code from the ISO 4217 standard (e.g., USD, EUR, GBP). */
1325
+ currencyCode?: string | null;
1326
+ customer?: components["schemas"]["orders-api-customer.schema"];
1327
+ /** @description List of line items in the order. */
1328
+ lineItems: components["schemas"]["orders-api-line-item.schema"][];
1329
+ /** @description Unique identifier for the order. */
1330
+ orderId: string;
1331
+ shipping?: components["schemas"]["orders-api-shipping.schema"];
1332
+ /** @description Subtotal price excluding tax and shipping. */
1333
+ subtotalPrice?: number | null;
1334
+ /** @description Optional tags associated with the order. */
1335
+ tags?: string[] | null;
1336
+ /** @description Total order price including tax and shipping. */
1337
+ totalPrice?: number | null;
1338
+ /** @description Total tax amount. */
1339
+ totalTax?: number | null;
1340
+ };
1341
+ /** @description Successful order creation response. */
1342
+ "orders-api-create-order-response.schema": {
1343
+ /** @description Original external order ID provided in the request. */
1344
+ externalOrderId: string;
1345
+ /** @description Internal Redo order ID. */
1346
+ orderId: string;
1347
+ };
1348
+ /** @description Customer information. */
1349
+ "orders-api-customer.schema": {
1350
+ /** @description Customer email address. */
1351
+ email?: string | null;
1352
+ /** @description Customer first name. */
1353
+ firstName?: string | null;
1354
+ /** @description Customer ID from the external system. */
1355
+ id?: string | null;
1356
+ /** @description Customer last name. */
1357
+ lastName?: string | null;
1358
+ /** @description Customer full name. */
1359
+ name?: string | null;
1360
+ /** @description Customer phone number. */
1361
+ phoneNumber?: string | null;
1362
+ };
1363
+ /** @description Successful order deletion response. */
1364
+ "orders-api-delete-order-response.schema": {
1365
+ /** @description External order ID that was deleted. */
1366
+ externalOrderId: string;
1367
+ /** @description Internal Redo order ID. */
1368
+ orderId: string;
1369
+ /** @description Indicates successful deletion. */
1370
+ success: boolean;
1371
+ };
1372
+ /** @description Orders API error response. */
1373
+ "orders-api-error.schema": {
1374
+ /** @description Error message describing what went wrong. */
1375
+ error: string;
1376
+ };
1377
+ /** @description Fulfilled line item details. */
1378
+ "orders-api-fulfillment-line-item.schema": {
1379
+ /** @description Line item ID that was fulfilled. */
1380
+ id: string;
1381
+ /** @description Product ID. */
1382
+ productId: string;
1383
+ /** @description Quantity fulfilled for this line item. */
1384
+ quantity: number;
1385
+ /** @description SKU of the product. */
1386
+ sku?: string | null;
1387
+ /** @description Title/name of the product. */
1388
+ title: string;
1389
+ /** @description Product variant ID. */
1390
+ variantId?: string | null;
1391
+ };
1392
+ /** @description Successful fulfillment operation response. */
1393
+ "orders-api-fulfillment-response.schema": {
1394
+ fulfillment: components["schemas"]["orders-api-fulfillment.schema"];
1395
+ /** @constant */
1396
+ success: true;
1397
+ };
1398
+ /** @description Fulfillment information. */
1399
+ "orders-api-fulfillment.schema": {
1400
+ /**
1401
+ * Format: date-time
1402
+ * @description ISO 8601 date string for when the fulfillment was created.
1403
+ */
1404
+ createdAt: string;
1405
+ /** @description Unique fulfillment ID. */
1406
+ id: string;
1407
+ /** @description List of line items in this fulfillment. */
1408
+ lineItems: components["schemas"]["orders-api-fulfillment-line-item.schema"][];
1409
+ /**
1410
+ * @description Current shipment status.
1411
+ * @enum {string}
1412
+ */
1413
+ status: "pre_transit" | "unknown" | "in_transit" | "out_for_delivery" | "available_for_pickup" | "delivered" | "return_to_sender" | "failure" | "cancelled" | "error";
1414
+ /** @description Shipping carrier name (e.g., FedEx, UPS). */
1415
+ trackingCompany?: string | null;
1416
+ /** @description List of tracking events in chronological order. */
1417
+ trackingHistory: components["schemas"]["orders-api-tracking-event.schema"][];
1418
+ /** @description Tracking number for the shipment. */
1419
+ trackingNumber?: string | null;
1420
+ };
1421
+ /** @description Response for getting an order, including fulfillments. */
1422
+ "orders-api-get-order-response.schema": components["schemas"]["orders-api-create-order-request.schema"] & {
1423
+ /** @description List of fulfillments for this order. */
1424
+ fulfillments: components["schemas"]["orders-api-fulfillment.schema"][];
1425
+ };
1426
+ /** @description Line item in the order. */
1427
+ "orders-api-line-item.schema": {
1428
+ /** @description Unique identifier for the line item. */
1429
+ id: string;
1430
+ /** @description Price per unit of the product. */
1431
+ price?: number | null;
1432
+ /** @description Identifier for the product. */
1433
+ productId: string;
1434
+ /** @description Quantity of the product ordered. */
1435
+ quantity: number;
1436
+ /** @description SKU of the product. */
1437
+ sku?: string | null;
1438
+ /** @description Title/name of the product. */
1439
+ title: string;
1440
+ /** @description Identifier for the product variant. */
1441
+ variantId?: string | null;
1442
+ };
1443
+ /** @description Shipping address. */
1444
+ "orders-api-shipping-address.schema": {
1445
+ /** @description Primary address line. */
1446
+ address1?: string | null;
1447
+ /** @description Secondary address line. */
1448
+ address2?: string | null;
1449
+ /** @description City. */
1450
+ city?: string | null;
1451
+ /** @description Country. */
1452
+ country?: string | null;
1453
+ /** @description Postal or zip code. */
1454
+ postalCode?: string | null;
1455
+ /** @description State or province. */
1456
+ province?: string | null;
1457
+ };
1458
+ /** @description Shipping information. */
1459
+ "orders-api-shipping.schema": {
1460
+ address?: components["schemas"]["orders-api-shipping-address.schema"];
1461
+ /** @description Shipping cost. */
1462
+ cost?: number | null;
1463
+ /** @description Shipping method name. */
1464
+ method?: string | null;
1465
+ };
1466
+ /** @description Tracking event details. */
1467
+ "orders-api-tracking-event.schema": {
1468
+ /**
1469
+ * Format: date-time
1470
+ * @description ISO 8601 timestamp of the tracking event.
1471
+ */
1472
+ datetime: string;
1473
+ location?: components["schemas"]["orders-api-tracking-location.schema"];
1474
+ /** @description Tracking event message. */
1475
+ message: string;
1476
+ /** @description Status at this tracking event. */
1477
+ status: string;
1478
+ };
1479
+ /** @description Location information for a tracking event. */
1480
+ "orders-api-tracking-location.schema": {
1481
+ city?: string | null;
1482
+ country?: string | null;
1483
+ postalCode?: string | null;
1484
+ state?: string | null;
1485
+ };
1486
+ /**
1487
+ * @description Request body for updating a fulfillment's tracking status.
1488
+ *
1489
+ * The status field accepts two types of values:
1490
+ * - **Statuses** (e.g., `in_transit`, `delivered`): Update the shipment's current status and trigger configured automations.
1491
+ * - **Events** (e.g., `stalled_in_transit`, `delayed`, `arriving_early`): Trigger automations without changing the current shipment status.
1492
+ *
1493
+ * Both can update other fields like estimated delivery date and tracking history.
1494
+ */
1495
+ "orders-api-update-fulfillment-status-request.schema": {
1496
+ /**
1497
+ * Format: date-time
1498
+ * @description Timestamp of the tracking event in ISO 8601 format.
1499
+ */
1500
+ datetime?: string | null;
1501
+ /**
1502
+ * Format: date-time
1503
+ * @description Estimated delivery date in ISO 8601 format.
1504
+ */
1505
+ estimatedDeliveryDate?: string | null;
1506
+ location?: components["schemas"]["orders-api-tracking-location.schema"];
1507
+ /** @description Tracking event message (e.g., "Departed shipping partner facility"). */
1508
+ message?: string | null;
1509
+ /**
1510
+ * @description Shipment status or automation event.
1511
+ *
1512
+ * Statuses update the current shipment status and trigger automations:
1513
+ * `pre_transit`, `in_transit`, `out_for_delivery`, `available_for_pickup`, `delivered`, `return_to_sender`, `failure`, `cancelled`, `error`.
1514
+ *
1515
+ * Events trigger automations without changing the current status:
1516
+ * `stalled_in_transit`, `delayed`, `arriving_early`.
1517
+ *
1518
+ * @enum {string}
1519
+ */
1520
+ status: "pre_transit" | "in_transit" | "out_for_delivery" | "available_for_pickup" | "delivered" | "return_to_sender" | "failure" | "cancelled" | "error" | "stalled_in_transit" | "delayed" | "arriving_early";
1521
+ };
1139
1522
  /**
1140
1523
  * Person name
1141
1524
  * @description Person name.
@@ -1955,10 +2338,14 @@ export interface components {
1955
2338
  };
1956
2339
  responses: never;
1957
2340
  parameters: {
2341
+ /** @description Unique fulfillment identifier. */
2342
+ "fulfillment-id.param": string;
1958
2343
  /** @description Optional idempotency key for safely retrying create requests. */
1959
2344
  "idempotency-key.param"?: string;
1960
2345
  /** @description Invoice ID */
1961
2346
  "invoice-id.param": string;
2347
+ /** @description Order ID. Can be either the external order ID provided when creating the order, or the internal Redo order ID. */
2348
+ "order-id.param": string;
1962
2349
  /**
1963
2350
  * @description Page marker, from X-Page-Next header
1964
2351
  * @example 64df700931a04885276c3364
@@ -2602,12 +2989,23 @@ export interface operations {
2602
2989
  * @description Create a custom event to trigger flows with merchant-defined event names and properties.
2603
2990
  *
2604
2991
  * Custom events allow merchants to trigger flows based on events from their own systems.
2605
- * Events can include custom properties that are accessible in email and SMS templates.
2992
+ * Events can include custom properties that are accessible in email and SMS templates,
2993
+ * and are persisted for segmentation and historical queries.
2994
+ *
2995
+ * ## Identity Resolution
2996
+ * The API resolves customers using the following priority order:
2997
+ * 1. `customer.id` — Redo customer ObjectId (highest priority)
2998
+ * 2. `customer.email` — customer email address
2999
+ * 3. `customer.phoneNumber` — customer phone number
2606
3000
  *
2607
- * ## Customer Matching
2608
- * The API matches customers by email or phone number. At least one must be provided.
3001
+ * At least one identifier must be provided. If no matching customer is found, one will
3002
+ * be created automatically. If `customer.id` is provided but not found, the API falls
3003
+ * back to email/phone rather than returning 404.
2609
3004
  *
2610
- * If no matching customer is found, the request will fail with a 404 error.
3005
+ * ## Datetime Formatting
3006
+ * All datetime values must be formatted as ISO 8601 (RFC 3339) strings, e.g., `2026-04-02T12:00:00Z`.
3007
+ * This applies to `eventTimestamp`, any date-valued properties in `data`, and any date-valued `customFields`.
3008
+ * Strings matching this format are automatically detected and indexed as dates for segmentation.
2611
3009
  *
2612
3010
  * ## Rate Limiting
2613
3011
  * This endpoint is rate-limited to 100 requests per second per store.
@@ -2624,19 +3022,80 @@ export interface operations {
2624
3022
  };
2625
3023
  };
2626
3024
  responses: {
2627
- /** @description Event created successfully */
2628
- 200: {
3025
+ /** @description Event accepted and queued for processing. No response body is returned. */
3026
+ 202: {
3027
+ content: never;
3028
+ };
3029
+ /** @description Invalid request body or missing required customer identifier */
3030
+ 400: {
2629
3031
  content: {
2630
- "application/json": components["schemas"]["custom-event-response.schema"];
3032
+ "application/json": components["schemas"]["error.schema"];
2631
3033
  };
2632
3034
  };
2633
- /** @description Invalid request body or missing required customer identifier */
3035
+ /** @description Store not found */
3036
+ 404: {
3037
+ content: {
3038
+ "application/json": components["schemas"]["error.schema"];
3039
+ };
3040
+ };
3041
+ /** @description Rate limit exceeded */
3042
+ 429: {
3043
+ content: {
3044
+ "application/json": components["schemas"]["error.schema"];
3045
+ };
3046
+ };
3047
+ /** @description Error */
3048
+ default: {
3049
+ content: {
3050
+ "application/problem+json": components["schemas"]["error.schema"];
3051
+ };
3052
+ };
3053
+ };
3054
+ };
3055
+ /**
3056
+ * Bulk create custom events
3057
+ * @description Create multiple custom events in a single request. Accepts up to 100 events per request.
3058
+ *
3059
+ * Each event is validated independently. The response includes per-event results, allowing
3060
+ * partial failures — some events may be accepted while others are rejected due to validation
3061
+ * errors.
3062
+ *
3063
+ * ## Identity Resolution
3064
+ * Each event resolves customers independently using the same priority order as the
3065
+ * single-event endpoint:
3066
+ * 1. `customer.id` — Redo customer ObjectId (highest priority)
3067
+ * 2. `customer.email` — customer email address
3068
+ * 3. `customer.phoneNumber` — customer phone number
3069
+ *
3070
+ * At least one identifier must be provided per event. If no matching customer is found,
3071
+ * one will be created automatically.
3072
+ *
3073
+ * ## Rate Limiting
3074
+ * This endpoint is rate-limited to 100 requests per second per store.
3075
+ */
3076
+ "Bulk create custom events": {
3077
+ parameters: {
3078
+ path: {
3079
+ storeId: components["parameters"]["store-id.param"];
3080
+ };
3081
+ };
3082
+ requestBody: {
3083
+ content: {
3084
+ "application/json": components["schemas"]["bulk-custom-event-request.schema"];
3085
+ };
3086
+ };
3087
+ responses: {
3088
+ /** @description Bulk request accepted and queued for processing. No response body is returned. */
3089
+ 202: {
3090
+ content: never;
3091
+ };
3092
+ /** @description Invalid request body (e.g., events array missing or exceeds 100 items) */
2634
3093
  400: {
2635
3094
  content: {
2636
3095
  "application/json": components["schemas"]["error.schema"];
2637
3096
  };
2638
3097
  };
2639
- /** @description Customer not found with provided identifier */
3098
+ /** @description Store not found */
2640
3099
  404: {
2641
3100
  content: {
2642
3101
  "application/json": components["schemas"]["error.schema"];
@@ -2683,6 +3142,237 @@ export interface operations {
2683
3142
  };
2684
3143
  };
2685
3144
  };
3145
+ /**
3146
+ * Create Order
3147
+ * @description Create a new order in the system with line items, customer information, and shipping details.
3148
+ */
3149
+ "Order create": {
3150
+ parameters: {
3151
+ path: {
3152
+ storeId: components["parameters"]["store-id.param"];
3153
+ };
3154
+ };
3155
+ requestBody: {
3156
+ content: {
3157
+ "application/json": components["schemas"]["orders-api-create-order-request.schema"];
3158
+ };
3159
+ };
3160
+ responses: {
3161
+ /** @description Success */
3162
+ 200: {
3163
+ content: {
3164
+ "application/json": components["schemas"]["orders-api-create-order-response.schema"];
3165
+ };
3166
+ };
3167
+ /** @description Bad Request (validation error) */
3168
+ 400: {
3169
+ content: {
3170
+ "application/json": components["schemas"]["orders-api-error.schema"];
3171
+ };
3172
+ };
3173
+ /** @description Unauthorized (invalid or missing API token) */
3174
+ 401: {
3175
+ content: {
3176
+ "application/json": components["schemas"]["orders-api-error.schema"];
3177
+ };
3178
+ };
3179
+ /** @description Conflict (duplicate order ID) */
3180
+ 409: {
3181
+ content: {
3182
+ "application/json": components["schemas"]["orders-api-error.schema"];
3183
+ };
3184
+ };
3185
+ /** @description Error */
3186
+ default: {
3187
+ content: {
3188
+ "application/problem+json": components["schemas"]["error.schema"];
3189
+ };
3190
+ };
3191
+ };
3192
+ };
3193
+ /**
3194
+ * Get Order
3195
+ * @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.
3196
+ */
3197
+ "Order get": {
3198
+ parameters: {
3199
+ path: {
3200
+ storeId: components["parameters"]["store-id.param"];
3201
+ orderId: components["parameters"]["order-id.param"];
3202
+ };
3203
+ };
3204
+ responses: {
3205
+ /** @description Success */
3206
+ 200: {
3207
+ content: {
3208
+ "application/json": components["schemas"]["orders-api-get-order-response.schema"];
3209
+ };
3210
+ };
3211
+ /** @description Unauthorized (invalid or missing API token) */
3212
+ 401: {
3213
+ content: {
3214
+ "application/json": components["schemas"]["orders-api-error.schema"];
3215
+ };
3216
+ };
3217
+ /** @description Order not found */
3218
+ 404: {
3219
+ content: {
3220
+ "application/json": components["schemas"]["orders-api-error.schema"];
3221
+ };
3222
+ };
3223
+ /** @description Error */
3224
+ default: {
3225
+ content: {
3226
+ "application/problem+json": components["schemas"]["error.schema"];
3227
+ };
3228
+ };
3229
+ };
3230
+ };
3231
+ /**
3232
+ * Delete Order
3233
+ * @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.
3234
+ */
3235
+ "Order delete": {
3236
+ parameters: {
3237
+ path: {
3238
+ storeId: components["parameters"]["store-id.param"];
3239
+ orderId: components["parameters"]["order-id.param"];
3240
+ };
3241
+ };
3242
+ responses: {
3243
+ /** @description Success */
3244
+ 200: {
3245
+ content: {
3246
+ "application/json": components["schemas"]["orders-api-delete-order-response.schema"];
3247
+ };
3248
+ };
3249
+ /** @description Unauthorized (invalid or missing API token) */
3250
+ 401: {
3251
+ content: {
3252
+ "application/json": components["schemas"]["orders-api-error.schema"];
3253
+ };
3254
+ };
3255
+ /** @description Order not found */
3256
+ 404: {
3257
+ content: {
3258
+ "application/json": components["schemas"]["orders-api-error.schema"];
3259
+ };
3260
+ };
3261
+ /** @description Error */
3262
+ default: {
3263
+ content: {
3264
+ "application/problem+json": components["schemas"]["error.schema"];
3265
+ };
3266
+ };
3267
+ };
3268
+ };
3269
+ /**
3270
+ * Create Fulfillment
3271
+ * @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.
3272
+ */
3273
+ "Fulfillment create": {
3274
+ parameters: {
3275
+ path: {
3276
+ storeId: components["parameters"]["store-id.param"];
3277
+ orderId: components["parameters"]["order-id.param"];
3278
+ };
3279
+ };
3280
+ requestBody: {
3281
+ content: {
3282
+ "application/json": components["schemas"]["orders-api-create-fulfillment-request.schema"];
3283
+ };
3284
+ };
3285
+ responses: {
3286
+ /** @description Success */
3287
+ 200: {
3288
+ content: {
3289
+ "application/json": components["schemas"]["orders-api-fulfillment-response.schema"];
3290
+ };
3291
+ };
3292
+ /** @description Bad Request (validation error) */
3293
+ 400: {
3294
+ content: {
3295
+ "application/json": components["schemas"]["orders-api-error.schema"];
3296
+ };
3297
+ };
3298
+ /** @description Unauthorized (invalid or missing API token) */
3299
+ 401: {
3300
+ content: {
3301
+ "application/json": components["schemas"]["orders-api-error.schema"];
3302
+ };
3303
+ };
3304
+ /** @description Order not found */
3305
+ 404: {
3306
+ content: {
3307
+ "application/json": components["schemas"]["orders-api-error.schema"];
3308
+ };
3309
+ };
3310
+ /** @description Error */
3311
+ default: {
3312
+ content: {
3313
+ "application/problem+json": components["schemas"]["error.schema"];
3314
+ };
3315
+ };
3316
+ };
3317
+ };
3318
+ /**
3319
+ * Update Fulfillment Status
3320
+ * @description Post a shipment status update or trigger an automation event for a fulfillment.
3321
+ *
3322
+ * The status field accepts two types of values:
3323
+ *
3324
+ * **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.
3325
+ *
3326
+ * **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.
3327
+ *
3328
+ * Both statuses and events can update other fields like estimated delivery date and tracking history.
3329
+ */
3330
+ "Fulfillment status update": {
3331
+ parameters: {
3332
+ path: {
3333
+ storeId: components["parameters"]["store-id.param"];
3334
+ orderId: components["parameters"]["order-id.param"];
3335
+ fulfillmentId: components["parameters"]["fulfillment-id.param"];
3336
+ };
3337
+ };
3338
+ requestBody: {
3339
+ content: {
3340
+ "application/json": components["schemas"]["orders-api-update-fulfillment-status-request.schema"];
3341
+ };
3342
+ };
3343
+ responses: {
3344
+ /** @description Success */
3345
+ 200: {
3346
+ content: {
3347
+ "application/json": components["schemas"]["orders-api-fulfillment-response.schema"];
3348
+ };
3349
+ };
3350
+ /** @description Bad Request (validation error) */
3351
+ 400: {
3352
+ content: {
3353
+ "application/json": components["schemas"]["orders-api-error.schema"];
3354
+ };
3355
+ };
3356
+ /** @description Unauthorized (invalid or missing API token) */
3357
+ 401: {
3358
+ content: {
3359
+ "application/json": components["schemas"]["orders-api-error.schema"];
3360
+ };
3361
+ };
3362
+ /** @description Fulfillment not found */
3363
+ 404: {
3364
+ content: {
3365
+ "application/json": components["schemas"]["orders-api-error.schema"];
3366
+ };
3367
+ };
3368
+ /** @description Error */
3369
+ default: {
3370
+ content: {
3371
+ "application/problem+json": components["schemas"]["error.schema"];
3372
+ };
3373
+ };
3374
+ };
3375
+ };
2686
3376
  /**
2687
3377
  * Bulk upload products (Beta)
2688
3378
  * @description Bulk create or update product families and their variants.