-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathapiary.apib
More file actions
3441 lines (2718 loc) · 142 KB
/
apiary.apib
File metadata and controls
3441 lines (2718 loc) · 142 KB
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
FORMAT: 1A
HOST: https://api.foreupsoftware.com/api_rest/index.php/
# foreUp API
Thank you for your interest in partnering with foreUP! Our API documentation requires approval by our Development team. Any and all requests must be submitted to partners@foreup.com. If you have any questions please feel free to contact us through the same email. We will be in touch!
The foreUp API can be used to access sales data, tee time usage, and other information from courses you have permission to access.
The responses follow the JSONapi spec, read about it here: http://jsonapi.org/.
They have several imeplementations for parsing responses here: http://jsonapi.org/implementations/.
# Group Secured Access
## Authentication [/tokens]
### Create a New Token [POST]
To authenticate with the api you must first create a JWT using your username/password. To learn more about JWT go here: https://jwt.io/.
+ Request (application/json)
{
"email": "testaccount@test.com",
"password": "testaccount@test.com"
}
+ Response 200 (application/json)
+ Body
{
"data": {
"type": "token",
"id": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE0NzQ5MjI5MzgsImV4cCI6MTQ3NzUxNDkzOCwibGV2ZWwiOjAsImNpZCI6MCwiZW1wbG95ZWUiOmZhbHNlLCJ1aWQiOjY0ODI3Mjh9.go-Bf_6X8qByMu9JblewsmQt1dsqOu_70z6IlYYaZgGbsvjf9uQI0-RFSEivALntv0HF6-6WN9T5FxLpGyxcNA",
"attributes": []
}
}
# Group Single Sign On
## Authentication [/tokens/validate/{token}]
### Validate a Recieved Token [GET]
**NOTE: You do not need to validate a token you've received from us via the "Create a New Token" endpoint since we are providing you the token directly.**
When a course access your app we'll send a JWT across. This JWT contains the course id, employee id, and employee email. The audience should be the url you gave us. You need to validate the token with us before accepting it as fact.
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE0OTQwMTU3NjAsImV4cCI6MTQ5NjYwNzc2MCwibGV2ZWwiOjEsImNpZCI6OTAzOSwiZW1wbG95ZWUiOmZhbHNlLCJ1aWQiOjcxNzk5MDUsImFwaVZlcnNpb24iOm51bGwsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGx9.ah0lO0-I-Vv2RhTEOJK9lAfURrTd88LqzdvxpkaVxJ_02zH4NOjuLl9F8fYVleU5cY6Mk5n-TgOK4tDwiKJBgg
+ Parameters
+ token : eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE0Nzc1OTUzOTYsImV4cCI6MTUwODY5OTM5NiwibGV2ZWwiOjEsImNpZCI6OTAzOSwiZW1wbG95ZWUiOnRydWUsInVpZCI6NTQ3ODY1MCwiZW1wSWQiOjU0Nzg2NTAsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGx9.lHiBf6aoIEbhDTBATMUrnO7oJIqsIm13Zl7zyIQoYKxeF0WBbL0oxk2AWxSy13hOQJVjI4pOMgT0p5u1majTag (string,required) -
+ Response 200 (application/json)
+ Body
{
"valid": true
}
# Group Courses
## Courses [/courses{?include}]
This endpoint will list all the courses which you have access too.
### List All[GET]
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE2MjczOTg3OTYsImV4cCI6MTYyOTk5MDc5NiwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOmZhbHNlLCJ1aWQiOjcxNzk5MDUsImFwaVZlcnNpb24iOm51bGwsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGx9.CufuQeilJIi2w428jScRfNelkx1h_rb-UBz1rg63pE6BKZfA2LWvf4v35xU_41m2aRuZCyUgwot70C-3k5IFTw
+ Parameters
+ include : teesheets (enum[string],optional) - Which relationships to include in the response. The hours a tee sheet can be booked, and the sides that belong to the tee sheet are automatically included when include=teesheets is added.
+ Members
+ `teesheets`
+ `teesheets.holes`
+ Response 200 (application/json)
+ Attributes
+ data (array[Courses])
## Sales [/courses/{courseId}/sales{?include,startDate,endDate,start,limit}]
### Get One [GET /courses/{courseId}/sales/{saleId}{?include}]
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE0Nzg5MDQxMDIsImV4cCI6MTUxMDAwODEwMiwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOnRydWUsInVpZCI6MTYzNywiZW1wSWQiOjE2MzcsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGx9.ooY5m1n3qurbJhkRzrviVPVailuKnLXbImHO8-y-p9ryejEpeE-IUrS_APJpAQcGTxY7YCQL_qhRgRbeSriW8A
+ Parameters
+ courseId : 9039 - A course id that the user has permission to access.
+ saleId : 24378234 (string) - A course id that the user has permission to access.
+ include : items (enum[string],optional) - Which relationships to include in response.
+ Members
+ `items`
+ `terminals`
+ `bookings`
+ `customer`
+ Response 200 (application/json)
+ Attributes
+ data (Sales)
### List All [GET]
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE0Nzg5MDQxMDIsImV4cCI6MTUxMDAwODEwMiwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOnRydWUsInVpZCI6MTYzNywiZW1wSWQiOjE2MzcsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGx9.ooY5m1n3qurbJhkRzrviVPVailuKnLXbImHO8-y-p9ryejEpeE-IUrS_APJpAQcGTxY7YCQL_qhRgRbeSriW8A
+ Parameters
+ courseId : 9039 - A course id that the user has permission to access.
+ limit: 10 (integer, optional)- Total results to show (Max: 100).
+ start: 0 (integer, optional)- Which result to start on.
+ startDate : `2016-07-06` (date,optional) - Must limit the sales returned to a single date.
+ endDate : `2016-07-08` (date,optional) - Must limit the sales returned to a single date.
+ include : items (enum[string],optional) - Which relationships to include in response.
+ Members
+ `items`
+ `terminals`
+ `bookings`
+ `customer`
+ Response 200 (application/json)
+ Attributes
+ data (array[Sales])
### Add Comment [PUT /courses/{courseId}/sales/{saleId}{?include}]
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE0Nzg5MDQxMDIsImV4cCI6MTUxMDAwODEwMiwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOnRydWUsInVpZCI6MTYzNywiZW1wSWQiOjE2MzcsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGx9.ooY5m1n3qurbJhkRzrviVPVailuKnLXbImHO8-y-p9ryejEpeE-IUrS_APJpAQcGTxY7YCQL_qhRgRbeSriW8A
+ Body
{
"data": {
"attributes": {
"comment": "Some comment to give context to the sale."
}
}
}
+ Parameters
+ courseId : 9039 - A course id that the user has permission to access.
+ saleId : 24378234 (string) - A course id that the user has permission to access.
+ include : items (enum[string],optional) - Which relationships to include in response.
+ Members
+ `items`
+ `terminals`
+ `bookings`
+ `customer`
+ Response 200 (application/json)
+ Attributes
+ data (Sales)
## Tee Sheets [/courses/{courseId}/teesheets{?include}]
### Get All [GET]
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE2MjczMjkzOTQsImV4cCI6MTYyOTkyMTM5NCwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOmZhbHNlLCJ1aWQiOjcxNzk5MDUsImFwaVZlcnNpb24iOm51bGwsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGx9.sj-lqjPhj4XINThrcisUiqnutt7AbNgH81YeTmgvoEFyBQPEa5H0--9m9FgLPcXcvJml66xyEmgGsCE44On0mQ
+ Parameters
+ courseId : 9039 - A course id that the user has permission to access.
+ include : `holes` (enum[string],optional) - Which relationships to include in response. Tee sheet sides will automatically be included in the response.
+ Members
+ `holes`
+ Response 200 (application/json)
+ Attributes
+ data (array[Tee Sheets])
## Terminals [/courses/{courseId}/terminals]
### Get All [GET]
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE0Nzg5MDQxMDIsImV4cCI6MTUxMDAwODEwMiwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOnRydWUsInVpZCI6MTYzNywiZW1wSWQiOjE2MzcsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGx9.ooY5m1n3qurbJhkRzrviVPVailuKnLXbImHO8-y-p9ryejEpeE-IUrS_APJpAQcGTxY7YCQL_qhRgRbeSriW8A
+ Parameters
+ courseId : 9039 - A course id that the user has permission to access.
+ Response 200 (application/json)
+ Attributes
+ data (array[Terminals])
## Price Classes [/courses/{courseId}/priceClasses]
### Get All [GET]
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE0Nzg5MDQxMDIsImV4cCI6MTUxMDAwODEwMiwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOnRydWUsInVpZCI6MTYzNywiZW1wSWQiOjE2MzcsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGx9.ooY5m1n3qurbJhkRzrviVPVailuKnLXbImHO8-y-p9ryejEpeE-IUrS_APJpAQcGTxY7YCQL_qhRgRbeSriW8A
+ Parameters
+ courseId : 9039 - A course id that the user has permission to access.
+ Response 200 (application/json)
+ Attributes
+ data (array[Price Class])
### Get One [GET /courses/{courseId}/priceClasses/{priceClassId}]
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE0Nzg5MDQxMDIsImV4cCI6MTUxMDAwODEwMiwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOnRydWUsInVpZCI6MTYzNywiZW1wSWQiOjE2MzcsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGx9.ooY5m1n3qurbJhkRzrviVPVailuKnLXbImHO8-y-p9ryejEpeE-IUrS_APJpAQcGTxY7YCQL_qhRgRbeSriW8A
+ Parameters
+ courseId : 9039 - A course id that the user has permission to access.
+ priceClassId : 5 - The price class ID
+ Response 200 (application/json)
+ Attributes
+ data (Price Class)
### Create [POST]
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE0Nzg5MDQxMDIsImV4cCI6MTUxMDAwODEwMiwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOnRydWUsInVpZCI6MTYzNywiZW1wSWQiOjE2MzcsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGx9.ooY5m1n3qurbJhkRzrviVPVailuKnLXbImHO8-y-p9ryejEpeE-IUrS_APJpAQcGTxY7YCQL_qhRgRbeSriW8A
+ Attributes
+ data (Price Class)
+ Parameters
+ courseId : 9039 - A course id that the user has permission to access.
+ Response 200 (application/json)
+ Attributes
+ data (Price Class)
### Update [PUT /courses/{courseId}/priceClasses/{priceClassId}]
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE0Nzg5MDQxMDIsImV4cCI6MTUxMDAwODEwMiwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOnRydWUsInVpZCI6MTYzNywiZW1wSWQiOjE2MzcsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGx9.ooY5m1n3qurbJhkRzrviVPVailuKnLXbImHO8-y-p9ryejEpeE-IUrS_APJpAQcGTxY7YCQL_qhRgRbeSriW8A
+ Attributes
+ data (Price Class)
+ Parameters
+ courseId : 9039 - A course id that the user has permission to access.
+ priceClassId : 5 - The price class ID
+ Response 200 (application/json)
+ Attributes
+ data (Price Class)
## Employees [/courses/{courseId}/employees{?include,start,limit}]
+ Model
+ Body
{
"data": [
{
"type": "employees",
"id": "5478650",
"attributes": {
"user_level": 1,
"position": "",
"username": "tnash1",
"activated": 1,
"last_login": {
"date": "2016-10-17 04:25:41.000000",
"timezone_type": 3,
"timezone": "America/Denver"
},
"contact_info": {
"id": 5478650,
"first_name": "Trevor",
"last_name": "nash",
"phone_number": "",
"cell_phone_number": "",
"email": "fake@fake.com",
"birthday": null,
"address_1": "",
"address_2": "",
"city": "",
"state": "",
"zip": "",
"country": "",
"comments": "",
}
}
}
]
}
### Get All [GET]
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE0Nzg5MDQxMDIsImV4cCI6MTUxMDAwODEwMiwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOnRydWUsInVpZCI6MTYzNywiZW1wSWQiOjE2MzcsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGx9.ooY5m1n3qurbJhkRzrviVPVailuKnLXbImHO8-y-p9ryejEpeE-IUrS_APJpAQcGTxY7YCQL_qhRgRbeSriW8A
+ Parameters
+ courseId : 9039 - A course id that the user has permission to access.
+ limit: 10 (integer, optional)- Total results to show (Max: 100).
+ start: 0 (integer, optional)- Which result to start on.
+ Response 200 (application/json)
[Employees][]
## Carts [/courses/{courseId}/carts/{cartId}]
### Create Cart [POST /courses/{courseId}/carts]
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE2NTA5MDYyNDAsImV4cCI6MTY1MzQ5ODI0MCwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOmZhbHNlLCJ1aWQiOjcxNzk5MDUsImFwaVZlcnNpb24iOm51bGwsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGwsImFwaXYySWQiOjEyMCwibGltaXRhdGlvbnMiOnsiY3VzdG9tZXJzIjp0cnVlLCJlbXBsb3llZXMiOnRydWUsImludmVudG9yeSI6dHJ1ZSwiaWRlbnRpdHlfcHJvdmlkZXIiOnRydWUsImVtYWlscyI6dHJ1ZSwic2FsZXMiOnRydWUsInRlZXNoZWV0Ijp0cnVlLCJ0cmFkaW5nX2VuYWJsZWQiOmZhbHNlLCJtYWdpY19hdXRoX3ZpYV9lbWFpbCI6ZmFsc2V9fQ.QLk1w1CyUBAp6raPCePWVbrxNpngrXTE8On5cbF1YzSIWZVKvz2nCIMKRLoScHl1AGbZvzG4pNtp47nulbf3NQ
+ Parameters
+ courseId : 9039 - A course id that the user has permission to access.
+ Response 200 (application/json)
+ Attributes
+ data (Carts)
### Get Cart [GET /courses/{courseId}/carts/{cartId}{?include}]
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE2NTA5MDYyNDAsImV4cCI6MTY1MzQ5ODI0MCwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOmZhbHNlLCJ1aWQiOjcxNzk5MDUsImFwaVZlcnNpb24iOm51bGwsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGwsImFwaXYySWQiOjEyMCwibGltaXRhdGlvbnMiOnsiY3VzdG9tZXJzIjp0cnVlLCJlbXBsb3llZXMiOnRydWUsImludmVudG9yeSI6dHJ1ZSwiaWRlbnRpdHlfcHJvdmlkZXIiOnRydWUsImVtYWlscyI6dHJ1ZSwic2FsZXMiOnRydWUsInRlZXNoZWV0Ijp0cnVlLCJ0cmFkaW5nX2VuYWJsZWQiOmZhbHNlLCJtYWdpY19hdXRoX3ZpYV9lbWFpbCI6ZmFsc2V9fQ.QLk1w1CyUBAp6raPCePWVbrxNpngrXTE8On5cbF1YzSIWZVKvz2nCIMKRLoScHl1AGbZvzG4pNtp47nulbf3NQ
+ Parameters
+ courseId : 9039 - A course id that the user has permission to access.
+ cartId : 38133556 (string)
+ include : `cartItems`,`cartItems.items` (enum[string],optional) - Which relationships to include in response.
+ Members
+ `cartItems`
+ `cartItems.items`
+ `customers`
+ Response 200 (application/json)
+ Attributes
+ data (Carts)
### Add Payment [POST /courses/{courseId}/carts/{cartId}/payments]
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE2NTA5MDYyNDAsImV4cCI6MTY1MzQ5ODI0MCwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOmZhbHNlLCJ1aWQiOjcxNzk5MDUsImFwaVZlcnNpb24iOm51bGwsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGwsImFwaXYySWQiOjEyMCwibGltaXRhdGlvbnMiOnsiY3VzdG9tZXJzIjp0cnVlLCJlbXBsb3llZXMiOnRydWUsImludmVudG9yeSI6dHJ1ZSwiaWRlbnRpdHlfcHJvdmlkZXIiOnRydWUsImVtYWlscyI6dHJ1ZSwic2FsZXMiOnRydWUsInRlZXNoZWV0Ijp0cnVlLCJ0cmFkaW5nX2VuYWJsZWQiOmZhbHNlLCJtYWdpY19hdXRoX3ZpYV9lbWFpbCI6ZmFsc2V9fQ.QLk1w1CyUBAp6raPCePWVbrxNpngrXTE8On5cbF1YzSIWZVKvz2nCIMKRLoScHl1AGbZvzG4pNtp47nulbf3NQ
+ Attributes
+ data (Cart Payment)
+ Parameters
+ courseId : 9039 - A course id that the user has permission to access.
+ cartId : 56 (string)
+ Response 200 (application/json)
+ Attributes
+ data (Carts)
### Add Customer [POST /courses/{courseId}/carts/{cartId}/customers]
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE2NTA5MDYyNDAsImV4cCI6MTY1MzQ5ODI0MCwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOmZhbHNlLCJ1aWQiOjcxNzk5MDUsImFwaVZlcnNpb24iOm51bGwsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGwsImFwaXYySWQiOjEyMCwibGltaXRhdGlvbnMiOnsiY3VzdG9tZXJzIjp0cnVlLCJlbXBsb3llZXMiOnRydWUsImludmVudG9yeSI6dHJ1ZSwiaWRlbnRpdHlfcHJvdmlkZXIiOnRydWUsImVtYWlscyI6dHJ1ZSwic2FsZXMiOnRydWUsInRlZXNoZWV0Ijp0cnVlLCJ0cmFkaW5nX2VuYWJsZWQiOmZhbHNlLCJtYWdpY19hdXRoX3ZpYV9lbWFpbCI6ZmFsc2V9fQ.QLk1w1CyUBAp6raPCePWVbrxNpngrXTE8On5cbF1YzSIWZVKvz2nCIMKRLoScHl1AGbZvzG4pNtp47nulbf3NQ
+ Attributes
+ data (Cart Customer)
+ Parameters
+ courseId : 9039 - A course id that the user has permission to access.
+ cartId : 56 (string)
+ Response 200 (application/json)
+ Attributes
+ data (Carts)
### Suspend Cart [PUT /courses/{courseId}/carts/{cartId}/suspend]
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE2NTA5MDYyNDAsImV4cCI6MTY1MzQ5ODI0MCwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOmZhbHNlLCJ1aWQiOjcxNzk5MDUsImFwaVZlcnNpb24iOm51bGwsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGwsImFwaXYySWQiOjEyMCwibGltaXRhdGlvbnMiOnsiY3VzdG9tZXJzIjp0cnVlLCJlbXBsb3llZXMiOnRydWUsImludmVudG9yeSI6dHJ1ZSwiaWRlbnRpdHlfcHJvdmlkZXIiOnRydWUsImVtYWlscyI6dHJ1ZSwic2FsZXMiOnRydWUsInRlZXNoZWV0Ijp0cnVlLCJ0cmFkaW5nX2VuYWJsZWQiOmZhbHNlLCJtYWdpY19hdXRoX3ZpYV9lbWFpbCI6ZmFsc2V9fQ.QLk1w1CyUBAp6raPCePWVbrxNpngrXTE8On5cbF1YzSIWZVKvz2nCIMKRLoScHl1AGbZvzG4pNtp47nulbf3NQ
+ Attributes
+ data (Carts Suspend)
+ Parameters
+ courseId : 9039 - A course id that the user has permission to access.
+ cartId : 56 (string)
+ Response 200 (application/json)
+ Attributes
+ data (Carts)
### Complete Cart [PUT]
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE2NTA5MDYyNDAsImV4cCI6MTY1MzQ5ODI0MCwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOmZhbHNlLCJ1aWQiOjcxNzk5MDUsImFwaVZlcnNpb24iOm51bGwsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGwsImFwaXYySWQiOjEyMCwibGltaXRhdGlvbnMiOnsiY3VzdG9tZXJzIjp0cnVlLCJlbXBsb3llZXMiOnRydWUsImludmVudG9yeSI6dHJ1ZSwiaWRlbnRpdHlfcHJvdmlkZXIiOnRydWUsImVtYWlscyI6dHJ1ZSwic2FsZXMiOnRydWUsInRlZXNoZWV0Ijp0cnVlLCJ0cmFkaW5nX2VuYWJsZWQiOmZhbHNlLCJtYWdpY19hdXRoX3ZpYV9lbWFpbCI6ZmFsc2V9fQ.QLk1w1CyUBAp6raPCePWVbrxNpngrXTE8On5cbF1YzSIWZVKvz2nCIMKRLoScHl1AGbZvzG4pNtp47nulbf3NQ
+ Attributes
+ data (Carts Complete)
+ Parameters
+ courseId : 9039 - A course id that the user has permission to access.
+ cartId : 56 (string)
+ Response 200 (application/json)
+ Attributes
+ data (Sales)
## Cart Items [/courses/{courseId}/carts/{cartId}/items]
### Delete Line Item [DELETE /courses/{courseId}/carts/{cartId}/items/{line}]
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE0Nzg5MDQxMDIsImV4cCI6MTUxMDAwODEwMiwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOnRydWUsInVpZCI6MTYzNywiZW1wSWQiOjE2MzcsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGx9.ooY5m1n3qurbJhkRzrviVPVailuKnLXbImHO8-y-p9ryejEpeE-IUrS_APJpAQcGTxY7YCQL_qhRgRbeSriW8A
+ Parameters
+ courseId : 9039 - A course id that the user has permission to access.
+ cartId : 38133556 (string)
+ line : 1 (string)
+ Response 200 (application/json)
+ Attributes
+ data (Cart Items)
### Update Line Item [PUT /courses/{courseId}/carts/{cartId}/items/{line}]
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE0Nzg5MDQxMDIsImV4cCI6MTUxMDAwODEwMiwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOnRydWUsInVpZCI6MTYzNywiZW1wSWQiOjE2MzcsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGx9.ooY5m1n3qurbJhkRzrviVPVailuKnLXbImHO8-y-p9ryejEpeE-IUrS_APJpAQcGTxY7YCQL_qhRgRbeSriW8A
+ Attributes
+ data (Cart Items)
+ Parameters
+ courseId : 9039 - A course id that the user has permission to access.
+ cartId : 38133556 (string)
+ line : 1 (string)
+ Response 200 (application/json)
+ Attributes
+ data (Cart Items)
### Add Line Item [POST /courses/{courseId}/carts/{cartId}/items]
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE0Nzg5MDQxMDIsImV4cCI6MTUxMDAwODEwMiwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOnRydWUsInVpZCI6MTYzNywiZW1wSWQiOjE2MzcsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGx9.ooY5m1n3qurbJhkRzrviVPVailuKnLXbImHO8-y-p9ryejEpeE-IUrS_APJpAQcGTxY7YCQL_qhRgRbeSriW8A
+ Attributes
+ data (Cart Items)
+ Parameters
+ courseId : 9039 - A course id that the user has permission to access.
+ cartId : 38133556 (string)
+ Response 200 (application/json)
+ Attributes
+ data (Cart Items)
# Group Tee Sheets
Foreup is currently in the process of a major architectural overhaul of our tee sheet functionality. Our old tee sheet only allowed
users to create tee sheets with two sides which only supported up to an 18 hole setup. Our revamped tee sheet theoretically supports
any number of sides/holes, but is currently artificially capped at 6 sides or 54 holes.
There are several changes to the API when a facility is switched to our revamped tee sheet. Facilities that are considered to have a 27+ hole
course setup will be changing drastically. In the old tee sheet these facilities had to be setup with multiple tee sheets as a work around
for having more than 18 holes. A side effect of this is that these facilities could have integrations book times on almost all sides
even though our api at the time only allowed booking on the front side. When these facilities are moved over to our revamped tee sheet
their setup is changed so they only have a single tee sheet. In order to keep equivalent functionality in the API we have built out
support to book tee times on any side if the facility is using our revamped tee sheet. This applies to any size tee sheet so although
for 18 hole courses your integration doesn't need to change much if you want to take advantage of back 9 booking you'll want to update
your integration.
All endpoints that pertain to tee times and available tee time slots will now return a new attribute called teeSheetSideId or
scheduleSideId. These two fields represent the same thing. All tee sheets now have a collection of sides with information
like side name, order(order side is displayed in), and id. When you use the tee sheet endpoint to pull all of a facilities tee sheets
this info is automatically included if the facility is using our revamped tee sheet.
The final change on our revamped tee sheet has to do with allowed group sizes. On the old tee sheet you could only set a minimum
and maximum group size and any value in between was allowed. So if the min was 2 and the max was 5 a golfer could book if their group had
2, 3, 4, or 5 players in it. The revamped tee sheet changes this to allow more granular restrictions. You can now specifically specify
any group size you want to allow. For example it is now possible to say you only want to allow groups of 2 or 4. In this scenario groups
of 1, 3, and 5 would not be allowed. The tee time slots endpoint will return an 'allowedGroupSizes' array with this information in it.
To help in identifying what facilities are using our revamped tee sheet we've added an attribute to the courses endpoint called
'tee_sheet_version'. If the value is set to '2.0.0' or higher then they are on our revamped tee sheet and will require passing a
teeSheetSideId to many endpoints to take advantage of any new functionality introduced by the revamped tee sheet. If they are still on
our old tee sheet 'tee_sheet_version' will be set to '1.0.0'
## Tee Time Slots [/courses/{courseId}/teesheets/{teesheetId}/teetimes{?startTime,endTime,date,customerId,priceClassId,holes,bookingClassId,scheduleSideId}]
Each slot can have multiple bookings totalling up to 4 players.
### Get All [GET ]
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE2NTgzMzg0NjIsImV4cCI6MTY2MDkzMDQ2MiwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOmZhbHNlLCJ1aWQiOjcxNzk5MDUsImFwaVZlcnNpb24iOm51bGwsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGwsImFwaXYySWQiOjEyMCwibGltaXRhdGlvbnMiOnsiY3VzdG9tZXJzIjp0cnVlLCJlbXBsb3llZXMiOnRydWUsImludmVudG9yeSI6dHJ1ZSwiaWRlbnRpdHlfcHJvdmlkZXIiOnRydWUsImVtYWlscyI6dHJ1ZSwic2FsZXMiOnRydWUsInRlZXNoZWV0Ijp0cnVlLCJ0cmFkaW5nX2VuYWJsZWQiOmZhbHNlLCJtYWdpY19hdXRoX3ZpYV9lbWFpbCI6ZmFsc2V9fQ.JYeQ3501mR0bJNjYLRKzCA3mbZJEdmHQl2Kngp3zg4jhHMLSlh1nuj6IGWb7nIWAtbUl1i1_IoYt7qTBRI8nxA
+ Parameters
+ courseId : 9039 - A course id that the user has permission to access.
+ teesheetId : 2192 (integer) - A tee sheet id that the user has permission to access.
+ startTime : `0800` (string,required) - Find tee times starting with this time.
+ endTime : `1500` (string,required) - Find tee times up to this time.
+ date : `2022-07-21`,`sales` (string,required) - Date of tee time slots
+ bookingClassId : 1 (integer,optional) - View tee times using a booking class id
+ customerId: 9039 (integer,optional) - Show pricing in regards to a customer
+ priceClassId: 3 (integer,optional) - Show pricing with the given price class id.
+ holes: `Both` (integer | string,optional) - Show availability for 9 holes, 18 holes, or Both. This value defaults to 18 if omitted from the request.
+ scheduleSideId: 4979 (integer | string,optional) - This parameter will do nothing if the course is not using our revamped tee sheet. Filters slots by a specific side. If no side id is specified the endpoint will return time slots for ONLY the first side of the tee sheet. If you would like to get ALL slots at once pass the option "all" instead of a side id.
+ Response 200 (application/json)
+ Attributes
+ data (array[Tee Time Slot]
## Booked Players [/courses/{courseId}/teesheets/{teesheetId}/bookings/{bookingId}/bookedPlayers/{bookedPlayerId}]
Each booking has 5 available spots. These spots are "Booked Players". A booked player can be linked to an actual customer in the crm or given just a title like "Guest." Each player can be assigned a unique price class.
#### Example
A member books a time for him and two of his buddies. The system should create one booking, for 3 players. The first booked player will be linked to his unique customer id and should be assigned the "member" price class. The other two spots should be labeled as "Guest" and be assigned the "Public" price class.
[](http://i.imgur.com/XGhPw6W.png)
### Update [PUT]
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE0Nzg5MDQxMDIsImV4cCI6MTUxMDAwODEwMiwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOnRydWUsInVpZCI6MTYzNywiZW1wSWQiOjE2MzcsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGx9.ooY5m1n3qurbJhkRzrviVPVailuKnLXbImHO8-y-p9ryejEpeE-IUrS_APJpAQcGTxY7YCQL_qhRgRbeSriW8A
+ Attributes
+ data (Booked Player)
+ Parameters
+ courseId : 9039 - A course id that the user has permission to access.
+ teesheetId : 1530 (string) - A tee sheet id that the user has permission to access.
+ bookingId : TTID_0929103348mnhfo (string) - A tee sheet id that the user has permission to access.
+ bookedPlayerId : `TTID_0929103348mnhfo-1` (string) - Booking position unique id
+ Response 200 (application/json)
+ Attributes
+ data (Booked Player)
## Bookings [/courses/{courseId}/teesheets/{teesheetId}/bookings{?include,startDate,endDate,start,limit}]
Bookings don't contain any pricing information and are purely the bookings on a teesheet.
To get pricing information from a booking that's already been paid for you must include the sales relationship. The sales object will include the customer information, payment details, and item details.
### Get One [GET /courses/{courseId}/teesheets/{teesheetId}/bookings/{bookingId}{?include}]
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE0Nzg5MDQxMDIsImV4cCI6MTUxMDAwODEwMiwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOnRydWUsInVpZCI6MTYzNywiZW1wSWQiOjE2MzcsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGx9.ooY5m1n3qurbJhkRzrviVPVailuKnLXbImHO8-y-p9ryejEpeE-IUrS_APJpAQcGTxY7YCQL_qhRgRbeSriW8A
+ Parameters
+ courseId : 9039 - A course id that the user has permission to access.
+ teesheetId : 2192 (string) - A tee sheet id that the user has permission to access.
+ bookingId : TTID_1018142720xb6jt (string) - A tee sheet id that the user has permission to access.
+ include : `players`,`sales` (enum[string],optional) - Which relationships to include in response.
+ Members
+ `players`
+ `sales`
+ `sales.items`
+ `bookedPlayers`
+ `bookedPlayers.people`
+ `bookedPlayers.priceClasses`
+ Response 200 (application/json)
+ Attributes
+ data (Bookings)
### Update [PUT /courses/{courseId}/teesheets/{teesheetId}/bookings/{bookingId}{?include}]
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE0Nzg5MDQxMDIsImV4cCI6MTUxMDAwODEwMiwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOnRydWUsInVpZCI6MTYzNywiZW1wSWQiOjE2MzcsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGx9.ooY5m1n3qurbJhkRzrviVPVailuKnLXbImHO8-y-p9ryejEpeE-IUrS_APJpAQcGTxY7YCQL_qhRgRbeSriW8A
+ Attributes
+ data (Bookings)
+ Parameters
+ courseId : 9039 - A course id that the user has permission to access.
+ teesheetId : 1530 (string) - A tee sheet id that the user has permission to access.
+ bookingId : TTID_0929103348mnhfo (string) - A tee sheet id that the user has permission to access.
+ Response 200 (application/json)
+ Attributes
+ data (Bookings)
### Get Pricing [GET /courses/{courseId}/teesheets/{teesheetId}/bookings/{bookingId}/pricing]
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE0Nzg5MDQxMDIsImV4cCI6MTUxMDAwODEwMiwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOnRydWUsInVpZCI6MTYzNywiZW1wSWQiOjE2MzcsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGx9.ooY5m1n3qurbJhkRzrviVPVailuKnLXbImHO8-y-p9ryejEpeE-IUrS_APJpAQcGTxY7YCQL_qhRgRbeSriW8A
+ Parameters
+ courseId : 9039 - A course id that the user has permission to access.
+ bookingId : TTID_1018142720xb6jt (string)
+ teesheetId : 2192 (integer) - A tee sheet id that the user has permission to access.
+ Response 200 (application/json)
+ Attributes
+ data (array[Booking Pricing]
### Create One [POST /courses/{courseId}/teesheets/{teesheetId}/bookings]
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE0Nzg5MDQxMDIsImV4cCI6MTUxMDAwODEwMiwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOnRydWUsInVpZCI6MTYzNywiZW1wSWQiOjE2MzcsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGx9.ooY5m1n3qurbJhkRzrviVPVailuKnLXbImHO8-y-p9ryejEpeE-IUrS_APJpAQcGTxY7YCQL_qhRgRbeSriW8A
+ Attributes
+ data (Bookings Creation)
+ Parameters
+ courseId : 9039 - A course id that the user has permission to access.
+ teesheetId : 2192 (string) - A tee sheet id that the user has permission to access.
+ Response 200 (application/json)
+ Attributes
+ data (Bookings)
### Delete One [DELETE /courses/{courseId}/teesheets/{teesheetId}/bookings/{bookingId}]
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE0Nzg5MDQxMDIsImV4cCI6MTUxMDAwODEwMiwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOnRydWUsInVpZCI6MTYzNywiZW1wSWQiOjE2MzcsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGx9.ooY5m1n3qurbJhkRzrviVPVailuKnLXbImHO8-y-p9ryejEpeE-IUrS_APJpAQcGTxY7YCQL_qhRgRbeSriW8A
+ Parameters
+ courseId : 9039 - A course id that the user has permission to access.
+ teesheetId : 2192 (string) - A tee sheet id that the user has permission to access.
+ bookingId : TTID_1018142720xb6jt (string) - A booking id that the user has permission to access.
+ Response 200 (application/json)
+ Attributes
+ data (Bookings)
### Check In [POST /courses/{courseId}/teesheets/{teesheetId}/bookings/{bookingId}/checkIn]
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE0Nzg5MDQxMDIsImV4cCI6MTUxMDAwODEwMiwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOnRydWUsInVpZCI6MTYzNywiZW1wSWQiOjE2MzcsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGx9.ooY5m1n3qurbJhkRzrviVPVailuKnLXbImHO8-y-p9ryejEpeE-IUrS_APJpAQcGTxY7YCQL_qhRgRbeSriW8A
+ Attributes
+ data (Check In)
+ Parameters
+ courseId : 9039 - A course id that the user has permission to access.
+ bookingId : TTID_1018142720xb6jt (string)
+ teesheetId : 2192 (integer) - A tee sheet id that the user has permission to access.
+ Response 200 (application/json)
+ Attributes
+ data (Carts)
### Override Pricing [POST /courses/{courseId}/teesheets/{teesheetId}/bookings/{bookingId}/priceOverride]
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE0Nzg5MDQxMDIsImV4cCI6MTUxMDAwODEwMiwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOnRydWUsInVpZCI6MTYzNywiZW1wSWQiOjE2MzcsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGx9.ooY5m1n3qurbJhkRzrviVPVailuKnLXbImHO8-y-p9ryejEpeE-IUrS_APJpAQcGTxY7YCQL_qhRgRbeSriW8A
+ Attributes
+ data (Price Override)
+ Parameters
+ courseId : 9039 - A course id that the user has permission to access.
+ bookingId : TTID_1018142720xb6jt (string)
+ teesheetId : 2192 (integer) - A tee sheet id that the user has permission to access.
+ Response 200 (application/json)
+ Attributes
+ data (Price Override)
### Get All [GET]
###How should I distinguish green fees from other item?
Green fees and carts will have a category of "Green Fees" and "Carts" respectively. The department can be customized but a course can't adjust the category.
###Is it possible to include players and sales.items at the same time ?
Yes, add this to your query: include=players,sales,sales.items
###How do you identify the booking type? (Customer, Member, Public, etc)
The sales_items object containes an attribute "PriceClass" that designates the green fee type.
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE0Nzg5MDQxMDIsImV4cCI6MTUxMDAwODEwMiwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOnRydWUsInVpZCI6MTYzNywiZW1wSWQiOjE2MzcsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGx9.ooY5m1n3qurbJhkRzrviVPVailuKnLXbImHO8-y-p9ryejEpeE-IUrS_APJpAQcGTxY7YCQL_qhRgRbeSriW8A
+ Parameters
+ courseId : 9039 - A course id that the user has permission to access.
+ teesheetId : 1530 (integer) - A tee sheet id that the user has permission to access.
+ limit: 10 (integer, optional)- Total results to show (Max: 100).
+ start: 0 (integer, optional)- Which result to start on.
+ startDate : `2016-09-29` (date,optional) - Must limit the sales returned to a single date.
+ endDate : `2016-09-30` (date,optional) - Must limit the sales returned to a single date.
+ include : `players`,`sales` (enum[string],optional) - Which relationships to include in response.
+ Members
+ `players`
+ `sales`
+ `sales.items`
+ `bookedPlayers`
+ `bookedPlayers.people`
+ `bookedPlayers.priceClasses`
+ Response 200 (application/json)
+ Attributes
+ data (array[Bookings]
## Booking Classes / Reservation Groups [/courses/{courseId}/teesheets/{teesheetId}/reservationGroups]
### Get All [GET]
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE0Nzg5MDQxMDIsImV4cCI6MTUxMDAwODEwMiwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOnRydWUsInVpZCI6MTYzNywiZW1wSWQiOjE2MzcsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGx9.ooY5m1n3qurbJhkRzrviVPVailuKnLXbImHO8-y-p9ryejEpeE-IUrS_APJpAQcGTxY7YCQL_qhRgRbeSriW8A
+ Parameters
+ courseId : 9039 - A course id that the user has permission to access.
+ teesheetId : 2192 (integer) - A tee sheet id that the user has permission to access.
+ Response 200 (application/json)
+ Attributes
+ data (array[BookingClass]
## Specials [/courses/{courseId}/teesheets/{teesheetId}/specials]
### Get All [GET]
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE0Nzg5MDQxMDIsImV4cCI6MTUxMDAwODEwMiwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOnRydWUsInVpZCI6MTYzNywiZW1wSWQiOjE2MzcsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGx9.ooY5m1n3qurbJhkRzrviVPVailuKnLXbImHO8-y-p9ryejEpeE-IUrS_APJpAQcGTxY7YCQL_qhRgRbeSriW8A
+ Parameters
+ courseId : 9039 - A course id that the user has permission to access.
+ teesheetId : 2192 (integer) - A tee sheet id that the user has permission to access.
+ Response 200 (application/json)
+ Attributes
+ data (array[Special]
### Get One [GET /courses/{courseId}/teesheets/{teesheetId}/specials/{specialId}]
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE0Nzg5MDQxMDIsImV4cCI6MTUxMDAwODEwMiwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOnRydWUsInVpZCI6MTYzNywiZW1wSWQiOjE2MzcsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGx9.ooY5m1n3qurbJhkRzrviVPVailuKnLXbImHO8-y-p9ryejEpeE-IUrS_APJpAQcGTxY7YCQL_qhRgRbeSriW8A
+ Parameters
+ courseId : 9039 - A course id that the user has permission to access.
+ teesheetId : 2192 (integer) - A tee sheet id that the user has permission to access.
+ specialId: 5134 (integer)
+ Response 200 (application/json)
+ Attributes
+ data (array[Special]
### Update [PUT /courses/{courseId}/teesheets/{teesheetId}/specials/{specialId}]
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE0Nzg5MDQxMDIsImV4cCI6MTUxMDAwODEwMiwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOnRydWUsInVpZCI6MTYzNywiZW1wSWQiOjE2MzcsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGx9.ooY5m1n3qurbJhkRzrviVPVailuKnLXbImHO8-y-p9ryejEpeE-IUrS_APJpAQcGTxY7YCQL_qhRgRbeSriW8A
+ Attributes
+ data (Special)
+ Parameters
+ courseId : 9039 - A course id that the user has permission to access.
+ teesheetId : 2192 (integer) - A tee sheet id that the user has permission to access.
+ specialId: 5134 (integer)
+ Response 200 (application/json)
+ Attributes
+ data (array[Special]
### Create [POST]
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE0Nzg5MDQxMDIsImV4cCI6MTUxMDAwODEwMiwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOnRydWUsInVpZCI6MTYzNywiZW1wSWQiOjE2MzcsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGx9.ooY5m1n3qurbJhkRzrviVPVailuKnLXbImHO8-y-p9ryejEpeE-IUrS_APJpAQcGTxY7YCQL_qhRgRbeSriW8A
+ Attributes
+ data (Special)
+ Parameters
+ courseId : 9039 - A course id that the user has permission to access.
+ teesheetId : 2192 (integer) - A tee sheet id that the user has permission to access.
+ Response 200 (application/json)
+ Attributes
+ data (array[Special]
## Stats [/courses/{courseId}/teesheets/{teesheetId}/stats{?date,start,end}]
### Get All [GET]
This endpoint is limited to a maximum of one day. Occupancy is calculated by the number of slots available to potential slots. It's possible to have a single booking for 1 person be stretched across multiple slots.
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE0Nzg5MDQxMDIsImV4cCI6MTUxMDAwODEwMiwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOnRydWUsInVpZCI6MTYzNywiZW1wSWQiOjE2MzcsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGx9.ooY5m1n3qurbJhkRzrviVPVailuKnLXbImHO8-y-p9ryejEpeE-IUrS_APJpAQcGTxY7YCQL_qhRgRbeSriW8A
+ Parameters
+ courseId : 9039 - A course id that the user has permission to access.
+ teesheetId : 2192 (integer) - A tee sheet id that the user has permission to access.
+ date : `2016-05-19` (date,optional) - Must limit the stats returned to a single date.
+ start : `2016-05-19T00:00` (date,optional)
+ end : `2016-05-19T23:00` (date,optional)
+ Response 200 (application/json)
{
"data": {
"type": "teesheet_stats",
"id": "2016-09-28",
"attributes": {
"bookings": 1,
"occupancy": 0.003,
"playerNoShows": 1,
"playersCheckedIn": 0,
"revenue": 486.30,
"potential_slots":100,
"slots_available":0
}
}
}
## Trades [/courses/{courseId}/teesheets/{teesheetId}/tradesAvailable/{date}]
### Get [GET]
This endpoint is limited to a single date. You must first be authorized to participate in selling trades in order to successfully get trade information. The response (for an authorized user) shows how many trades are available for sale for a specific teesheet on a given day.
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE0Nzg5MDQxMDIsImV4cCI6MTUxMDAwODEwMiwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOnRydWUsInVpZCI6MTYzNywiZW1wSWQiOjE2MzcsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGx9.ooY5m1n3qurbJhkRzrviVPVailuKnLXbImHO8-y-p9ryejEpeE-IUrS_APJpAQcGTxY7YCQL_qhRgRbeSriW8A
+ Parameters
+ courseId : 9039 - A course id that the user has permission to access.
+ teesheetId : 2192 (integer) - A tee sheet id that the user has permission to access.
+ date : `2016-05-19` (date) - Must limit the trades returned to a single date.
+ Response 200 (application/json)
{
"data": {
"type": "trade",
"id": "1",
"attributes": {
"tradesAvailable": 0
}
}
}
### Create [POST /courses/{courseId}/teesheets/{teesheetId}/bookings]
This endpoint is nearly identical to creating a booking as laid out in the documentation above. In order to properly create a trade, your user must be authorized. Otherwise, the trade will not be created an error message will be returned. You will not be credited for the trade unless your user is authorized to participate in trades.
Please note the additional 3 key/value pairs required to successfully book a trade (`isTrade`, `amountCharged`, & `tax`). If any of those three argumentsare missing, an error message will be returned.
+ Request (application/json)
+ Headers
x-authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJhdWQiOiJmb3JldXBzb2Z0d2FyZS5jb20iLCJpYXQiOjE0Nzg5MDQxMDIsImV4cCI6MTUxMDAwODEwMiwibGV2ZWwiOjMsImNpZCI6OTAzOSwiZW1wbG95ZWUiOnRydWUsInVpZCI6MTYzNywiZW1wSWQiOjE2MzcsImFwcElkIjo2NDgyNzI4LCJwcmljZUNsYXNzSWQiOm51bGx9.ooY5m1n3qurbJhkRzrviVPVailuKnLXbImHO8-y-p9ryejEpeE-IUrS_APJpAQcGTxY7YCQL_qhRgRbeSriW8A
+ Attributes
+ data (Trade Creation)
+ Parameters
+ courseId : 9039 - A course id that the user has permission to access.
+ teesheetId : 2192 (string) - A tee sheet id that the user has permission to access.
+ Response 200 (application/json)
+ Attributes
+ data (Trades)
# Group Tee Time Pricing
Tee time pricing is extremely flexible. There are three important parts to tee time pricing.
- Price Clases
* A course can have as many price classes as they want. These are essentially customer categories such as member, guest, senior, junior, etc
- Season
* This is a date range such as, winter, summer, august, etc.
- Time Frames
* Each season can have multiple time frames. Time frames are a time range, examples include twilight, afternoon, evening, etc.
* Time Frames contain the price, there is a default time frame for each price class / season.
[](https://s3-us-west-2.amazonaws.com/foreup.course.images/Blank+Diagram+-+Page+1.png)
# New Bulk Endpoints
We are excited to release changes to our tee time pricing endpoints to allow for bulk creation and updating. These changes should significantly reduce the load on our servers and make managing your pricing more efficient.