@redotech/redo-api-schema 2.2.405 → 2.2.416

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.yaml CHANGED
@@ -1,1638 +1,4 @@
1
- components:
2
- headers:
3
- page-next.header:
4
- description: Next value for X-Page-Continue, for more results
5
- schema:
6
- type: string
7
- parameters:
8
- invoice-id.param:
9
- description: Invoice ID
10
- in: path
11
- name: invoiceId
12
- required: true
13
- schema:
14
- example: 64e4d5e837572a4813b73e40
15
- type: string
16
- page-continue.param:
17
- description: Page marker, from X-Page-Next header
18
- example: 64df700931a04885276c3364
19
- in: header
20
- name: X-Page-Continue
21
- schema:
22
- type: string
23
- page-size.param:
24
- description: Page size, defaults to 20
25
- example: 20
26
- in: header
27
- name: X-Page-Size
28
- schema:
29
- maximum: 500
30
- minimum: 1
31
- type: integer
32
- provider-order-name:
33
- description: Provider specific order name
34
- in: query
35
- name: provider_order_name
36
- schema:
37
- example: XYZ1025
38
- type: string
39
- return-id.param:
40
- description: Return ID
41
- in: path
42
- name: returnId
43
- required: true
44
- schema:
45
- example: 64e4d5e837572a4813b73e40
46
- type: string
47
- return-status.param:
48
- description: Filter returns by status
49
- in: query
50
- name: status
51
- schema:
52
- $ref: '#/components/schemas/return-status.schema'
53
- shopify-order-name:
54
- description: Shopify specific order name
55
- in: query
56
- name: shopify_order_name
57
- schema:
58
- example: XYZ1025
59
- type: string
60
- store-id.param:
61
- description: Store ID
62
- in: path
63
- name: storeId
64
- required: true
65
- schema:
66
- example: 64e5a8a1af49a89df37e4ee7
67
- type: string
68
- updated-at-max.param:
69
- description: Maximum updated time, exclusive
70
- example: '2000-02-01T00:00:00Z'
71
- in: query
72
- name: updated_at_max
73
- schema:
74
- format: date-time
75
- type: string
76
- updated-at-min.param:
77
- description: Minimum updated time, inclusive
78
- example: '2000-01-01T00:00:00Z'
79
- in: query
80
- name: updated_at_min
81
- schema:
82
- format: date-time
83
- type: string
84
- webhook-id.param:
85
- description: Webhook ID
86
- in: path
87
- name: webhookId
88
- required: true
89
- schema:
90
- example: 64e5a865a58eefeed7f05ea6
91
- type: string
92
- schemas:
93
- address.schema:
94
- description: Address.
95
- properties:
96
- city:
97
- description: City name
98
- examples:
99
- - Anytown
100
- title: City
101
- type: string
102
- country:
103
- description: Country code
104
- examples:
105
- - US
106
- - CA
107
- title: Country
108
- type: string
109
- line1:
110
- description: Line 1
111
- examples:
112
- - 123 Main St
113
- title: Line 1
114
- type: string
115
- line2:
116
- default: ''
117
- description: Line 2
118
- examples:
119
- - ''
120
- title: Line 2
121
- type: string
122
- postalCode:
123
- description: Postal or ZIP code
124
- examples:
125
- - '12345'
126
- title: Postal code
127
- type: string
128
- state:
129
- description: State or province
130
- examples:
131
- - WA
132
- - Washington
133
- title: State
134
- type: string
135
- required:
136
- - city
137
- - country
138
- - line1
139
- - state
140
- - postalCode
141
- title: Address
142
- type: object
143
- comment.schema:
144
- description: Comment with either message or image.
145
- examples:
146
- - message: Item is worn.
147
- - image: eJxiYAEAAAD//wMAAAYABQ==
148
- oneOf:
149
- - additionalProperties: false
150
- properties:
151
- image:
152
- contentEncoding: base64
153
- description: Base64-encoded image
154
- title: Image
155
- type: string
156
- required:
157
- - image
158
- title: Image comment
159
- type: object
160
- - additionalProperties: false
161
- properties:
162
- message:
163
- description: Message.
164
- title: Message
165
- type: string
166
- required:
167
- - message
168
- title: Message comment
169
- type: object
170
- title: Comment
171
- coverage-product.schema:
172
- description: Coverage product.
173
- properties:
174
- coverages:
175
- description: Coverage.
176
- items:
177
- properties:
178
- lineItems:
179
- items:
180
- properties:
181
- id:
182
- description: Line item ID.
183
- title: ID
184
- type: string
185
- type: object
186
- type: array
187
- type:
188
- enum:
189
- - shipping_failure
190
- - return_shipping
191
- title: Coverage
192
- required:
193
- - lineItems
194
- - type
195
- type: object
196
- type: array
197
- id:
198
- description: Coverage ID.
199
- title: ID
200
- type: string
201
- price:
202
- $ref: '#/components/schemas/money.schema'
203
- description: Price.
204
- title: Price
205
- required:
206
- - coverage
207
- - id
208
- - price
209
- title: Coverage product
210
- type: object
211
- custom-event-request.schema:
212
- additionalProperties: false
213
- description: Custom event to trigger flows with merchant-defined event names and properties.
214
- properties:
215
- email:
216
- description: Customer email address (one of email or phone is required).
217
- type: string
218
- event_name:
219
- description: The name of the custom event (e.g., 'user_registered', 'purchase_completed').
220
- type: string
221
- event_timestamp:
222
- description: ISO 8601 timestamp when the event occurred. Defaults to current time if not provided.
223
- format: date-time
224
- type: string
225
- phone:
226
- description: Customer phone number (one of email or phone is required).
227
- type: string
228
- properties:
229
- additionalProperties: true
230
- description: Custom properties for this event. Access in templates using dot notation (e.g., {{ properties.product_name }}).
231
- type: object
232
- required:
233
- - event_name
234
- title: Custom Event Request
235
- type: object
236
- custom-event-response.schema:
237
- additionalProperties: false
238
- description: Response after successfully creating a custom event.
239
- properties:
240
- event_id:
241
- description: The unique identifier for the created event.
242
- type: string
243
- event_name:
244
- description: The name of the custom event that was created.
245
- type: string
246
- status:
247
- description: Status of the event processing.
248
- enum:
249
- - processed
250
- type: string
251
- required:
252
- - event_id
253
- - status
254
- - event_name
255
- title: Custom Event Response
256
- type: object
257
- customer-subscription-email.schema:
258
- description: Email subscription updates
259
- properties:
260
- email:
261
- description: Email address
262
- format: email
263
- type: string
264
- subscriptions:
265
- properties:
266
- marketing:
267
- $ref: '#/components/schemas/subscription-status-marketing.schema'
268
- type: object
269
- required:
270
- - email
271
- - subscriptions
272
- type: object
273
- customer-subscription-sms.schema:
274
- description: SMS subscription updates
275
- properties:
276
- phoneNumber:
277
- description: Phone number in E.164 format (e.g., +12345678900)
278
- type: string
279
- subscriptions:
280
- properties:
281
- marketing:
282
- $ref: '#/components/schemas/subscription-status-marketing.schema'
283
- transactional:
284
- $ref: '#/components/schemas/subscription-status-transactional.schema'
285
- type: object
286
- required:
287
- - phoneNumber
288
- - subscriptions
289
- type: object
290
- customer-subscription-update-response.schema:
291
- description: Customer subscription update response
292
- properties:
293
- message:
294
- description: Human-readable success message
295
- type: string
296
- success:
297
- description: Whether the operation was successful
298
- type: boolean
299
- updatedSubscriptions:
300
- description: Details of which subscriptions were updated
301
- properties:
302
- email:
303
- properties:
304
- marketing:
305
- description: Whether email marketing was updated
306
- type: boolean
307
- type: object
308
- sms:
309
- properties:
310
- marketing:
311
- description: Whether SMS marketing was updated
312
- type: boolean
313
- transactional:
314
- description: Whether SMS transactional was updated
315
- type: boolean
316
- type: object
317
- type: object
318
- required:
319
- - success
320
- - message
321
- - updatedSubscriptions
322
- type: object
323
- error.schema:
324
- description: Problem details. See [RFC 7807 Section 3](https://datatracker.ietf.org/doc/html/rfc7807#section-3).
325
- properties:
326
- detail:
327
- description: Human-readable description of the problem.
328
- title: Detail
329
- type: string
330
- instance:
331
- description: A URI reference that identifies this problem.
332
- format: uri-reference
333
- type: string
334
- title:
335
- description: Human-readable summary of the problem type.
336
- title: Title
337
- type: string
338
- type:
339
- default: about:blank
340
- description: A URI reference that identifies the problem type.
341
- format: uri-reference
342
- type: string
343
- title: Problem details
344
- type: object
345
- exchange-provision.schema:
346
- enum:
347
- - instant
348
- - deferred
349
- example: deferred
350
- title: Exchang provision
351
- type: string
352
- https-callback.schema:
353
- description: HTTPS callback
354
- properties:
355
- auth:
356
- description: Authorization.
357
- oneOf:
358
- - properties:
359
- bearer:
360
- description: Bearer
361
- properties:
362
- token:
363
- description: Token for Bearer authorization.
364
- example: abc123
365
- format: password
366
- title: Token
367
- type: string
368
- title: Bearer
369
- title: Bearer authorization
370
- type: object
371
- - type: 'null'
372
- title: Authorization
373
- url:
374
- description: HTTPS callback URL.
375
- example: https://subscriber.example.org/events
376
- format: uri
377
- pattern: ^https://
378
- title: URL
379
- type: string
380
- required:
381
- - auth
382
- - url
383
- title: HTTPS callback
384
- type: object
385
- invoice.schema:
386
- description: Schema for an invoice.
387
- properties:
388
- charge:
389
- $ref: '#/components/schemas/money.schema'
390
- description: The charge that the invoice is for.
391
- createdAt:
392
- description: The time the invoice was created.
393
- format: date-time
394
- type: string
395
- id:
396
- description: The ID of the charge.
397
- type: string
398
- status:
399
- description: The status of the invoice.
400
- type: string
401
- store:
402
- properties:
403
- id:
404
- description: The ID of the store.
405
- type: string
406
- required:
407
- - id
408
- type: object
409
- updatedAt:
410
- description: The time the invoice was last updated.
411
- format: date-time
412
- type: string
413
- required:
414
- - team
415
- - updatedAt
416
- - status
417
- - createdAt
418
- - charge
419
- type: object
420
- item-quantity.schema:
421
- description: Item quantity.
422
- example: 1
423
- exclusiveMinimum: 0
424
- title: Item quantity
425
- type: number
426
- length.schema:
427
- description: Length measurement with unit.
428
- properties:
429
- unit:
430
- description: Length unit
431
- enum:
432
- - in
433
- - cm
434
- examples:
435
- - in
436
- - cm
437
- title: Unit
438
- type: string
439
- value:
440
- description: Numeric length value
441
- examples:
442
- - 10.5
443
- - 30
444
- minimum: 0
445
- title: Value
446
- type: number
447
- required:
448
- - value
449
- - unit
450
- title: Length
451
- type: object
452
- money.schema:
453
- description: Currency amount
454
- properties:
455
- amount:
456
- examples:
457
- - '50.2'
458
- - '1.78'
459
- title: Amount
460
- type: string
461
- currency:
462
- examples:
463
- - USD
464
- - EUR
465
- title: Currency
466
- type: string
467
- title: Money
468
- type: object
469
- order-read.schema:
470
- description: Order.
471
- properties:
472
- customer:
473
- properties:
474
- emailAddress:
475
- description: Email address of customer.
476
- format: email
477
- title: Email address
478
- type: string
479
- name:
480
- $ref: '#/components/schemas/person-name.schema'
481
- description: Name of customer.
482
- title: Name
483
- phoneNumber:
484
- $ref: '#/components/schemas/phone-number.schema'
485
- description: Phone number of customer.
486
- title: Phone number
487
- required:
488
- - name
489
- type: object
490
- discounts:
491
- $ref: '#/components/schemas/money.schema'
492
- description: The total amount discounted on the order before returns. This includes both order and line level discounts.
493
- title: Discounts
494
- externalId:
495
- description: Shopify ID
496
- examples:
497
- - '1073459971'
498
- - '450789469'
499
- title: External ID
500
- type: string
501
- id:
502
- description: Order ID
503
- example: 64e4da943dd822979a70bd12
504
- title: ID
505
- type: string
506
- items:
507
- items:
508
- properties:
509
- externalId:
510
- example: '123'
511
- type: string
512
- fulfillmentLocationId:
513
- description: ID of the location where the item was be fulfilled.
514
- example: '123'
515
- type:
516
- - string
517
- - 'null'
518
- id:
519
- description: Line item ID
520
- title: ID
521
- type: string
522
- price:
523
- $ref: '#/components/schemas/money.schema'
524
- title: Price
525
- product:
526
- $ref: '#/components/schemas/product.schema'
527
- title: Product
528
- quantity:
529
- $ref: '#/components/schemas/item-quantity.schema'
530
- title: Quantity
531
- variant:
532
- $ref: '#/components/schemas/product-variant.schema'
533
- title: Variant
534
- required:
535
- - id
536
- - product
537
- - quantity
538
- - variant
539
- - price
540
- - fulfillmentLocationId
541
- title: Line items
542
- type: array
543
- lineItemsTotal:
544
- $ref: '#/components/schemas/money.schema'
545
- description: Total price of all line items before discounts, shipping, and taxes.
546
- title: Line Items Total
547
- name:
548
- description: Shopify name.
549
- examples:
550
- - '#123'
551
- title: Name
552
- type: string
553
- shippingCost:
554
- $ref: '#/components/schemas/money.schema'
555
- description: The total shipping cost for the order. This includes fees and any related discounts that were refunded.
556
- title: Shipping Cost
557
- taxes:
558
- $ref: '#/components/schemas/money.schema'
559
- description: Total taxes applied to the order.
560
- title: Taxes
561
- total:
562
- $ref: '#/components/schemas/money.schema'
563
- description: The total price of the order, before returns. This includes taxes, discounts, and shipping costs.
564
- title: Total
565
- required:
566
- - customer
567
- - id
568
- - items
569
- - name
570
- - discounts
571
- - lineItemsTotal
572
- - shippingCost
573
- - total
574
- - taxes
575
- title: Order
576
- type: object
577
- person-name.schema:
578
- description: Person name.
579
- properties:
580
- given:
581
- description: Given name
582
- examples:
583
- - John
584
- - Mary
585
- type: string
586
- surname:
587
- description: Surname
588
- examples:
589
- - Smith
590
- - Brown
591
- type: string
592
- required:
593
- - given
594
- - surname
595
- title: Person name
596
- type: object
597
- phone-number.schema:
598
- description: Phone number, in E.164 format
599
- examples:
600
- - '+15555555555'
601
- title: Phone number
602
- type: string
603
- product-variant.schema:
604
- properties:
605
- externalId:
606
- title: External ID
607
- type: string
608
- name:
609
- title: Title
610
- type: string
611
- sku:
612
- title: SKU
613
- type: string
614
- weight:
615
- $ref: '#/components/schemas/weight.schema'
616
- title: Weight
617
- required:
618
- - name
619
- title: Product variant
620
- type: object
621
- product.schema:
622
- description: Product.
623
- properties:
624
- externalId:
625
- description: Product ID in external system (e.g. shopify).
626
- title: External ID
627
- type: string
628
- name:
629
- description: Product title
630
- title: Name
631
- type: string
632
- required:
633
- - name
634
- title: Product
635
- type: object
636
- return-read.schema:
637
- description: Return read.
638
- properties:
639
- compensationMethods:
640
- description: Array of compensation methods available for this return
641
- items:
642
- enum:
643
- - refund
644
- - store_credit
645
- - exchange
646
- type: string
647
- title: Compensation Methods
648
- type: array
649
- completeWithNoAction:
650
- description: Whether this return can be completed with no action
651
- title: Complete With No Action
652
- type: boolean
653
- createdAt:
654
- description: Time of creation.
655
- format: date-time
656
- title: Created at
657
- type: string
658
- destination:
659
- properties:
660
- mailingAddress:
661
- $ref: '#/components/schemas/address.schema'
662
- description: Mailing address to send the returned items.
663
- title: Mailing address
664
- phoneNumber:
665
- $ref: '#/components/schemas/phone-number.schema'
666
- description: Phone number of the destination.
667
- title: Phone number
668
- type: object
669
- exchange:
670
- description: Exchange order
671
- properties:
672
- itemCount:
673
- description: Total quantity of all exchange items
674
- type: integer
675
- items:
676
- items:
677
- properties:
678
- id:
679
- title: ID
680
- type: string
681
- originalPrice:
682
- description: Original price for the exchange item without discounts and taxes
683
- properties:
684
- amount:
685
- type: string
686
- currency:
687
- type: string
688
- type: object
689
- price:
690
- description: Subtotal price for the exchange item including discounts
691
- properties:
692
- amount:
693
- type: string
694
- currency:
695
- type: string
696
- tax:
697
- type: string
698
- type: object
699
- product:
700
- $ref: '#/components/schemas/product.schema'
701
- title: Product
702
- quantity:
703
- $ref: '#/components/schemas/item-quantity.schema'
704
- title: Quantity
705
- variant:
706
- $ref: '#/components/schemas/product-variant.schema'
707
- required:
708
- - id
709
- - quantity
710
- - variant
711
- title: Line items
712
- type: array
713
- order:
714
- properties:
715
- externalId:
716
- description: ID of external order
717
- title: External ID
718
- type: string
719
- type: object
720
- provision:
721
- $ref: '#/components/schemas/exchange-provision.schema'
722
- title: Provision
723
- totalTax:
724
- description: Total tax for exchange items
725
- properties:
726
- amount:
727
- type: string
728
- currency:
729
- type: string
730
- type: object
731
- required:
732
- - items
733
- - provision
734
- title: Exchange
735
- type: object
736
- externalOrderIds:
737
- description: Array of external order IDs associated with this return
738
- items:
739
- type: string
740
- title: External Order IDs
741
- type: array
742
- giftCards:
743
- description: Gift card(s) created for return
744
- items:
745
- properties:
746
- amount:
747
- $ref: '#/components/schemas/money.schema'
748
- title: Amount
749
- code:
750
- description: Gift card 16 digit code.
751
- title: Code
752
- type: string
753
- externalId:
754
- description: Gift card ID.
755
- title: ID
756
- type: string
757
- required:
758
- - amount
759
- - code
760
- - externalId
761
- type: object
762
- title: Gift cards
763
- type: array
764
- id:
765
- description: Return identifier.
766
- examples:
767
- - 64df65d4c5a4ca3eff4b4e43
768
- title: Identifier
769
- type: string
770
- internalCreatedByName:
771
- description: Name of the internal team member who created this return
772
- title: Internal Created By Name
773
- type: string
774
- items:
775
- description: Return items
776
- items:
777
- properties:
778
- assessments:
779
- description: Assessment records for this return item. Only applicable for warranties.
780
- items:
781
- properties:
782
- assignedUser:
783
- description: User assigned to this assessment
784
- properties:
785
- email:
786
- type: string
787
- firstName:
788
- type: string
789
- id:
790
- type: string
791
- lastName:
792
- type: string
793
- name:
794
- type: string
795
- required:
796
- - id
797
- - name
798
- - firstName
799
- - lastName
800
- - email
801
- type: object
802
- responses:
803
- description: Assessment responses
804
- items:
805
- discriminator:
806
- propertyName: type
807
- oneOf:
808
- - properties:
809
- type:
810
- const: short_text
811
- type: string
812
- value:
813
- description: Short text response value
814
- type: string
815
- required:
816
- - type
817
- - value
818
- title: Short Text Response
819
- type: object
820
- - properties:
821
- type:
822
- const: long_text
823
- type: string
824
- value:
825
- description: Long text response value
826
- type: string
827
- required:
828
- - type
829
- - value
830
- title: Long Text Response
831
- type: object
832
- - properties:
833
- type:
834
- const: select
835
- type: string
836
- value:
837
- description: Select response values (array of selected options)
838
- items:
839
- type: string
840
- type: array
841
- required:
842
- - type
843
- - value
844
- title: Select Response
845
- type: object
846
- - properties:
847
- type:
848
- const: number
849
- type: string
850
- value:
851
- description: Number response value
852
- type: number
853
- required:
854
- - type
855
- - value
856
- title: Number Response
857
- type: object
858
- - properties:
859
- type:
860
- const: boolean
861
- type: string
862
- value:
863
- description: Boolean response value
864
- type: boolean
865
- required:
866
- - type
867
- - value
868
- title: Boolean Response
869
- type: object
870
- - properties:
871
- type:
872
- const: file_upload
873
- type: string
874
- value:
875
- description: File upload response values (array of file URLs or identifiers)
876
- items:
877
- type: string
878
- type: array
879
- required:
880
- - type
881
- - value
882
- title: File Upload Response
883
- type: object
884
- - properties:
885
- type:
886
- const: date
887
- type: string
888
- value:
889
- description: Date response value
890
- format: date-time
891
- type: string
892
- required:
893
- - type
894
- - value
895
- title: Date Response
896
- type: object
897
- type: array
898
- required:
899
- - assignedUser
900
- - responses
901
- type: object
902
- type: array
903
- customerComment:
904
- description: Customer's comment about the return
905
- type: string
906
- exchangeItem:
907
- description: Exchange item details if this return item is being exchanged
908
- properties:
909
- product:
910
- properties:
911
- externalId:
912
- type: string
913
- name:
914
- type: string
915
- type: object
916
- quantity:
917
- type: integer
918
- variant:
919
- properties:
920
- externalId:
921
- type: string
922
- name:
923
- type: string
924
- type: object
925
- title: Exchange item
926
- type: object
927
- externalReturnLineItemId:
928
- description: External return line item ID
929
- title: External Return Line Item ID
930
- type: string
931
- greenReturn:
932
- description: Whether this is a green return (no physical return required)
933
- type: boolean
934
- id:
935
- description: Return item ID.
936
- title: ID
937
- type: string
938
- multipleChoiceQuestions:
939
- description: Multiple choice questions and answers for this return item
940
- items:
941
- properties:
942
- answer:
943
- description: The selected answer
944
- type: string
945
- question:
946
- description: The question text
947
- type: string
948
- required:
949
- - question
950
- - answer
951
- type: object
952
- type: array
953
- orderItem:
954
- description: Order line item
955
- properties:
956
- id:
957
- description: 'Line item reference ID in format: {orderId}/{lineItemIndex}'
958
- title: ID
959
- type: string
960
- line_item_id:
961
- description: Original Shopify line item ID
962
- title: Line Item ID
963
- type: string
964
- required:
965
- - id
966
- title: Order item
967
- type: object
968
- productAdjustment:
969
- description: Product adjustment details
970
- type: string
971
- productId:
972
- description: Product ID
973
- type: string
974
- quantity:
975
- description: Quantity of items being returned
976
- type: integer
977
- reason:
978
- description: Primary return reason
979
- examples:
980
- - Too big
981
- - Other
982
- type: string
983
- reasonCode:
984
- description: Return reason code
985
- type: string
986
- reasonCodes:
987
- description: Array of return reason codes
988
- items:
989
- type: string
990
- type: array
991
- reasons:
992
- description: Array of return reasons
993
- items:
994
- type: string
995
- type: array
996
- refund:
997
- description: Refund details
998
- properties:
999
- amount:
1000
- $ref: '#/components/schemas/money.schema'
1001
- title: Amount
1002
- type:
1003
- description: Refund strategy
1004
- type: string
1005
- required:
1006
- - amount
1007
- type: object
1008
- shipmentGroupIds:
1009
- description: IDs of the shipment groups this return item belongs to
1010
- items:
1011
- type: string
1012
- title: Shipment Group IDs
1013
- type: array
1014
- sku:
1015
- description: Product SKU
1016
- type: string
1017
- status:
1018
- description: Return item status
1019
- type: string
1020
- variantId:
1021
- description: Product variant ID
1022
- type: string
1023
- required:
1024
- - id
1025
- - orderItem
1026
- - quantity
1027
- - reason
1028
- type: object
1029
- type: array
1030
- notes:
1031
- description: Teammembers generated notes and comments on the return
1032
- items:
1033
- properties:
1034
- image:
1035
- description: Optional image URL attached to the note
1036
- title: Image URL
1037
- type: string
1038
- message:
1039
- description: The note text
1040
- title: Message
1041
- type: string
1042
- required:
1043
- - message
1044
- type: object
1045
- title: Notes
1046
- type: array
1047
- order:
1048
- description: Original order.
1049
- properties:
1050
- id:
1051
- description: Redo's internal identifier for the original order created in Redo.
1052
- example: 64e4da943dd822979a70bd12
1053
- title: ID
1054
- type: string
1055
- name:
1056
- description: Order name from the external provider, such as the Shopify order name.
1057
- examples:
1058
- - '#123'
1059
- title: Name
1060
- type: string
1061
- required:
1062
- - id
1063
- title: Order
1064
- type: object
1065
- shipment:
1066
- $ref: '#/components/schemas/return-shipment.schema'
1067
- description: Shipment, if has been made
1068
- title: Shipment
1069
- shipments:
1070
- description: Array of all shipments associated with this return
1071
- items:
1072
- $ref: '#/components/schemas/return-shipment.schema'
1073
- title: Shipments
1074
- type: array
1075
- shopifyOrderIds:
1076
- description: Array of Shopify order IDs (deprecated, use externalOrderIds)
1077
- items:
1078
- type: string
1079
- title: Shopify Order IDs
1080
- type: array
1081
- source:
1082
- properties:
1083
- emailAddress:
1084
- description: Email address.
1085
- format: email
1086
- title: Email address
1087
- type: string
1088
- mailingAddress:
1089
- $ref: '#/components/schemas/address.schema'
1090
- description: Mailing address returned items are sent from.
1091
- title: Mailing address
1092
- name:
1093
- $ref: '#/components/schemas/person-name.schema'
1094
- description: Name of returner.
1095
- title: Name
1096
- phoneNumber:
1097
- $ref: '#/components/schemas/phone-number.schema'
1098
- description: Phone number of returner.
1099
- title: Phone number
1100
- required:
1101
- - emailAddress
1102
- - mailingAddress
1103
- - name
1104
- - phoneNumber
1105
- type: object
1106
- status:
1107
- $ref: '#/components/schemas/return-status.schema'
1108
- description: Return status.
1109
- title: Status
1110
- tags:
1111
- description: Tags associated with this return
1112
- items:
1113
- properties:
1114
- name:
1115
- description: The tag's display name
1116
- type: string
1117
- source:
1118
- description: The source of the tag
1119
- type: string
1120
- required:
1121
- - name
1122
- - source
1123
- type: object
1124
- title: Tags
1125
- type: array
1126
- totals:
1127
- description: Calculated totals for the return
1128
- properties:
1129
- charge:
1130
- description: The upsell amount for the exchange order
1131
- properties:
1132
- amount:
1133
- $ref: '#/components/schemas/money.schema'
1134
- required:
1135
- - amount
1136
- type: object
1137
- exchange:
1138
- description: Total value of new items in exchange
1139
- properties:
1140
- amount:
1141
- $ref: '#/components/schemas/money.schema'
1142
- required:
1143
- - amount
1144
- type: object
1145
- refund:
1146
- description: Total refund amount excluding shipping
1147
- properties:
1148
- amount:
1149
- $ref: '#/components/schemas/money.schema'
1150
- required:
1151
- - amount
1152
- type: object
1153
- storeCredit:
1154
- description: Total store credit amount
1155
- properties:
1156
- amount:
1157
- $ref: '#/components/schemas/money.schema'
1158
- required:
1159
- - amount
1160
- type: object
1161
- required:
1162
- - refund
1163
- - exchange
1164
- - storeCredit
1165
- - charge
1166
- title: Totals
1167
- type: object
1168
- type:
1169
- $ref: '#/components/schemas/return-type.schema'
1170
- description: Return type.
1171
- title: Type
1172
- updatedAt:
1173
- description: Time of last update.
1174
- format: date-time
1175
- title: Updated at
1176
- type: string
1177
- required:
1178
- - createdAt
1179
- - destination
1180
- - giftCards
1181
- - source
1182
- - id
1183
- - order
1184
- - items
1185
- - status
1186
- - updatedAt
1187
- title: Return
1188
- type: object
1189
- return-shipment.schema:
1190
- description: Return shipment tracking information
1191
- properties:
1192
- carrier:
1193
- description: Carrier code
1194
- title: Carrier
1195
- type: string
1196
- deliveredAt:
1197
- description: Date and time this shipment was delivered
1198
- title: Delivered At
1199
- type: string
1200
- estimatedDeliveryDate:
1201
- description: Estimated delivery date for this shipment
1202
- title: Estimated Delivery Date
1203
- type: string
1204
- externalLocationId:
1205
- description: External location ID for the destination of this shipment
1206
- title: External Location ID
1207
- type: string
1208
- formLabel:
1209
- description: Form label URL
1210
- title: Form Label
1211
- type: string
1212
- itemIds:
1213
- description: IDs of the return items included in this shipment
1214
- items:
1215
- type: string
1216
- title: Item IDs
1217
- type: array
1218
- postageLabel:
1219
- description: Postage label URL
1220
- title: Postage Label
1221
- type: string
1222
- shipmentGroupId:
1223
- description: ID of the shipment group this shipment belongs to
1224
- title: Shipment Group ID
1225
- type: string
1226
- status:
1227
- description: Status of shipment
1228
- enum:
1229
- - unknown
1230
- - pre_transit
1231
- - in_transit
1232
- - out_for_delivery
1233
- - available_for_pickup
1234
- - cancelled
1235
- - delivered
1236
- - error
1237
- - failure
1238
- - return_to_sender
1239
- - expired
1240
- title: Status
1241
- type: string
1242
- tracker:
1243
- description: Tracking number
1244
- title: Tracker
1245
- type: string
1246
- trackingUrl:
1247
- description: Tracking URL
1248
- title: Tracking URL
1249
- type: string
1250
- title: Return Shipment
1251
- type: object
1252
- return-status-update.schema:
1253
- description: |
1254
- Return status.
1255
-
1256
- * complete: The return has been completed successfully.
1257
- * open: Return has been approved and is awaiting shipment.
1258
- * flagged: A problem with return processing requires merchant action.
1259
- * rejected: The return has been rejected.
1260
- * deleted: The return has been reset.
1261
- enum:
1262
- - complete
1263
- - open
1264
- - flagged
1265
- - rejected
1266
- - deleted
1267
- example: open
1268
- title: Return status
1269
- type: string
1270
- return-status.schema:
1271
- description: |
1272
- Return status.
1273
-
1274
- * open: Return has been approved and is awaiting shipment.
1275
- * in_transit: Return shipment is in transit.
1276
- * delivered: Return shipment has been delivered and awaiting processing.
1277
- * needs_review: Return requires review before further action.
1278
- * in_review: Return is currently being reviewed.
1279
- * complete: The return has been completed successfully.
1280
- * rejected: The return has been rejected.
1281
- * flagged: A problem with return processing requires merchant action.
1282
- * pre_shipment: Return requires pre-shipment merchant authorization.
1283
- * deleted: The return has been deleted (Reset).
1284
- enum:
1285
- - open
1286
- - in_transit
1287
- - delivered
1288
- - needs_review
1289
- - in_review
1290
- - complete
1291
- - rejected
1292
- - flagged
1293
- - pre_shipment
1294
- - deleted
1295
- example: open
1296
- title: Return status
1297
- type: string
1298
- return-type.schema:
1299
- description: |
1300
- Return type.
1301
- enum:
1302
- - claim
1303
- - return
1304
- - warranty
1305
- example: return
1306
- title: Return type
1307
- type: string
1308
- storefront-cart.schema:
1309
- description: Storefront cart.
1310
- properties:
1311
- lineItems:
1312
- description: Line items.
1313
- items:
1314
- properties:
1315
- coupons:
1316
- items:
1317
- properties:
1318
- code:
1319
- type: string
1320
- discountAmount:
1321
- $ref: '#/components/schemas/money.schema'
1322
- description: The amount this coupon discounts in dollars for this line item.
1323
- id:
1324
- type: string
1325
- required:
1326
- - id
1327
- - code
1328
- - discountAmount
1329
- type: object
1330
- type: array
1331
- id:
1332
- description: Line item ID.
1333
- title: ID
1334
- type: string
1335
- originalPrice:
1336
- $ref: '#/components/schemas/money.schema'
1337
- description: Original price.
1338
- title: Original Price
1339
- priceTotal:
1340
- $ref: '#/components/schemas/money.schema'
1341
- description: Total price.
1342
- title: Price
1343
- product:
1344
- description: Product.
1345
- properties:
1346
- id:
1347
- description: Identifier of the product.
1348
- title: ID
1349
- type: string
1350
- required:
1351
- - id
1352
- type: object
1353
- quantity:
1354
- description: Quantity.
1355
- title: Quantity
1356
- type: integer
1357
- variant:
1358
- description: Variant.
1359
- properties:
1360
- id:
1361
- description: Identifier of the variant.
1362
- title: ID
1363
- type: string
1364
- required:
1365
- - id
1366
- type: object
1367
- required:
1368
- - id
1369
- - quantity
1370
- - product
1371
- - variant
1372
- - priceTotal
1373
- type: object
1374
- title: Line items
1375
- type: array
1376
- priceTotal:
1377
- $ref: '#/components/schemas/money.schema'
1378
- description: Total price.
1379
- title: Price
1380
- required:
1381
- - lineItems
1382
- - priceTotal
1383
- title: Storefront Cart
1384
- type: object
1385
- storefront-customer.schema:
1386
- description: Storefront customer.
1387
- properties:
1388
- id:
1389
- description: Customer ID.
1390
- title: ID
1391
- type: string
1392
- required:
1393
- - id
1394
- title: Storefront Customer
1395
- type: object
1396
- storefront-event.schema:
1397
- additionalProperties: true
1398
- description: Shopify pixel event for storefront tracking.
1399
- properties:
1400
- anonymousId:
1401
- description: Anonymous identifier for users without account.
1402
- type: string
1403
- cart:
1404
- description: Cart information.
1405
- type:
1406
- - object
1407
- - 'null'
1408
- cartLine:
1409
- description: Information about specific cart line item.
1410
- type: object
1411
- checkout:
1412
- description: Checkout information.
1413
- type: object
1414
- collection:
1415
- description: Collection information.
1416
- type: object
1417
- customer:
1418
- description: Customer information if available.
1419
- type:
1420
- - object
1421
- - 'null'
1422
- customerEmail:
1423
- description: Customer email if available.
1424
- format: email
1425
- type: string
1426
- customerPhone:
1427
- description: Customer phone if available.
1428
- type: string
1429
- eventId:
1430
- description: Unique identifier for the event.
1431
- type: string
1432
- eventName:
1433
- description: Name of the Shopify pixel event.
1434
- enum:
1435
- - product_added_to_cart
1436
- - product_removed_from_cart
1437
- - product_viewed
1438
- - checkout_started
1439
- - checkout_completed
1440
- - checkout_contact_info_submitted
1441
- - page_viewed
1442
- - collection_viewed
1443
- type: string
1444
- productVariant:
1445
- description: Product variant information.
1446
- type: object
1447
- source:
1448
- description: Source of the event.
1449
- enum:
1450
- - AIMERCE
1451
- type: string
1452
- timestamp:
1453
- description: ISO 8601 timestamp when the event occurred.
1454
- format: date-time
1455
- type: string
1456
- urlWithParams:
1457
- description: Complete page URL with query parameters.
1458
- type: string
1459
- urlWithoutParams:
1460
- description: Page URL without query parameters.
1461
- type: string
1462
- required:
1463
- - eventName
1464
- - eventId
1465
- - timestamp
1466
- - source
1467
- title: Storefront Event
1468
- type: object
1469
- subscription-status-marketing.schema:
1470
- description: Marketing subscription status
1471
- properties:
1472
- subscriptionStatus:
1473
- description: Subscription status
1474
- enum:
1475
- - subscribed
1476
- - confirmed
1477
- - unsubscribed
1478
- type: string
1479
- triggerAutomations:
1480
- default: false
1481
- description: Whether to trigger automations for this subscription change. Defaults to false.
1482
- type: boolean
1483
- updatedAt:
1484
- description: ISO 8601 timestamp. If not provided, defaults to now.
1485
- format: date-time
1486
- type: string
1487
- required:
1488
- - subscriptionStatus
1489
- title: Subscription Status Marketing
1490
- type: object
1491
- subscription-status-transactional.schema:
1492
- description: Transactional subscription status (order tracking)
1493
- properties:
1494
- subscriptionStatus:
1495
- description: Subscription status. Only subscribed and unsubscribed are supported for transactional.
1496
- enum:
1497
- - subscribed
1498
- - unsubscribed
1499
- type: string
1500
- updatedAt:
1501
- description: ISO 8601 timestamp. If not provided, defaults to now.
1502
- format: date-time
1503
- type: string
1504
- required:
1505
- - subscriptionStatus
1506
- title: Subscription Status Transactional
1507
- type: object
1508
- webhook-create.schema:
1509
- description: Webhook create.
1510
- properties:
1511
- backfill:
1512
- default: false
1513
- description: Create events for already-existing items
1514
- title: Backfill
1515
- type: boolean
1516
- callback:
1517
- $ref: '#/components/schemas/https-callback.schema'
1518
- description: HTTPS callback to POST events.
1519
- title: HTTPS callback
1520
- externalId:
1521
- default: null
1522
- description: Optional external identifier.
1523
- title: External ID
1524
- type:
1525
- - string
1526
- - 'null'
1527
- kind:
1528
- $ref: '#/components/schemas/webhook-kind.schema'
1529
- description: Kind.
1530
- title: Kind
1531
- topic:
1532
- $ref: '#/components/schemas/webhook-topic.schema'
1533
- description: Topic.
1534
- title: Topic
1535
- required:
1536
- - callback
1537
- - topic
1538
- title: Webhook create
1539
- type: object
1540
- webhook-kind.schema:
1541
- description: Webhook kind.
1542
- enum:
1543
- - redo
1544
- - loop
1545
- title: Webhook kind
1546
- type: string
1547
- webhook-read.schema:
1548
- description: Webhook read.
1549
- properties:
1550
- callback:
1551
- $ref: '#/components/schemas/https-callback.schema'
1552
- description: HTTPS callback URL to POST events.
1553
- title: Callback
1554
- createdAt:
1555
- description: Time created.
1556
- format: date-time
1557
- title: Created at.
1558
- type: string
1559
- externalId:
1560
- default: null
1561
- description: Optional external identifier.
1562
- title: External ID
1563
- type:
1564
- - string
1565
- - 'null'
1566
- id:
1567
- description: Webhook ID.
1568
- readonly: true
1569
- title: ID
1570
- type: string
1571
- kind:
1572
- $ref: '#/components/schemas/webhook-kind.schema'
1573
- description: Kind.
1574
- title: Kind
1575
- topic:
1576
- $ref: '#/components/schemas/webhook-topic.schema'
1577
- description: Topic.
1578
- title: Topic
1579
- updatedAt:
1580
- description: Last time updated.
1581
- format: date-time
1582
- title: Updated at.
1583
- type: string
1584
- required:
1585
- - callback
1586
- - createdAt
1587
- - externalId id
1588
- - updatedAt
1589
- - topic
1590
- title: Webhook read
1591
- type: object
1592
- webhook-topic.schema:
1593
- description: Webhook topic.
1594
- enum:
1595
- - return
1596
- title: Webhook topic
1597
- type: string
1598
- webhook-update.schema:
1599
- description: Webhook update.
1600
- properties:
1601
- callback:
1602
- $ref: '#/components/schemas/https-callback.schema'
1603
- description: HTTPS callback to POST events.
1604
- title: HTTPS callback
1605
- externalId:
1606
- default: null
1607
- description: Optional external identifier.
1608
- title: External ID
1609
- type:
1610
- - string
1611
- - 'null'
1612
- required:
1613
- - callback
1614
- title: Webhook update
1615
- type: object
1616
- weight.schema:
1617
- description: Weight.
1618
- properties:
1619
- kg:
1620
- description: Weight in kilograms
1621
- examples:
1622
- - 0.021
1623
- - 1.4
1624
- minimum: 0
1625
- title: Kilograms
1626
- type: number
1627
- title: Weight
1628
- type: object
1629
- securitySchemes:
1630
- Bearer:
1631
- scheme: bearer
1632
- type: http
1633
- UserBearer:
1634
- scheme: bearer
1635
- type: http
1
+ openapi: 3.1.0
1636
2
  info:
1637
3
  contact:
1638
4
  email: engineering-admin@getredo.com
@@ -1651,24 +17,509 @@ info:
1651
17
 
1652
18
  ## Webhooks
1653
19
 
1654
- Webhooks are authenticated using the Bearer authorization scheme, using
1655
- a secret supplied by the subscriber.
20
+ Webhooks are authenticated using the Bearer authorization scheme, using
21
+ a secret supplied by the subscriber.
22
+
23
+ ```txt
24
+ POST /events HTTP/1.1
25
+ Authorization: Bearer subscriberauth123
26
+ Host: subscriber.example.com
27
+ ```
28
+
29
+ Webhook events are delivered in order for each individual subject (e.g.
30
+ return).
31
+
32
+ If the response is not a 2xx status code, the event will be retried multiple
33
+ times before discarding it.
34
+ title: Redo API
35
+ version: 2.2.1
36
+ servers:
37
+ - url: https://api.getredo.com/v2.2
38
+ tags:
39
+ - name: Checkout Buttons
40
+ - name: Coverage Info
41
+ - name: Coverage Products
42
+ - name: Custom Events
43
+ - name: Customer Portal
44
+ - name: Customer Subscriptions
45
+ - name: Customers
46
+ - name: Invoices
47
+ - name: Merchant Admin
48
+ - name: Returns
49
+ - name: Storefront
50
+ - name: Webhooks
51
+ paths:
52
+ /stores/{storeId}/checkout-buttons-ui:
53
+ description: Generate HTML and CSS for checkout buttons to enable or disable returns coverage.
54
+ get:
55
+ description: Generate rendered HTML and CSS for checkout buttons.
56
+ operationId: Checkout buttons UI
57
+ parameters:
58
+ - $ref: '#/components/parameters/store-id.param'
59
+ responses:
60
+ '200':
61
+ content:
62
+ application/json:
63
+ schema:
64
+ properties:
65
+ css:
66
+ description: Boilerplate checkout button CSS, plus any merchant configured styles or A/B tests.
67
+ title: Checkout buttons CSS
68
+ type: string
69
+ html:
70
+ description: Boilerplate checkout button HTML
71
+ title: Checkout buttons HTML
72
+ type: string
73
+ description: Success
74
+ summary: Checkout Buttons UI
75
+ tags:
76
+ - Checkout Buttons
77
+ summary: Checkout buttons UI
78
+ /stores/{storeId}/coverage-info:
79
+ description: Navigate to the coverage info page.
80
+ get:
81
+ description: Navigate to the coverage info page.
82
+ operationId: Coverage info navigate
83
+ parameters:
84
+ - $ref: '#/components/parameters/store-id.param'
85
+ responses:
86
+ '302':
87
+ description: Redirect
88
+ summary: Navigate to Coverage Info
89
+ tags:
90
+ - Coverage Info
91
+ summary: Coverage info
92
+ /stores/{storeId}/coverage-products:
93
+ description: Available coverage products.
94
+ post:
95
+ description: Get available coverage products.
96
+ operationId: Coverage products
97
+ parameters:
98
+ - $ref: '#/components/parameters/store-id.param'
99
+ requestBody:
100
+ content:
101
+ application/json:
102
+ schema:
103
+ properties:
104
+ cart:
105
+ $ref: '#/components/schemas/storefront-cart.schema'
106
+ customer:
107
+ $ref: '#/components/schemas/storefront-customer.schema'
108
+ products:
109
+ description: Product information.
110
+ items:
111
+ properties:
112
+ id:
113
+ description: Identifier of the product.
114
+ title: ID
115
+ type: string
116
+ required:
117
+ - id
118
+ type: object
119
+ deprecated: true
120
+ title: Products
121
+ type: array
122
+ variants:
123
+ description: Variant information.
124
+ items:
125
+ properties:
126
+ height:
127
+ $ref: '#/components/schemas/length.schema'
128
+ description: Height of an item.
129
+ title: Height
130
+ id:
131
+ description: Identifier of the variant.
132
+ title: ID
133
+ type: string
134
+ length:
135
+ $ref: '#/components/schemas/length.schema'
136
+ description: Length of an item.
137
+ title: Length
138
+ title:
139
+ title: Title
140
+ type: string
141
+ weight:
142
+ $ref: '#/components/schemas/weight.schema'
143
+ description: Weight of an item.
144
+ title: Weight
145
+ width:
146
+ $ref: '#/components/schemas/length.schema'
147
+ description: Width of an item.
148
+ title: Width
149
+ required:
150
+ - id
151
+ type: object
152
+ deprecated: true
153
+ title: Variants
154
+ type: array
155
+ required:
156
+ - cart
157
+ type: object
158
+ required: true
159
+ responses:
160
+ '200':
161
+ content:
162
+ application/json:
163
+ schema:
164
+ properties:
165
+ coverageProducts:
166
+ description: Coverage products.
167
+ items:
168
+ $ref: '#/components/schemas/coverage-product.schema'
169
+ title: Coverage Products
170
+ type: array
171
+ required:
172
+ - coverageProducts
173
+ type: object
174
+ description: Success
175
+ default:
176
+ content:
177
+ application/problem+json:
178
+ schema:
179
+ $ref: '#/components/schemas/error.schema'
180
+ description: Error
181
+ summary: Coverage Products
182
+ tags:
183
+ - Coverage Products
184
+ summary: Coverage products
185
+ /stores/{storeId}/events:
186
+ post:
187
+ description: |
188
+ Create a custom event to trigger flows with merchant-defined event names and properties.
189
+
190
+ Custom events allow merchants to trigger flows based on events from their own systems.
191
+ Events can include custom properties that are accessible in email and SMS templates.
192
+
193
+ ## Customer Matching
194
+ The API matches customers by email or phone number. At least one must be provided.
195
+
196
+ If no matching customer is found, the request will fail with a 404 error.
197
+
198
+ ## Rate Limiting
199
+ This endpoint is rate-limited to 100 requests per second per store.
200
+ operationId: Custom event create
201
+ parameters:
202
+ - $ref: '#/components/parameters/store-id.param'
203
+ requestBody:
204
+ content:
205
+ application/json:
206
+ schema:
207
+ $ref: '#/components/schemas/custom-event-request.schema'
208
+ examples:
209
+ user_registered:
210
+ summary: User registration event
211
+ value:
212
+ event_name: user_registered
213
+ email: customer@example.com
214
+ properties:
215
+ plan_type: premium
216
+ referral_code: FRIEND123
217
+ source: mobile_app
218
+ purchase_milestone:
219
+ summary: Purchase milestone event
220
+ value:
221
+ event_name: purchase_milestone_reached
222
+ phone: '+12065551234'
223
+ properties:
224
+ milestone_type: 100th_purchase
225
+ total_spent: 5000
226
+ vip_tier: gold
227
+ required: true
228
+ responses:
229
+ '200':
230
+ content:
231
+ application/json:
232
+ schema:
233
+ $ref: '#/components/schemas/custom-event-response.schema'
234
+ description: Event created successfully
235
+ '400':
236
+ content:
237
+ application/json:
238
+ schema:
239
+ $ref: '#/components/schemas/error.schema'
240
+ description: Invalid request body or missing required customer identifier
241
+ '404':
242
+ content:
243
+ application/json:
244
+ schema:
245
+ $ref: '#/components/schemas/error.schema'
246
+ description: Customer not found with provided identifier
247
+ '429':
248
+ content:
249
+ application/json:
250
+ schema:
251
+ $ref: '#/components/schemas/error.schema'
252
+ description: Rate limit exceeded
253
+ default:
254
+ content:
255
+ application/problem+json:
256
+ schema:
257
+ $ref: '#/components/schemas/error.schema'
258
+ description: Error
259
+ security:
260
+ - Bearer: []
261
+ summary: Create custom event
262
+ tags:
263
+ - Custom Events
264
+ /stores/{storeId}/customer-portal:
265
+ description: Navigate to the customer portal.
266
+ get:
267
+ description: Navigate to the customer portal.
268
+ operationId: Customer portal navigate
269
+ parameters:
270
+ - $ref: '#/components/parameters/store-id.param'
271
+ - description: HMAC-SHA256 JWT of {"iss":"<partnerId>","sub":"<storeId>/<customerId>"}
272
+ in: query
273
+ name: token
274
+ schema:
275
+ type: string
276
+ - description: Order ID
277
+ in: query
278
+ name: order_id
279
+ schema:
280
+ type: string
281
+ responses:
282
+ '302':
283
+ description: Redirect
284
+ summary: Navigate to Customer Portal
285
+ tags:
286
+ - Customer Portal
287
+ summary: Customer portal
288
+ /stores/{storeId}/customer-subscriptions:
289
+ description: Update customer subscription preferences for marketing and transactional messages.
290
+ post:
291
+ description: Update customer subscription status for SMS and email marketing and transactional messages. If the customer with that phone number or email does not exist, it will be created.
292
+ operationId: Customer subscriptions update
293
+ parameters:
294
+ - $ref: '#/components/parameters/store-id.param'
295
+ requestBody:
296
+ content:
297
+ application/json:
298
+ schema:
299
+ properties:
300
+ email:
301
+ $ref: '#/components/schemas/customer-subscription-email.schema'
302
+ sms:
303
+ $ref: '#/components/schemas/customer-subscription-sms.schema'
304
+ type: object
305
+ required: true
306
+ responses:
307
+ '200':
308
+ content:
309
+ application/json:
310
+ schema:
311
+ $ref: '#/components/schemas/customer-subscription-update-response.schema'
312
+ description: Success
313
+ '400':
314
+ content:
315
+ application/problem+json:
316
+ schema:
317
+ $ref: '#/components/schemas/error.schema'
318
+ description: Bad Request
319
+ '500':
320
+ content:
321
+ application/problem+json:
322
+ schema:
323
+ $ref: '#/components/schemas/error.schema'
324
+ description: Internal Server Error
325
+ default:
326
+ content:
327
+ application/problem+json:
328
+ schema:
329
+ $ref: '#/components/schemas/error.schema'
330
+ description: Error
331
+ security:
332
+ - Bearer: []
333
+ summary: Update Customer Subscriptions
334
+ tags:
335
+ - Customer Subscriptions
336
+ summary: Customer subscriptions
337
+ /stores/{storeId}/customers:
338
+ description: Manage customer profiles.
339
+ get:
340
+ description: |
341
+ Retrieve a customer profile by email address.
342
+
343
+ The response includes the customer's name, contact information, location,
344
+ and any custom fields associated with the profile. Custom fields are returned
345
+ as `{ fieldName: value }` pairs.
346
+ operationId: Customer get
347
+ parameters:
348
+ - $ref: '#/components/parameters/store-id.param'
349
+ - description: Customer email address
350
+ in: query
351
+ name: email
352
+ required: true
353
+ schema:
354
+ format: email
355
+ type: string
356
+ responses:
357
+ '200':
358
+ content:
359
+ application/json:
360
+ schema:
361
+ $ref: '#/components/schemas/customer-read.schema'
362
+ example:
363
+ id: 67bd4f1a2e3c8d001a5f9b12
364
+ email: jane@example.com
365
+ firstName: Jane
366
+ lastName: Smith
367
+ phoneNumber: '+11234567890'
368
+ location:
369
+ street1: 123 Main St
370
+ street2: Suite 12
371
+ city: Seattle
372
+ state: Washington
373
+ stateCode: WA
374
+ postalCode: '98101'
375
+ country: United States
376
+ countryCode: US
377
+ latitude: 47.6062
378
+ longitude: -122.3321
379
+ customFields:
380
+ pricing_plan: com.example.yearly
381
+ status: Active
382
+ subscription_source: web
383
+ loyalty_points: 1250
384
+ vip_member: true
385
+ createdAt: '2026-02-20T18:30:00.000Z'
386
+ updatedAt: '2026-02-24T12:15:00.000Z'
387
+ description: Customer found
388
+ '400':
389
+ content:
390
+ application/problem+json:
391
+ schema:
392
+ $ref: '#/components/schemas/error.schema'
393
+ description: Missing or invalid email parameter
394
+ '404':
395
+ content:
396
+ application/problem+json:
397
+ schema:
398
+ $ref: '#/components/schemas/error.schema'
399
+ description: No customer found for that email
400
+ '500':
401
+ content:
402
+ application/problem+json:
403
+ schema:
404
+ $ref: '#/components/schemas/error.schema'
405
+ description: Internal server error
406
+ default:
407
+ content:
408
+ application/problem+json:
409
+ schema:
410
+ $ref: '#/components/schemas/error.schema'
411
+ description: Error
412
+ security:
413
+ - Bearer: []
414
+ summary: Get customer by email
415
+ tags:
416
+ - Customers
417
+ put:
418
+ description: |
419
+ Create or update a customer profile. Uses the email address as the upsert
420
+ key — if a customer with that email exists, their profile is updated;
421
+ otherwise, a new customer is created.
1656
422
 
1657
- ```txt
1658
- POST /events HTTP/1.1
1659
- Authorization: Bearer subscriberauth123
1660
- Host: subscriber.example.com
1661
- ```
423
+ ## Profile fields
424
+ - `firstName` and `lastName` are set directly on the customer. A full
425
+ display name is automatically generated from these fields.
426
+ - `phoneNumber` should be in E.164 format (e.g., `+12345678900`). If the
427
+ number is new, it is added to the customer's contact information.
1662
428
 
1663
- Webhook events are delivered in order for each individual subject (e.g.
1664
- return).
429
+ ## Location
430
+ Providing `location` sets the customer's current location. Only the fields
431
+ you include are updated.
1665
432
 
1666
- If the response is not a 2xx status code, the event will be retried multiple
1667
- times before discarding it.
1668
- title: Redo API
1669
- version: 2.2.1
1670
- openapi: 3.1.0
1671
- paths:
433
+ ## Custom fields
434
+ Use `customFields` to store arbitrary key-value data on the customer (e.g.,
435
+ `pricing_plan`, `subscription_source`). Values can be strings, numbers, or
436
+ booleans. If a custom field doesn't exist yet, it is created automatically.
437
+ operationId: Customer upsert
438
+ parameters:
439
+ - $ref: '#/components/parameters/store-id.param'
440
+ requestBody:
441
+ content:
442
+ application/json:
443
+ schema:
444
+ $ref: '#/components/schemas/customer-upsert-request.schema'
445
+ examples:
446
+ create_customer:
447
+ summary: Create a new customer with custom fields
448
+ value:
449
+ email: jane@example.com
450
+ firstName: Jane
451
+ lastName: Smith
452
+ phoneNumber: '+11234567890'
453
+ location:
454
+ street1: 123 Main St
455
+ street2: Suite 12
456
+ city: Seattle
457
+ state: Washington
458
+ stateCode: WA
459
+ postalCode: '98101'
460
+ country: United States
461
+ countryCode: US
462
+ latitude: 47.6062
463
+ longitude: -122.3321
464
+ customFields:
465
+ pricing_plan: com.example.yearly
466
+ status: Active
467
+ subscription_source: web
468
+ loyalty_points: 1250
469
+ vip_member: true
470
+ update_custom_fields:
471
+ summary: Update only custom fields for an existing customer
472
+ value:
473
+ email: jane@example.com
474
+ customFields:
475
+ status: Cancelled
476
+ cancellation_reason: Too expensive
477
+ required: true
478
+ responses:
479
+ '200':
480
+ content:
481
+ application/json:
482
+ schema:
483
+ $ref: '#/components/schemas/customer-upsert-response.schema'
484
+ example:
485
+ id: 67bd4f1a2e3c8d001a5f9b12
486
+ email: jane@example.com
487
+ created: false
488
+ description: Existing customer updated
489
+ '201':
490
+ content:
491
+ application/json:
492
+ schema:
493
+ $ref: '#/components/schemas/customer-upsert-response.schema'
494
+ example:
495
+ id: 67bd4f1a2e3c8d001a5f9b12
496
+ email: jane@example.com
497
+ created: true
498
+ description: New customer created
499
+ '400':
500
+ content:
501
+ application/problem+json:
502
+ schema:
503
+ $ref: '#/components/schemas/error.schema'
504
+ description: Invalid request body or invalid email address
505
+ '500':
506
+ content:
507
+ application/problem+json:
508
+ schema:
509
+ $ref: '#/components/schemas/error.schema'
510
+ description: Internal server error
511
+ default:
512
+ content:
513
+ application/problem+json:
514
+ schema:
515
+ $ref: '#/components/schemas/error.schema'
516
+ description: Error
517
+ security:
518
+ - Bearer: []
519
+ summary: Create or update customer
520
+ tags:
521
+ - Customers
522
+ summary: Customers
1672
523
  /invoices/pending/items.csv:
1673
524
  description: Return invoice CSV file.
1674
525
  get:
@@ -1721,6 +572,53 @@ paths:
1721
572
  tags:
1722
573
  - Invoices
1723
574
  summary: Invoice
575
+ /stores/{storeId}/invoices:
576
+ description: Return a list of invoices.
577
+ get:
578
+ description: Get a list of invoices.
579
+ operationId: Invoice list
580
+ parameters:
581
+ - $ref: '#/components/parameters/store-id.param'
582
+ responses:
583
+ '200':
584
+ content:
585
+ application/json:
586
+ schema:
587
+ properties:
588
+ invoices:
589
+ items:
590
+ $ref: '#/components/schemas/invoice.schema'
591
+ type: array
592
+ required:
593
+ - invoices
594
+ type: object
595
+ description: Success
596
+ default:
597
+ content:
598
+ application/problem+json:
599
+ schema:
600
+ $ref: '#/components/schemas/error.schema'
601
+ description: Error
602
+ security:
603
+ - Bearer: []
604
+ summary: List Invoices
605
+ tags:
606
+ - Invoices
607
+ summary: Invoice
608
+ /stores/{storeId}/admin:
609
+ description: Navigate to the merchant admin page.
610
+ get:
611
+ description: Navigate to the merchant admin page.
612
+ operationId: Merchant admin navigate
613
+ parameters:
614
+ - $ref: '#/components/parameters/store-id.param'
615
+ responses:
616
+ '302':
617
+ description: Redirect
618
+ summary: Navigate to Merchant Admin
619
+ tags:
620
+ - Merchant Admin
621
+ summary: Merchant admin
1724
622
  /returns/{returnId}:
1725
623
  description: Return.
1726
624
  get:
@@ -1962,643 +860,2110 @@ paths:
1962
860
  tags:
1963
861
  - Returns
1964
862
  summary: Return status
1965
- /stores/{storeId}/admin:
1966
- description: Navigate to the merchant admin page.
863
+ /stores/{storeId}/returns:
864
+ description: List of returns for store.
1967
865
  get:
1968
- description: Navigate to the merchant admin page.
1969
- operationId: Merchant admin navigate
866
+ description: List returns, sorted by most recent to least recent.
867
+ operationId: Returns list
1970
868
  parameters:
1971
- - $ref: '#/components/parameters/store-id.param'
869
+ - $ref: '#/components/parameters/page-continue.param'
870
+ - $ref: '#/components/parameters/page-size.param'
871
+ - $ref: '#/components/parameters/updated-at-max.param'
872
+ - $ref: '#/components/parameters/updated-at-min.param'
873
+ - $ref: '#/components/parameters/shopify-order-name'
874
+ - $ref: '#/components/parameters/provider-order-name'
875
+ - $ref: '#/components/parameters/return-status.param'
1972
876
  responses:
1973
- '302':
1974
- description: Redirect
1975
- summary: Navigate to Merchant Admin
877
+ '200':
878
+ content:
879
+ application/json:
880
+ schema:
881
+ properties:
882
+ orders:
883
+ items:
884
+ $ref: '#/components/schemas/order-read.schema'
885
+ type: array
886
+ returns:
887
+ items:
888
+ $ref: '#/components/schemas/return-read.schema'
889
+ type: array
890
+ required:
891
+ - orders
892
+ - returns
893
+ type: object
894
+ description: Success
895
+ headers:
896
+ X-Page-Next:
897
+ $ref: '#/components/headers/page-next.header'
898
+ default:
899
+ content:
900
+ application/problem+json:
901
+ schema:
902
+ $ref: '#/components/schemas/error.schema'
903
+ description: Error
904
+ security:
905
+ - Bearer: []
906
+ summary: List Returns
1976
907
  tags:
1977
- - Merchant Admin
1978
- summary: Merchant admin
1979
- /stores/{storeId}/checkout-buttons-ui:
1980
- description: Generate HTML and CSS for checkout buttons to enable or disable returns coverage.
1981
- get:
1982
- description: Generate rendered HTML and CSS for checkout buttons.
1983
- operationId: Checkout buttons UI
908
+ - Returns
909
+ parameters:
910
+ - $ref: '#/components/parameters/store-id.param'
911
+ summary: Returns
912
+ /stores/{storeId}/storefront/events:
913
+ post:
914
+ description: Processes events from storefronts using Shopify pixel event schema
915
+ operationId: Storefront Event
1984
916
  parameters:
1985
917
  - $ref: '#/components/parameters/store-id.param'
918
+ requestBody:
919
+ content:
920
+ application/json:
921
+ schema:
922
+ $ref: '#/components/schemas/storefront-event.schema'
923
+ required: true
924
+ responses:
925
+ '204':
926
+ description: Event processed successfully
927
+ '400':
928
+ content:
929
+ application/json:
930
+ schema:
931
+ $ref: '#/components/schemas/error.schema'
932
+ description: Invalid event payload
933
+ default:
934
+ content:
935
+ application/problem+json:
936
+ schema:
937
+ $ref: '#/components/schemas/error.schema'
938
+ description: Error
939
+ security:
940
+ - Bearer: []
941
+ summary: Receive Storefront Events
942
+ tags:
943
+ - Storefront
944
+ /stores/{storeId}/webhooks:
945
+ description: Webhooks.
946
+ get:
947
+ description: List webhooks for store.
948
+ operationId: Webhooks list
1986
949
  responses:
1987
950
  '200':
1988
951
  content:
1989
952
  application/json:
1990
953
  schema:
1991
954
  properties:
1992
- css:
1993
- description: Boilerplate checkout button CSS, plus any merchant configured styles or A/B tests.
1994
- title: Checkout buttons CSS
1995
- type: string
1996
- html:
1997
- description: Boilerplate checkout button HTML
1998
- title: Checkout buttons HTML
1999
- type: string
955
+ webhooks:
956
+ items:
957
+ $ref: '#/components/schemas/webhook-read.schema'
958
+ type: array
959
+ required:
960
+ - webhooks
961
+ type: object
2000
962
  description: Success
2001
- summary: Checkout Buttons UI
963
+ default:
964
+ content:
965
+ application/problem+json:
966
+ schema:
967
+ $ref: '#/components/schemas/error.schema'
968
+ description: Error
969
+ summary: List Webhooks
2002
970
  tags:
2003
- - Checkout Buttons
2004
- summary: Checkout buttons UI
2005
- /stores/{storeId}/coverage-info:
2006
- description: Navigate to the coverage info page.
971
+ - Webhooks
972
+ parameters:
973
+ - $ref: '#/components/parameters/store-id.param'
974
+ post:
975
+ description: Create webhook for store. Or if webhook already exists with `externalId`, update it.
976
+ operationId: Webhook create
977
+ requestBody:
978
+ content:
979
+ application/json:
980
+ schema:
981
+ properties:
982
+ webhook:
983
+ $ref: '#/components/schemas/webhook-create.schema'
984
+ type: object
985
+ required: true
986
+ responses:
987
+ '200':
988
+ content:
989
+ application/json:
990
+ schema:
991
+ properties:
992
+ webhook:
993
+ $ref: '#/components/schemas/webhook-read.schema'
994
+ type: object
995
+ description: Updated
996
+ '201':
997
+ content:
998
+ application/json:
999
+ schema:
1000
+ properties:
1001
+ webhook:
1002
+ $ref: '#/components/schemas/webhook-read.schema'
1003
+ type: object
1004
+ description: Created
1005
+ default:
1006
+ content:
1007
+ application/problem+json:
1008
+ schema:
1009
+ $ref: '#/components/schemas/error.schema'
1010
+ description: Error
1011
+ security:
1012
+ - Bearer: []
1013
+ summary: Create or Update Webhook
1014
+ tags:
1015
+ - Webhooks
1016
+ summary: Webhooks
1017
+ /webhooks/{webhookId}:
1018
+ delete:
1019
+ description: Delete a webhook.
1020
+ operationId: Webhook delete
1021
+ parameters:
1022
+ - $ref: '#/components/parameters/webhook-id.param'
1023
+ responses:
1024
+ '204':
1025
+ description: Deleted
1026
+ security:
1027
+ - Bearer: []
1028
+ summary: Delete Webhook
1029
+ tags:
1030
+ - Webhooks
1031
+ description: Webhook.
2007
1032
  get:
2008
- description: Navigate to the coverage info page.
2009
- operationId: Coverage info navigate
1033
+ description: Get a webhook.
1034
+ operationId: Webhook get
2010
1035
  parameters:
2011
- - $ref: '#/components/parameters/store-id.param'
1036
+ - $ref: '#/components/parameters/webhook-id.param'
1037
+ responses:
1038
+ '200':
1039
+ content:
1040
+ application/json:
1041
+ schema:
1042
+ properties:
1043
+ webhook:
1044
+ $ref: '#/components/schemas/webhook-read.schema'
1045
+ required:
1046
+ - webhook
1047
+ type: object
1048
+ description: Success
1049
+ summary: Webhook
1050
+ tags:
1051
+ - Webhooks
1052
+ put:
1053
+ description: Update a webhook.
1054
+ operationId: Webhook update
1055
+ parameters:
1056
+ - $ref: '#/components/parameters/webhook-id.param'
1057
+ requestBody:
1058
+ content:
1059
+ application/json:
1060
+ schema:
1061
+ properties:
1062
+ webhook:
1063
+ $ref: '#/components/schemas/webhook-update.schema'
1064
+ required:
1065
+ - webhook
1066
+ type: object
1067
+ required: true
1068
+ responses:
1069
+ '204':
1070
+ description: Success
1071
+ default:
1072
+ content:
1073
+ application/problem+json:
1074
+ schema:
1075
+ $ref: '#/components/schemas/error.schema'
1076
+ description: Error
1077
+ summary: Update Webhook
1078
+ tags:
1079
+ - Webhooks
1080
+ summary: Webhook
1081
+ /webhooks/{webhookId}/replay:
1082
+ description: Webhook replay.
1083
+ parameters:
1084
+ - $ref: '#/components/parameters/webhook-id.param'
1085
+ post:
1086
+ description: Replay a webhook.
1087
+ operationId: Webhook replay
1088
+ requestBody:
1089
+ content:
1090
+ application/json:
1091
+ schema:
1092
+ properties:
1093
+ start:
1094
+ format: date-time
1095
+ type: string
1096
+ required:
1097
+ - start
1098
+ type: object
1099
+ required: true
2012
1100
  responses:
2013
- '302':
2014
- description: Redirect
2015
- summary: Navigate to Coverage Info
1101
+ '202':
1102
+ description: Success
1103
+ default:
1104
+ content:
1105
+ application/problem+json:
1106
+ schema:
1107
+ $ref: '#/components/schemas/error.schema'
1108
+ description: Error
1109
+ summary: Replay Webhook
2016
1110
  tags:
2017
- - Coverage Info
2018
- summary: Coverage info
2019
- /stores/{storeId}/coverage-products:
2020
- description: Available coverage products.
1111
+ - Webhooks
1112
+ summary: Webhook replay
1113
+ webhooks:
1114
+ return:
2021
1115
  post:
2022
- description: Get available coverage products.
2023
- operationId: Coverage products
2024
- parameters:
2025
- - $ref: '#/components/parameters/store-id.param'
1116
+ operationId: Webhook return event
2026
1117
  requestBody:
2027
1118
  content:
2028
1119
  application/json:
2029
1120
  schema:
1121
+ description: Return event
1122
+ properties:
1123
+ at:
1124
+ description: Event time
1125
+ format: date-time
1126
+ title: At
1127
+ type: string
1128
+ order:
1129
+ $ref: '#/components/schemas/order-read.schema'
1130
+ description: Order for return.
1131
+ title: Order
1132
+ return:
1133
+ $ref: '#/components/schemas/return-read.schema'
1134
+ description: Return.
1135
+ title: Return
1136
+ type:
1137
+ description: Event type
1138
+ enum:
1139
+ - backfill
1140
+ - created
1141
+ - updated
1142
+ type: string
1143
+ type: object
1144
+ description: |
1145
+ Return event webhook.
1146
+ required: true
1147
+ responses:
1148
+ 2XX:
1149
+ description: Success. Return a 2xx status code to indicate success.
1150
+ default:
1151
+ description: Error. The event will be retried multiple times and then discarded.
1152
+ security:
1153
+ - UserBearer: []
1154
+ summary: Return event
1155
+ tags:
1156
+ - Returns
1157
+ components:
1158
+ securitySchemes:
1159
+ Bearer:
1160
+ scheme: bearer
1161
+ type: http
1162
+ UserBearer:
1163
+ scheme: bearer
1164
+ type: http
1165
+ parameters:
1166
+ store-id.param:
1167
+ description: Store ID
1168
+ in: path
1169
+ name: storeId
1170
+ required: true
1171
+ schema:
1172
+ example: 64e5a8a1af49a89df37e4ee7
1173
+ type: string
1174
+ invoice-id.param:
1175
+ description: Invoice ID
1176
+ in: path
1177
+ name: invoiceId
1178
+ required: true
1179
+ schema:
1180
+ example: 64e4d5e837572a4813b73e40
1181
+ type: string
1182
+ return-id.param:
1183
+ description: Return ID
1184
+ in: path
1185
+ name: returnId
1186
+ required: true
1187
+ schema:
1188
+ example: 64e4d5e837572a4813b73e40
1189
+ type: string
1190
+ page-continue.param:
1191
+ description: Page marker, from X-Page-Next header
1192
+ example: 64df700931a04885276c3364
1193
+ in: header
1194
+ name: X-Page-Continue
1195
+ schema:
1196
+ type: string
1197
+ page-size.param:
1198
+ description: Page size, defaults to 20
1199
+ example: 20
1200
+ in: header
1201
+ name: X-Page-Size
1202
+ schema:
1203
+ maximum: 500
1204
+ minimum: 1
1205
+ type: integer
1206
+ updated-at-max.param:
1207
+ description: Maximum updated time, exclusive
1208
+ example: '2000-02-01T00:00:00Z'
1209
+ in: query
1210
+ name: updated_at_max
1211
+ schema:
1212
+ format: date-time
1213
+ type: string
1214
+ updated-at-min.param:
1215
+ description: Minimum updated time, inclusive
1216
+ example: '2000-01-01T00:00:00Z'
1217
+ in: query
1218
+ name: updated_at_min
1219
+ schema:
1220
+ format: date-time
1221
+ type: string
1222
+ shopify-order-name:
1223
+ description: Shopify specific order name
1224
+ in: query
1225
+ name: shopify_order_name
1226
+ schema:
1227
+ example: XYZ1025
1228
+ type: string
1229
+ provider-order-name:
1230
+ description: Provider specific order name
1231
+ in: query
1232
+ name: provider_order_name
1233
+ schema:
1234
+ example: XYZ1025
1235
+ type: string
1236
+ return-status.param:
1237
+ description: Filter returns by status
1238
+ in: query
1239
+ name: status
1240
+ schema:
1241
+ $ref: '#/components/schemas/return-status.schema'
1242
+ webhook-id.param:
1243
+ description: Webhook ID
1244
+ in: path
1245
+ name: webhookId
1246
+ required: true
1247
+ schema:
1248
+ example: 64e5a865a58eefeed7f05ea6
1249
+ type: string
1250
+ schemas:
1251
+ money.schema:
1252
+ description: Currency amount
1253
+ properties:
1254
+ amount:
1255
+ examples:
1256
+ - '50.2'
1257
+ - '1.78'
1258
+ title: Amount
1259
+ type: string
1260
+ currency:
1261
+ examples:
1262
+ - USD
1263
+ - EUR
1264
+ title: Currency
1265
+ type: string
1266
+ title: Money
1267
+ type: object
1268
+ storefront-cart.schema:
1269
+ description: Storefront cart.
1270
+ properties:
1271
+ lineItems:
1272
+ description: Line items.
1273
+ items:
1274
+ properties:
1275
+ coupons:
1276
+ items:
1277
+ properties:
1278
+ code:
1279
+ type: string
1280
+ discountAmount:
1281
+ $ref: '#/components/schemas/money.schema'
1282
+ description: The amount this coupon discounts in dollars for this line item.
1283
+ id:
1284
+ type: string
1285
+ required:
1286
+ - id
1287
+ - code
1288
+ - discountAmount
1289
+ type: object
1290
+ type: array
1291
+ id:
1292
+ description: Line item ID.
1293
+ title: ID
1294
+ type: string
1295
+ originalPrice:
1296
+ $ref: '#/components/schemas/money.schema'
1297
+ description: Original price.
1298
+ title: Original Price
1299
+ priceTotal:
1300
+ $ref: '#/components/schemas/money.schema'
1301
+ description: Total price.
1302
+ title: Price
1303
+ product:
1304
+ description: Product.
1305
+ properties:
1306
+ id:
1307
+ description: Identifier of the product.
1308
+ title: ID
1309
+ type: string
1310
+ required:
1311
+ - id
1312
+ type: object
1313
+ quantity:
1314
+ description: Quantity.
1315
+ title: Quantity
1316
+ type: integer
1317
+ variant:
1318
+ description: Variant.
1319
+ properties:
1320
+ id:
1321
+ description: Identifier of the variant.
1322
+ title: ID
1323
+ type: string
1324
+ required:
1325
+ - id
1326
+ type: object
1327
+ required:
1328
+ - id
1329
+ - quantity
1330
+ - product
1331
+ - variant
1332
+ - priceTotal
1333
+ type: object
1334
+ title: Line items
1335
+ type: array
1336
+ priceTotal:
1337
+ $ref: '#/components/schemas/money.schema'
1338
+ description: Total price.
1339
+ title: Price
1340
+ required:
1341
+ - lineItems
1342
+ - priceTotal
1343
+ title: Storefront Cart
1344
+ type: object
1345
+ storefront-customer.schema:
1346
+ description: Storefront customer.
1347
+ properties:
1348
+ id:
1349
+ description: Customer ID.
1350
+ title: ID
1351
+ type: string
1352
+ required:
1353
+ - id
1354
+ title: Storefront Customer
1355
+ type: object
1356
+ length.schema:
1357
+ description: Length measurement with unit.
1358
+ properties:
1359
+ unit:
1360
+ description: Length unit
1361
+ enum:
1362
+ - in
1363
+ - cm
1364
+ examples:
1365
+ - in
1366
+ - cm
1367
+ title: Unit
1368
+ type: string
1369
+ value:
1370
+ description: Numeric length value
1371
+ examples:
1372
+ - 10.5
1373
+ - 30
1374
+ minimum: 0
1375
+ title: Value
1376
+ type: number
1377
+ required:
1378
+ - value
1379
+ - unit
1380
+ title: Length
1381
+ type: object
1382
+ weight.schema:
1383
+ description: Weight.
1384
+ properties:
1385
+ kg:
1386
+ description: Weight in kilograms
1387
+ examples:
1388
+ - 0.021
1389
+ - 1.4
1390
+ minimum: 0
1391
+ title: Kilograms
1392
+ type: number
1393
+ title: Weight
1394
+ type: object
1395
+ error.schema:
1396
+ description: Problem details. See [RFC 7807 Section 3](https://datatracker.ietf.org/doc/html/rfc7807#section-3).
1397
+ properties:
1398
+ detail:
1399
+ description: Human-readable description of the problem.
1400
+ title: Detail
1401
+ type: string
1402
+ instance:
1403
+ description: A URI reference that identifies this problem.
1404
+ format: uri-reference
1405
+ type: string
1406
+ title:
1407
+ description: Human-readable summary of the problem type.
1408
+ title: Title
1409
+ type: string
1410
+ type:
1411
+ default: about:blank
1412
+ description: A URI reference that identifies the problem type.
1413
+ format: uri-reference
1414
+ type: string
1415
+ title: Problem details
1416
+ type: object
1417
+ coverage-product.schema:
1418
+ description: Coverage product.
1419
+ properties:
1420
+ coverages:
1421
+ description: Coverage.
1422
+ items:
1423
+ properties:
1424
+ lineItems:
1425
+ items:
1426
+ properties:
1427
+ id:
1428
+ description: Line item ID.
1429
+ title: ID
1430
+ type: string
1431
+ type: object
1432
+ type: array
1433
+ type:
1434
+ enum:
1435
+ - shipping_failure
1436
+ - return_shipping
1437
+ title: Coverage
1438
+ required:
1439
+ - lineItems
1440
+ - type
1441
+ type: object
1442
+ type: array
1443
+ id:
1444
+ description: Coverage ID.
1445
+ title: ID
1446
+ type: string
1447
+ price:
1448
+ $ref: '#/components/schemas/money.schema'
1449
+ description: Price.
1450
+ title: Price
1451
+ required:
1452
+ - coverage
1453
+ - id
1454
+ - price
1455
+ title: Coverage product
1456
+ type: object
1457
+ custom-event-request.schema:
1458
+ additionalProperties: false
1459
+ description: Custom event to trigger flows with merchant-defined event names and properties.
1460
+ properties:
1461
+ event_name:
1462
+ description: The name of the custom event (e.g., 'user_registered', 'purchase_completed').
1463
+ type: string
1464
+ email:
1465
+ description: Customer email address (one of email or phone is required).
1466
+ type: string
1467
+ phone:
1468
+ description: Customer phone number (one of email or phone is required).
1469
+ type: string
1470
+ properties:
1471
+ description: Custom properties for this event. Access in templates using dot notation (e.g., {{ properties.product_name }}).
1472
+ type: object
1473
+ additionalProperties: true
1474
+ event_timestamp:
1475
+ description: ISO 8601 timestamp when the event occurred. Defaults to current time if not provided.
1476
+ format: date-time
1477
+ type: string
1478
+ required:
1479
+ - event_name
1480
+ title: Custom Event Request
1481
+ type: object
1482
+ custom-event-response.schema:
1483
+ additionalProperties: false
1484
+ description: Response after successfully creating a custom event.
1485
+ properties:
1486
+ event_id:
1487
+ description: The unique identifier for the created event.
1488
+ type: string
1489
+ status:
1490
+ description: Status of the event processing.
1491
+ enum:
1492
+ - processed
1493
+ type: string
1494
+ event_name:
1495
+ description: The name of the custom event that was created.
1496
+ type: string
1497
+ required:
1498
+ - event_id
1499
+ - status
1500
+ - event_name
1501
+ title: Custom Event Response
1502
+ type: object
1503
+ subscription-status-marketing.schema:
1504
+ description: Marketing subscription status
1505
+ properties:
1506
+ subscriptionStatus:
1507
+ description: Subscription status
1508
+ enum:
1509
+ - subscribed
1510
+ - confirmed
1511
+ - unsubscribed
1512
+ type: string
1513
+ triggerAutomations:
1514
+ default: false
1515
+ description: Whether to trigger automations for this subscription change. Defaults to false.
1516
+ type: boolean
1517
+ updatedAt:
1518
+ description: ISO 8601 timestamp. If not provided, defaults to now.
1519
+ format: date-time
1520
+ type: string
1521
+ required:
1522
+ - subscriptionStatus
1523
+ title: Subscription Status Marketing
1524
+ type: object
1525
+ customer-subscription-email.schema:
1526
+ description: Email subscription updates
1527
+ properties:
1528
+ email:
1529
+ description: Email address
1530
+ format: email
1531
+ type: string
1532
+ subscriptions:
1533
+ properties:
1534
+ marketing:
1535
+ $ref: '#/components/schemas/subscription-status-marketing.schema'
1536
+ type: object
1537
+ required:
1538
+ - email
1539
+ - subscriptions
1540
+ type: object
1541
+ subscription-status-transactional.schema:
1542
+ description: Transactional subscription status (order tracking)
1543
+ properties:
1544
+ subscriptionStatus:
1545
+ description: Subscription status. Only subscribed and unsubscribed are supported for transactional.
1546
+ enum:
1547
+ - subscribed
1548
+ - unsubscribed
1549
+ type: string
1550
+ updatedAt:
1551
+ description: ISO 8601 timestamp. If not provided, defaults to now.
1552
+ format: date-time
1553
+ type: string
1554
+ required:
1555
+ - subscriptionStatus
1556
+ title: Subscription Status Transactional
1557
+ type: object
1558
+ customer-subscription-sms.schema:
1559
+ description: SMS subscription updates
1560
+ properties:
1561
+ phoneNumber:
1562
+ description: Phone number in E.164 format (e.g., +12345678900)
1563
+ type: string
1564
+ subscriptions:
1565
+ properties:
1566
+ marketing:
1567
+ $ref: '#/components/schemas/subscription-status-marketing.schema'
1568
+ transactional:
1569
+ $ref: '#/components/schemas/subscription-status-transactional.schema'
1570
+ type: object
1571
+ required:
1572
+ - phoneNumber
1573
+ - subscriptions
1574
+ type: object
1575
+ customer-subscription-update-response.schema:
1576
+ description: Customer subscription update response
1577
+ properties:
1578
+ message:
1579
+ description: Human-readable success message
1580
+ type: string
1581
+ success:
1582
+ description: Whether the operation was successful
1583
+ type: boolean
1584
+ updatedSubscriptions:
1585
+ description: Details of which subscriptions were updated
1586
+ properties:
1587
+ email:
2030
1588
  properties:
2031
- cart:
2032
- $ref: '#/components/schemas/storefront-cart.schema'
2033
- customer:
2034
- $ref: '#/components/schemas/storefront-customer.schema'
2035
- products:
2036
- deprecated: true
2037
- description: Product information.
2038
- items:
1589
+ marketing:
1590
+ description: Whether email marketing was updated
1591
+ type: boolean
1592
+ type: object
1593
+ sms:
1594
+ properties:
1595
+ marketing:
1596
+ description: Whether SMS marketing was updated
1597
+ type: boolean
1598
+ transactional:
1599
+ description: Whether SMS transactional was updated
1600
+ type: boolean
1601
+ type: object
1602
+ type: object
1603
+ required:
1604
+ - success
1605
+ - message
1606
+ - updatedSubscriptions
1607
+ type: object
1608
+ customer-location.schema:
1609
+ description: Customer location information.
1610
+ properties:
1611
+ street1:
1612
+ description: Street address line 1
1613
+ type: string
1614
+ street2:
1615
+ description: Street address line 2
1616
+ type: string
1617
+ city:
1618
+ description: City name
1619
+ type: string
1620
+ state:
1621
+ description: State or province name
1622
+ examples:
1623
+ - Washington
1624
+ - Ontario
1625
+ type: string
1626
+ stateCode:
1627
+ description: State or province abbreviation
1628
+ examples:
1629
+ - WA
1630
+ - 'ON'
1631
+ type: string
1632
+ postalCode:
1633
+ description: Postal or ZIP code
1634
+ examples:
1635
+ - '12345'
1636
+ - K1A 0B1
1637
+ type: string
1638
+ country:
1639
+ description: Country name
1640
+ examples:
1641
+ - United States
1642
+ - Canada
1643
+ type: string
1644
+ countryCode:
1645
+ description: ISO 3166-1 alpha-2 country code
1646
+ examples:
1647
+ - US
1648
+ - CA
1649
+ type: string
1650
+ ianaTimeZoneName:
1651
+ description: IANA time zone identifier
1652
+ examples:
1653
+ - America/New_York
1654
+ - America/Los_Angeles
1655
+ type: string
1656
+ latitude:
1657
+ description: Latitude coordinate
1658
+ type: number
1659
+ longitude:
1660
+ description: Longitude coordinate
1661
+ type: number
1662
+ title: Customer Location
1663
+ type: object
1664
+ customer-read.schema:
1665
+ description: Customer profile.
1666
+ properties:
1667
+ id:
1668
+ description: Redo customer ID
1669
+ examples:
1670
+ - 67bd4f1a2e3c8d001a5f9b12
1671
+ type: string
1672
+ email:
1673
+ description: Customer email address
1674
+ format: email
1675
+ examples:
1676
+ - jane@example.com
1677
+ type: string
1678
+ firstName:
1679
+ description: Customer first name
1680
+ examples:
1681
+ - Jane
1682
+ type: string
1683
+ lastName:
1684
+ description: Customer last name
1685
+ examples:
1686
+ - Smith
1687
+ type: string
1688
+ phoneNumber:
1689
+ description: Customer phone number in E.164 format
1690
+ examples:
1691
+ - '+11234567890'
1692
+ type: string
1693
+ location:
1694
+ $ref: '#/components/schemas/customer-location.schema'
1695
+ customFields:
1696
+ description: Custom field values as key-value pairs, where keys are field names and values can be strings, numbers, or booleans.
1697
+ type: object
1698
+ additionalProperties:
1699
+ oneOf:
1700
+ - type: string
1701
+ - type: number
1702
+ - type: boolean
1703
+ examples:
1704
+ - subscription_source: web
1705
+ status: Active
1706
+ loyalty_points: 1250
1707
+ vip_member: true
1708
+ createdAt:
1709
+ description: Timestamp when the customer was created.
1710
+ format: date-time
1711
+ title: Created at
1712
+ examples:
1713
+ - '2026-02-20T18:30:00.000Z'
1714
+ type: string
1715
+ updatedAt:
1716
+ description: Timestamp when the customer was last updated.
1717
+ format: date-time
1718
+ title: Updated at
1719
+ examples:
1720
+ - '2026-02-24T12:15:00.000Z'
1721
+ type: string
1722
+ required:
1723
+ - id
1724
+ - email
1725
+ - createdAt
1726
+ - updatedAt
1727
+ title: Customer
1728
+ type: object
1729
+ customer-upsert-request.schema:
1730
+ additionalProperties: false
1731
+ description: Request body for creating or updating a customer profile. The email address is used as the upsert key.
1732
+ properties:
1733
+ email:
1734
+ description: Customer email address. Used as the upsert key to find or create the customer.
1735
+ format: email
1736
+ type: string
1737
+ firstName:
1738
+ description: Customer first name
1739
+ type: string
1740
+ lastName:
1741
+ description: Customer last name
1742
+ type: string
1743
+ phoneNumber:
1744
+ description: Customer phone number in E.164 format (e.g., +12345678900). Appended to the existing phone list if not already present.
1745
+ examples:
1746
+ - '+12345678900'
1747
+ type: string
1748
+ location:
1749
+ $ref: '#/components/schemas/customer-location.schema'
1750
+ customFields:
1751
+ description: Custom field values as key-value pairs. Keys are field names and values can be strings, numbers, or booleans. New fields are created automatically if they don't exist yet.
1752
+ type: object
1753
+ additionalProperties:
1754
+ oneOf:
1755
+ - type: string
1756
+ - type: number
1757
+ - type: boolean
1758
+ example:
1759
+ subscription_source: web
1760
+ status: Active
1761
+ loyalty_points: 1250
1762
+ vip_member: true
1763
+ required:
1764
+ - email
1765
+ title: Customer Upsert Request
1766
+ type: object
1767
+ customer-upsert-response.schema:
1768
+ additionalProperties: false
1769
+ description: Response after creating or updating a customer profile.
1770
+ properties:
1771
+ id:
1772
+ description: Redo customer ID
1773
+ type: string
1774
+ email:
1775
+ description: Customer email address
1776
+ type: string
1777
+ created:
1778
+ description: Whether a new customer was created (true) or an existing customer was updated (false).
1779
+ type: boolean
1780
+ required:
1781
+ - id
1782
+ - email
1783
+ - created
1784
+ title: Customer Upsert Response
1785
+ type: object
1786
+ invoice.schema:
1787
+ description: Schema for an invoice.
1788
+ properties:
1789
+ charge:
1790
+ $ref: '#/components/schemas/money.schema'
1791
+ description: The charge that the invoice is for.
1792
+ createdAt:
1793
+ description: The time the invoice was created.
1794
+ format: date-time
1795
+ type: string
1796
+ id:
1797
+ description: The ID of the charge.
1798
+ type: string
1799
+ status:
1800
+ description: The status of the invoice.
1801
+ type: string
1802
+ store:
1803
+ properties:
1804
+ id:
1805
+ description: The ID of the store.
1806
+ type: string
1807
+ required:
1808
+ - id
1809
+ type: object
1810
+ updatedAt:
1811
+ description: The time the invoice was last updated.
1812
+ format: date-time
1813
+ type: string
1814
+ required:
1815
+ - team
1816
+ - updatedAt
1817
+ - status
1818
+ - createdAt
1819
+ - charge
1820
+ type: object
1821
+ person-name.schema:
1822
+ description: Person name.
1823
+ properties:
1824
+ given:
1825
+ description: Given name
1826
+ examples:
1827
+ - John
1828
+ - Mary
1829
+ type: string
1830
+ surname:
1831
+ description: Surname
1832
+ examples:
1833
+ - Smith
1834
+ - Brown
1835
+ type: string
1836
+ required:
1837
+ - given
1838
+ - surname
1839
+ title: Person name
1840
+ type: object
1841
+ phone-number.schema:
1842
+ description: Phone number, in E.164 format
1843
+ examples:
1844
+ - '+15555555555'
1845
+ title: Phone number
1846
+ type: string
1847
+ product.schema:
1848
+ description: Product.
1849
+ properties:
1850
+ externalId:
1851
+ description: Product ID in external system (e.g. shopify).
1852
+ title: External ID
1853
+ type: string
1854
+ name:
1855
+ description: Product title
1856
+ title: Name
1857
+ type: string
1858
+ required:
1859
+ - name
1860
+ title: Product
1861
+ type: object
1862
+ item-quantity.schema:
1863
+ description: Item quantity.
1864
+ example: 1
1865
+ exclusiveMinimum: 0
1866
+ title: Item quantity
1867
+ type: number
1868
+ product-variant.schema:
1869
+ properties:
1870
+ externalId:
1871
+ title: External ID
1872
+ type: string
1873
+ name:
1874
+ title: Title
1875
+ type: string
1876
+ sku:
1877
+ title: SKU
1878
+ type: string
1879
+ weight:
1880
+ $ref: '#/components/schemas/weight.schema'
1881
+ title: Weight
1882
+ required:
1883
+ - name
1884
+ title: Product variant
1885
+ type: object
1886
+ order-read.schema:
1887
+ description: Order.
1888
+ properties:
1889
+ customer:
1890
+ properties:
1891
+ emailAddress:
1892
+ description: Email address of customer.
1893
+ format: email
1894
+ title: Email address
1895
+ type: string
1896
+ name:
1897
+ $ref: '#/components/schemas/person-name.schema'
1898
+ description: Name of customer.
1899
+ title: Name
1900
+ phoneNumber:
1901
+ $ref: '#/components/schemas/phone-number.schema'
1902
+ description: Phone number of customer.
1903
+ title: Phone number
1904
+ required:
1905
+ - name
1906
+ type: object
1907
+ discounts:
1908
+ $ref: '#/components/schemas/money.schema'
1909
+ description: The total amount discounted on the order before returns. This includes both order and line level discounts.
1910
+ title: Discounts
1911
+ externalId:
1912
+ description: Shopify ID
1913
+ examples:
1914
+ - '1073459971'
1915
+ - '450789469'
1916
+ title: External ID
1917
+ type: string
1918
+ id:
1919
+ description: Order ID
1920
+ example: 64e4da943dd822979a70bd12
1921
+ title: ID
1922
+ type: string
1923
+ items:
1924
+ items:
1925
+ properties:
1926
+ externalId:
1927
+ example: '123'
1928
+ type: string
1929
+ fulfillmentLocationId:
1930
+ description: ID of the location where the item was be fulfilled.
1931
+ example: '123'
1932
+ type:
1933
+ - string
1934
+ - 'null'
1935
+ id:
1936
+ description: Line item ID
1937
+ title: ID
1938
+ type: string
1939
+ price:
1940
+ $ref: '#/components/schemas/money.schema'
1941
+ title: Price
1942
+ product:
1943
+ $ref: '#/components/schemas/product.schema'
1944
+ title: Product
1945
+ quantity:
1946
+ $ref: '#/components/schemas/item-quantity.schema'
1947
+ title: Quantity
1948
+ variant:
1949
+ $ref: '#/components/schemas/product-variant.schema'
1950
+ title: Variant
1951
+ required:
1952
+ - id
1953
+ - product
1954
+ - quantity
1955
+ - variant
1956
+ - price
1957
+ - fulfillmentLocationId
1958
+ title: Line items
1959
+ type: array
1960
+ lineItemsTotal:
1961
+ $ref: '#/components/schemas/money.schema'
1962
+ description: Total price of all line items before discounts, shipping, and taxes.
1963
+ title: Line Items Total
1964
+ name:
1965
+ description: Shopify name.
1966
+ examples:
1967
+ - '#123'
1968
+ title: Name
1969
+ type: string
1970
+ shippingCost:
1971
+ $ref: '#/components/schemas/money.schema'
1972
+ description: The total shipping cost for the order. This includes fees and any related discounts that were refunded.
1973
+ title: Shipping Cost
1974
+ taxes:
1975
+ $ref: '#/components/schemas/money.schema'
1976
+ description: Total taxes applied to the order.
1977
+ title: Taxes
1978
+ total:
1979
+ $ref: '#/components/schemas/money.schema'
1980
+ description: The total price of the order, before returns. This includes taxes, discounts, and shipping costs.
1981
+ title: Total
1982
+ required:
1983
+ - customer
1984
+ - id
1985
+ - items
1986
+ - name
1987
+ - discounts
1988
+ - lineItemsTotal
1989
+ - shippingCost
1990
+ - total
1991
+ - taxes
1992
+ title: Order
1993
+ type: object
1994
+ address.schema:
1995
+ description: Address.
1996
+ properties:
1997
+ city:
1998
+ description: City name
1999
+ examples:
2000
+ - Anytown
2001
+ title: City
2002
+ type: string
2003
+ country:
2004
+ description: Country code
2005
+ examples:
2006
+ - US
2007
+ - CA
2008
+ title: Country
2009
+ type: string
2010
+ line1:
2011
+ description: Line 1
2012
+ examples:
2013
+ - 123 Main St
2014
+ title: Line 1
2015
+ type: string
2016
+ line2:
2017
+ default: ''
2018
+ description: Line 2
2019
+ examples:
2020
+ - ''
2021
+ title: Line 2
2022
+ type: string
2023
+ postalCode:
2024
+ description: Postal or ZIP code
2025
+ examples:
2026
+ - '12345'
2027
+ title: Postal code
2028
+ type: string
2029
+ state:
2030
+ description: State or province
2031
+ examples:
2032
+ - WA
2033
+ - Washington
2034
+ title: State
2035
+ type: string
2036
+ required:
2037
+ - city
2038
+ - country
2039
+ - line1
2040
+ - state
2041
+ - postalCode
2042
+ title: Address
2043
+ type: object
2044
+ exchange-provision.schema:
2045
+ enum:
2046
+ - instant
2047
+ - deferred
2048
+ example: deferred
2049
+ title: Exchang provision
2050
+ type: string
2051
+ return-shipment.schema:
2052
+ description: Return shipment tracking information
2053
+ properties:
2054
+ carrier:
2055
+ description: Carrier code
2056
+ title: Carrier
2057
+ type: string
2058
+ status:
2059
+ description: Status of shipment
2060
+ enum:
2061
+ - unknown
2062
+ - pre_transit
2063
+ - in_transit
2064
+ - out_for_delivery
2065
+ - available_for_pickup
2066
+ - cancelled
2067
+ - delivered
2068
+ - error
2069
+ - failure
2070
+ - return_to_sender
2071
+ - expired
2072
+ title: Status
2073
+ type: string
2074
+ tracker:
2075
+ description: Tracking number
2076
+ title: Tracker
2077
+ type: string
2078
+ trackingUrl:
2079
+ description: Tracking URL
2080
+ title: Tracking URL
2081
+ type: string
2082
+ postageLabel:
2083
+ description: Postage label URL
2084
+ title: Postage Label
2085
+ type: string
2086
+ formLabel:
2087
+ description: Form label URL
2088
+ title: Form Label
2089
+ type: string
2090
+ shipmentGroupId:
2091
+ description: ID of the shipment group this shipment belongs to
2092
+ title: Shipment Group ID
2093
+ type: string
2094
+ itemIds:
2095
+ description: IDs of the return items included in this shipment
2096
+ items:
2097
+ type: string
2098
+ title: Item IDs
2099
+ type: array
2100
+ externalLocationId:
2101
+ description: External location ID for the destination of this shipment
2102
+ title: External Location ID
2103
+ type: string
2104
+ estimatedDeliveryDate:
2105
+ description: Estimated delivery date for this shipment
2106
+ title: Estimated Delivery Date
2107
+ type: string
2108
+ deliveredAt:
2109
+ description: Date and time this shipment was delivered
2110
+ title: Delivered At
2111
+ type: string
2112
+ title: Return Shipment
2113
+ type: object
2114
+ return-status.schema:
2115
+ description: |
2116
+ Return status.
2117
+
2118
+ * open: Return has been approved and is awaiting shipment.
2119
+ * in_transit: Return shipment is in transit.
2120
+ * delivered: Return shipment has been delivered and awaiting processing.
2121
+ * needs_review: Return requires review before further action.
2122
+ * in_review: Return is currently being reviewed.
2123
+ * complete: The return has been completed successfully.
2124
+ * rejected: The return has been rejected.
2125
+ * flagged: A problem with return processing requires merchant action.
2126
+ * pre_shipment: Return requires pre-shipment merchant authorization.
2127
+ * deleted: The return has been deleted (Reset).
2128
+ enum:
2129
+ - open
2130
+ - in_transit
2131
+ - delivered
2132
+ - needs_review
2133
+ - in_review
2134
+ - complete
2135
+ - rejected
2136
+ - flagged
2137
+ - pre_shipment
2138
+ - deleted
2139
+ example: open
2140
+ title: Return status
2141
+ type: string
2142
+ return-type.schema:
2143
+ description: |
2144
+ Return type.
2145
+ enum:
2146
+ - claim
2147
+ - return
2148
+ - warranty
2149
+ example: return
2150
+ title: Return type
2151
+ type: string
2152
+ return-read.schema:
2153
+ description: Return read.
2154
+ properties:
2155
+ compensationMethods:
2156
+ description: Array of compensation methods available for this return
2157
+ items:
2158
+ enum:
2159
+ - refund
2160
+ - store_credit
2161
+ - exchange
2162
+ type: string
2163
+ title: Compensation Methods
2164
+ type: array
2165
+ completeWithNoAction:
2166
+ description: Whether this return can be completed with no action
2167
+ title: Complete With No Action
2168
+ type: boolean
2169
+ createdAt:
2170
+ description: Time of creation.
2171
+ format: date-time
2172
+ title: Created at
2173
+ type: string
2174
+ destination:
2175
+ properties:
2176
+ mailingAddress:
2177
+ $ref: '#/components/schemas/address.schema'
2178
+ description: Mailing address to send the returned items.
2179
+ title: Mailing address
2180
+ phoneNumber:
2181
+ $ref: '#/components/schemas/phone-number.schema'
2182
+ description: Phone number of the destination.
2183
+ title: Phone number
2184
+ type: object
2185
+ exchange:
2186
+ description: Exchange order
2187
+ properties:
2188
+ itemCount:
2189
+ description: Total quantity of all exchange items
2190
+ type: integer
2191
+ items:
2192
+ items:
2193
+ properties:
2194
+ id:
2195
+ title: ID
2196
+ type: string
2197
+ originalPrice:
2198
+ description: Original price for the exchange item without discounts and taxes
2039
2199
  properties:
2040
- id:
2041
- description: Identifier of the product.
2042
- title: ID
2200
+ amount:
2201
+ type: string
2202
+ currency:
2043
2203
  type: string
2044
- required:
2045
- - id
2046
2204
  type: object
2047
- title: Products
2048
- type: array
2049
- variants:
2050
- deprecated: true
2051
- description: Variant information.
2052
- items:
2205
+ price:
2206
+ description: Subtotal price for the exchange item including discounts
2053
2207
  properties:
2054
- height:
2055
- $ref: '#/components/schemas/length.schema'
2056
- description: Height of an item.
2057
- title: Height
2058
- id:
2059
- description: Identifier of the variant.
2060
- title: ID
2208
+ amount:
2061
2209
  type: string
2062
- length:
2063
- $ref: '#/components/schemas/length.schema'
2064
- description: Length of an item.
2065
- title: Length
2066
- title:
2067
- title: Title
2210
+ currency:
2211
+ type: string
2212
+ tax:
2068
2213
  type: string
2069
- weight:
2070
- $ref: '#/components/schemas/weight.schema'
2071
- description: Weight of an item.
2072
- title: Weight
2073
- width:
2074
- $ref: '#/components/schemas/length.schema'
2075
- description: Width of an item.
2076
- title: Width
2077
- required:
2078
- - id
2079
2214
  type: object
2080
- title: Variants
2081
- type: array
2082
- required:
2083
- - cart
2084
- type: object
2085
- required: true
2086
- responses:
2087
- '200':
2088
- content:
2089
- application/json:
2090
- schema:
2091
- properties:
2092
- coverageProducts:
2093
- description: Coverage products.
2094
- items:
2095
- $ref: '#/components/schemas/coverage-product.schema'
2096
- title: Coverage Products
2097
- type: array
2098
- required:
2099
- - coverageProducts
2100
- type: object
2101
- description: Success
2102
- default:
2103
- content:
2104
- application/problem+json:
2105
- schema:
2106
- $ref: '#/components/schemas/error.schema'
2107
- description: Error
2108
- summary: Coverage Products
2109
- tags:
2110
- - Coverage Products
2111
- summary: Coverage products
2112
- /stores/{storeId}/customer-portal:
2113
- description: Navigate to the customer portal.
2114
- get:
2115
- description: Navigate to the customer portal.
2116
- operationId: Customer portal navigate
2117
- parameters:
2118
- - $ref: '#/components/parameters/store-id.param'
2119
- - description: HMAC-SHA256 JWT of {"iss":"<partnerId>","sub":"<storeId>/<customerId>"}
2120
- in: query
2121
- name: token
2122
- schema:
2123
- type: string
2124
- - description: Order ID
2125
- in: query
2126
- name: order_id
2127
- schema:
2128
- type: string
2129
- responses:
2130
- '302':
2131
- description: Redirect
2132
- summary: Navigate to Customer Portal
2133
- tags:
2134
- - Customer Portal
2135
- summary: Customer portal
2136
- /stores/{storeId}/customer-subscriptions:
2137
- description: Update customer subscription preferences for marketing and transactional messages.
2138
- post:
2139
- description: Update customer subscription status for SMS and email marketing and transactional messages. If the customer with that phone number or email does not exist, it will be created.
2140
- operationId: Customer subscriptions update
2141
- parameters:
2142
- - $ref: '#/components/parameters/store-id.param'
2143
- requestBody:
2144
- content:
2145
- application/json:
2146
- schema:
2147
- properties:
2148
- email:
2149
- $ref: '#/components/schemas/customer-subscription-email.schema'
2150
- sms:
2151
- $ref: '#/components/schemas/customer-subscription-sms.schema'
2152
- type: object
2153
- required: true
2154
- responses:
2155
- '200':
2156
- content:
2157
- application/json:
2158
- schema:
2159
- $ref: '#/components/schemas/customer-subscription-update-response.schema'
2160
- description: Success
2161
- '400':
2162
- content:
2163
- application/problem+json:
2164
- schema:
2165
- $ref: '#/components/schemas/error.schema'
2166
- description: Bad Request
2167
- '500':
2168
- content:
2169
- application/problem+json:
2170
- schema:
2171
- $ref: '#/components/schemas/error.schema'
2172
- description: Internal Server Error
2173
- default:
2174
- content:
2175
- application/problem+json:
2176
- schema:
2177
- $ref: '#/components/schemas/error.schema'
2178
- description: Error
2179
- security:
2180
- - Bearer: []
2181
- summary: Update Customer Subscriptions
2182
- tags:
2183
- - Customer Subscriptions
2184
- summary: Customer subscriptions
2185
- /stores/{storeId}/events:
2186
- post:
2187
- description: |
2188
- Create a custom event to trigger flows with merchant-defined event names and properties.
2189
-
2190
- Custom events allow merchants to trigger flows based on events from their own systems.
2191
- Events can include custom properties that are accessible in email and SMS templates.
2192
-
2193
- ## Customer Matching
2194
- The API matches customers by email or phone number. At least one must be provided.
2195
-
2196
- If no matching customer is found, the request will fail with a 404 error.
2197
-
2198
- ## Rate Limiting
2199
- This endpoint is rate-limited to 100 requests per second per store.
2200
- operationId: Custom event create
2201
- parameters:
2202
- - $ref: '#/components/parameters/store-id.param'
2203
- requestBody:
2204
- content:
2205
- application/json:
2206
- examples:
2207
- purchase_milestone:
2208
- summary: Purchase milestone event
2209
- value:
2210
- event_name: purchase_milestone_reached
2211
- phone: '+12065551234'
2212
- properties:
2213
- milestone_type: 100th_purchase
2214
- total_spent: 5000
2215
- vip_tier: gold
2216
- user_registered:
2217
- summary: User registration event
2218
- value:
2219
- email: customer@example.com
2220
- event_name: user_registered
2221
- properties:
2222
- plan_type: premium
2223
- referral_code: FRIEND123
2224
- source: mobile_app
2225
- schema:
2226
- $ref: '#/components/schemas/custom-event-request.schema'
2227
- required: true
2228
- responses:
2229
- '200':
2230
- content:
2231
- application/json:
2232
- schema:
2233
- $ref: '#/components/schemas/custom-event-response.schema'
2234
- description: Event created successfully
2235
- '400':
2236
- content:
2237
- application/json:
2238
- schema:
2239
- $ref: '#/components/schemas/error.schema'
2240
- description: Invalid request body or missing required customer identifier
2241
- '404':
2242
- content:
2243
- application/json:
2244
- schema:
2245
- $ref: '#/components/schemas/error.schema'
2246
- description: Customer not found with provided identifier
2247
- '429':
2248
- content:
2249
- application/json:
2250
- schema:
2251
- $ref: '#/components/schemas/error.schema'
2252
- description: Rate limit exceeded
2253
- default:
2254
- content:
2255
- application/problem+json:
2256
- schema:
2257
- $ref: '#/components/schemas/error.schema'
2258
- description: Error
2259
- security:
2260
- - Bearer: []
2261
- summary: Create custom event
2262
- tags:
2263
- - Custom Events
2264
- /stores/{storeId}/invoices:
2265
- description: Return a list of invoices.
2266
- get:
2267
- description: Get a list of invoices.
2268
- operationId: Invoice list
2269
- parameters:
2270
- - $ref: '#/components/parameters/store-id.param'
2271
- responses:
2272
- '200':
2273
- content:
2274
- application/json:
2275
- schema:
2276
- properties:
2277
- invoices:
2278
- items:
2279
- $ref: '#/components/schemas/invoice.schema'
2280
- type: array
2215
+ product:
2216
+ $ref: '#/components/schemas/product.schema'
2217
+ title: Product
2218
+ quantity:
2219
+ $ref: '#/components/schemas/item-quantity.schema'
2220
+ title: Quantity
2221
+ variant:
2222
+ $ref: '#/components/schemas/product-variant.schema'
2281
2223
  required:
2282
- - invoices
2224
+ - id
2225
+ - quantity
2226
+ - variant
2227
+ title: Line items
2228
+ type: array
2229
+ order:
2230
+ properties:
2231
+ externalId:
2232
+ description: ID of external order
2233
+ title: External ID
2234
+ type: string
2235
+ type: object
2236
+ provision:
2237
+ $ref: '#/components/schemas/exchange-provision.schema'
2238
+ title: Provision
2239
+ totalTax:
2240
+ description: Total tax for exchange items
2241
+ properties:
2242
+ amount:
2243
+ type: string
2244
+ currency:
2245
+ type: string
2246
+ type: object
2247
+ required:
2248
+ - items
2249
+ - provision
2250
+ title: Exchange
2251
+ type: object
2252
+ externalOrderIds:
2253
+ description: Array of external order IDs associated with this return
2254
+ items:
2255
+ type: string
2256
+ title: External Order IDs
2257
+ type: array
2258
+ giftCards:
2259
+ description: Gift card(s) created for return
2260
+ items:
2261
+ properties:
2262
+ amount:
2263
+ $ref: '#/components/schemas/money.schema'
2264
+ title: Amount
2265
+ code:
2266
+ description: Gift card 16 digit code.
2267
+ title: Code
2268
+ type: string
2269
+ externalId:
2270
+ description: Gift card ID.
2271
+ title: ID
2272
+ type: string
2273
+ required:
2274
+ - amount
2275
+ - code
2276
+ - externalId
2277
+ type: object
2278
+ title: Gift cards
2279
+ type: array
2280
+ id:
2281
+ description: Return identifier.
2282
+ examples:
2283
+ - 64df65d4c5a4ca3eff4b4e43
2284
+ title: Identifier
2285
+ type: string
2286
+ internalCreatedByName:
2287
+ description: Name of the internal team member who created this return
2288
+ title: Internal Created By Name
2289
+ type: string
2290
+ items:
2291
+ description: Return items
2292
+ items:
2293
+ properties:
2294
+ customerComment:
2295
+ description: Customer's comment about the return
2296
+ type: string
2297
+ exchangeItem:
2298
+ description: Exchange item details if this return item is being exchanged
2299
+ properties:
2300
+ product:
2301
+ properties:
2302
+ externalId:
2303
+ type: string
2304
+ name:
2305
+ type: string
2306
+ type: object
2307
+ quantity:
2308
+ type: integer
2309
+ variant:
2310
+ properties:
2311
+ externalId:
2312
+ type: string
2313
+ name:
2314
+ type: string
2315
+ type: object
2316
+ title: Exchange item
2283
2317
  type: object
2284
- description: Success
2285
- default:
2286
- content:
2287
- application/problem+json:
2288
- schema:
2289
- $ref: '#/components/schemas/error.schema'
2290
- description: Error
2291
- security:
2292
- - Bearer: []
2293
- summary: List Invoices
2294
- tags:
2295
- - Invoices
2296
- summary: Invoice
2297
- /stores/{storeId}/returns:
2298
- description: List of returns for store.
2299
- get:
2300
- description: List returns, sorted by most recent to least recent.
2301
- operationId: Returns list
2302
- parameters:
2303
- - $ref: '#/components/parameters/page-continue.param'
2304
- - $ref: '#/components/parameters/page-size.param'
2305
- - $ref: '#/components/parameters/updated-at-max.param'
2306
- - $ref: '#/components/parameters/updated-at-min.param'
2307
- - $ref: '#/components/parameters/shopify-order-name'
2308
- - $ref: '#/components/parameters/provider-order-name'
2309
- - $ref: '#/components/parameters/return-status.param'
2310
- responses:
2311
- '200':
2312
- content:
2313
- application/json:
2314
- schema:
2318
+ greenReturn:
2319
+ description: Whether this is a green return (no physical return required)
2320
+ type: boolean
2321
+ shipmentGroupIds:
2322
+ description: IDs of the shipment groups this return item belongs to
2323
+ items:
2324
+ type: string
2325
+ title: Shipment Group IDs
2326
+ type: array
2327
+ id:
2328
+ description: Return item ID.
2329
+ title: ID
2330
+ type: string
2331
+ orderItem:
2332
+ description: Order line item
2315
2333
  properties:
2316
- orders:
2317
- items:
2318
- $ref: '#/components/schemas/order-read.schema'
2319
- type: array
2320
- returns:
2321
- items:
2322
- $ref: '#/components/schemas/return-read.schema'
2323
- type: array
2334
+ id:
2335
+ description: 'Line item reference ID in format: {orderId}/{lineItemIndex}'
2336
+ title: ID
2337
+ type: string
2338
+ line_item_id:
2339
+ description: Original Shopify line item ID
2340
+ title: Line Item ID
2341
+ type: string
2324
2342
  required:
2325
- - orders
2326
- - returns
2343
+ - id
2344
+ title: Order item
2327
2345
  type: object
2328
- description: Success
2329
- headers:
2330
- X-Page-Next:
2331
- $ref: '#/components/headers/page-next.header'
2332
- default:
2333
- content:
2334
- application/problem+json:
2335
- schema:
2336
- $ref: '#/components/schemas/error.schema'
2337
- description: Error
2338
- security:
2339
- - Bearer: []
2340
- summary: List Returns
2341
- tags:
2342
- - Returns
2343
- parameters:
2344
- - $ref: '#/components/parameters/store-id.param'
2345
- summary: Returns
2346
- /stores/{storeId}/storefront/events:
2347
- post:
2348
- description: Processes events from storefronts using Shopify pixel event schema
2349
- operationId: Storefront Event
2350
- parameters:
2351
- - $ref: '#/components/parameters/store-id.param'
2352
- requestBody:
2353
- content:
2354
- application/json:
2355
- schema:
2356
- $ref: '#/components/schemas/storefront-event.schema'
2357
- required: true
2358
- responses:
2359
- '204':
2360
- description: Event processed successfully
2361
- '400':
2362
- content:
2363
- application/json:
2364
- schema:
2365
- $ref: '#/components/schemas/error.schema'
2366
- description: Invalid event payload
2367
- default:
2368
- content:
2369
- application/problem+json:
2370
- schema:
2371
- $ref: '#/components/schemas/error.schema'
2372
- description: Error
2373
- security:
2374
- - Bearer: []
2375
- summary: Receive Storefront Events
2376
- tags:
2377
- - Storefront
2378
- /stores/{storeId}/webhooks:
2379
- description: Webhooks.
2380
- get:
2381
- description: List webhooks for store.
2382
- operationId: Webhooks list
2383
- responses:
2384
- '200':
2385
- content:
2386
- application/json:
2387
- schema:
2346
+ externalReturnLineItemId:
2347
+ description: External return line item ID
2348
+ title: External Return Line Item ID
2349
+ type: string
2350
+ productId:
2351
+ description: Product ID
2352
+ type: string
2353
+ quantity:
2354
+ description: Quantity of items being returned
2355
+ type: integer
2356
+ reason:
2357
+ description: Primary return reason
2358
+ examples:
2359
+ - Too big
2360
+ - Other
2361
+ type: string
2362
+ reasonCode:
2363
+ description: Return reason code
2364
+ type: string
2365
+ reasons:
2366
+ description: Array of return reasons
2367
+ items:
2368
+ type: string
2369
+ type: array
2370
+ reasonCodes:
2371
+ description: Array of return reason codes
2372
+ items:
2373
+ type: string
2374
+ type: array
2375
+ productAdjustment:
2376
+ description: Product adjustment details
2377
+ type: string
2378
+ multipleChoiceQuestions:
2379
+ description: Multiple choice questions and answers for this return item
2380
+ items:
2381
+ properties:
2382
+ question:
2383
+ description: The question text
2384
+ type: string
2385
+ answer:
2386
+ description: The selected answer
2387
+ type: string
2388
+ required:
2389
+ - question
2390
+ - answer
2391
+ type: object
2392
+ type: array
2393
+ assessments:
2394
+ description: Assessment records for this return item. Only applicable for warranties.
2395
+ items:
2396
+ properties:
2397
+ assignedUser:
2398
+ description: User assigned to this assessment
2399
+ properties:
2400
+ id:
2401
+ type: string
2402
+ name:
2403
+ type: string
2404
+ firstName:
2405
+ type: string
2406
+ lastName:
2407
+ type: string
2408
+ email:
2409
+ type: string
2410
+ required:
2411
+ - id
2412
+ - name
2413
+ - firstName
2414
+ - lastName
2415
+ - email
2416
+ type: object
2417
+ responses:
2418
+ description: Assessment responses
2419
+ items:
2420
+ discriminator:
2421
+ propertyName: type
2422
+ oneOf:
2423
+ - title: Short Text Response
2424
+ properties:
2425
+ type:
2426
+ const: short_text
2427
+ type: string
2428
+ value:
2429
+ description: Short text response value
2430
+ type: string
2431
+ required:
2432
+ - type
2433
+ - value
2434
+ type: object
2435
+ - title: Long Text Response
2436
+ properties:
2437
+ type:
2438
+ const: long_text
2439
+ type: string
2440
+ value:
2441
+ description: Long text response value
2442
+ type: string
2443
+ required:
2444
+ - type
2445
+ - value
2446
+ type: object
2447
+ - title: Select Response
2448
+ properties:
2449
+ type:
2450
+ const: select
2451
+ type: string
2452
+ value:
2453
+ description: Select response values (array of selected options)
2454
+ items:
2455
+ type: string
2456
+ type: array
2457
+ required:
2458
+ - type
2459
+ - value
2460
+ type: object
2461
+ - title: Number Response
2462
+ properties:
2463
+ type:
2464
+ const: number
2465
+ type: string
2466
+ value:
2467
+ description: Number response value
2468
+ type: number
2469
+ required:
2470
+ - type
2471
+ - value
2472
+ type: object
2473
+ - title: Boolean Response
2474
+ properties:
2475
+ type:
2476
+ const: boolean
2477
+ type: string
2478
+ value:
2479
+ description: Boolean response value
2480
+ type: boolean
2481
+ required:
2482
+ - type
2483
+ - value
2484
+ type: object
2485
+ - title: File Upload Response
2486
+ properties:
2487
+ type:
2488
+ const: file_upload
2489
+ type: string
2490
+ value:
2491
+ description: File upload response values (array of file URLs or identifiers)
2492
+ items:
2493
+ type: string
2494
+ type: array
2495
+ required:
2496
+ - type
2497
+ - value
2498
+ type: object
2499
+ - title: Date Response
2500
+ properties:
2501
+ type:
2502
+ const: date
2503
+ type: string
2504
+ value:
2505
+ description: Date response value
2506
+ format: date-time
2507
+ type: string
2508
+ required:
2509
+ - type
2510
+ - value
2511
+ type: object
2512
+ type: array
2513
+ required:
2514
+ - assignedUser
2515
+ - responses
2516
+ type: object
2517
+ type: array
2518
+ refund:
2519
+ description: Refund details
2388
2520
  properties:
2389
- webhooks:
2390
- items:
2391
- $ref: '#/components/schemas/webhook-read.schema'
2392
- type: array
2521
+ amount:
2522
+ $ref: '#/components/schemas/money.schema'
2523
+ title: Amount
2524
+ type:
2525
+ description: Refund strategy
2526
+ type: string
2393
2527
  required:
2394
- - webhooks
2528
+ - amount
2395
2529
  type: object
2396
- description: Success
2397
- default:
2398
- content:
2399
- application/problem+json:
2400
- schema:
2401
- $ref: '#/components/schemas/error.schema'
2402
- description: Error
2403
- summary: List Webhooks
2404
- tags:
2405
- - Webhooks
2406
- parameters:
2407
- - $ref: '#/components/parameters/store-id.param'
2408
- post:
2409
- description: Create webhook for store. Or if webhook already exists with `externalId`, update it.
2410
- operationId: Webhook create
2411
- requestBody:
2412
- content:
2413
- application/json:
2414
- schema:
2530
+ sku:
2531
+ description: Product SKU
2532
+ type: string
2533
+ status:
2534
+ description: Return item status
2535
+ type: string
2536
+ variantId:
2537
+ description: Product variant ID
2538
+ type: string
2539
+ required:
2540
+ - id
2541
+ - orderItem
2542
+ - quantity
2543
+ - reason
2544
+ type: object
2545
+ type: array
2546
+ notes:
2547
+ description: Teammembers generated notes and comments on the return
2548
+ items:
2549
+ properties:
2550
+ image:
2551
+ description: Optional image URL attached to the note
2552
+ title: Image URL
2553
+ type: string
2554
+ message:
2555
+ description: The note text
2556
+ title: Message
2557
+ type: string
2558
+ required:
2559
+ - message
2560
+ type: object
2561
+ title: Notes
2562
+ type: array
2563
+ order:
2564
+ description: Original order.
2565
+ properties:
2566
+ id:
2567
+ description: Redo's internal identifier for the original order created in Redo.
2568
+ example: 64e4da943dd822979a70bd12
2569
+ title: ID
2570
+ type: string
2571
+ name:
2572
+ description: Order name from the external provider, such as the Shopify order name.
2573
+ examples:
2574
+ - '#123'
2575
+ title: Name
2576
+ type: string
2577
+ required:
2578
+ - id
2579
+ title: Order
2580
+ type: object
2581
+ shipment:
2582
+ $ref: '#/components/schemas/return-shipment.schema'
2583
+ description: Shipment, if has been made
2584
+ title: Shipment
2585
+ shipments:
2586
+ description: Array of all shipments associated with this return
2587
+ items:
2588
+ $ref: '#/components/schemas/return-shipment.schema'
2589
+ title: Shipments
2590
+ type: array
2591
+ shopifyOrderIds:
2592
+ description: Array of Shopify order IDs (deprecated, use externalOrderIds)
2593
+ items:
2594
+ type: string
2595
+ title: Shopify Order IDs
2596
+ type: array
2597
+ source:
2598
+ properties:
2599
+ emailAddress:
2600
+ description: Email address.
2601
+ format: email
2602
+ title: Email address
2603
+ type: string
2604
+ mailingAddress:
2605
+ $ref: '#/components/schemas/address.schema'
2606
+ description: Mailing address returned items are sent from.
2607
+ title: Mailing address
2608
+ name:
2609
+ $ref: '#/components/schemas/person-name.schema'
2610
+ description: Name of returner.
2611
+ title: Name
2612
+ phoneNumber:
2613
+ $ref: '#/components/schemas/phone-number.schema'
2614
+ description: Phone number of returner.
2615
+ title: Phone number
2616
+ required:
2617
+ - emailAddress
2618
+ - mailingAddress
2619
+ - name
2620
+ - phoneNumber
2621
+ type: object
2622
+ status:
2623
+ $ref: '#/components/schemas/return-status.schema'
2624
+ description: Return status.
2625
+ title: Status
2626
+ tags:
2627
+ description: Tags associated with this return
2628
+ items:
2629
+ properties:
2630
+ name:
2631
+ description: The tag's display name
2632
+ type: string
2633
+ source:
2634
+ description: The source of the tag
2635
+ type: string
2636
+ required:
2637
+ - name
2638
+ - source
2639
+ type: object
2640
+ title: Tags
2641
+ type: array
2642
+ totals:
2643
+ description: Calculated totals for the return
2644
+ properties:
2645
+ charge:
2646
+ description: The upsell amount for the exchange order
2415
2647
  properties:
2416
- webhook:
2417
- $ref: '#/components/schemas/webhook-create.schema'
2648
+ amount:
2649
+ $ref: '#/components/schemas/money.schema'
2650
+ required:
2651
+ - amount
2418
2652
  type: object
2419
- required: true
2420
- responses:
2421
- '200':
2422
- content:
2423
- application/json:
2424
- schema:
2425
- properties:
2426
- webhook:
2427
- $ref: '#/components/schemas/webhook-read.schema'
2428
- type: object
2429
- description: Updated
2430
- '201':
2431
- content:
2432
- application/json:
2433
- schema:
2434
- properties:
2435
- webhook:
2436
- $ref: '#/components/schemas/webhook-read.schema'
2437
- type: object
2438
- description: Created
2439
- default:
2440
- content:
2441
- application/problem+json:
2442
- schema:
2443
- $ref: '#/components/schemas/error.schema'
2444
- description: Error
2445
- security:
2446
- - Bearer: []
2447
- summary: Create or Update Webhook
2448
- tags:
2449
- - Webhooks
2450
- summary: Webhooks
2451
- /webhooks/{webhookId}:
2452
- delete:
2453
- description: Delete a webhook.
2454
- operationId: Webhook delete
2455
- parameters:
2456
- - $ref: '#/components/parameters/webhook-id.param'
2457
- responses:
2458
- '204':
2459
- description: Deleted
2460
- security:
2461
- - Bearer: []
2462
- summary: Delete Webhook
2463
- tags:
2464
- - Webhooks
2465
- description: Webhook.
2466
- get:
2467
- description: Get a webhook.
2468
- operationId: Webhook get
2469
- parameters:
2470
- - $ref: '#/components/parameters/webhook-id.param'
2471
- responses:
2472
- '200':
2473
- content:
2474
- application/json:
2475
- schema:
2476
- properties:
2477
- webhook:
2478
- $ref: '#/components/schemas/webhook-read.schema'
2479
- required:
2480
- - webhook
2481
- type: object
2482
- description: Success
2483
- summary: Webhook
2484
- tags:
2485
- - Webhooks
2486
- put:
2487
- description: Update a webhook.
2488
- operationId: Webhook update
2489
- parameters:
2490
- - $ref: '#/components/parameters/webhook-id.param'
2491
- requestBody:
2492
- content:
2493
- application/json:
2494
- schema:
2653
+ exchange:
2654
+ description: Total value of new items in exchange
2495
2655
  properties:
2496
- webhook:
2497
- $ref: '#/components/schemas/webhook-update.schema'
2656
+ amount:
2657
+ $ref: '#/components/schemas/money.schema'
2498
2658
  required:
2499
- - webhook
2659
+ - amount
2500
2660
  type: object
2501
- required: true
2502
- responses:
2503
- '204':
2504
- description: Success
2505
- default:
2506
- content:
2507
- application/problem+json:
2508
- schema:
2509
- $ref: '#/components/schemas/error.schema'
2510
- description: Error
2511
- summary: Update Webhook
2512
- tags:
2513
- - Webhooks
2514
- summary: Webhook
2515
- /webhooks/{webhookId}/replay:
2516
- description: Webhook replay.
2517
- parameters:
2518
- - $ref: '#/components/parameters/webhook-id.param'
2519
- post:
2520
- description: Replay a webhook.
2521
- operationId: Webhook replay
2522
- requestBody:
2523
- content:
2524
- application/json:
2525
- schema:
2661
+ refund:
2662
+ description: Total refund amount excluding shipping
2526
2663
  properties:
2527
- start:
2528
- format: date-time
2529
- type: string
2664
+ amount:
2665
+ $ref: '#/components/schemas/money.schema'
2530
2666
  required:
2531
- - start
2667
+ - amount
2532
2668
  type: object
2533
- required: true
2534
- responses:
2535
- '202':
2536
- description: Success
2537
- default:
2538
- content:
2539
- application/problem+json:
2540
- schema:
2541
- $ref: '#/components/schemas/error.schema'
2542
- description: Error
2543
- summary: Replay Webhook
2544
- tags:
2545
- - Webhooks
2546
- summary: Webhook replay
2547
- servers:
2548
- - url: https://api.getredo.com/v2.2
2549
- tags:
2550
- - name: Checkout Buttons
2551
- - name: Coverage Info
2552
- - name: Coverage Products
2553
- - name: Custom Events
2554
- - name: Customer Portal
2555
- - name: Customer Subscriptions
2556
- - name: Invoices
2557
- - name: Merchant Admin
2558
- - name: Returns
2559
- - name: Storefront
2560
- - name: Webhooks
2561
- webhooks:
2562
- return:
2563
- post:
2564
- operationId: Webhook return event
2565
- requestBody:
2566
- content:
2567
- application/json:
2568
- schema:
2569
- description: Return event
2669
+ storeCredit:
2670
+ description: Total store credit amount
2570
2671
  properties:
2571
- at:
2572
- description: Event time
2573
- format: date-time
2574
- title: At
2575
- type: string
2576
- order:
2577
- $ref: '#/components/schemas/order-read.schema'
2578
- description: Order for return.
2579
- title: Order
2580
- return:
2581
- $ref: '#/components/schemas/return-read.schema'
2582
- description: Return.
2583
- title: Return
2584
- type:
2585
- description: Event type
2586
- enum:
2587
- - backfill
2588
- - created
2589
- - updated
2590
- type: string
2672
+ amount:
2673
+ $ref: '#/components/schemas/money.schema'
2674
+ required:
2675
+ - amount
2676
+ type: object
2677
+ required:
2678
+ - refund
2679
+ - exchange
2680
+ - storeCredit
2681
+ - charge
2682
+ title: Totals
2683
+ type: object
2684
+ type:
2685
+ $ref: '#/components/schemas/return-type.schema'
2686
+ description: Return type.
2687
+ title: Type
2688
+ updatedAt:
2689
+ description: Time of last update.
2690
+ format: date-time
2691
+ title: Updated at
2692
+ type: string
2693
+ required:
2694
+ - createdAt
2695
+ - destination
2696
+ - giftCards
2697
+ - source
2698
+ - id
2699
+ - order
2700
+ - items
2701
+ - status
2702
+ - updatedAt
2703
+ title: Return
2704
+ type: object
2705
+ comment.schema:
2706
+ description: Comment with either message or image.
2707
+ examples:
2708
+ - message: Item is worn.
2709
+ - image: eJxiYAEAAAD//wMAAAYABQ==
2710
+ oneOf:
2711
+ - additionalProperties: false
2712
+ properties:
2713
+ image:
2714
+ contentEncoding: base64
2715
+ description: Base64-encoded image
2716
+ title: Image
2717
+ type: string
2718
+ required:
2719
+ - image
2720
+ title: Image comment
2721
+ type: object
2722
+ - additionalProperties: false
2723
+ properties:
2724
+ message:
2725
+ description: Message.
2726
+ title: Message
2727
+ type: string
2728
+ required:
2729
+ - message
2730
+ title: Message comment
2731
+ type: object
2732
+ title: Comment
2733
+ return-status-update.schema:
2734
+ description: |
2735
+ Return status.
2736
+
2737
+ * complete: The return has been completed successfully.
2738
+ * open: Return has been approved and is awaiting shipment.
2739
+ * flagged: A problem with return processing requires merchant action.
2740
+ * rejected: The return has been rejected.
2741
+ * deleted: The return has been reset.
2742
+ enum:
2743
+ - complete
2744
+ - open
2745
+ - flagged
2746
+ - rejected
2747
+ - deleted
2748
+ example: open
2749
+ title: Return status
2750
+ type: string
2751
+ storefront-event.schema:
2752
+ additionalProperties: true
2753
+ description: Shopify pixel event for storefront tracking.
2754
+ properties:
2755
+ anonymousId:
2756
+ description: Anonymous identifier for users without account.
2757
+ type: string
2758
+ cart:
2759
+ description: Cart information.
2760
+ type:
2761
+ - object
2762
+ - 'null'
2763
+ cartLine:
2764
+ description: Information about specific cart line item.
2765
+ type: object
2766
+ checkout:
2767
+ description: Checkout information.
2768
+ type: object
2769
+ collection:
2770
+ description: Collection information.
2771
+ type: object
2772
+ customer:
2773
+ description: Customer information if available.
2774
+ type:
2775
+ - object
2776
+ - 'null'
2777
+ customerEmail:
2778
+ description: Customer email if available.
2779
+ format: email
2780
+ type: string
2781
+ customerPhone:
2782
+ description: Customer phone if available.
2783
+ type: string
2784
+ eventId:
2785
+ description: Unique identifier for the event.
2786
+ type: string
2787
+ eventName:
2788
+ description: Name of the Shopify pixel event.
2789
+ enum:
2790
+ - product_added_to_cart
2791
+ - product_removed_from_cart
2792
+ - product_viewed
2793
+ - checkout_started
2794
+ - checkout_completed
2795
+ - checkout_contact_info_submitted
2796
+ - page_viewed
2797
+ - collection_viewed
2798
+ type: string
2799
+ productVariant:
2800
+ description: Product variant information.
2801
+ type: object
2802
+ source:
2803
+ description: Source of the event.
2804
+ enum:
2805
+ - AIMERCE
2806
+ type: string
2807
+ timestamp:
2808
+ description: ISO 8601 timestamp when the event occurred.
2809
+ format: date-time
2810
+ type: string
2811
+ urlWithParams:
2812
+ description: Complete page URL with query parameters.
2813
+ type: string
2814
+ urlWithoutParams:
2815
+ description: Page URL without query parameters.
2816
+ type: string
2817
+ required:
2818
+ - eventName
2819
+ - eventId
2820
+ - timestamp
2821
+ - source
2822
+ title: Storefront Event
2823
+ type: object
2824
+ https-callback.schema:
2825
+ description: HTTPS callback
2826
+ properties:
2827
+ auth:
2828
+ description: Authorization.
2829
+ oneOf:
2830
+ - properties:
2831
+ bearer:
2832
+ description: Bearer
2833
+ properties:
2834
+ token:
2835
+ description: Token for Bearer authorization.
2836
+ example: abc123
2837
+ format: password
2838
+ title: Token
2839
+ type: string
2840
+ title: Bearer
2841
+ title: Bearer authorization
2591
2842
  type: object
2592
- description: |
2593
- Return event webhook.
2594
- required: true
2595
- responses:
2596
- 2XX:
2597
- description: Success. Return a 2xx status code to indicate success.
2598
- default:
2599
- description: Error. The event will be retried multiple times and then discarded.
2600
- security:
2601
- - UserBearer: []
2602
- summary: Return event
2603
- tags:
2604
- - Returns
2843
+ - type: 'null'
2844
+ title: Authorization
2845
+ url:
2846
+ description: HTTPS callback URL.
2847
+ example: https://subscriber.example.org/events
2848
+ format: uri
2849
+ pattern: ^https://
2850
+ title: URL
2851
+ type: string
2852
+ required:
2853
+ - auth
2854
+ - url
2855
+ title: HTTPS callback
2856
+ type: object
2857
+ webhook-kind.schema:
2858
+ description: Webhook kind.
2859
+ enum:
2860
+ - redo
2861
+ - loop
2862
+ title: Webhook kind
2863
+ type: string
2864
+ webhook-topic.schema:
2865
+ description: Webhook topic.
2866
+ enum:
2867
+ - return
2868
+ title: Webhook topic
2869
+ type: string
2870
+ webhook-read.schema:
2871
+ description: Webhook read.
2872
+ properties:
2873
+ callback:
2874
+ $ref: '#/components/schemas/https-callback.schema'
2875
+ description: HTTPS callback URL to POST events.
2876
+ title: Callback
2877
+ createdAt:
2878
+ description: Time created.
2879
+ format: date-time
2880
+ title: Created at.
2881
+ type: string
2882
+ externalId:
2883
+ default: null
2884
+ description: Optional external identifier.
2885
+ title: External ID
2886
+ type:
2887
+ - string
2888
+ - 'null'
2889
+ id:
2890
+ description: Webhook ID.
2891
+ readonly: true
2892
+ title: ID
2893
+ type: string
2894
+ kind:
2895
+ $ref: '#/components/schemas/webhook-kind.schema'
2896
+ description: Kind.
2897
+ title: Kind
2898
+ topic:
2899
+ $ref: '#/components/schemas/webhook-topic.schema'
2900
+ description: Topic.
2901
+ title: Topic
2902
+ updatedAt:
2903
+ description: Last time updated.
2904
+ format: date-time
2905
+ title: Updated at.
2906
+ type: string
2907
+ required:
2908
+ - callback
2909
+ - createdAt
2910
+ - externalId id
2911
+ - updatedAt
2912
+ - topic
2913
+ title: Webhook read
2914
+ type: object
2915
+ webhook-create.schema:
2916
+ description: Webhook create.
2917
+ properties:
2918
+ backfill:
2919
+ default: false
2920
+ description: Create events for already-existing items
2921
+ title: Backfill
2922
+ type: boolean
2923
+ callback:
2924
+ $ref: '#/components/schemas/https-callback.schema'
2925
+ description: HTTPS callback to POST events.
2926
+ title: HTTPS callback
2927
+ externalId:
2928
+ default: null
2929
+ description: Optional external identifier.
2930
+ title: External ID
2931
+ type:
2932
+ - string
2933
+ - 'null'
2934
+ kind:
2935
+ $ref: '#/components/schemas/webhook-kind.schema'
2936
+ description: Kind.
2937
+ title: Kind
2938
+ topic:
2939
+ $ref: '#/components/schemas/webhook-topic.schema'
2940
+ description: Topic.
2941
+ title: Topic
2942
+ required:
2943
+ - callback
2944
+ - topic
2945
+ title: Webhook create
2946
+ type: object
2947
+ webhook-update.schema:
2948
+ description: Webhook update.
2949
+ properties:
2950
+ callback:
2951
+ $ref: '#/components/schemas/https-callback.schema'
2952
+ description: HTTPS callback to POST events.
2953
+ title: HTTPS callback
2954
+ externalId:
2955
+ default: null
2956
+ description: Optional external identifier.
2957
+ title: External ID
2958
+ type:
2959
+ - string
2960
+ - 'null'
2961
+ required:
2962
+ - callback
2963
+ title: Webhook update
2964
+ type: object
2965
+ headers:
2966
+ page-next.header:
2967
+ description: Next value for X-Page-Continue, for more results
2968
+ schema:
2969
+ type: string