forked from mark-goody/api-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
goody-api-openapi.json
2811 lines (2811 loc) · 105 KB
/
goody-api-openapi.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"openapi": "3.0.1",
"info": {
"title": "Goody API",
"version": "1.0.0",
"contact": {
"name": "Goody Support",
"email": "[email protected]"
}
},
"components": {
"schemas": {
"Error": {
"type": "object",
"properties": {
"error": {
"type": "string"
}
},
"required": ["error"],
"x-stoplight": {
"id": "1vnjpuo83kmgq"
}
},
"ListMeta": {
"type": "object",
"properties": {
"total_count": {
"type": "integer",
"description": "The total number of items in this list."
}
},
"x-stoplight": {
"id": "jbdco7y0akl4y"
}
},
"OrderBatch": {
"type": "object",
"description": "An order batch is the primary resource created by the API. Order batches contain an array of orders.",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"send_status": {
"$ref": "#/components/schemas/OrderBatchSendStatus",
"description": "The `pending` status indicates that an order batch is being prepared to be sent out. If it is not scheduled, it is being sent asynchronously. If it is scheduled, it will stay in `pending` state until the scheduled time is reached, at which point it will be processed and moved to `complete`. When it is in `pending` status, no orders are created yet.\\n\\nWhen the order batch is in `complete` status, all orders are created and available."
},
"from_name": {
"type": "string",
"description": "The name of the sender. This is displayed on the order and notifications."
},
"message": {
"type": "string",
"nullable": true,
"description": "The message in this order batch, provided by the sender."
},
"orders_count": {
"type": "integer",
"description": "The total number of orders in this order batch. This might be blank if the order batch is scheduled for the future, or it could be fewer than the recipient count if the order batch is in the process of being sent."
},
"orders_preview": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Order"
},
"description": "A preview of the first 10 orders in this order batch. To paginate through all of the orders, use the `/order_batches/:id/orders` endpoint with `?page&per_page`. If your use case never sends more than 10 orders in a single batch, you can use this field instead of calling `/order_batches/:id/orders`. For order batches with more than 10 recipients, this array will be empty while the orders are asynchronously created in the background."
},
"recipients_count": {
"type": "integer",
"description": "The total number of recipients in this order batch."
},
"recipients_preview": {
"type": "array",
"items": {
"$ref": "#/components/schemas/OrderBatchRecipient"
},
"description": "A preview of the first 10 recipients in this order batch. To see all of the recipients, use `/order_batches/:id/recipients`. Recipients contain the original contact information provided for each recipient when the order batch was created."
},
"cart": {
"$ref": "#/components/schemas/Cart",
"description": "The cart that was sent for this order batch. This is the original cart that was created for this order batch. If individual orders were swapped, this still remains the same, whereas orders' `cart` would change if they were swapped."
},
"is_scheduled_send": {
"type": "boolean",
"description": "Whether this order batch was set up as a scheduled send. This stays as `true` after the scheduled send is complete. To determine if the order batch is scheduled to be sent for the future, check if `status` is `pending` and `scheduled_send_on` is in the future. When a order batch is scheduled, orders are only created on the scheduled send date."
},
"scheduled_send_on": {
"type": "string",
"format": "date-time",
"description": "The date and time the order batch is scheduled to be sent. This will be `null` if the order batch is not a scheduled send. This field remains after the scheduled send completes. ISO 8601, UTC.",
"nullable": true
},
"expires_at": {
"type": "string",
"format": "date-time",
"description": "The date and time the order batch is set to expire. ISO 8601, UTC.",
"nullable": true
},
"send_method": {
"$ref": "#/components/schemas/OrderBatchSendMethod",
"nullable": true
},
"batch_name": {
"type": "string",
"nullable": true,
"description": "An internal name for the order batch, falling back to an auto-generated batch name. Not displayed to recipients."
},
"card_id": {
"type": "string",
"format": "uuid",
"nullable": true,
"description": "The digital greeting card on this order batch."
},
"sender": {
"$ref": "#/components/schemas/Sender",
"description": "The sender of the order batch."
},
"workspace_id": {
"type": "string",
"format": "uuid",
"description": "Organizations are sub-divided into workspaces. Order batches are contained in workspaces, identified by this ID."
},
"workspace_name": {
"type": "string"
},
"reference_id": {
"type": "string",
"description": "The reference ID displayed on receipts and other locations as the ID for this order batch."
}
},
"required": [
"id",
"send_status",
"orders_preview",
"orders_count",
"cart",
"from_name",
"recipients_preview",
"recipients_count",
"sender",
"reference_id"
],
"x-stoplight": {
"id": "fquan1kp8um2b"
}
},
"Order": {
"type": "object",
"description": "An individual order contains the gift link to be sent to the recipient (if applicable) and other information about the order.",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"recipient_first_name": {
"type": "string"
},
"recipient_last_name": {
"type": "string",
"nullable": true
},
"recipient_email": {
"type": "string",
"nullable": true
},
"status": {
"$ref": "#/components/schemas/OrderStatus"
},
"individual_gift_link": {
"type": "string",
"description": "This gift link can be sent to the recipient or shared with the sender. For privacy reasons, this gift link does not display tracking information. A separate link, the recipient link, is sent directly to the recipient after they accept their gift, which does contain tracking information."
},
"cart": {
"$ref": "#/components/schemas/Cart",
"description": "The cart currently on this order. If the order is a gift that was swapped, `cart` displays the most recent products selected (i.e. post-swap)."
},
"shipments": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Shipment"
},
"description": "A list of the shipments for the order."
},
"workspace_id": {
"type": "string",
"format": "uuid",
"description": "Organizations are sub-divided into workspaces. Orders are contained in workspaces, identified by this ID."
},
"workspace_name": {
"type": "string",
"nullable": true
},
"expires_at": {
"type": "string",
"format": "date-time",
"description": "For gifts, the date and time the gift is set to expire.",
"nullable": true
},
"card_id": {
"type": "string",
"format": "uuid",
"nullable": true,
"description": "The digital greeting card on this gift."
},
"message": {
"type": "string",
"nullable": true,
"description": "The message in this gift, provided by the sender."
},
"thank_you_note": {
"type": "string",
"nullable": true,
"description": "A thank you note sent by the recipient."
},
"view_count_recipient": {
"type": "integer",
"description": "The number of times the recipient viewed the gift."
},
"is_swapped": {
"type": "boolean",
"description": "If this gift was swapped by the recipient. Swapping allows a recipient to select another product or products, which replaces the `cart`. The original products are saved to `original_cart`."
},
"order_batch_id": {
"type": "string",
"format": "uuid",
"description": "On Goody for Business, all orders are attached to a order batch, which is a collection of one or more orders."
},
"amounts": {
"type": "object",
"description": "Costs in USD cents (i.e. $1.00 = 100). If the order was swapped, `amounts` displays the most recent amounts (i.e. post-swap).",
"properties": {
"amount_product": {
"type": "integer",
"description": "Total cost of the products in this order."
},
"amount_shipping": {
"type": "integer",
"description": "Total cost of shipping for this order."
},
"amount_processing_fee": {
"type": "integer",
"nullable": true,
"description": "Total cost of processing fees for this order."
},
"amount_credit_applied": {
"type": "integer",
"nullable": true,
"description": "Total amount of credit applied to this order."
},
"amount_pre_tax_total": {
"type": "integer",
"description": "Total cost of the products, shipping, and processing fees in this order."
},
"amount_tax": {
"type": "integer",
"nullable": true,
"description": "Total tax for this order."
},
"amount_total": {
"type": "integer",
"nullable": true,
"description": "Total cost of the products, shipping, processing fees, tax, and global shipping costs in this order."
},
"amount_global_relay_cost": {
"type": "integer",
"nullable": true,
"description": "Total cost of global shipping for this order through the Global Relay service."
}
},
"required": [
"amount_product",
"amount_shipping",
"amount_pre_tax_total"
]
},
"event_times": {
"type": "object",
"description": "Only provided when calling the /orders/:id endpoint.",
"properties": {
"created_at": {
"type": "string",
"format": "date-time",
"description": "ISO 8601"
},
"notified_at": {
"type": "string",
"format": "date-time",
"description": "When the recipient was notified of the order.",
"nullable": true
},
"opened_at": {
"type": "string",
"format": "date-time",
"description": "For gifts, when the recipient opened the order.",
"nullable": true
},
"accepted_at": {
"type": "string",
"format": "date-time",
"description": "For gifts, when the recipient accepted the order.",
"nullable": true
},
"pending_payment_at": {
"type": "string",
"format": "date-time",
"description": "When the order entered pending payment status.",
"nullable": true
},
"paid_at": {
"type": "string",
"format": "date-time",
"description": "When the order was paid for.",
"nullable": true
},
"shipped_at": {
"type": "string",
"format": "date-time",
"description": "When the order was first shipped. If there are multiple shipments, this is when the first shipment shipped.",
"nullable": true
},
"delivered_at": {
"type": "string",
"format": "date-time",
"description": "When the order was delivered. If there are multiple shipments, this is when all shipments were delivered.",
"nullable": true
}
},
"required": ["created_at"],
"nullable": true
},
"original_cart": {
"$ref": "#/components/schemas/Cart",
"description": "If this order is a gift that was swapped, this displays the original cart that was sent to the recipient.",
"nullable": true
},
"original_amounts": {
"type": "object",
"description": "If this order is a gift that was swapped, this displays the original amounts of the cart that was sent to the recipient.",
"properties": {
"original_amount_product": {
"type": "integer",
"nullable": true
},
"original_amount_shipping": {
"type": "integer",
"nullable": true
},
"original_amount_credit_applied": {
"type": "integer",
"nullable": true
},
"original_amount_pre_tax_total": {
"type": "integer",
"nullable": true
}
},
"nullable": true
},
"sender": {
"$ref": "#/components/schemas/Sender",
"description": "The Goody user who sent this order."
},
"reference_id": {
"type": "string",
"description": "The reference ID displayed on receipts and other locations as the ID for this order."
}
},
"required": [
"id",
"recipient_first_name",
"status",
"individual_gift_link",
"cart",
"shipments",
"amounts",
"sender",
"reference_id"
],
"x-stoplight": {
"id": "fc2rz8bpoqar8"
}
},
"OrderBatchRecipient": {
"type": "object",
"properties": {
"first_name": {
"type": "string"
},
"last_name": {
"type": "string",
"nullable": true
},
"email": {
"type": "string",
"nullable": true
}
},
"required": ["first_name"],
"x-stoplight": {
"id": "evzfcymowpzg5"
}
},
"Cart": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CartItem"
}
}
},
"x-stoplight": {
"id": "2b560057ec486"
}
},
"CartItem": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"product": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string"
},
"brand": {
"type": "object",
"description": "The brand that this product is from.",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string"
}
},
"required": ["id", "name"]
}
},
"required": ["id", "name", "brand"]
},
"quantity": {
"type": "integer"
}
},
"required": ["id", "product", "quantity"],
"x-stoplight": {
"id": "8bea3259dbc00"
}
},
"OrderBatchSendStatus": {
"type": "string",
"enum": ["pending", "complete", "failed", "canceled"],
"x-stoplight": {
"id": "usnpbv5aarvmo"
}
},
"OrderStatus": {
"type": "string",
"enum": [
"created",
"notified",
"opened",
"accepted",
"pending_payment",
"paid",
"ordered",
"shipped",
"delivered",
"failed",
"canceled"
],
"x-stoplight": {
"id": "wmct5z8xjbpsf"
}
},
"Shipment": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"status": {
"type": "string",
"enum": [
"pending",
"tracking",
"shipped",
"delivered",
"delivered_override",
"failed",
"failed_unset_tracking",
"failed_with_reship"
]
},
"brand_name": {
"type": "string",
"description": "The name of the brand that this shipment is from."
},
"tracking_carrier": {
"type": "string",
"nullable": true,
"description": "The carrier for this shipment, e.g. UPS."
},
"tracking_number": {
"type": "string",
"nullable": true,
"description": "Only for approved distribution partners."
},
"shipped_at": {
"type": "string",
"format": "date-time",
"description": "ISO 8601",
"nullable": true
},
"delivered_at": {
"type": "string",
"format": "date-time",
"description": "ISO 8601",
"nullable": true
},
"delivery_eta": {
"type": "string",
"format": "date-time",
"description": "The estimated delivery time of this shipment.",
"nullable": true
}
},
"required": ["id", "status", "brand_name"],
"x-stoplight": {
"id": "45be4z89axulx"
}
},
"Product": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string"
},
"brand": {
"$ref": "#/components/schemas/Brand"
},
"subtitle": {
"type": "string",
"nullable": true,
"description": "A description of this product."
},
"subtitle_short": {
"type": "string",
"nullable": true,
"description": "An optional one-line description of this product. When provided, it overrides the subtitle when displayed in areas with less space. Not always provided."
},
"recipient_description": {
"type": "string",
"nullable": true,
"description": "An optional description of this product with custom verbiage for recipients. When provided, it overrides the subtitle for the product when displayed to the recipient. Falls back to the subtitle."
},
"variants_label": {
"type": "string",
"nullable": true,
"description": "The label for the variants of this product, e.g. \"Size\" or \"Color\"."
},
"variants_num_selectable": {
"type": "integer",
"nullable": true,
"description": "The number of variants that can be selected for this product. For example, if this is a t-shirt, then this would be 1, since you can only select one size. If this were a build-a-box of chocolates, this could be 3 if you could select 3 flavor variants."
},
"variants": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ProductVariant"
}
},
"images": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ProductImage"
}
},
"price": {
"type": "integer",
"description": "The price of the product, in cents."
},
"price_is_variable": {
"type": "boolean",
"description": "Whether the price of this product is variable. If true, then the price can be set by the sender."
},
"price_min": {
"type": "integer",
"nullable": true,
"description": "The minimum price of the product, in cents. Only used if price_is_variable is true."
},
"price_max": {
"type": "integer",
"nullable": true,
"description": "The maximum price of the product, in cents. Only used if price_is_variable is true."
},
"restricted_states": {
"type": "array",
"items": {
"type": "string",
"description": "The US states that this product cannot be shipped to."
}
},
"reserved_options": {
"type": "object",
"description": "For approved API partners only.",
"properties": {
"custom_price_tier": {
"type": "integer",
"nullable": true,
"description": "For approved API partners only. A custom price tier for this product."
}
}
}
},
"required": [
"id",
"name",
"brand",
"variants",
"images",
"price",
"price_is_variable",
"restricted_states"
],
"x-stoplight": {
"id": "g2fjxi7ifmy7e"
}
},
"Brand": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string"
},
"shipping_price": {
"type": "integer",
"description": "The price of shipping for this brand, in cents."
}
},
"required": ["id", "name", "shipping_price"],
"x-stoplight": {
"id": "ycfpkomuc0zo9"
}
},
"ProductImage": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"image_large": {
"$ref": "#/components/schemas/Image"
}
},
"required": ["id", "image_large"],
"x-stoplight": {
"id": "me363t5e82ly1"
}
},
"ProductVariant": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string"
},
"image_large": {
"$ref": "#/components/schemas/Image",
"nullable": true
},
"subtitle": {
"type": "string",
"nullable": true
}
},
"required": ["id", "name"],
"x-stoplight": {
"id": "hy5ra1nqn1nmr"
}
},
"Image": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"width": {
"type": "integer"
},
"height": {
"type": "integer"
}
},
"required": ["id", "large_url"],
"x-stoplight": {
"id": "5tzkqztx3cg3a"
}
},
"MailingAddress": {
"type": "object",
"properties": {
"first_name": {
"type": "string",
"nullable": true
},
"last_name": {
"type": "string",
"nullable": true
},
"address_1": {
"type": "string"
},
"address_2": {
"type": "string",
"nullable": true
},
"city": {
"type": "string"
},
"state": {
"type": "string"
},
"postal_code": {
"type": "string"
},
"country": {
"type": "string",
"nullable": true,
"description": "The two-letter country code, e.g. \"US\". Only US is supported at this time."
}
},
"required": ["address_1", "city", "state", "postal_code", "country"],
"x-stoplight": {
"id": "aqsjscxndamml"
}
},
"Me": {
"type": "object",
"properties": {
"email": {
"type": "string",
"nullable": true
},
"public_app_id": {
"type": "string",
"nullable": true
}
},
"x-stoplight": {
"id": "3e02549777e32"
}
},
"Sender": {
"type": "object",
"properties": {
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"email": {
"type": "string"
}
},
"required": ["first_name", "last_name", "email"]
},
"OrderBatchInput": {
"type": "object",
"description": "Input parameters for an order batch.",
"properties": {
"from_name": {
"type": "string",
"description": "The name of the sender of the order (typically a gift), to be displayed as \"from\"."
},
"message": {
"type": "string",
"description": "For gifts, a message for the gift to be displayed in the digital unwrapping and email notifications, if enabled."
},
"recipients": {
"type": "array",
"items": {
"$ref": "#/components/schemas/RecipientInput"
}
},
"cart": {
"$ref": "#/components/schemas/CartInput"
},
"send_method": {
"$ref": "#/components/schemas/OrderBatchSendMethod"
},
"card_id": {
"type": "string",
"format": "uuid",
"description": "The digital greeting card to attach to gifts. A card must be specified if a message is specified, since the message is displayed after the card is opened."
},
"payment_method_id": {
"type": "string",
"description": "The payment method used to pay for this order batch. If not specified, defaults to the first payment method on the account. If the account has no payment methods, then the order batch creation will fail."
},
"workspace_id": {
"type": "string",
"format": "uuid",
"description": "Workspace to create the order batch in. If not specified, creates the order batch in the oldest workspace the user has access to."
},
"scheduled_send_on": {
"type": "string",
"format": "date-time",
"description": "The date and time at which the order batch will be sent. If not specified, the order batch is sent immediately. If an order batch is scheduled to be sent in the future, then orders will not be created until the scheduled send time. ISO 8601 format.",
"nullable": true
},
"expires_at": {
"type": "string",
"format": "date-time",
"description": "The date and time at which the order batch will expire. If not specified, the order batch does not expire. An expiry must be set for orders paid using account balance. ISO 8601 format.",
"nullable": true
},
"reserved_options": {
"type": "object",
"description": "For approved API partners only.",
"properties": {
"custom_price_tier": {
"type": "integer",
"nullable": true,
"description": "For approved API partners only. A custom price tier to set on this order batch."
}
},
"nullable": true
}
},
"required": ["from_name", "recipients", "cart", "send_method"],
"x-stoplight": {
"id": "e5265bcbd93c6"
}
},
"CartInput": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CartItemInput"
},
"description": "An array of cart items."
}
},
"x-stoplight": {
"id": "8396da3a59ece"
}
},
"CartItemInput": {
"type": "object",
"properties": {
"product_id": {
"type": "string",
"format": "uuid"
},
"quantity": {
"type": "integer"
},
"variable_price": {
"type": "integer",
"description": "If this product has a variable price (e.g. a flex gift or a gift card), then this must be provided. A positive integer represented in cents."
}
},
"required": ["product_id", "quantity"],
"x-stoplight": {
"id": "d0386d3729b9c"
}
},
"OrderBatchSendMethod": {
"type": "string",
"enum": ["link_multiple_custom_list"],
"description": "The method for sending a order batch. Currently, the only supported send method is `link_multiple_custom_list` which specifies that a link should be created for each order, but no email should automatically be sent to the recipient.",
"x-stoplight": {
"id": "hh9befpaovmiv"
}
},
"RecipientInput": {
"type": "object",
"properties": {
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"email": {
"type": "string"
},
"mailing_address": {
"$ref": "#/components/schemas/MailingAddress",
"description": "Optional mailing address to pre-populate into the order. This field is only available for approved API partners."
}
},
"required": ["first_name"],
"x-stoplight": {
"id": "p1l0ggz26x65d"
}
}
},
"securitySchemes": {
"bearer": {
"type": "http",
"scheme": "bearer",
"description": "Your Goody user API key."
}
}
},
"servers": [
{
"url": "https://api.ongoody.com",
"description": "Production"
},
{
"url": "https://api.sandbox.ongoody.com",
"description": "Sandbox"
}
],
"paths": {
"/v1/me": {
"get": {
"summary": "Retrieve current user",
"tags": ["Me"],
"security": [
{
"bearer": []
}
],
"x-stoplight": {
"id": "d75b9884bf82f"
},
"responses": {
"200": {
"description": "Me retrieved",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Me"
}
}
}
},
"401": {
"description": "Failed to authorize",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/v1/order_batches": {
"post": {
"summary": "Create an order batch",
"tags": ["Order Batches"],
"security": [
{
"bearer": []
}
],
"x-stoplight": {
"id": "f34ff5fb2a13a"
},
"description": "Creates an order batch, which is the container for orders. An order batch can\nhave one or multiple recipients. Each recipient turns into an order. When\nsuccessful, returns the order batch.",
"parameters": [],
"responses": {