@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 +742 -52
- package/lib/openapi.yaml +1054 -99
- package/package.json +1 -1
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
|
|
@@ -189,16 +190,28 @@ paths:
|
|
|
189
190
|
Create a custom event to trigger flows with merchant-defined event names and properties.
|
|
190
191
|
|
|
191
192
|
Custom events allow merchants to trigger flows based on events from their own systems.
|
|
192
|
-
Events can include custom properties that are accessible in email and SMS templates
|
|
193
|
+
Events can include custom properties that are accessible in email and SMS templates,
|
|
194
|
+
and are persisted for segmentation and historical queries.
|
|
193
195
|
|
|
194
|
-
##
|
|
195
|
-
The API
|
|
196
|
+
## Identity Resolution
|
|
197
|
+
The API resolves customers using the following priority order:
|
|
198
|
+
1. `customer.id` — Redo customer ObjectId (highest priority)
|
|
199
|
+
2. `customer.email` — customer email address
|
|
200
|
+
3. `customer.phoneNumber` — customer phone number
|
|
196
201
|
|
|
197
|
-
If no matching customer is found,
|
|
202
|
+
At least one identifier must be provided. If no matching customer is found, one will
|
|
203
|
+
be created automatically. If `customer.id` is provided but not found, the API falls
|
|
204
|
+
back to email/phone rather than returning 404.
|
|
205
|
+
|
|
206
|
+
## Datetime Formatting
|
|
207
|
+
All datetime values must be formatted as ISO 8601 (RFC 3339) strings, e.g., `2026-04-02T12:00:00Z`.
|
|
208
|
+
This applies to `eventTimestamp`, any date-valued properties in `data`, and any date-valued `customFields`.
|
|
209
|
+
Strings matching this format are automatically detected and indexed as dates for segmentation.
|
|
198
210
|
|
|
199
211
|
## Rate Limiting
|
|
200
212
|
This endpoint is rate-limited to 100 requests per second per store.
|
|
201
213
|
operationId: Custom event create
|
|
214
|
+
x-express-openapi-disable-validation-middleware: true
|
|
202
215
|
parameters:
|
|
203
216
|
- $ref: '#/components/parameters/store-id.param'
|
|
204
217
|
requestBody:
|
|
@@ -207,44 +220,173 @@ paths:
|
|
|
207
220
|
schema:
|
|
208
221
|
$ref: '#/components/schemas/custom-event-request.schema'
|
|
209
222
|
examples:
|
|
210
|
-
|
|
211
|
-
summary:
|
|
223
|
+
full_example:
|
|
224
|
+
summary: Every field populated
|
|
212
225
|
value:
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
226
|
+
eventName: Purchase Milestone Reached
|
|
227
|
+
customer:
|
|
228
|
+
id: 665f1a2b3c4d5e6f7a8b9c0d
|
|
229
|
+
email: stewart@example.com
|
|
230
|
+
phoneNumber: '+11234567890'
|
|
231
|
+
firstName: Stewart
|
|
232
|
+
lastName: Thompson
|
|
233
|
+
location:
|
|
234
|
+
street1: 123 Main St
|
|
235
|
+
street2: Apt 4B
|
|
236
|
+
city: Seattle
|
|
237
|
+
state: Washington
|
|
238
|
+
stateCode: WA
|
|
239
|
+
postalCode: '98101'
|
|
240
|
+
country: United States
|
|
241
|
+
countryCode: US
|
|
242
|
+
ianaTimeZoneName: America/Los_Angeles
|
|
243
|
+
latitude: 47.6062
|
|
244
|
+
longitude: -122.3321
|
|
245
|
+
customFields:
|
|
246
|
+
Age at Signup: 25
|
|
247
|
+
Birthday: '1976-07-04T12:00:00Z'
|
|
248
|
+
Loyalty Tier: Gold
|
|
249
|
+
Accepts Marketing: true
|
|
250
|
+
eventTimestamp: '2026-04-02T12:00:00Z'
|
|
251
|
+
value: 299.99
|
|
252
|
+
valueCurrency: USD
|
|
253
|
+
uniqueId: milestone-test-001
|
|
254
|
+
data:
|
|
255
|
+
Milestone Type: 100th_purchase
|
|
256
|
+
Total Spent: 5000
|
|
257
|
+
VIP Tier: gold
|
|
258
|
+
Enrolled At: '2025-01-01T00:00:00Z'
|
|
259
|
+
Campaign Source: email_drip
|
|
260
|
+
Last Purchase Date: '2026-03-15T00:00:00Z'
|
|
261
|
+
$extra:
|
|
262
|
+
Most Recent Order IDs:
|
|
263
|
+
- 1
|
|
264
|
+
- 2
|
|
265
|
+
- 3
|
|
266
|
+
Profile Snapshot:
|
|
267
|
+
tier: gold
|
|
268
|
+
memberSince: '2024-01-01'
|
|
269
|
+
medium_example:
|
|
270
|
+
summary: Event with customer profile and data
|
|
221
271
|
value:
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
272
|
+
eventName: Order Placed
|
|
273
|
+
customer:
|
|
274
|
+
email: stewart@example.com
|
|
275
|
+
firstName: Stewart
|
|
276
|
+
lastName: Thompson
|
|
277
|
+
customFields:
|
|
278
|
+
Birthday: '1976-07-04T12:00:00Z'
|
|
279
|
+
Loyalty Tier: Gold
|
|
280
|
+
value: 149.99
|
|
281
|
+
valueCurrency: USD
|
|
282
|
+
data:
|
|
283
|
+
Order Id: ord_456
|
|
284
|
+
Item Count: 3
|
|
285
|
+
Category: apparel
|
|
286
|
+
minimal:
|
|
287
|
+
summary: Required fields only
|
|
288
|
+
value:
|
|
289
|
+
eventName: Page Viewed
|
|
290
|
+
customer:
|
|
291
|
+
email: stewart@example.com
|
|
228
292
|
required: true
|
|
229
293
|
responses:
|
|
230
|
-
'
|
|
294
|
+
'202':
|
|
295
|
+
description: Event accepted and queued for processing. No response body is returned.
|
|
296
|
+
'400':
|
|
297
|
+
content:
|
|
298
|
+
application/json:
|
|
299
|
+
schema:
|
|
300
|
+
$ref: '#/components/schemas/error.schema'
|
|
301
|
+
description: Invalid request body or missing required customer identifier
|
|
302
|
+
'404':
|
|
303
|
+
content:
|
|
304
|
+
application/json:
|
|
305
|
+
schema:
|
|
306
|
+
$ref: '#/components/schemas/error.schema'
|
|
307
|
+
description: Store not found
|
|
308
|
+
'429':
|
|
231
309
|
content:
|
|
232
310
|
application/json:
|
|
233
311
|
schema:
|
|
234
|
-
$ref: '#/components/schemas/
|
|
235
|
-
description:
|
|
312
|
+
$ref: '#/components/schemas/error.schema'
|
|
313
|
+
description: Rate limit exceeded
|
|
314
|
+
default:
|
|
315
|
+
content:
|
|
316
|
+
application/problem+json:
|
|
317
|
+
schema:
|
|
318
|
+
$ref: '#/components/schemas/error.schema'
|
|
319
|
+
description: Error
|
|
320
|
+
security:
|
|
321
|
+
- Bearer: []
|
|
322
|
+
summary: Create custom event
|
|
323
|
+
tags:
|
|
324
|
+
- Custom Events
|
|
325
|
+
/stores/{storeId}/events/bulk:
|
|
326
|
+
post:
|
|
327
|
+
description: |
|
|
328
|
+
Create multiple custom events in a single request. Accepts up to 100 events per request.
|
|
329
|
+
|
|
330
|
+
Each event is validated independently. The response includes per-event results, allowing
|
|
331
|
+
partial failures — some events may be accepted while others are rejected due to validation
|
|
332
|
+
errors.
|
|
333
|
+
|
|
334
|
+
## Identity Resolution
|
|
335
|
+
Each event resolves customers independently using the same priority order as the
|
|
336
|
+
single-event endpoint:
|
|
337
|
+
1. `customer.id` — Redo customer ObjectId (highest priority)
|
|
338
|
+
2. `customer.email` — customer email address
|
|
339
|
+
3. `customer.phoneNumber` — customer phone number
|
|
340
|
+
|
|
341
|
+
At least one identifier must be provided per event. If no matching customer is found,
|
|
342
|
+
one will be created automatically.
|
|
343
|
+
|
|
344
|
+
## Rate Limiting
|
|
345
|
+
This endpoint is rate-limited to 100 requests per second per store.
|
|
346
|
+
operationId: Bulk create custom events
|
|
347
|
+
x-express-openapi-disable-validation-middleware: true
|
|
348
|
+
parameters:
|
|
349
|
+
- $ref: '#/components/parameters/store-id.param'
|
|
350
|
+
requestBody:
|
|
351
|
+
content:
|
|
352
|
+
application/json:
|
|
353
|
+
schema:
|
|
354
|
+
$ref: '#/components/schemas/bulk-custom-event-request.schema'
|
|
355
|
+
examples:
|
|
356
|
+
mixed_events:
|
|
357
|
+
summary: Bulk event creation with multiple event types
|
|
358
|
+
value:
|
|
359
|
+
events:
|
|
360
|
+
- eventName: User Registered
|
|
361
|
+
customer:
|
|
362
|
+
email: alice@example.com
|
|
363
|
+
data:
|
|
364
|
+
Plan Type: premium
|
|
365
|
+
- eventName: Purchase Completed
|
|
366
|
+
customer:
|
|
367
|
+
email: bob@example.com
|
|
368
|
+
data:
|
|
369
|
+
Order Total: 99.99
|
|
370
|
+
Item Count: 3
|
|
371
|
+
value: 99.99
|
|
372
|
+
valueCurrency: USD
|
|
373
|
+
uniqueId: order-456
|
|
374
|
+
required: true
|
|
375
|
+
responses:
|
|
376
|
+
'202':
|
|
377
|
+
description: Bulk request accepted and queued for processing. No response body is returned.
|
|
236
378
|
'400':
|
|
237
379
|
content:
|
|
238
380
|
application/json:
|
|
239
381
|
schema:
|
|
240
382
|
$ref: '#/components/schemas/error.schema'
|
|
241
|
-
description: Invalid request body
|
|
383
|
+
description: Invalid request body (e.g., events array missing or exceeds 100 items)
|
|
242
384
|
'404':
|
|
243
385
|
content:
|
|
244
386
|
application/json:
|
|
245
387
|
schema:
|
|
246
388
|
$ref: '#/components/schemas/error.schema'
|
|
247
|
-
description:
|
|
389
|
+
description: Store not found
|
|
248
390
|
'429':
|
|
249
391
|
content:
|
|
250
392
|
application/json:
|
|
@@ -259,7 +401,7 @@ paths:
|
|
|
259
401
|
description: Error
|
|
260
402
|
security:
|
|
261
403
|
- Bearer: []
|
|
262
|
-
summary:
|
|
404
|
+
summary: Bulk create custom events
|
|
263
405
|
tags:
|
|
264
406
|
- Custom Events
|
|
265
407
|
/stores/{storeId}/customer-portal:
|
|
@@ -620,6 +762,240 @@ paths:
|
|
|
620
762
|
tags:
|
|
621
763
|
- Merchant Admin
|
|
622
764
|
summary: Merchant admin
|
|
765
|
+
/stores/{storeId}/orders:
|
|
766
|
+
description: Orders collection.
|
|
767
|
+
post:
|
|
768
|
+
description: Create a new order in the system with line items, customer information, and shipping details.
|
|
769
|
+
operationId: Order create
|
|
770
|
+
requestBody:
|
|
771
|
+
content:
|
|
772
|
+
application/json:
|
|
773
|
+
schema:
|
|
774
|
+
$ref: '#/components/schemas/orders-api-create-order-request.schema'
|
|
775
|
+
required: true
|
|
776
|
+
responses:
|
|
777
|
+
'200':
|
|
778
|
+
content:
|
|
779
|
+
application/json:
|
|
780
|
+
schema:
|
|
781
|
+
$ref: '#/components/schemas/orders-api-create-order-response.schema'
|
|
782
|
+
description: Success
|
|
783
|
+
'400':
|
|
784
|
+
content:
|
|
785
|
+
application/json:
|
|
786
|
+
schema:
|
|
787
|
+
$ref: '#/components/schemas/orders-api-error.schema'
|
|
788
|
+
description: Bad Request (validation error)
|
|
789
|
+
'401':
|
|
790
|
+
content:
|
|
791
|
+
application/json:
|
|
792
|
+
schema:
|
|
793
|
+
$ref: '#/components/schemas/orders-api-error.schema'
|
|
794
|
+
description: Unauthorized (invalid or missing API token)
|
|
795
|
+
'409':
|
|
796
|
+
content:
|
|
797
|
+
application/json:
|
|
798
|
+
schema:
|
|
799
|
+
$ref: '#/components/schemas/orders-api-error.schema'
|
|
800
|
+
description: Conflict (duplicate order ID)
|
|
801
|
+
default:
|
|
802
|
+
content:
|
|
803
|
+
application/problem+json:
|
|
804
|
+
schema:
|
|
805
|
+
$ref: '#/components/schemas/error.schema'
|
|
806
|
+
description: Error
|
|
807
|
+
security:
|
|
808
|
+
- Bearer: []
|
|
809
|
+
summary: Create Order
|
|
810
|
+
tags:
|
|
811
|
+
- Orders
|
|
812
|
+
parameters:
|
|
813
|
+
- $ref: '#/components/parameters/store-id.param'
|
|
814
|
+
summary: Orders
|
|
815
|
+
/stores/{storeId}/orders/{orderId}:
|
|
816
|
+
description: Single order operations.
|
|
817
|
+
get:
|
|
818
|
+
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.
|
|
819
|
+
operationId: Order get
|
|
820
|
+
responses:
|
|
821
|
+
'200':
|
|
822
|
+
content:
|
|
823
|
+
application/json:
|
|
824
|
+
schema:
|
|
825
|
+
$ref: '#/components/schemas/orders-api-get-order-response.schema'
|
|
826
|
+
description: Success
|
|
827
|
+
'401':
|
|
828
|
+
content:
|
|
829
|
+
application/json:
|
|
830
|
+
schema:
|
|
831
|
+
$ref: '#/components/schemas/orders-api-error.schema'
|
|
832
|
+
description: Unauthorized (invalid or missing API token)
|
|
833
|
+
'404':
|
|
834
|
+
content:
|
|
835
|
+
application/json:
|
|
836
|
+
schema:
|
|
837
|
+
$ref: '#/components/schemas/orders-api-error.schema'
|
|
838
|
+
description: Order not found
|
|
839
|
+
default:
|
|
840
|
+
content:
|
|
841
|
+
application/problem+json:
|
|
842
|
+
schema:
|
|
843
|
+
$ref: '#/components/schemas/error.schema'
|
|
844
|
+
description: Error
|
|
845
|
+
security:
|
|
846
|
+
- Bearer: []
|
|
847
|
+
summary: Get Order
|
|
848
|
+
tags:
|
|
849
|
+
- Orders
|
|
850
|
+
delete:
|
|
851
|
+
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.
|
|
852
|
+
operationId: Order delete
|
|
853
|
+
responses:
|
|
854
|
+
'200':
|
|
855
|
+
content:
|
|
856
|
+
application/json:
|
|
857
|
+
schema:
|
|
858
|
+
$ref: '#/components/schemas/orders-api-delete-order-response.schema'
|
|
859
|
+
description: Success
|
|
860
|
+
'401':
|
|
861
|
+
content:
|
|
862
|
+
application/json:
|
|
863
|
+
schema:
|
|
864
|
+
$ref: '#/components/schemas/orders-api-error.schema'
|
|
865
|
+
description: Unauthorized (invalid or missing API token)
|
|
866
|
+
'404':
|
|
867
|
+
content:
|
|
868
|
+
application/json:
|
|
869
|
+
schema:
|
|
870
|
+
$ref: '#/components/schemas/orders-api-error.schema'
|
|
871
|
+
description: Order not found
|
|
872
|
+
default:
|
|
873
|
+
content:
|
|
874
|
+
application/problem+json:
|
|
875
|
+
schema:
|
|
876
|
+
$ref: '#/components/schemas/error.schema'
|
|
877
|
+
description: Error
|
|
878
|
+
security:
|
|
879
|
+
- Bearer: []
|
|
880
|
+
summary: Delete Order
|
|
881
|
+
tags:
|
|
882
|
+
- Orders
|
|
883
|
+
parameters:
|
|
884
|
+
- $ref: '#/components/parameters/store-id.param'
|
|
885
|
+
- $ref: '#/components/parameters/order-id.param'
|
|
886
|
+
summary: Order
|
|
887
|
+
/stores/{storeId}/orders/{orderId}/fulfillments:
|
|
888
|
+
description: Order fulfillments collection.
|
|
889
|
+
post:
|
|
890
|
+
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.
|
|
891
|
+
operationId: Fulfillment create
|
|
892
|
+
requestBody:
|
|
893
|
+
content:
|
|
894
|
+
application/json:
|
|
895
|
+
schema:
|
|
896
|
+
$ref: '#/components/schemas/orders-api-create-fulfillment-request.schema'
|
|
897
|
+
required: true
|
|
898
|
+
responses:
|
|
899
|
+
'200':
|
|
900
|
+
content:
|
|
901
|
+
application/json:
|
|
902
|
+
schema:
|
|
903
|
+
$ref: '#/components/schemas/orders-api-fulfillment-response.schema'
|
|
904
|
+
description: Success
|
|
905
|
+
'400':
|
|
906
|
+
content:
|
|
907
|
+
application/json:
|
|
908
|
+
schema:
|
|
909
|
+
$ref: '#/components/schemas/orders-api-error.schema'
|
|
910
|
+
description: Bad Request (validation error)
|
|
911
|
+
'401':
|
|
912
|
+
content:
|
|
913
|
+
application/json:
|
|
914
|
+
schema:
|
|
915
|
+
$ref: '#/components/schemas/orders-api-error.schema'
|
|
916
|
+
description: Unauthorized (invalid or missing API token)
|
|
917
|
+
'404':
|
|
918
|
+
content:
|
|
919
|
+
application/json:
|
|
920
|
+
schema:
|
|
921
|
+
$ref: '#/components/schemas/orders-api-error.schema'
|
|
922
|
+
description: Order not found
|
|
923
|
+
default:
|
|
924
|
+
content:
|
|
925
|
+
application/problem+json:
|
|
926
|
+
schema:
|
|
927
|
+
$ref: '#/components/schemas/error.schema'
|
|
928
|
+
description: Error
|
|
929
|
+
security:
|
|
930
|
+
- Bearer: []
|
|
931
|
+
summary: Create Fulfillment
|
|
932
|
+
tags:
|
|
933
|
+
- Orders
|
|
934
|
+
parameters:
|
|
935
|
+
- $ref: '#/components/parameters/store-id.param'
|
|
936
|
+
- $ref: '#/components/parameters/order-id.param'
|
|
937
|
+
summary: Order Fulfillments
|
|
938
|
+
/stores/{storeId}/orders/{orderId}/fulfillments/{fulfillmentId}/shipment-status:
|
|
939
|
+
description: Update fulfillment shipment status.
|
|
940
|
+
post:
|
|
941
|
+
description: |
|
|
942
|
+
Post a shipment status update or trigger an automation event for a fulfillment.
|
|
943
|
+
|
|
944
|
+
The status field accepts two types of values:
|
|
945
|
+
|
|
946
|
+
**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.
|
|
947
|
+
|
|
948
|
+
**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.
|
|
949
|
+
|
|
950
|
+
Both statuses and events can update other fields like estimated delivery date and tracking history.
|
|
951
|
+
operationId: Fulfillment status update
|
|
952
|
+
requestBody:
|
|
953
|
+
content:
|
|
954
|
+
application/json:
|
|
955
|
+
schema:
|
|
956
|
+
$ref: '#/components/schemas/orders-api-update-fulfillment-status-request.schema'
|
|
957
|
+
required: true
|
|
958
|
+
responses:
|
|
959
|
+
'200':
|
|
960
|
+
content:
|
|
961
|
+
application/json:
|
|
962
|
+
schema:
|
|
963
|
+
$ref: '#/components/schemas/orders-api-fulfillment-response.schema'
|
|
964
|
+
description: Success
|
|
965
|
+
'400':
|
|
966
|
+
content:
|
|
967
|
+
application/json:
|
|
968
|
+
schema:
|
|
969
|
+
$ref: '#/components/schemas/orders-api-error.schema'
|
|
970
|
+
description: Bad Request (validation error)
|
|
971
|
+
'401':
|
|
972
|
+
content:
|
|
973
|
+
application/json:
|
|
974
|
+
schema:
|
|
975
|
+
$ref: '#/components/schemas/orders-api-error.schema'
|
|
976
|
+
description: Unauthorized (invalid or missing API token)
|
|
977
|
+
'404':
|
|
978
|
+
content:
|
|
979
|
+
application/json:
|
|
980
|
+
schema:
|
|
981
|
+
$ref: '#/components/schemas/orders-api-error.schema'
|
|
982
|
+
description: Fulfillment not found
|
|
983
|
+
default:
|
|
984
|
+
content:
|
|
985
|
+
application/problem+json:
|
|
986
|
+
schema:
|
|
987
|
+
$ref: '#/components/schemas/error.schema'
|
|
988
|
+
description: Error
|
|
989
|
+
security:
|
|
990
|
+
- Bearer: []
|
|
991
|
+
summary: Update Fulfillment Status
|
|
992
|
+
tags:
|
|
993
|
+
- Orders
|
|
994
|
+
parameters:
|
|
995
|
+
- $ref: '#/components/parameters/store-id.param'
|
|
996
|
+
- $ref: '#/components/parameters/order-id.param'
|
|
997
|
+
- $ref: '#/components/parameters/fulfillment-id.param'
|
|
998
|
+
summary: Fulfillment Shipment Status
|
|
623
999
|
/stores/{storeId}/products/bulk-upload:
|
|
624
1000
|
post:
|
|
625
1001
|
description: |
|
|
@@ -1389,6 +1765,20 @@ components:
|
|
|
1389
1765
|
schema:
|
|
1390
1766
|
example: 64e4d5e837572a4813b73e40
|
|
1391
1767
|
type: string
|
|
1768
|
+
order-id.param:
|
|
1769
|
+
description: Order ID. Can be either the external order ID provided when creating the order, or the internal Redo order ID.
|
|
1770
|
+
in: path
|
|
1771
|
+
name: orderId
|
|
1772
|
+
required: true
|
|
1773
|
+
schema:
|
|
1774
|
+
type: string
|
|
1775
|
+
fulfillment-id.param:
|
|
1776
|
+
description: Unique fulfillment identifier.
|
|
1777
|
+
in: path
|
|
1778
|
+
name: fulfillmentId
|
|
1779
|
+
required: true
|
|
1780
|
+
schema:
|
|
1781
|
+
type: string
|
|
1392
1782
|
return-id.param:
|
|
1393
1783
|
description: Return ID
|
|
1394
1784
|
in: path
|
|
@@ -1672,84 +2062,142 @@ components:
|
|
|
1672
2062
|
title: Coverage product
|
|
1673
2063
|
type: object
|
|
1674
2064
|
custom-event-request.schema:
|
|
1675
|
-
additionalProperties:
|
|
1676
|
-
description:
|
|
2065
|
+
additionalProperties: true
|
|
2066
|
+
description: |
|
|
2067
|
+
Custom event to trigger flows with merchant-defined event names and properties.
|
|
1677
2068
|
properties:
|
|
1678
|
-
|
|
1679
|
-
description: The name of the custom event (e.g., '
|
|
1680
|
-
type: string
|
|
1681
|
-
email:
|
|
1682
|
-
description: Customer email address (one of email or phone is required).
|
|
1683
|
-
type: string
|
|
1684
|
-
phone:
|
|
1685
|
-
description: Customer phone number (one of email or phone is required).
|
|
1686
|
-
type: string
|
|
1687
|
-
properties:
|
|
1688
|
-
description: Custom properties for this event. Access in templates using dot notation (e.g., {{ properties.product_name }}).
|
|
1689
|
-
type: object
|
|
1690
|
-
additionalProperties: true
|
|
1691
|
-
event_timestamp:
|
|
1692
|
-
description: ISO 8601 timestamp when the event occurred. Defaults to current time if not provided.
|
|
1693
|
-
format: date-time
|
|
2069
|
+
eventName:
|
|
2070
|
+
description: The name of the custom event (e.g., 'User Registered', 'Loyalty Reward Earned').
|
|
1694
2071
|
type: string
|
|
1695
|
-
|
|
1696
|
-
description:
|
|
1697
|
-
|
|
2072
|
+
customer:
|
|
2073
|
+
description: |
|
|
2074
|
+
Customer identity and profile fields. At least one of `id`, `email`, or `phoneNumber` is required for identity resolution.
|
|
1698
2075
|
type: object
|
|
2076
|
+
additionalProperties: false
|
|
2077
|
+
anyOf:
|
|
2078
|
+
- required:
|
|
2079
|
+
- id
|
|
2080
|
+
- required:
|
|
2081
|
+
- email
|
|
2082
|
+
- required:
|
|
2083
|
+
- phoneNumber
|
|
1699
2084
|
properties:
|
|
1700
|
-
|
|
1701
|
-
description:
|
|
2085
|
+
id:
|
|
2086
|
+
description: Redo customer ObjectId. Used for identity resolution. Takes priority over email and phoneNumber when provided.
|
|
1702
2087
|
type: string
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
type:
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
2088
|
+
email:
|
|
2089
|
+
description: Customer email address. Used for identity resolution.
|
|
2090
|
+
format: email
|
|
2091
|
+
type: string
|
|
2092
|
+
phoneNumber:
|
|
2093
|
+
description: Customer phone number in E.164 format. Used for identity resolution.
|
|
2094
|
+
type: string
|
|
2095
|
+
firstName:
|
|
2096
|
+
description: Customer first name. Applied with patch semantics — does not erase existing value if omitted.
|
|
2097
|
+
type: string
|
|
2098
|
+
lastName:
|
|
2099
|
+
description: Customer last name. Applied with patch semantics — does not erase existing value if omitted.
|
|
2100
|
+
type: string
|
|
2101
|
+
location:
|
|
2102
|
+
description: Customer location for profile enrichment. All fields are optional.
|
|
2103
|
+
type: object
|
|
2104
|
+
additionalProperties: false
|
|
2105
|
+
properties:
|
|
2106
|
+
street1:
|
|
2107
|
+
description: Primary street address.
|
|
2108
|
+
type: string
|
|
2109
|
+
street2:
|
|
2110
|
+
description: Secondary address line (apartment, suite, etc.).
|
|
2111
|
+
type: string
|
|
2112
|
+
city:
|
|
2113
|
+
description: City name.
|
|
2114
|
+
type: string
|
|
2115
|
+
state:
|
|
2116
|
+
description: State or province name.
|
|
2117
|
+
type: string
|
|
2118
|
+
stateCode:
|
|
2119
|
+
description: State or province abbreviation (e.g., "CA", "NY").
|
|
2120
|
+
type: string
|
|
2121
|
+
postalCode:
|
|
2122
|
+
description: Postal or ZIP code.
|
|
2123
|
+
type: string
|
|
2124
|
+
country:
|
|
2125
|
+
description: Country name.
|
|
2126
|
+
type: string
|
|
2127
|
+
countryCode:
|
|
2128
|
+
description: ISO 3166-1 alpha-2 country code (e.g., "US", "GB").
|
|
2129
|
+
type: string
|
|
2130
|
+
ianaTimeZoneName:
|
|
2131
|
+
description: IANA time zone identifier (e.g., "America/New_York").
|
|
2132
|
+
type: string
|
|
2133
|
+
latitude:
|
|
2134
|
+
description: Geographic latitude coordinate.
|
|
2135
|
+
type: number
|
|
2136
|
+
longitude:
|
|
2137
|
+
description: Geographic longitude coordinate.
|
|
2138
|
+
type: number
|
|
2139
|
+
customFields:
|
|
2140
|
+
description: |
|
|
2141
|
+
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.
|
|
2142
|
+
type: object
|
|
2143
|
+
additionalProperties:
|
|
2144
|
+
oneOf:
|
|
2145
|
+
- type: string
|
|
2146
|
+
- type: number
|
|
2147
|
+
- type: boolean
|
|
2148
|
+
data:
|
|
2149
|
+
description: |
|
|
2150
|
+
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).
|
|
2151
|
+
|
|
2152
|
+
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.
|
|
2153
|
+
type: object
|
|
2154
|
+
additionalProperties:
|
|
2155
|
+
description: |
|
|
2156
|
+
Segmentable event property. Each key you add becomes available for audience segmentation and automation conditions. Supported types are string, number, boolean, and date (ISO 8601 strings like "2025-01-15T00:00:00Z" are auto-detected as dates). Values of 0, null, and empty string ("") are treated as unset and will not be stored.
|
|
2157
|
+
anyOf:
|
|
2158
|
+
- type: string
|
|
2159
|
+
- type: number
|
|
2160
|
+
- type: boolean
|
|
2161
|
+
properties:
|
|
2162
|
+
$extra:
|
|
2163
|
+
description: |
|
|
2164
|
+
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.
|
|
2165
|
+
type: object
|
|
2166
|
+
additionalProperties: true
|
|
2167
|
+
eventTimestamp:
|
|
2168
|
+
description: ISO 8601 timestamp when the event occurred. Defaults to current time if not provided.
|
|
2169
|
+
format: date-time
|
|
2170
|
+
type: string
|
|
2171
|
+
value:
|
|
2172
|
+
description: Monetary or conversion value associated with the event (e.g., purchase amount).
|
|
2173
|
+
type: number
|
|
2174
|
+
valueCurrency:
|
|
2175
|
+
description: ISO 4217 currency code for the value field (e.g., "USD", "EUR").
|
|
2176
|
+
type: string
|
|
2177
|
+
uniqueId:
|
|
2178
|
+
description: |
|
|
2179
|
+
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.
|
|
2180
|
+
type: string
|
|
2181
|
+
required:
|
|
2182
|
+
- eventName
|
|
2183
|
+
- customer
|
|
2184
|
+
title: Custom Event Request
|
|
2185
|
+
type: object
|
|
2186
|
+
bulk-custom-event-request.schema:
|
|
2187
|
+
additionalProperties: false
|
|
2188
|
+
description: Request body for sending multiple custom events in a single request.
|
|
2189
|
+
properties:
|
|
2190
|
+
events:
|
|
2191
|
+
description: Array of custom events to create.
|
|
2192
|
+
type: array
|
|
2193
|
+
items:
|
|
2194
|
+
$ref: '#/components/schemas/custom-event-request.schema'
|
|
2195
|
+
maxItems: 100
|
|
2196
|
+
minItems: 1
|
|
2197
|
+
required:
|
|
2198
|
+
- events
|
|
2199
|
+
title: Bulk Custom Event Request
|
|
2200
|
+
type: object
|
|
1753
2201
|
subscription-status-marketing.schema:
|
|
1754
2202
|
description: Marketing subscription status
|
|
1755
2203
|
properties:
|
|
@@ -2079,6 +2527,513 @@ components:
|
|
|
2079
2527
|
- createdAt
|
|
2080
2528
|
- charge
|
|
2081
2529
|
type: object
|
|
2530
|
+
orders-api-line-item.schema:
|
|
2531
|
+
description: Line item in the order.
|
|
2532
|
+
properties:
|
|
2533
|
+
id:
|
|
2534
|
+
description: Unique identifier for the line item.
|
|
2535
|
+
type: string
|
|
2536
|
+
productId:
|
|
2537
|
+
description: Identifier for the product.
|
|
2538
|
+
type: string
|
|
2539
|
+
variantId:
|
|
2540
|
+
description: Identifier for the product variant.
|
|
2541
|
+
type:
|
|
2542
|
+
- string
|
|
2543
|
+
- 'null'
|
|
2544
|
+
title:
|
|
2545
|
+
description: Title/name of the product.
|
|
2546
|
+
type: string
|
|
2547
|
+
sku:
|
|
2548
|
+
description: SKU of the product.
|
|
2549
|
+
type:
|
|
2550
|
+
- string
|
|
2551
|
+
- 'null'
|
|
2552
|
+
quantity:
|
|
2553
|
+
description: Quantity of the product ordered.
|
|
2554
|
+
minimum: 1
|
|
2555
|
+
maximum: 1000
|
|
2556
|
+
type: integer
|
|
2557
|
+
price:
|
|
2558
|
+
description: Price per unit of the product.
|
|
2559
|
+
minimum: 0
|
|
2560
|
+
type:
|
|
2561
|
+
- number
|
|
2562
|
+
- 'null'
|
|
2563
|
+
required:
|
|
2564
|
+
- id
|
|
2565
|
+
- productId
|
|
2566
|
+
- title
|
|
2567
|
+
- quantity
|
|
2568
|
+
type: object
|
|
2569
|
+
orders-api-customer.schema:
|
|
2570
|
+
description: Customer information.
|
|
2571
|
+
properties:
|
|
2572
|
+
id:
|
|
2573
|
+
description: Customer ID from the external system.
|
|
2574
|
+
type:
|
|
2575
|
+
- string
|
|
2576
|
+
- 'null'
|
|
2577
|
+
email:
|
|
2578
|
+
description: Customer email address.
|
|
2579
|
+
type:
|
|
2580
|
+
- string
|
|
2581
|
+
- 'null'
|
|
2582
|
+
phoneNumber:
|
|
2583
|
+
description: Customer phone number.
|
|
2584
|
+
type:
|
|
2585
|
+
- string
|
|
2586
|
+
- 'null'
|
|
2587
|
+
name:
|
|
2588
|
+
description: Customer full name.
|
|
2589
|
+
type:
|
|
2590
|
+
- string
|
|
2591
|
+
- 'null'
|
|
2592
|
+
firstName:
|
|
2593
|
+
description: Customer first name.
|
|
2594
|
+
type:
|
|
2595
|
+
- string
|
|
2596
|
+
- 'null'
|
|
2597
|
+
lastName:
|
|
2598
|
+
description: Customer last name.
|
|
2599
|
+
type:
|
|
2600
|
+
- string
|
|
2601
|
+
- 'null'
|
|
2602
|
+
type: object
|
|
2603
|
+
orders-api-shipping-address.schema:
|
|
2604
|
+
description: Shipping address.
|
|
2605
|
+
properties:
|
|
2606
|
+
address1:
|
|
2607
|
+
description: Primary address line.
|
|
2608
|
+
type:
|
|
2609
|
+
- string
|
|
2610
|
+
- 'null'
|
|
2611
|
+
address2:
|
|
2612
|
+
description: Secondary address line.
|
|
2613
|
+
type:
|
|
2614
|
+
- string
|
|
2615
|
+
- 'null'
|
|
2616
|
+
city:
|
|
2617
|
+
description: City.
|
|
2618
|
+
type:
|
|
2619
|
+
- string
|
|
2620
|
+
- 'null'
|
|
2621
|
+
province:
|
|
2622
|
+
description: State or province.
|
|
2623
|
+
type:
|
|
2624
|
+
- string
|
|
2625
|
+
- 'null'
|
|
2626
|
+
country:
|
|
2627
|
+
description: Country.
|
|
2628
|
+
type:
|
|
2629
|
+
- string
|
|
2630
|
+
- 'null'
|
|
2631
|
+
postalCode:
|
|
2632
|
+
description: Postal or zip code.
|
|
2633
|
+
type:
|
|
2634
|
+
- string
|
|
2635
|
+
- 'null'
|
|
2636
|
+
type: object
|
|
2637
|
+
orders-api-shipping.schema:
|
|
2638
|
+
description: Shipping information.
|
|
2639
|
+
properties:
|
|
2640
|
+
method:
|
|
2641
|
+
description: Shipping method name.
|
|
2642
|
+
type:
|
|
2643
|
+
- string
|
|
2644
|
+
- 'null'
|
|
2645
|
+
cost:
|
|
2646
|
+
description: Shipping cost.
|
|
2647
|
+
minimum: 0
|
|
2648
|
+
type:
|
|
2649
|
+
- number
|
|
2650
|
+
- 'null'
|
|
2651
|
+
address:
|
|
2652
|
+
$ref: '#/components/schemas/orders-api-shipping-address.schema'
|
|
2653
|
+
type: object
|
|
2654
|
+
orders-api-create-order-request.schema:
|
|
2655
|
+
description: Request body for creating an order.
|
|
2656
|
+
properties:
|
|
2657
|
+
orderId:
|
|
2658
|
+
description: Unique identifier for the order.
|
|
2659
|
+
type: string
|
|
2660
|
+
createdAt:
|
|
2661
|
+
description: ISO 8601 date string for when the order was created.
|
|
2662
|
+
format: date-time
|
|
2663
|
+
type: string
|
|
2664
|
+
lineItems:
|
|
2665
|
+
description: List of line items in the order.
|
|
2666
|
+
items:
|
|
2667
|
+
$ref: '#/components/schemas/orders-api-line-item.schema'
|
|
2668
|
+
minItems: 1
|
|
2669
|
+
type: array
|
|
2670
|
+
customer:
|
|
2671
|
+
$ref: '#/components/schemas/orders-api-customer.schema'
|
|
2672
|
+
shipping:
|
|
2673
|
+
$ref: '#/components/schemas/orders-api-shipping.schema'
|
|
2674
|
+
totalPrice:
|
|
2675
|
+
description: Total order price including tax and shipping.
|
|
2676
|
+
minimum: 0
|
|
2677
|
+
type:
|
|
2678
|
+
- number
|
|
2679
|
+
- 'null'
|
|
2680
|
+
subtotalPrice:
|
|
2681
|
+
description: Subtotal price excluding tax and shipping.
|
|
2682
|
+
minimum: 0
|
|
2683
|
+
type:
|
|
2684
|
+
- number
|
|
2685
|
+
- 'null'
|
|
2686
|
+
totalTax:
|
|
2687
|
+
description: Total tax amount.
|
|
2688
|
+
minimum: 0
|
|
2689
|
+
type:
|
|
2690
|
+
- number
|
|
2691
|
+
- 'null'
|
|
2692
|
+
tags:
|
|
2693
|
+
description: Optional tags associated with the order.
|
|
2694
|
+
items:
|
|
2695
|
+
type: string
|
|
2696
|
+
type:
|
|
2697
|
+
- array
|
|
2698
|
+
- 'null'
|
|
2699
|
+
currencyCode:
|
|
2700
|
+
description: Currency code from the ISO 4217 standard (e.g., USD, EUR, GBP).
|
|
2701
|
+
type:
|
|
2702
|
+
- string
|
|
2703
|
+
- 'null'
|
|
2704
|
+
required:
|
|
2705
|
+
- orderId
|
|
2706
|
+
- createdAt
|
|
2707
|
+
- lineItems
|
|
2708
|
+
type: object
|
|
2709
|
+
orders-api-create-order-response.schema:
|
|
2710
|
+
description: Successful order creation response.
|
|
2711
|
+
properties:
|
|
2712
|
+
orderId:
|
|
2713
|
+
description: Internal Redo order ID.
|
|
2714
|
+
type: string
|
|
2715
|
+
externalOrderId:
|
|
2716
|
+
description: Original external order ID provided in the request.
|
|
2717
|
+
type: string
|
|
2718
|
+
required:
|
|
2719
|
+
- orderId
|
|
2720
|
+
- externalOrderId
|
|
2721
|
+
type: object
|
|
2722
|
+
orders-api-error.schema:
|
|
2723
|
+
description: Orders API error response.
|
|
2724
|
+
properties:
|
|
2725
|
+
error:
|
|
2726
|
+
description: Error message describing what went wrong.
|
|
2727
|
+
type: string
|
|
2728
|
+
required:
|
|
2729
|
+
- error
|
|
2730
|
+
type: object
|
|
2731
|
+
orders-api-fulfillment-line-item.schema:
|
|
2732
|
+
description: Fulfilled line item details.
|
|
2733
|
+
properties:
|
|
2734
|
+
id:
|
|
2735
|
+
description: Line item ID that was fulfilled.
|
|
2736
|
+
type: string
|
|
2737
|
+
quantity:
|
|
2738
|
+
description: Quantity fulfilled for this line item.
|
|
2739
|
+
minimum: 1
|
|
2740
|
+
maximum: 1000
|
|
2741
|
+
type: integer
|
|
2742
|
+
title:
|
|
2743
|
+
description: Title/name of the product.
|
|
2744
|
+
type: string
|
|
2745
|
+
productId:
|
|
2746
|
+
description: Product ID.
|
|
2747
|
+
type: string
|
|
2748
|
+
variantId:
|
|
2749
|
+
description: Product variant ID.
|
|
2750
|
+
type:
|
|
2751
|
+
- string
|
|
2752
|
+
- 'null'
|
|
2753
|
+
sku:
|
|
2754
|
+
description: SKU of the product.
|
|
2755
|
+
type:
|
|
2756
|
+
- string
|
|
2757
|
+
- 'null'
|
|
2758
|
+
required:
|
|
2759
|
+
- id
|
|
2760
|
+
- quantity
|
|
2761
|
+
- title
|
|
2762
|
+
- productId
|
|
2763
|
+
type: object
|
|
2764
|
+
orders-api-tracking-location.schema:
|
|
2765
|
+
description: Location information for a tracking event.
|
|
2766
|
+
properties:
|
|
2767
|
+
city:
|
|
2768
|
+
type:
|
|
2769
|
+
- string
|
|
2770
|
+
- 'null'
|
|
2771
|
+
state:
|
|
2772
|
+
type:
|
|
2773
|
+
- string
|
|
2774
|
+
- 'null'
|
|
2775
|
+
country:
|
|
2776
|
+
type:
|
|
2777
|
+
- string
|
|
2778
|
+
- 'null'
|
|
2779
|
+
postalCode:
|
|
2780
|
+
type:
|
|
2781
|
+
- string
|
|
2782
|
+
- 'null'
|
|
2783
|
+
type: object
|
|
2784
|
+
orders-api-tracking-event.schema:
|
|
2785
|
+
description: Tracking event details.
|
|
2786
|
+
properties:
|
|
2787
|
+
message:
|
|
2788
|
+
description: Tracking event message.
|
|
2789
|
+
type: string
|
|
2790
|
+
status:
|
|
2791
|
+
description: Status at this tracking event.
|
|
2792
|
+
type: string
|
|
2793
|
+
datetime:
|
|
2794
|
+
description: ISO 8601 timestamp of the tracking event.
|
|
2795
|
+
format: date-time
|
|
2796
|
+
type: string
|
|
2797
|
+
location:
|
|
2798
|
+
$ref: '#/components/schemas/orders-api-tracking-location.schema'
|
|
2799
|
+
required:
|
|
2800
|
+
- message
|
|
2801
|
+
- status
|
|
2802
|
+
- datetime
|
|
2803
|
+
type: object
|
|
2804
|
+
orders-api-fulfillment.schema:
|
|
2805
|
+
description: Fulfillment information.
|
|
2806
|
+
properties:
|
|
2807
|
+
id:
|
|
2808
|
+
description: Unique fulfillment ID.
|
|
2809
|
+
type: string
|
|
2810
|
+
createdAt:
|
|
2811
|
+
description: ISO 8601 date string for when the fulfillment was created.
|
|
2812
|
+
format: date-time
|
|
2813
|
+
type: string
|
|
2814
|
+
lineItems:
|
|
2815
|
+
description: List of line items in this fulfillment.
|
|
2816
|
+
items:
|
|
2817
|
+
$ref: '#/components/schemas/orders-api-fulfillment-line-item.schema'
|
|
2818
|
+
type: array
|
|
2819
|
+
trackingCompany:
|
|
2820
|
+
description: Shipping carrier name (e.g., FedEx, UPS).
|
|
2821
|
+
type:
|
|
2822
|
+
- string
|
|
2823
|
+
- 'null'
|
|
2824
|
+
trackingNumber:
|
|
2825
|
+
description: Tracking number for the shipment.
|
|
2826
|
+
type:
|
|
2827
|
+
- string
|
|
2828
|
+
- 'null'
|
|
2829
|
+
status:
|
|
2830
|
+
description: Current shipment status.
|
|
2831
|
+
enum:
|
|
2832
|
+
- pre_transit
|
|
2833
|
+
- unknown
|
|
2834
|
+
- in_transit
|
|
2835
|
+
- out_for_delivery
|
|
2836
|
+
- available_for_pickup
|
|
2837
|
+
- delivered
|
|
2838
|
+
- return_to_sender
|
|
2839
|
+
- failure
|
|
2840
|
+
- cancelled
|
|
2841
|
+
- error
|
|
2842
|
+
type: string
|
|
2843
|
+
trackingHistory:
|
|
2844
|
+
description: List of tracking events in chronological order.
|
|
2845
|
+
items:
|
|
2846
|
+
$ref: '#/components/schemas/orders-api-tracking-event.schema'
|
|
2847
|
+
type: array
|
|
2848
|
+
required:
|
|
2849
|
+
- id
|
|
2850
|
+
- createdAt
|
|
2851
|
+
- lineItems
|
|
2852
|
+
- status
|
|
2853
|
+
- trackingHistory
|
|
2854
|
+
type: object
|
|
2855
|
+
orders-api-get-order-response.schema:
|
|
2856
|
+
description: Response for getting an order, including fulfillments.
|
|
2857
|
+
allOf:
|
|
2858
|
+
- $ref: '#/components/schemas/orders-api-create-order-request.schema'
|
|
2859
|
+
- properties:
|
|
2860
|
+
fulfillments:
|
|
2861
|
+
description: List of fulfillments for this order.
|
|
2862
|
+
items:
|
|
2863
|
+
$ref: '#/components/schemas/orders-api-fulfillment.schema'
|
|
2864
|
+
type: array
|
|
2865
|
+
required:
|
|
2866
|
+
- fulfillments
|
|
2867
|
+
type: object
|
|
2868
|
+
orders-api-delete-order-response.schema:
|
|
2869
|
+
description: Successful order deletion response.
|
|
2870
|
+
properties:
|
|
2871
|
+
success:
|
|
2872
|
+
description: Indicates successful deletion.
|
|
2873
|
+
type: boolean
|
|
2874
|
+
orderId:
|
|
2875
|
+
description: Internal Redo order ID.
|
|
2876
|
+
type: string
|
|
2877
|
+
externalOrderId:
|
|
2878
|
+
description: External order ID that was deleted.
|
|
2879
|
+
type: string
|
|
2880
|
+
required:
|
|
2881
|
+
- success
|
|
2882
|
+
- orderId
|
|
2883
|
+
- externalOrderId
|
|
2884
|
+
type: object
|
|
2885
|
+
orders-api-create-fulfillment-request.schema:
|
|
2886
|
+
description: Request body for creating a fulfillment.
|
|
2887
|
+
properties:
|
|
2888
|
+
fulfillmentId:
|
|
2889
|
+
description: Unique identifier for the fulfillment. If not provided, will be auto-generated.
|
|
2890
|
+
type: string
|
|
2891
|
+
lineItems:
|
|
2892
|
+
description: List of line items to fulfill.
|
|
2893
|
+
items:
|
|
2894
|
+
description: Line item fulfillment details.
|
|
2895
|
+
properties:
|
|
2896
|
+
id:
|
|
2897
|
+
description: Line item ID to fulfill.
|
|
2898
|
+
type: string
|
|
2899
|
+
quantity:
|
|
2900
|
+
description: Quantity to fulfill for this line item.
|
|
2901
|
+
minimum: 1
|
|
2902
|
+
maximum: 1000
|
|
2903
|
+
type: integer
|
|
2904
|
+
required:
|
|
2905
|
+
- id
|
|
2906
|
+
- quantity
|
|
2907
|
+
type: object
|
|
2908
|
+
minItems: 1
|
|
2909
|
+
type: array
|
|
2910
|
+
tracking:
|
|
2911
|
+
description: Optional tracking information for the shipment.
|
|
2912
|
+
properties:
|
|
2913
|
+
carrier:
|
|
2914
|
+
description: Name of the shipping carrier (e.g., FedEx, UPS, USPS).
|
|
2915
|
+
type: string
|
|
2916
|
+
code:
|
|
2917
|
+
description: Tracking number/code for the shipment.
|
|
2918
|
+
type: string
|
|
2919
|
+
required:
|
|
2920
|
+
- carrier
|
|
2921
|
+
- code
|
|
2922
|
+
type:
|
|
2923
|
+
- object
|
|
2924
|
+
- 'null'
|
|
2925
|
+
useDummyTracking:
|
|
2926
|
+
description: If true, creates a dummy tracker for testing without calling external tracking APIs. Useful for development and testing the fulfillment status update endpoint.
|
|
2927
|
+
type: boolean
|
|
2928
|
+
initialTracking:
|
|
2929
|
+
description: Initial tracking information for the dummy tracker. Only used when useDummyTracking is true. If not specified, defaults to status "pre_transit".
|
|
2930
|
+
properties:
|
|
2931
|
+
status:
|
|
2932
|
+
description: Initial shipment status for the dummy tracker. Only actual statuses are allowed (not automation events).
|
|
2933
|
+
enum:
|
|
2934
|
+
- pre_transit
|
|
2935
|
+
- unknown
|
|
2936
|
+
- in_transit
|
|
2937
|
+
- out_for_delivery
|
|
2938
|
+
- available_for_pickup
|
|
2939
|
+
- delivered
|
|
2940
|
+
- return_to_sender
|
|
2941
|
+
- failure
|
|
2942
|
+
- cancelled
|
|
2943
|
+
- error
|
|
2944
|
+
type: string
|
|
2945
|
+
estimatedDeliveryDate:
|
|
2946
|
+
description: Estimated delivery date in ISO 8601 format.
|
|
2947
|
+
format: date-time
|
|
2948
|
+
type:
|
|
2949
|
+
- string
|
|
2950
|
+
- 'null'
|
|
2951
|
+
message:
|
|
2952
|
+
description: Tracking event message.
|
|
2953
|
+
type:
|
|
2954
|
+
- string
|
|
2955
|
+
- 'null'
|
|
2956
|
+
datetime:
|
|
2957
|
+
description: Timestamp of the tracking event in ISO 8601 format.
|
|
2958
|
+
format: date-time
|
|
2959
|
+
type:
|
|
2960
|
+
- string
|
|
2961
|
+
- 'null'
|
|
2962
|
+
location:
|
|
2963
|
+
$ref: '#/components/schemas/orders-api-tracking-location.schema'
|
|
2964
|
+
required:
|
|
2965
|
+
- status
|
|
2966
|
+
type: object
|
|
2967
|
+
required:
|
|
2968
|
+
- lineItems
|
|
2969
|
+
type: object
|
|
2970
|
+
orders-api-fulfillment-response.schema:
|
|
2971
|
+
description: Successful fulfillment operation response.
|
|
2972
|
+
properties:
|
|
2973
|
+
success:
|
|
2974
|
+
const: true
|
|
2975
|
+
type: boolean
|
|
2976
|
+
fulfillment:
|
|
2977
|
+
$ref: '#/components/schemas/orders-api-fulfillment.schema'
|
|
2978
|
+
required:
|
|
2979
|
+
- success
|
|
2980
|
+
- fulfillment
|
|
2981
|
+
type: object
|
|
2982
|
+
orders-api-update-fulfillment-status-request.schema:
|
|
2983
|
+
description: |
|
|
2984
|
+
Request body for updating a fulfillment's tracking status.
|
|
2985
|
+
|
|
2986
|
+
The status field accepts two types of values:
|
|
2987
|
+
- **Statuses** (e.g., `in_transit`, `delivered`): Update the shipment's current status and trigger configured automations.
|
|
2988
|
+
- **Events** (e.g., `stalled_in_transit`, `delayed`, `arriving_early`): Trigger automations without changing the current shipment status.
|
|
2989
|
+
|
|
2990
|
+
Both can update other fields like estimated delivery date and tracking history.
|
|
2991
|
+
properties:
|
|
2992
|
+
status:
|
|
2993
|
+
description: |
|
|
2994
|
+
Shipment status or automation event.
|
|
2995
|
+
|
|
2996
|
+
Statuses update the current shipment status and trigger automations:
|
|
2997
|
+
`pre_transit`, `in_transit`, `out_for_delivery`, `available_for_pickup`, `delivered`, `return_to_sender`, `failure`, `cancelled`, `error`.
|
|
2998
|
+
|
|
2999
|
+
Events trigger automations without changing the current status:
|
|
3000
|
+
`stalled_in_transit`, `delayed`, `arriving_early`.
|
|
3001
|
+
enum:
|
|
3002
|
+
- pre_transit
|
|
3003
|
+
- in_transit
|
|
3004
|
+
- out_for_delivery
|
|
3005
|
+
- available_for_pickup
|
|
3006
|
+
- delivered
|
|
3007
|
+
- return_to_sender
|
|
3008
|
+
- failure
|
|
3009
|
+
- cancelled
|
|
3010
|
+
- error
|
|
3011
|
+
- stalled_in_transit
|
|
3012
|
+
- delayed
|
|
3013
|
+
- arriving_early
|
|
3014
|
+
type: string
|
|
3015
|
+
estimatedDeliveryDate:
|
|
3016
|
+
description: Estimated delivery date in ISO 8601 format.
|
|
3017
|
+
format: date-time
|
|
3018
|
+
type:
|
|
3019
|
+
- string
|
|
3020
|
+
- 'null'
|
|
3021
|
+
message:
|
|
3022
|
+
description: Tracking event message (e.g., "Departed shipping partner facility").
|
|
3023
|
+
type:
|
|
3024
|
+
- string
|
|
3025
|
+
- 'null'
|
|
3026
|
+
datetime:
|
|
3027
|
+
description: Timestamp of the tracking event in ISO 8601 format.
|
|
3028
|
+
format: date-time
|
|
3029
|
+
type:
|
|
3030
|
+
- string
|
|
3031
|
+
- 'null'
|
|
3032
|
+
location:
|
|
3033
|
+
$ref: '#/components/schemas/orders-api-tracking-location.schema'
|
|
3034
|
+
required:
|
|
3035
|
+
- status
|
|
3036
|
+
type: object
|
|
2082
3037
|
bulk-product-family-option.schema:
|
|
2083
3038
|
description: A product option (e.g. Size, Color) with its possible values.
|
|
2084
3039
|
properties:
|