@redotech/redo-api-schema 2.2.36

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.
@@ -0,0 +1,1178 @@
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
+ page-continue.param:
9
+ description: Page marker, from X-Page-Next header
10
+ example: 64df700931a04885276c3364
11
+ in: header
12
+ name: X-Page-Continue
13
+ schema:
14
+ type: string
15
+ page-size.param:
16
+ description: Page size, defaults to 20
17
+ example: 20
18
+ in: header
19
+ name: X-Page-Size
20
+ schema:
21
+ type: integer
22
+ return-id.param:
23
+ description: Return ID
24
+ in: path
25
+ name: returnId
26
+ required: true
27
+ schema:
28
+ example: 64e4d5e837572a4813b73e40
29
+ type: string
30
+ store-id.param:
31
+ description: Store ID
32
+ in: path
33
+ name: storeId
34
+ required: true
35
+ schema:
36
+ example: 64e5a8a1af49a89df37e4ee7
37
+ type: string
38
+ updated-at-max.param:
39
+ description: Maximum updated time, exclusive
40
+ example: '2000-02-01T00:00:00Z'
41
+ in: query
42
+ name: updated_at_max
43
+ schema:
44
+ format: date-time
45
+ type: string
46
+ updated-at-min.param:
47
+ description: Minimum updated time, inclusive
48
+ example: '2000-01-01T00:00:00Z'
49
+ in: query
50
+ name: updated_at_min
51
+ schema:
52
+ format: date-time
53
+ type: string
54
+ webhook-id.param:
55
+ description: Webhook ID
56
+ in: path
57
+ name: webhookId
58
+ required: true
59
+ schema:
60
+ example: 64e5a865a58eefeed7f05ea6
61
+ type: string
62
+ schemas:
63
+ address.schema:
64
+ description: Address.
65
+ properties:
66
+ city:
67
+ description: City name
68
+ examples:
69
+ - Anytown
70
+ title: City
71
+ type: string
72
+ country:
73
+ description: Country code
74
+ examples:
75
+ - US
76
+ - CA
77
+ title: Country
78
+ type: string
79
+ line1:
80
+ description: Line 1
81
+ examples:
82
+ - 123 Main St
83
+ title: Line 1
84
+ type: string
85
+ line2:
86
+ default: ''
87
+ description: Line 2
88
+ examples:
89
+ - ''
90
+ title: Line 2
91
+ type: string
92
+ postalCode:
93
+ description: Postal or ZIP code
94
+ examples:
95
+ - '12345'
96
+ title: Postal code
97
+ type: string
98
+ state:
99
+ description: State or province
100
+ examples:
101
+ - WA
102
+ - Washington
103
+ title: State
104
+ type: string
105
+ required:
106
+ - city
107
+ - country
108
+ - line1
109
+ - state
110
+ - postalCode
111
+ title: Address
112
+ type: object
113
+ comment.schema:
114
+ description: Comment with either message or image.
115
+ examples:
116
+ - message: Item is worn.
117
+ - image: eJxiYAEAAAD//wMAAAYABQ==
118
+ oneOf:
119
+ - properties:
120
+ image:
121
+ contentEncoding: base64
122
+ description: Base64-encoded image
123
+ title: Image
124
+ type: string
125
+ title: Image comment
126
+ type: object
127
+ - properties:
128
+ message:
129
+ description: Message.
130
+ title: Message
131
+ type: string
132
+ title: Message comment
133
+ type: object
134
+ title: Comment
135
+ error.schema:
136
+ description: See [RFC 7807 Section 3](https://datatracker.ietf.org/doc/html/rfc7807#section-3).
137
+ properties:
138
+ detail:
139
+ description: A human-readable explanation specific to this occurrence of the problem.
140
+ type: string
141
+ instance:
142
+ description: A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
143
+ type: string
144
+ status:
145
+ description: The HTTP status code ([[RFC7231], Section 6](https://datatracker.ietf.org/doc/html/rfc7231#section-6)) generated by the origin server for this occurrence of the problem.
146
+ type: number
147
+ title:
148
+ description: A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [[RFC7231], Section 3.4](https://datatracker.ietf.org/doc/html/rfc7231#section-3.4)).
149
+ type: string
150
+ type:
151
+ default: about:blank
152
+ description: A URI reference [[RFC3986](https://datatracker.ietf.org/doc/html/rfc3986)] that identifies the problem type. This specification encourages that, when dereferenced, it provide human-readable documentation for the problem type (e.g., using HTML [[W3C.REC-html5-20141028](https://datatracker.ietf.org/doc/html/rfc7807#ref-W3C.REC-html5-20141028)]). When this member is not present, its value is assumed to be "about:blank".
153
+ format: uri-reference
154
+ type: string
155
+ title: Problem details
156
+ type: object
157
+ exchange-provision.schema:
158
+ enum:
159
+ - instant
160
+ - deferred
161
+ example: deferred
162
+ title: Exchang provision
163
+ type: string
164
+ https-callback.schema:
165
+ description: HTTPS callback
166
+ properties:
167
+ auth:
168
+ description: Authorization.
169
+ oneOf:
170
+ - properties:
171
+ bearer:
172
+ description: Bearer
173
+ properties:
174
+ token:
175
+ description: Token for Bearer authorization.
176
+ example: abc123
177
+ format: password
178
+ title: Token
179
+ type: string
180
+ title: Bearer
181
+ title: Bearer authorization
182
+ type: object
183
+ - type: 'null'
184
+ title: Authorization
185
+ url:
186
+ description: HTTPS callback URL.
187
+ example: https://subscriber.example.org/events
188
+ format: uri
189
+ pattern: ^https://
190
+ title: URL
191
+ type: string
192
+ required:
193
+ - auth
194
+ - url
195
+ title: HTTPS callback
196
+ type: object
197
+ item-quantity.schema:
198
+ description: Item quantity.
199
+ example: 1
200
+ exclusiveMinimum: 0
201
+ title: Item quantity
202
+ type: number
203
+ money.schema:
204
+ description: Currency amount
205
+ properties:
206
+ amount:
207
+ examples:
208
+ - 50.2
209
+ - 1.78
210
+ title: Amount
211
+ type: number
212
+ currency:
213
+ examples:
214
+ - USD
215
+ - EUR
216
+ title: Currency
217
+ type: string
218
+ title: Money
219
+ type: object
220
+ order-read.schema:
221
+ description: Order.
222
+ properties:
223
+ customer:
224
+ properties:
225
+ emailAddress:
226
+ description: Email address of customer.
227
+ format: email
228
+ title: Email address
229
+ type: string
230
+ name:
231
+ $ref: '#/components/schemas/person-name.schema'
232
+ description: Name of customer.
233
+ title: Name
234
+ phoneNumber:
235
+ $ref: '#/components/schemas/phone-number.schema'
236
+ description: Phone number of customer.
237
+ title: Phone number
238
+ required:
239
+ - name
240
+ type: object
241
+ externalId:
242
+ description: Shopify ID
243
+ examples:
244
+ - '1073459971'
245
+ - '450789469'
246
+ title: External ID
247
+ type: string
248
+ id:
249
+ description: Order ID
250
+ example: 64e4da943dd822979a70bd12
251
+ title: ID
252
+ type: string
253
+ items:
254
+ items:
255
+ properties:
256
+ externalId:
257
+ example: '123'
258
+ type: string
259
+ id:
260
+ description: Line item ID
261
+ title: ID
262
+ type: string
263
+ product:
264
+ $ref: '#/components/schemas/product.schema'
265
+ title: Product
266
+ quantity:
267
+ $ref: '#/components/schemas/item-quantity.schema'
268
+ title: Quantity
269
+ variant:
270
+ $ref: '#/components/schemas/product-variant.schema'
271
+ title: Variant
272
+ required:
273
+ - id
274
+ - product
275
+ - quantity
276
+ - variant
277
+ title: Line items
278
+ type: array
279
+ name:
280
+ description: Shopify name.
281
+ examples:
282
+ - '#123'
283
+ title: Name
284
+ type: string
285
+ required:
286
+ - customer
287
+ - id
288
+ - items
289
+ - name
290
+ title: Order
291
+ type: object
292
+ person-name.schema:
293
+ description: Person name.
294
+ properties:
295
+ given:
296
+ description: Given name
297
+ examples:
298
+ - John
299
+ - Mary
300
+ type: string
301
+ surname:
302
+ description: Surname
303
+ examples:
304
+ - Smith
305
+ - Brown
306
+ type: string
307
+ required:
308
+ - given
309
+ - surname
310
+ title: Person name
311
+ type: object
312
+ phone-number.schema:
313
+ description: Phone number, in E.164 format
314
+ examples:
315
+ - '+15555555555'
316
+ title: Phone number
317
+ type: string
318
+ product-variant.schema:
319
+ properties:
320
+ externalId:
321
+ title: External ID
322
+ type: string
323
+ name:
324
+ title: Title
325
+ type: string
326
+ sku:
327
+ title: SKU
328
+ type: string
329
+ weight:
330
+ $ref: '#/components/schemas/weight.schema'
331
+ title: Weight
332
+ required:
333
+ - name
334
+ title: Product variant
335
+ type: object
336
+ product.schema:
337
+ description: Product.
338
+ properties:
339
+ externalId:
340
+ description: Product ID in external system (e.g. shopify).
341
+ title: External ID
342
+ type: string
343
+ name:
344
+ description: Product title
345
+ title: Name
346
+ type: string
347
+ required:
348
+ - name
349
+ title: Product
350
+ type: object
351
+ return-read.schema:
352
+ description: Return read.
353
+ properties:
354
+ createdAt:
355
+ description: Time of creation.
356
+ format: date-time
357
+ title: Created at
358
+ type: string
359
+ destination:
360
+ properties:
361
+ mailingAddress:
362
+ $ref: '#/components/schemas/address.schema'
363
+ description: Mailing address to send the returned items.
364
+ title: Mailing address
365
+ phoneNumber:
366
+ $ref: '#/components/schemas/phone-number.schema'
367
+ description: Phone number of the destination.
368
+ title: Phone number
369
+ type: object
370
+ exchange:
371
+ description: Exchange order
372
+ properties:
373
+ items:
374
+ items:
375
+ properties:
376
+ id:
377
+ title: ID
378
+ type: string
379
+ product:
380
+ $ref: '#/components/schemas/product.schema'
381
+ title: Product
382
+ quantity:
383
+ $ref: '#/components/schemas/item-quantity.schema'
384
+ title: Quantity
385
+ variant:
386
+ $ref: '#/components/schemas/product-variant.schema'
387
+ required:
388
+ - id
389
+ - quantity
390
+ - product
391
+ - variant
392
+ title: Line items
393
+ type: array
394
+ order:
395
+ properties:
396
+ externalId:
397
+ description: ID of external order
398
+ title: External ID
399
+ type: string
400
+ id:
401
+ type: string
402
+ type: object
403
+ provision:
404
+ $ref: '#/components/schemas/exchange-provision.schema'
405
+ title: Provision
406
+ required:
407
+ - items
408
+ - provision
409
+ title: Exchange
410
+ type: object
411
+ id:
412
+ description: Return identifier.
413
+ examples:
414
+ - 64df65d4c5a4ca3eff4b4e43
415
+ title: Identifier
416
+ type: string
417
+ items:
418
+ description: Return items
419
+ items:
420
+ properties:
421
+ exchangeItem:
422
+ properties:
423
+ id:
424
+ description: ID of exchange line item
425
+ title: ID
426
+ type: string
427
+ required:
428
+ - string
429
+ title: Exchange item
430
+ type: object
431
+ id:
432
+ description: Return item ID.
433
+ title: ID
434
+ type: string
435
+ orderItem:
436
+ description: Order line item
437
+ properties:
438
+ id:
439
+ description: 'Line item ID in original order. Note: There can be more than return item for an original line item, with different quantity, return reasons, etc.'
440
+ title: ID
441
+ type: string
442
+ required:
443
+ - index
444
+ title: Order item
445
+ type: object
446
+ quantity:
447
+ $ref: '#/components/schemas/item-quantity.schema'
448
+ title: Quantity
449
+ reason:
450
+ description: Return reason
451
+ examples:
452
+ - Too big
453
+ - Other
454
+ type: string
455
+ refund:
456
+ description: Refund
457
+ properties:
458
+ amount:
459
+ $ref: '#/components/schemas/money.schema'
460
+ title: Amount
461
+ pendingAmount:
462
+ $ref: '#/components/schemas/money.schema'
463
+ title: Planned amount
464
+ pendingTaxAmount:
465
+ $ref: '#/components/schemas/money.schema'
466
+ description: Taxes.
467
+ title: Taxes
468
+ taxAmount:
469
+ $ref: '#/components/schemas/money.schema'
470
+ description: Taxes.
471
+ title: Taxes
472
+ type:
473
+ description: Refund method
474
+ enum:
475
+ - credit
476
+ - refund
477
+ type: string
478
+ required:
479
+ - amount
480
+ - pendingAmount
481
+ - pendingTaxAmount
482
+ - taxAmount
483
+ - type
484
+ type: object
485
+ required:
486
+ - item
487
+ - quantity
488
+ - reason
489
+ type: object
490
+ type: array
491
+ order:
492
+ description: Original order.
493
+ properties:
494
+ id:
495
+ description: Order ID.
496
+ example: abc123
497
+ title: ID
498
+ type: string
499
+ required:
500
+ - id
501
+ title: Order
502
+ type: object
503
+ shipment:
504
+ description: Shipment, if has been made
505
+ properties:
506
+ carrier:
507
+ description: Carrier code
508
+ title: Carrier
509
+ type: string
510
+ status:
511
+ description: Status of shipment
512
+ enum:
513
+ - pre_transit
514
+ - transit
515
+ - delivered
516
+ - cancelled
517
+ - flagged
518
+ title: Status
519
+ type: string
520
+ tracker:
521
+ description: Tracking number
522
+ title: Tracker
523
+ type: string
524
+ title: Shipment
525
+ type: object
526
+ source:
527
+ properties:
528
+ emailAddress:
529
+ description: Email address.
530
+ format: email
531
+ title: Email address
532
+ type: string
533
+ mailingAddress:
534
+ $ref: '#/components/schemas/address.schema'
535
+ description: Mailing address returned items are sent from.
536
+ title: Mailing address
537
+ name:
538
+ $ref: '#/components/schemas/person-name.schema'
539
+ description: Name of returner.
540
+ title: Name
541
+ phoneNumber:
542
+ $ref: '#/components/schemas/phone-number.schema'
543
+ description: Phone number of returner.
544
+ title: Phone number
545
+ required:
546
+ - emailAddress
547
+ - mailingAddress
548
+ - name
549
+ - phoneNumber
550
+ type: object
551
+ status:
552
+ $ref: '#/components/schemas/return-status.schema'
553
+ description: Return status.
554
+ title: Status
555
+ updatedAt:
556
+ description: Time of last update.
557
+ format: date-time
558
+ title: Updated at
559
+ type: string
560
+ required:
561
+ - createdAt
562
+ - destination
563
+ - source
564
+ - id
565
+ - order
566
+ - items
567
+ - status
568
+ - updatedAt
569
+ title: Return
570
+ type: object
571
+ return-status.schema:
572
+ description: |
573
+ Return status.
574
+
575
+ * manual_review: Return requires pre-shipment merchant authorization.
576
+ * open: Return has been approved is awaiting shipment.
577
+ * transit: Return shipment is in transit.
578
+ * delivered: Return shipment has been delievered and awaiting processing.
579
+ * flagged: A problem with return processing requires merchant action.
580
+ * cancelled: The return has been cancelled.
581
+ * closed: The return has been completed.
582
+ enum:
583
+ - manual_review
584
+ - open
585
+ - transit
586
+ - delivered
587
+ - flagged
588
+ - cancelled
589
+ - closed
590
+ example: open
591
+ title: Return status
592
+ type: string
593
+ webhook-create.schema:
594
+ description: Webhook create.
595
+ properties:
596
+ backfill:
597
+ default: false
598
+ description: Create events for already-existing items
599
+ title: Backfill
600
+ type: boolean
601
+ callback:
602
+ $ref: '#/components/schemas/https-callback.schema'
603
+ description: HTTPS callback to POST events.
604
+ title: HTTPS callback
605
+ externalId:
606
+ default: null
607
+ description: Optional external identifier.
608
+ title: External ID
609
+ type:
610
+ - string
611
+ - 'null'
612
+ topic:
613
+ $ref: '#/components/schemas/webhook-topic.schema'
614
+ description: Topic.
615
+ title: Topic
616
+ required:
617
+ - callback
618
+ - topic
619
+ title: Webhook create
620
+ type: object
621
+ webhook-read.schema:
622
+ description: Webhook read.
623
+ properties:
624
+ callback:
625
+ $ref: '#/components/schemas/https-callback.schema'
626
+ description: HTTPS callback URL to POST events.
627
+ title: Callback
628
+ createdAt:
629
+ description: Time created.
630
+ format: date-time
631
+ title: Created at.
632
+ type: string
633
+ externalId:
634
+ default: null
635
+ description: Optional external identifier.
636
+ title: External ID
637
+ type:
638
+ - string
639
+ - 'null'
640
+ id:
641
+ description: Webhook ID.
642
+ readonly: true
643
+ title: ID
644
+ type: string
645
+ topic:
646
+ $ref: '#/components/schemas/webhook-topic.schema'
647
+ description: Topic.
648
+ title: Topic
649
+ updatedAt:
650
+ description: Last time updated.
651
+ format: date-time
652
+ title: Updated at.
653
+ type: string
654
+ required:
655
+ - callback
656
+ - createdAt
657
+ - externalId id
658
+ - updatedAt
659
+ - topic
660
+ title: Webhook read
661
+ type: object
662
+ webhook-topic.schema:
663
+ description: Webhook topic.
664
+ enum:
665
+ - return
666
+ title: Webhook topic
667
+ type: string
668
+ webhook-update.schema:
669
+ description: Webhook update.
670
+ properties:
671
+ callback:
672
+ $ref: '#/components/schemas/https-callback.schema'
673
+ description: HTTPS callback to POST events.
674
+ title: HTTPS callback
675
+ externalId:
676
+ default: null
677
+ description: Optional external identifier.
678
+ title: External ID
679
+ type:
680
+ - string
681
+ - 'null'
682
+ required:
683
+ - callback
684
+ title: Webhook update
685
+ type: object
686
+ weight.schema:
687
+ description: Weight.
688
+ properties:
689
+ kg:
690
+ description: Weight in kilograms
691
+ examples:
692
+ - 0.021
693
+ - 1.4
694
+ minimum: 0
695
+ title: Kilograms
696
+ type: number
697
+ title: Weight
698
+ type: object
699
+ securitySchemes:
700
+ Bearer:
701
+ scheme: Bearer
702
+ type: http
703
+ UserBearer:
704
+ scheme: Bearer
705
+ type: http
706
+ info:
707
+ contact:
708
+ email: engineering-admin@getredo.com
709
+ name: Redo Engineering
710
+ description: |
711
+ ## Endpoints
712
+
713
+ Endpoints are authenticated using the Bearer authorization scheme, using the
714
+ REDO_API_SECRET.
715
+
716
+ ```txt
717
+ GET /v2.2/resource HTTP/1.1
718
+ Authorization: Bearer 77bb7598b7a972475cc7c7e171ec33af
719
+ Host: api.getredo.com
720
+ ```
721
+
722
+ ## Webhooks
723
+
724
+ Webhooks are authenticated using the Bearer authorization scheme, using
725
+ a secret supplied by the subscriber.
726
+
727
+ ```txt
728
+ POST /events HTTP/1.1
729
+ Authorization: Bearer subscriberauth123
730
+ Host: subscriber.example.com
731
+ ```
732
+
733
+ Webhook events are delivered in order for each individual subject (e.g.
734
+ return).
735
+
736
+ If the response is not a 2xx status code, the event will be retried multiple
737
+ times before discarding it.
738
+ title: Redo API
739
+ version: 2.2.0
740
+ openapi: 3.1.0
741
+ paths:
742
+ /__return:
743
+ description: Return event webhook.
744
+ post:
745
+ operationId: Webhook return event
746
+ requestBody:
747
+ content:
748
+ application/json:
749
+ schema:
750
+ description: Return event
751
+ properties:
752
+ at:
753
+ description: Event time
754
+ format: date-time
755
+ title: At
756
+ type: string
757
+ order:
758
+ $ref: '#/components/schemas/order-read.schema'
759
+ description: Order for return.
760
+ title: Order
761
+ return:
762
+ $ref: '#/components/schemas/return-read.schema'
763
+ description: Return.
764
+ title: Return
765
+ type:
766
+ description: Event type
767
+ enum:
768
+ - backfill
769
+ - created
770
+ - updated
771
+ type: string
772
+ type: object
773
+ description: |
774
+ Return event webhook.
775
+
776
+ <!-- theme: warning -->
777
+ > #### Note
778
+ >
779
+ > This is not an actual Redo API endpoint, but a webhook.
780
+ required: true
781
+ responses:
782
+ 2xx:
783
+ description: Success. Return a 2xx status code to indicate success.
784
+ default:
785
+ description: Error. The event will be retried multiple times and then discarded.
786
+ security:
787
+ - UserBearer: []
788
+ summary: Return event [Webhook]
789
+ tags:
790
+ - Returns
791
+ summary: Return event [Webhook]
792
+ /returns/{returnId}/comments:
793
+ description: Return comment.
794
+ get:
795
+ description: List return comments.
796
+ operationId: Return comments get
797
+ responses:
798
+ '200':
799
+ content:
800
+ application/json:
801
+ schema:
802
+ properties:
803
+ comments:
804
+ description: Return comments.
805
+ items:
806
+ $ref: '#/components/schemas/comment.schema'
807
+ title: Comments
808
+ type: array
809
+ required:
810
+ - comments
811
+ type: object
812
+ description: Success
813
+ summary: List return comments
814
+ tags:
815
+ - Returns
816
+ parameters:
817
+ - $ref: '#/components/parameters/return-id.param'
818
+ post:
819
+ description: Create return comment.
820
+ operationId: Return comment create
821
+ requestBody:
822
+ content:
823
+ application/json:
824
+ schema:
825
+ properties:
826
+ comment:
827
+ $ref: '#/components/schemas/comment.schema'
828
+ required:
829
+ - comment
830
+ type: object
831
+ required: true
832
+ responses:
833
+ '201':
834
+ content:
835
+ application/json:
836
+ schema:
837
+ properties:
838
+ comment:
839
+ $ref: '#/components/schemas/comment.schema'
840
+ required:
841
+ - comment
842
+ type: object
843
+ description: Created
844
+ default:
845
+ content:
846
+ application/problem+json:
847
+ schema:
848
+ $ref: '#/components/schemas/error.schema'
849
+ description: Error
850
+ security:
851
+ - Bearer: []
852
+ summary: Create return comment
853
+ tags:
854
+ - Returns
855
+ summary: Return comment
856
+ /returns/{returnId}/status:
857
+ description: Return status.
858
+ get:
859
+ description: Get return status.
860
+ operationId: Return status get
861
+ responses:
862
+ '200':
863
+ content:
864
+ application/json:
865
+ schema:
866
+ properties:
867
+ status:
868
+ $ref: '#/components/schemas/return-status.schema'
869
+ required:
870
+ - status
871
+ type: object
872
+ description: Success
873
+ default:
874
+ content:
875
+ application/problem+json:
876
+ schema:
877
+ $ref: '#/components/schemas/error.schema'
878
+ description: Error
879
+ security:
880
+ - Bearer: []
881
+ summary: Get return status
882
+ tags:
883
+ - Returns
884
+ parameters:
885
+ - $ref: '#/components/parameters/return-id.param'
886
+ put:
887
+ description: Update return status.
888
+ operationId: Return status update
889
+ requestBody:
890
+ content:
891
+ application/json:
892
+ schema:
893
+ properties:
894
+ status:
895
+ $ref: '#/components/schemas/return-status.schema'
896
+ required:
897
+ - status
898
+ type: object
899
+ required: true
900
+ responses:
901
+ '204':
902
+ description: Updated
903
+ default:
904
+ content:
905
+ application/problem+json:
906
+ schema:
907
+ $ref: '#/components/schemas/error.schema'
908
+ description: Error
909
+ security:
910
+ - Bearer: []
911
+ summary: Update return status
912
+ tags:
913
+ - Returns
914
+ summary: Return status
915
+ /stores/{storeId}/returns:
916
+ description: List of returns for store.
917
+ get:
918
+ description: List returns, sorted by most recent to least recent.
919
+ operationId: Returns list
920
+ parameters:
921
+ - $ref: '#/components/parameters/page-continue.param'
922
+ - $ref: '#/components/parameters/page-size.param'
923
+ - $ref: '#/components/parameters/updated-at-max.param'
924
+ - $ref: '#/components/parameters/updated-at-min.param'
925
+ responses:
926
+ '200':
927
+ content:
928
+ application/json:
929
+ schema:
930
+ properties:
931
+ orders:
932
+ items:
933
+ $ref: '#/components/schemas/order-read.schema'
934
+ type: array
935
+ returns:
936
+ items:
937
+ $ref: '#/components/schemas/return-read.schema'
938
+ type: array
939
+ required:
940
+ - orders
941
+ - returns
942
+ type: object
943
+ description: Success
944
+ headers:
945
+ X-Page-Next:
946
+ $ref: '#/components/headers/page-next.header'
947
+ default:
948
+ content:
949
+ application/problem+json:
950
+ schema:
951
+ $ref: '#/components/schemas/error.schema'
952
+ description: Error
953
+ security:
954
+ - Bearer: []
955
+ summary: List returns
956
+ tags:
957
+ - Returns
958
+ parameters:
959
+ - $ref: '#/components/parameters/store-id.param'
960
+ summary: Returns
961
+ /stores/{storeId}/webhooks:
962
+ description: Webhooks.
963
+ get:
964
+ description: List webhooks for store.
965
+ operationId: Webhooks list
966
+ responses:
967
+ '200':
968
+ content:
969
+ application/json:
970
+ schema:
971
+ properties:
972
+ webhooks:
973
+ items:
974
+ $ref: '#/components/schemas/webhook-read.schema'
975
+ type: array
976
+ required:
977
+ - webhooks
978
+ type: object
979
+ description: Success
980
+ default:
981
+ content:
982
+ application/problem+json:
983
+ schema:
984
+ $ref: '#/components/schemas/error.schema'
985
+ description: Error
986
+ summary: List webhooks
987
+ tags:
988
+ - Webhooks
989
+ parameters:
990
+ - $ref: '#/components/parameters/store-id.param'
991
+ post:
992
+ description: Create webhook for store. Or if webhook already exists with `externalId`, update it.
993
+ operationId: Webhook create
994
+ requestBody:
995
+ content:
996
+ application/json:
997
+ schema:
998
+ properties:
999
+ webhook:
1000
+ $ref: '#/components/schemas/webhook-create.schema'
1001
+ type: object
1002
+ required: true
1003
+ responses:
1004
+ '200':
1005
+ content:
1006
+ application/json:
1007
+ schema:
1008
+ properties:
1009
+ webhook:
1010
+ $ref: '#/components/schemas/webhook-read.schema'
1011
+ type: object
1012
+ description: Updated
1013
+ '201':
1014
+ content:
1015
+ application/json:
1016
+ schema:
1017
+ properties:
1018
+ webhook:
1019
+ $ref: '#/components/schemas/webhook-read.schema'
1020
+ type: object
1021
+ description: Created
1022
+ default:
1023
+ content:
1024
+ application/problem+json:
1025
+ schema:
1026
+ $ref: '#/components/schemas/error.schema'
1027
+ description: Error
1028
+ security:
1029
+ - Bearer: []
1030
+ summary: Create or update webhook
1031
+ tags:
1032
+ - Webhooks
1033
+ summary: Webhooks
1034
+ /webhooks/{webhookId}:
1035
+ delete:
1036
+ description: Delete a webbhook.
1037
+ operationId: Webhook delete
1038
+ responses:
1039
+ '204':
1040
+ description: Deleted
1041
+ security:
1042
+ - Bearer: []
1043
+ summary: Delete webhook
1044
+ tags:
1045
+ - Webhooks
1046
+ description: Webhook.
1047
+ get:
1048
+ description: Get a webhook.
1049
+ operationId: Webhook get
1050
+ responses:
1051
+ '200':
1052
+ content:
1053
+ application/json:
1054
+ schema:
1055
+ properties:
1056
+ webhook:
1057
+ $ref: '#/components/schemas/webhook-read.schema'
1058
+ required:
1059
+ - webhook
1060
+ type: object
1061
+ description: Success
1062
+ summary: Get webhook
1063
+ tags:
1064
+ - Webhooks
1065
+ parameters:
1066
+ - $ref: '#/components/parameters/webhook-id.param'
1067
+ put:
1068
+ description: Update a webhook.
1069
+ operationId: Webhook update
1070
+ requestBody:
1071
+ content:
1072
+ application/json:
1073
+ schema:
1074
+ properties:
1075
+ webhook:
1076
+ $ref: '#/components/schemas/webhook-update.schema'
1077
+ required:
1078
+ - webbhook
1079
+ type: object
1080
+ required: true
1081
+ responses:
1082
+ '204':
1083
+ description: Success
1084
+ default:
1085
+ content:
1086
+ application/problem+json:
1087
+ schema:
1088
+ $ref: '#/components/schemas/error.schema'
1089
+ description: Error
1090
+ summary: Update webhook
1091
+ tags:
1092
+ - Webhooks
1093
+ summary: Webhook
1094
+ /webhooks/{webhookId}/replay:
1095
+ description: Webhook replay.
1096
+ parameters:
1097
+ - $ref: '#/components/parameters/webhook-id.param'
1098
+ post:
1099
+ description: Replay a webhook.
1100
+ operationId: Webhook replay
1101
+ requestBody:
1102
+ content:
1103
+ application/json:
1104
+ schema:
1105
+ properties:
1106
+ start:
1107
+ format: date-time
1108
+ type: string
1109
+ required:
1110
+ - start
1111
+ type: object
1112
+ required: true
1113
+ responses:
1114
+ '202':
1115
+ description: Success
1116
+ default:
1117
+ content:
1118
+ application/problem+json:
1119
+ schema:
1120
+ $ref: '#/components/schemas/error.schema'
1121
+ description: Error
1122
+ summary: Replay webhook
1123
+ tags:
1124
+ - Webhooks
1125
+ summary: Webhook replay
1126
+ servers:
1127
+ - url: https://api.getredo.com/v2.2
1128
+ webhooks:
1129
+ return:
1130
+ description: Return event webhook.
1131
+ post:
1132
+ operationId: Webhook return event
1133
+ requestBody:
1134
+ content:
1135
+ application/json:
1136
+ schema:
1137
+ description: Return event
1138
+ properties:
1139
+ at:
1140
+ description: Event time
1141
+ format: date-time
1142
+ title: At
1143
+ type: string
1144
+ order:
1145
+ $ref: '#/components/schemas/order-read.schema'
1146
+ description: Order for return.
1147
+ title: Order
1148
+ return:
1149
+ $ref: '#/components/schemas/return-read.schema'
1150
+ description: Return.
1151
+ title: Return
1152
+ type:
1153
+ description: Event type
1154
+ enum:
1155
+ - backfill
1156
+ - created
1157
+ - updated
1158
+ type: string
1159
+ type: object
1160
+ description: |
1161
+ Return event webhook.
1162
+
1163
+ <!-- theme: warning -->
1164
+ > #### Note
1165
+ >
1166
+ > This is not an actual Redo API endpoint, but a webhook.
1167
+ required: true
1168
+ responses:
1169
+ 2xx:
1170
+ description: Success. Return a 2xx status code to indicate success.
1171
+ default:
1172
+ description: Error. The event will be retried multiple times and then discarded.
1173
+ security:
1174
+ - UserBearer: []
1175
+ summary: Return event [Webhook]
1176
+ tags:
1177
+ - Returns
1178
+ summary: Return event [Webhook]