-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi.html
More file actions
911 lines (880 loc) · 94.7 KB
/
api.html
File metadata and controls
911 lines (880 loc) · 94.7 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
<!DOCTYPE html><html><head><meta charset="utf-8"><title>Workshop Butler API</title><link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"><style>@import url('https://fonts.googleapis.com/css?family=Roboto:400,700|Inconsolata|Raleway:200');.hljs-comment,.hljs-title{color:#8e908c}.hljs-variable,.hljs-attribute,.hljs-tag,.hljs-regexp,.ruby .hljs-constant,.xml .hljs-tag .hljs-title,.xml .hljs-pi,.xml .hljs-doctype,.html .hljs-doctype,.css .hljs-id,.css .hljs-class,.css .hljs-pseudo{color:#c82829}.hljs-number,.hljs-preprocessor,.hljs-pragma,.hljs-built_in,.hljs-literal,.hljs-params,.hljs-constant{color:#f5871f}.ruby .hljs-class .hljs-title,.css .hljs-rules .hljs-attribute{color:#eab700}.hljs-string,.hljs-value,.hljs-inheritance,.hljs-header,.ruby .hljs-symbol,.xml .hljs-cdata{color:#718c00}.css .hljs-hexcolor{color:#3e999f}.hljs-function,.python .hljs-decorator,.python .hljs-title,.ruby .hljs-function .hljs-title,.ruby .hljs-title .hljs-keyword,.perl .hljs-sub,.javascript .hljs-title,.coffeescript .hljs-title{color:#4271ae}.hljs-keyword,.javascript .hljs-function{color:#8959a8}.hljs{display:block;background:white;color:#4d4d4c;padding:.5em}.coffeescript .javascript,.javascript .xml,.tex .hljs-formula,.xml .javascript,.xml .vbscript,.xml .css,.xml .hljs-cdata{opacity:.5}.right .hljs-comment{color:#969896}.right .css .hljs-class,.right .css .hljs-id,.right .css .hljs-pseudo,.right .hljs-attribute,.right .hljs-regexp,.right .hljs-tag,.right .hljs-variable,.right .html .hljs-doctype,.right .ruby .hljs-constant,.right .xml .hljs-doctype,.right .xml .hljs-pi,.right .xml .hljs-tag .hljs-title{color:#c66}.right .hljs-built_in,.right .hljs-constant,.right .hljs-literal,.right .hljs-number,.right .hljs-params,.right .hljs-pragma,.right .hljs-preprocessor{color:#de935f}.right .css .hljs-rule .hljs-attribute,.right .ruby .hljs-class .hljs-title{color:#f0c674}.right .hljs-header,.right .hljs-inheritance,.right .hljs-name,.right .hljs-string,.right .hljs-value,.right .ruby .hljs-symbol,.right .xml .hljs-cdata{color:#b5bd68}.right .css .hljs-hexcolor,.right .hljs-title{color:#8abeb7}.right .coffeescript .hljs-title,.right .hljs-function,.right .javascript .hljs-title,.right .perl .hljs-sub,.right .python .hljs-decorator,.right .python .hljs-title,.right .ruby .hljs-function .hljs-title,.right .ruby .hljs-title .hljs-keyword{color:#81a2be}.right .hljs-keyword,.right .javascript .hljs-function{color:#b294bb}.right .hljs{display:block;overflow-x:auto;background:#1d1f21;color:#c5c8c6;padding:.5em;-webkit-text-size-adjust:none}.right .coffeescript .javascript,.right .javascript .xml,.right .tex .hljs-formula,.right .xml .css,.right .xml .hljs-cdata,.right .xml .javascript,.right .xml .vbscript{opacity:.5}body{color:black;background:white;font:400 14px / 1.42 'Roboto',Helvetica,sans-serif}header{border-bottom:1px solid #f2f2f2;margin-bottom:12px}h1,h2,h3,h4,h5{color:black;margin:12px 0}h1 .permalink,h2 .permalink,h3 .permalink,h4 .permalink,h5 .permalink{margin-left:0;opacity:0;transition:opacity .25s ease}h1:hover .permalink,h2:hover .permalink,h3:hover .permalink,h4:hover .permalink,h5:hover .permalink{opacity:1}.triple h1 .permalink,.triple h2 .permalink,.triple h3 .permalink,.triple h4 .permalink,.triple h5 .permalink{opacity:.15}.triple h1:hover .permalink,.triple h2:hover .permalink,.triple h3:hover .permalink,.triple h4:hover .permalink,.triple h5:hover .permalink{opacity:.15}h1{font:200 36px 'Raleway',Helvetica,sans-serif;font-size:36px}h2{font:200 36px 'Raleway',Helvetica,sans-serif;font-size:30px}h3{font-size:100%;text-transform:uppercase}h5{font-size:100%;font-weight:normal}p{margin:0 0 10px}p.choices{line-height:1.6}a{color:#428bca;text-decoration:none}li p{margin:0}hr.split{border:0;height:1px;width:100%;padding-left:6px;margin:12px auto;background-image:linear-gradient(to right, rgba(0,0,0,0) 20%, rgba(0,0,0,0.2) 51.4%, rgba(255,255,255,0.2) 51.4%, rgba(255,255,255,0) 80%)}dl dt{float:left;width:130px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:700}dl dd{margin-left:150px}blockquote{color:rgba(0,0,0,0.5);font-size:15.5px;padding:10px 20px;margin:12px 0;border-left:5px solid #e8e8e8}blockquote p:last-child{margin-bottom:0}pre{background-color:#f5f5f5;padding:12px;border:1px solid #cfcfcf;border-radius:6px;overflow:auto}pre code{color:black;background-color:transparent;padding:0;border:none}code{color:#444;background-color:#f5f5f5;font:'Inconsolata',monospace;padding:1px 4px;border:1px solid #cfcfcf;border-radius:3px}ul,ol{padding-left:2em}table{border-collapse:collapse;border-spacing:0;margin-bottom:12px}table tr:nth-child(2n){background-color:#fafafa}table th,table td{padding:6px 12px;border:1px solid #e6e6e6}.text-muted{opacity:.5}.note,.warning{padding:.3em 1em;margin:1em 0;border-radius:2px;font-size:90%}.note h1,.warning h1,.note h2,.warning h2,.note h3,.warning h3,.note h4,.warning h4,.note h5,.warning h5,.note h6,.warning h6{font-family:200 36px 'Raleway',Helvetica,sans-serif;font-size:135%;font-weight:500}.note p,.warning p{margin:.5em 0}.note{color:black;background-color:#f0f6fb;border-left:4px solid #428bca}.note h1,.note h2,.note h3,.note h4,.note h5,.note h6{color:#428bca}.warning{color:black;background-color:#fbf1f0;border-left:4px solid #c9302c}.warning h1,.warning h2,.warning h3,.warning h4,.warning h5,.warning h6{color:#c9302c}header{margin-top:24px}nav{position:fixed;top:24px;bottom:0;overflow-y:auto}nav .resource-group{padding:0}nav .resource-group .heading{position:relative}nav .resource-group .heading .chevron{position:absolute;top:12px;right:12px;opacity:.5}nav .resource-group .heading a{display:block;color:black;opacity:.7;border-left:2px solid transparent;margin:0}nav .resource-group .heading a:hover{text-decoration:none;background-color:bad-color;border-left:2px solid black}nav ul{list-style-type:none;padding-left:0}nav ul a{display:block;font-size:13px;color:rgba(0,0,0,0.7);padding:8px 12px;border-top:1px solid #d9d9d9;border-left:2px solid transparent;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}nav ul a:hover{text-decoration:none;background-color:bad-color;border-left:2px solid black}nav ul>li{margin:0}nav ul>li:first-child{margin-top:-12px}nav ul>li:last-child{margin-bottom:-12px}nav ul ul a{padding-left:24px}nav ul ul li{margin:0}nav ul ul li:first-child{margin-top:0}nav ul ul li:last-child{margin-bottom:0}nav>div>div>ul>li:first-child>a{border-top:none}.preload *{transition:none !important}.pull-left{float:left}.pull-right{float:right}.badge{display:inline-block;float:right;min-width:10px;min-height:14px;padding:3px 7px;font-size:12px;color:#000;background-color:#f2f2f2;border-radius:10px;margin:-2px 0}.badge.get{color:#70bbe1;background-color:#d9edf7}.badge.head{color:#70bbe1;background-color:#d9edf7}.badge.options{color:#70bbe1;background-color:#d9edf7}.badge.put{color:#f0db70;background-color:#fcf8e3}.badge.patch{color:#f0db70;background-color:#fcf8e3}.badge.post{color:#93cd7c;background-color:#dff0d8}.badge.delete{color:#ce8383;background-color:#f2dede}.collapse-button{float:right}.collapse-button .close{display:none;color:#428bca;cursor:pointer}.collapse-button .open{color:#428bca;cursor:pointer}.collapse-button.show .close{display:inline}.collapse-button.show .open{display:none}.collapse-content{max-height:0;overflow:hidden;transition:max-height .3s ease-in-out}nav{width:220px}.container{max-width:940px;margin-left:auto;margin-right:auto}.container .row .content{margin-left:244px;width:696px}.container .row:after{content:'';display:block;clear:both}.container-fluid nav{width:22%}.container-fluid .row .content{margin-left:24%}.container-fluid.triple nav{width:16.5%;padding-right:1px}.container-fluid.triple .row .content{position:relative;margin-left:16.5%;padding-left:24px}.middle:before,.middle:after{content:'';display:table}.middle:after{clear:both}.middle{box-sizing:border-box;width:51.5%;padding-right:12px}.right{box-sizing:border-box;float:right;width:48.5%;padding-left:12px}.right a{color:#428bca}.right h1,.right h2,.right h3,.right h4,.right h5,.right p,.right div{color:white}.right pre{background-color:#1d1f21;border:1px solid #1d1f21}.right pre code{color:#c5c8c6}.right .description{margin-top:12px}.triple .resource-heading{font-size:125%}.definition{margin-top:12px;margin-bottom:12px}.definition .method{font-weight:bold}.definition .method.get{color:#2e8ab8}.definition .method.head{color:#2e8ab8}.definition .method.options{color:#2e8ab8}.definition .method.post{color:#56b82e}.definition .method.put{color:#b8a22e}.definition .method.patch{color:#b8a22e}.definition .method.delete{color:#b82e2e}.definition .uri{word-break:break-all;word-wrap:break-word}.definition .hostname{opacity:.5}.example-names{background-color:#eee;padding:12px;border-radius:6px}.example-names .tab-button{cursor:pointer;color:black;border:1px solid #ddd;padding:6px;margin-left:12px}.example-names .tab-button.active{background-color:#d5d5d5}.right .example-names{background-color:#444}.right .example-names .tab-button{color:white;border:1px solid #666;border-radius:6px}.right .example-names .tab-button.active{background-color:#5e5e5e}#nav-background{position:fixed;left:0;top:0;bottom:0;width:16.5%;padding-right:14.4px;background-color:#fbfbfb;border-right:1px solid #f0f0f0;z-index:-1}#right-panel-background{position:absolute;right:-12px;top:-12px;bottom:-12px;width:48.6%;background-color:#333;z-index:-1}@media (max-width:1200px){nav{width:198px}.container{max-width:840px}.container .row .content{margin-left:224px;width:606px}}@media (max-width:992px){nav{width:169.4px}.container{max-width:720px}.container .row .content{margin-left:194px;width:526px}}@media (max-width:768px){nav{display:none}.container{width:95%;max-width:none}.container .row .content,.container-fluid .row .content,.container-fluid.triple .row .content{margin-left:auto;margin-right:auto;width:95%}#nav-background{display:none}#right-panel-background{width:48.6%}}.back-to-top{position:fixed;z-index:1;bottom:0;right:24px;padding:4px 8px;color:rgba(0,0,0,0.5);background-color:#f2f2f2;text-decoration:none !important;border-top:1px solid #d9d9d9;border-left:1px solid #d9d9d9;border-right:1px solid #d9d9d9;border-top-left-radius:3px;border-top-right-radius:3px}.resource-group{padding:12px;margin-bottom:12px;background-color:white;border:1px solid #d9d9d9;border-radius:6px}.resource-group h2.group-heading,.resource-group .heading a{padding:12px;margin:-12px -12px 12px -12px;background-color:#f2f2f2;border-bottom:1px solid #d9d9d9;border-top-left-radius:6px;border-top-right-radius:6px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.triple .content .resource-group{padding:0;border:none}.triple .content .resource-group h2.group-heading,.triple .content .resource-group .heading a{margin:0 0 12px 0;border:1px solid #d9d9d9}nav .resource-group .heading a{padding:12px;margin-bottom:0}nav .resource-group .collapse-content{padding:0}.action{margin-bottom:12px;padding:12px 12px 0 12px;overflow:hidden;border:1px solid transparent;border-radius:6px}.action h4.action-heading{padding:6px 12px;margin:-12px -12px 12px -12px;border-bottom:1px solid transparent;border-top-left-radius:6px;border-top-right-radius:6px;overflow:hidden}.action h4.action-heading .name{float:right;font-weight:normal;padding:6px 0}.action h4.action-heading .method{padding:6px 12px;margin-right:12px;border-radius:3px;display:inline-block}.action h4.action-heading .method.get{color:#fff;background-color:#337ab7}.action h4.action-heading .method.head{color:#fff;background-color:#337ab7}.action h4.action-heading .method.options{color:#fff;background-color:#337ab7}.action h4.action-heading .method.put{color:#fff;background-color:#ed9c28}.action h4.action-heading .method.patch{color:#fff;background-color:#ed9c28}.action h4.action-heading .method.post{color:#fff;background-color:#5cb85c}.action h4.action-heading .method.delete{color:#fff;background-color:#d9534f}.action h4.action-heading code{color:#444;background-color:#f5f5f5;border-color:#cfcfcf;font-weight:normal;word-break:break-all;display:inline-block;margin-top:2px}.action dl.inner{padding-bottom:2px}.action .title{border-bottom:1px solid white;margin:0 -12px -1px -12px;padding:12px}.action.get{border-color:#bce8f1}.action.get h4.action-heading{color:#337ab7;background:#d9edf7;border-bottom-color:#bce8f1}.action.head{border-color:#bce8f1}.action.head h4.action-heading{color:#337ab7;background:#d9edf7;border-bottom-color:#bce8f1}.action.options{border-color:#bce8f1}.action.options h4.action-heading{color:#337ab7;background:#d9edf7;border-bottom-color:#bce8f1}.action.post{border-color:#d6e9c6}.action.post h4.action-heading{color:#5cb85c;background:#dff0d8;border-bottom-color:#d6e9c6}.action.put{border-color:#faebcc}.action.put h4.action-heading{color:#ed9c28;background:#fcf8e3;border-bottom-color:#faebcc}.action.patch{border-color:#faebcc}.action.patch h4.action-heading{color:#ed9c28;background:#fcf8e3;border-bottom-color:#faebcc}.action.delete{border-color:#ebccd1}.action.delete h4.action-heading{color:#d9534f;background:#f2dede;border-bottom-color:#ebccd1}</style></head><body class="preload"><a href="#top" class="text-muted back-to-top"><i class="fa fa-toggle-up"></i> Back to top</a><div class="container"><div class="row"><nav><div class="resource-group"><div class="heading"><div class="chevron"><i class="open fa fa-angle-down"></i></div><a href="#top">Overview</a></div><div class="collapse-content"><ul><li><a href="#header-authentication">Authentication</a></li><li><a href="#header-api-keys">API Keys</a></li><li><a href="#header-errors">Errors</a></li></ul></div></div><div class="resource-group"><div class="heading"><div class="chevron"><i class="open fa fa-angle-down"></i></div><a href="#registration-forms">Registration Forms</a></div><div class="collapse-content"><ul><li><a href="#header-rendering-a-form">Rendering a Form</a></li><li><a href="#header-rendering-fields">Rendering Fields</a></li></ul></div></div><div class="resource-group"><div class="heading"><div class="chevron"><i class="open fa fa-angle-down"></i></div><a href="#attendees">Attendees</a></div><div class="collapse-content"><ul><li><a href="#header-important-info">Important Info</a></li><li><a href="#attendees-attendee-list">Attendee List</a><ul><li><a href="#attendees-attendee-list-post"><span class="badge post"><i class="fa fa-plus"></i></span>Create New Attendee</a></li><li><a href="#attendees-attendee-list-post-1"><span class="badge post"><i class="fa fa-plus"></i></span>Register New Attendee</a></li><li><a href="#attendees-attendee-list-get"><span class="badge get"><i class="fa fa-arrow-down"></i></span>Get Attendees</a></li></ul></li></ul></div></div><div class="resource-group"><div class="heading"><div class="chevron"><i class="open fa fa-angle-down"></i></div><a href="#evaluations">Evaluations</a></div><div class="collapse-content"><ul><li><a href="#evaluations-evaluations">Evaluations</a><ul><li><a href="#evaluations-evaluations-post"><span class="badge post"><i class="fa fa-plus"></i></span>Create New Evaluation</a></li><li><a href="#evaluations-evaluations-get"><span class="badge get"><i class="fa fa-arrow-down"></i></span>Get Evaluations</a></li></ul></li></ul></div></div><div class="resource-group"><div class="heading"><div class="chevron"><i class="open fa fa-angle-down"></i></div><a href="#events">Events</a></div><div class="collapse-content"><ul><li><a href="#events-events-list-get"><span class="badge get"><i class="fa fa-arrow-down"></i></span>Get Events</a></li><li><a href="#events-event-get"><span class="badge get"><i class="fa fa-arrow-down"></i></span>Get Event</a></li></ul></div></div><div class="resource-group"><div class="heading"><div class="chevron"><i class="open fa fa-angle-down"></i></div><a href="#event-requests">Event Requests</a></div><div class="collapse-content"><ul><li><a href="#event-requests-event-requests-post"><span class="badge post"><i class="fa fa-plus"></i></span>Create New Event Request</a></li></ul></div></div><div class="resource-group"><div class="heading"><div class="chevron"><i class="open fa fa-angle-down"></i></div><a href="#facilitators">Facilitators</a></div><div class="collapse-content"><ul><li><a href="#facilitators-facilitators">Facilitators</a><ul><li><a href="#facilitators-facilitators-get"><span class="badge get"><i class="fa fa-arrow-down"></i></span>Facilitator List</a></li><li><a href="#facilitators-facilitators-get-1"><span class="badge get"><i class="fa fa-arrow-down"></i></span>Get Facilitator</a></li></ul></li></ul></div></div><p style="text-align: center; word-wrap: break-word;"><a href="https://api.workshopbutler.com">https://api.workshopbutler.com</a></p></nav><div class="content"><header><h1 id="top">Workshop Butler API</h1></header><p><a href="http://127.0.0.1:9000/">The Workshop Butler API</a> provides a set of methods to integrate
accounts of knowledge brands and independent trainers with their websites
to show scheduled events and licensed trainers, accept registrations and
evaluations.</p>
<p>Our API has predictable, resource-oriented URLs, and uses HTTP response
codes to indicate API errors. We use built-in HTTP features,
like HTTP authentication and HTTP verbs, which are understood by
off-the-shelf HTTP clients.</p>
<p>JSON is returned by all API responses, including errors.
All input should be sent in JSON format.</p>
<blockquote>
<p>Workshop Butler API provides only a limited functionality, and cannot be
considered as a full-scaled REST API for Workshop Butler platform.</p>
</blockquote>
<h2 id="header-authentication">Authentication <a class="permalink" href="#header-authentication" aria-hidden="true">¶</a></h2>
<p>API requests require an API key. This key is unique for your account. Do not share your secret API keys in publicly
accessible areas such GitHub, client-side code, and so forth.</p>
<p>All API requests must be made over HTTPS. API requests without authentication will also fail.</p>
<p>There are two ways you can pass API key. The first one is as
GET query parameter.</p>
<p><strong>GET Query parameter</strong></p>
<pre><code class="language-http">curl 'https://api.workshopbutler.com/facilitators?api_key=YOUR_KEY'</code></pre>
<p>The second option is HTTP header.</p>
<p><strong>HTTP Header</strong></p>
<pre><code class="language-http">curl -H 'X-Api-Key: YOUR_KEY' 'https://api.workshopbutler.com/facilitators'</code></pre>
<h3 id="header-api-keys">API Keys <a class="permalink" href="#header-api-keys" aria-hidden="true">¶</a></h3>
<p>The API supports two types of accounts: knowledge brand and trainer. Each type of accounts
has its own key pattern.</p>
<p>API keys for knowledge brand accounts has <code>ppk_</code> prefix. API keys for trainers are shorter
and starts with <code>tpk_</code>.</p>
<p>To acquire the key:</p>
<ul>
<li>
<p>for a knowledge brand, open <strong>API</strong> tab in <strong>Account Settings</strong></p>
</li>
<li>
<p>for a trainer, open <strong>Website Integration</strong> tab in <strong>Account Settings</strong>.</p>
</li>
</ul>
<h2 id="header-errors">Errors <a class="permalink" href="#header-errors" aria-hidden="true">¶</a></h2>
<p>Workshop Butler uses HTTP response codes to report about an error. Any response with
4xx or 5xx is an error and should be handled appropriately.</p>
<p>All errors are in JSON format. Each error contains two required attributes: <code>code</code> and <code>message</code>.
<code>code</code> has an internal numeric identifier of the error. <code>message</code> gives you a better understanding
why the error occurred. Some errors may have additional attribute <code>info</code> which contains
a detailed description of the error.</p>
<p>The example of an ordinary API error is below:</p>
<pre><code class="language-json">{
"<span class="hljs-attribute">code</span>": <span class="hljs-value"><span class="hljs-number">404</span></span>,
"<span class="hljs-attribute">message</span>": <span class="hljs-value"><span class="hljs-string">"Not Found"</span></span>,
"<span class="hljs-attribute">info</span>": <span class="hljs-value"><span class="hljs-string">"The event with id=405 is not found"</span>
</span>}</code></pre>
<section id="registration-forms" class="resource-group"><h2 class="group-heading">Registration Forms <a href="#registration-forms" class="permalink">¶</a></h2><p>Workshop Butler allows users to configure what information they want to collect
during the registration. The users can add new fields of several different types,
make fields optional or required, and add fill-in instructions for the forms.</p>
<p>As a result, a set of attendee attributes, passed to the system through API for
successful registration, can differ from event to event. You can hard-code
a predefined set of fields on a registration form but you will limit a user’s
ability to tweak the system for their needs.</p>
<p>This section explains how to implement registration forms correctly.</p>
<h3 id="header-rendering-a-form">Rendering a Form <a class="permalink" href="#header-rendering-a-form" aria-hidden="true">¶</a></h3>
<p>When you request an <a href="#events-events-get">event</a>, the response contains two attributes,
related to the look of the form:</p>
<ul>
<li>
<p><code>instructions</code></p>
</li>
<li>
<p><code>registration_form</code></p>
</li>
</ul>
<p>The former one is a text with some instructions from the user to visitors on how
to fill-in the form. For example,</p>
<ul>
<li>
<p><em>Add your food preferences to the comment</em></p>
</li>
<li>
<p><em>Please, describe what your main goal for joining a workshop is</em></p>
</li>
</ul>
<p>The latter one is an array with sections and fields, the user expects visitors to fill in.
Each section has a name and one or several fields it contains.</p>
<p>The sections and the fields are ordered the way a user wants. Try not to change
the order if there are no other requirements from your users.</p>
<p>For example, this is a simplified form structure:</p>
<pre><code class="language-json">[{
"<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"Personal Info"</span></span>,
"<span class="hljs-attribute">fields</span>": <span class="hljs-value">[
...
]
</span>},{
"<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"Billing Address"</span></span>,
"<span class="hljs-attribute">fields</span>": <span class="hljs-value">[
...
]
</span>}]</code></pre>
<p>Based on it, you can create a form like:</p>
<pre><code class="language-HTML"><span class="hljs-tag"><<span class="hljs-title">form</span>></span>
<span class="hljs-tag"><<span class="hljs-title">fieldset</span>></span>
<span class="hljs-tag"><<span class="hljs-title">legend</span>></span>Personal Info<span class="hljs-tag"></<span class="hljs-title">legend</span>></span>
<span class="hljs-tag"><<span class="hljs-title">p</span>></span>
<span class="hljs-tag"><<span class="hljs-title">input</span> <span class="hljs-attribute">....</span>></span>
<span class="hljs-tag"></<span class="hljs-title">p</span>></span>
<span class="hljs-tag"></<span class="hljs-title">fieldset</span>></span>
<span class="hljs-tag"><<span class="hljs-title">fieldset</span>></span>
<span class="hljs-tag"><<span class="hljs-title">legend</span>></span>Billing Address<span class="hljs-tag"></<span class="hljs-title">legend</span>></span>
<span class="hljs-tag"><<span class="hljs-title">p</span>></span>
<span class="hljs-tag"><<span class="hljs-title">input</span> <span class="hljs-attribute">....</span>></span>
<span class="hljs-tag"></<span class="hljs-title">p</span>></span>
<span class="hljs-tag"></<span class="hljs-title">fieldset</span>></span>
<span class="hljs-tag"></<span class="hljs-title">form</span>></span></code></pre>
<h3 id="header-rendering-fields">Rendering Fields <a class="permalink" href="#header-rendering-fields" aria-hidden="true">¶</a></h3>
<p>Each field has four attributes: <code>name</code>, <code>type</code>, <code>required</code> and <code>label</code>. <code>select</code>
field contains one more attribute with the list of options.</p>
<pre><code class="language-json">{
"<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"first_name"</span></span>,
"<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"text"</span></span>,
"<span class="hljs-attribute">required</span>": <span class="hljs-value"><span class="hljs-literal">true</span></span>,
"<span class="hljs-attribute">label</span>": <span class="hljs-value"><span class="hljs-string">"First Name"</span>
</span>}</code></pre>
<p>From this JSON you may create a code similar to:</p>
<pre><code class="language-HTML"><span class="hljs-tag"><<span class="hljs-title">label</span> <span class="hljs-attribute">for</span>=<span class="hljs-value">"first_name"</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">"required"</span>></span>
First Name
<span class="hljs-tag"><<span class="hljs-title">input</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">"text"</span> <span class="hljs-attribute">name</span>=<span class="hljs-value">"first_name"</span>/></span>
<span class="hljs-tag"></<span class="hljs-title">label</span>></span></code></pre>
<p><code>name</code> is an unique field name which is passed to <a href="#attendees-attendee-list-post-1">through API</a>
along with a field’s value. Using the <code>name</code>, Workshop Butler maps the passed
parameters to relevant attendee’s attributes.</p>
<div class="warning">
<p>It is up to you to check if a visitor fills in the fields with <code>required=true</code>.
The system returns an error if one or several required fields are empty.</p>
</div>
<p>There are 8 field types:</p>
<table>
<thead>
<tr>
<th style="text-align:right">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:right">text</td>
<td>Basic input field, <code>HTML <input type="text" ..></code></td>
</tr>
<tr>
<td style="text-align:right">checkbox</td>
<td>Checkbox with true/false value, <code>HTML <input type="checkbox" ...></code></td>
</tr>
<tr>
<td style="text-align:right">select</td>
<td>Select field, <code>HTML <select name=""><option>... </select></code></td>
</tr>
<tr>
<td style="text-align:right">date</td>
<td>Date in format YYYY-MM-DD, <code>HTML <input type="date" ...></code></td>
</tr>
<tr>
<td style="text-align:right">textarea</td>
<td>Large text input, <code>HTML <textarea ....></code></td>
</tr>
<tr>
<td style="text-align:right">email</td>
<td>Email, <code>HTML <input type="email" ...></code></td>
</tr>
<tr>
<td style="text-align:right">country</td>
<td>List of countries to select from. A passed value for this field should be an ISO 8166-2 country code (<strong>de</strong>, <strong>RU</strong>).</td>
</tr>
<tr>
<td style="text-align:right">ticket</td>
<td>A selector with available ticket types. The ticket types are in <code>paid_ticket_types</code> attribute.</td>
</tr>
</tbody>
</table>
<p>Workshop Butler gives you plenty of information to render a beautiful yet
fully functional dynamical registration form.</p>
</section><section id="attendees" class="resource-group"><h2 class="group-heading">Attendees <a href="#attendees" class="permalink">¶</a></h2><p>An attendee represents a person participating in an event and has three required
attributes: first name, last name and email. Other attributes may be either optional
or required, depending on user settings.</p>
<h2 id="header-important-info">Important Info <a class="permalink" href="#header-important-info" aria-hidden="true">¶</a></h2>
<p>There are two ways to create an attendee. The difference is in how Workshop Butler
reacts for a new attendee.</p>
<p>When you <a href="#attendees-attendee-list-post">create a new attendee</a>, the system:</p>
<ol>
<li>
<p>adds a new attendee object</p>
</li>
<li>
<p>sets the attendee’s <code>participated</code> attributes to <code>true</code></p>
</li>
</ol>
<p>When you <a href="#attendees-attendee-list-post-1">register a new attendee</a>, the system:</p>
<ol>
<li>
<p>checks if a selected ticket is available</p>
</li>
<li>
<p>adds a new attendee object</p>
</li>
<li>
<p>triggers <code>New Attendee</code> event.</p>
</li>
</ol>
<p>Getting <code>New Attendee</code> event the system:</p>
<ul>
<li>
<p>sends a welcome email to the attendee’s email address.</p>
</li>
<li>
<p>sends a notification to team members about new registration.</p>
</li>
</ul>
<p>While integrating your website with Workshop Butler, prefer to use <a href="#attendees-attendee-list-post-1"><code>register</code></a> action
for a registration form. Use <a href="#attendees-attendee-list-post"><code>create</code></a> action only on an evaluation form, when you know
for sure the attendee has participated.</p>
<div id="attendees-attendee-list" class="resource"><h3 class="resource-heading">Attendee List <a href="#attendees-attendee-list" class="permalink"> ¶</a></h3><div id="attendees-attendee-list-post" class="action post"><h4 class="action-heading"><div class="name">Create New Attendee</div><a href="#attendees-attendee-list-post" class="method post">POST</a><code class="uri">/attendees</code></h4><p>Adds a new attendee to the system without additional checks and without triggering
<code>New Attendee</code> event.</p>
<p>On success, the system returns <code>201</code> response code. On failure, the system returns:</p>
<ul>
<li>
<p><code>403</code> response code when the account does not have an access to the event and cannot add a new attendee to it;</p>
</li>
<li>
<p><code>422</code> response code when the request has invalid data and cannot be processed</p>
</li>
</ul>
<h4>Example URI</h4><div class="definition"><span class="method post">POST</span> <span class="uri"><span class="hostname">https://api.workshopbutler.com</span>/attendees</span></div><div class="title"><strong>Request</strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span></code></pre><div style="height: 1px;"></div><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">event_id</span>": <span class="hljs-value"><span class="hljs-number">123</span></span>,
"<span class="hljs-attribute">first_name</span>": <span class="hljs-value"><span class="hljs-string">"Carl"</span></span>,
"<span class="hljs-attribute">last_name</span>": <span class="hljs-value"><span class="hljs-string">"Maddow"</span></span>,
"<span class="hljs-attribute">email</span>": <span class="hljs-value"><span class="hljs-string">"carl.maddow@test.com"</span></span>,
"<span class="hljs-attribute">date_of_birth</span>": <span class="hljs-value"><span class="hljs-string">"1951-09-17"</span></span>,
"<span class="hljs-attribute">country</span>": <span class="hljs-value"><span class="hljs-string">"NL"</span></span>,
"<span class="hljs-attribute">city</span>": <span class="hljs-value"><span class="hljs-string">"Amsterdam"</span></span>,
"<span class="hljs-attribute">province</span>": <span class="hljs-value"><span class="hljs-string">"Holland"</span></span>,
"<span class="hljs-attribute">organisation</span>": <span class="hljs-value"><span class="hljs-string">"Lost Beauty BV"</span></span>,
"<span class="hljs-attribute">role</span>": <span class="hljs-value"><span class="hljs-string">"Developer"</span>
</span>}</code></pre><div style="height: 1px;"></div></div></div><div class="title"><strong>Response <code>201</code></strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span></code></pre><div style="height: 1px;"></div><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">attendee_id</span>": <span class="hljs-value"><span class="hljs-number">1</span>
</span>}</code></pre><div style="height: 1px;"></div><h5>Schema</h5><pre><code>{
"<span class="hljs-attribute">$schema</span>": <span class="hljs-value"><span class="hljs-string">"http://json-schema.org/draft-04/schema#"</span></span>,
"<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"object"</span></span>,
"<span class="hljs-attribute">properties</span>": <span class="hljs-value">{
"<span class="hljs-attribute">attendee_id</span>": <span class="hljs-value">{
"<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"number"</span></span>,
"<span class="hljs-attribute">description</span>": <span class="hljs-value"><span class="hljs-string">"The ID of a created attendee"</span>
</span>}
</span>}
</span>}</code></pre><div style="height: 1px;"></div></div></div><div class="title"><strong>Response <code>403</code></strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span></code></pre><div style="height: 1px;"></div><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">code</span>": <span class="hljs-value"><span class="hljs-number">403</span></span>,
"<span class="hljs-attribute">message</span>": <span class="hljs-value"><span class="hljs-string">"Forbidden Request"</span></span>,
"<span class="hljs-attribute">info</span>": <span class="hljs-value">{
"<span class="hljs-attribute">event_id</span>": <span class="hljs-value"><span class="hljs-string">"This parameter is required"</span>
</span>}
</span>}</code></pre><div style="height: 1px;"></div></div></div><div class="title"><strong>Response <code>422</code></strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span></code></pre><div style="height: 1px;"></div><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">code</span>": <span class="hljs-value"><span class="hljs-number">422</span></span>,
"<span class="hljs-attribute">message</span>": <span class="hljs-value"><span class="hljs-string">"Validation failed"</span></span>,
"<span class="hljs-attribute">info</span>": <span class="hljs-value">{
"<span class="hljs-attribute">event_id</span>": <span class="hljs-value"><span class="hljs-string">"This parameter is required"</span>
</span>}
</span>}</code></pre><div style="height: 1px;"></div></div></div></div><div id="attendees-attendee-list-post-1" class="action post"><h4 class="action-heading"><div class="name">Register New Attendee</div><a href="#attendees-attendee-list-post-1" class="method post">POST</a><code class="uri">/attendees/register</code></h4><p>Adds a new attendee to the system after a ticket check, and triggers <code>New Attendee</code>
event.</p>
<div class="note">
<p>You should prefer this action to <a href="#attendees-attendee-list-post"><code>create</code></a>. For more details, read <a href="#header-important-info">Important info</a>.</p>
</div>
<p>The POST parameters for this request vary and are based on the configuration of
registration form. For more information, read <a href="#registraiton-forms">Registration Forms</a>.</p>
<p>On success, the system returns <code>201</code> response code. On failure, the system returns:</p>
<ul>
<li>
<p><code>403</code> response code when the account does not have an access to the event and cannot add a new attendee to it;</p>
</li>
<li>
<p><code>422</code> response code when the request has invalid data and cannot be processed</p>
</li>
</ul>
<h4>Example URI</h4><div class="definition"><span class="method post">POST</span> <span class="uri"><span class="hostname">https://api.workshopbutler.com</span>/attendees/register</span></div><div class="title"><strong>Response <code>201</code></strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span></code></pre><div style="height: 1px;"></div><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">attendee_id</span>": <span class="hljs-value"><span class="hljs-number">1234</span>
</span>}</code></pre><div style="height: 1px;"></div></div></div><div class="title"><strong>Response <code>403</code></strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span></code></pre><div style="height: 1px;"></div><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">code</span>": <span class="hljs-value"><span class="hljs-number">403</span></span>,
"<span class="hljs-attribute">message</span>": <span class="hljs-value"><span class="hljs-string">"Forbidden Request"</span>
</span>}</code></pre><div style="height: 1px;"></div></div></div><div class="title"><strong>Response <code>422</code></strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span></code></pre><div style="height: 1px;"></div><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">code</span>": <span class="hljs-value"><span class="hljs-number">422</span></span>,
"<span class="hljs-attribute">message</span>": <span class="hljs-value"><span class="hljs-string">"Validation failed"</span></span>,
"<span class="hljs-attribute">info</span>": <span class="hljs-value">{
"<span class="hljs-attribute">event_id</span>": <span class="hljs-value"><span class="hljs-string">"This parameter is required"</span>
</span>}
</span>}</code></pre><div style="height: 1px;"></div></div></div></div><div id="attendees-attendee-list-get" class="action get"><h4 class="action-heading"><div class="name">Get Attendees</div><a href="#attendees-attendee-list-get" class="method get">GET</a><code class="uri">/attendees{?sort}</code></h4><p>Returns the list of all attendees for the account. The attendees are returned sorted by creation date,
with the most recent attendees appearing last.</p>
<div class="warning">
<h4 id="header-caution"><i class="fa fa-warning"></i> Caution <a class="permalink" href="#header-caution" aria-hidden="true">¶</a></h4>
<p>this method is available only for trainer’s accounts. The owners of knowledge
brand accounts will get <code>403 Forbidden</code> response.</p>
</div>
<h4>Example URI</h4><div class="definition"><span class="method get">GET</span> <span class="uri"><span class="hostname">https://api.workshopbutler.com</span>/attendees?<span class="hljs-attribute">sort=</span><span class="hljs-literal"></span></span></div><div class="title"><strong>URI Parameters</strong><div class="collapse-button show"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><dl class="inner"><dt>sort</dt><dd><code>string</code> <span>(optional)</span> <span class="text-info default"><strong>Default: </strong><span>+created</span></span> <p>Sort field and order</p>
<p class="choices"><strong>Choices: </strong><code>+created</code> <code>-created</code> </p></dd></dl></div><div class="title"><strong>Response <code>200</code></strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span></code></pre><div style="height: 1px;"></div><h5>Body</h5><pre><code>[
{
"<span class="hljs-attribute">id</span>": <span class="hljs-value"><span class="hljs-number">1</span></span>,
"<span class="hljs-attribute">first_name</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">last_name</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">date_of_birth</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">email</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">country</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">city</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">street_1</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">street_2</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">postcode</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">province</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">organisation</span>": <span class="hljs-value"><span class="hljs-string">"Bug Cleaner Ltd."</span></span>,
"<span class="hljs-attribute">work_address</span>": <span class="hljs-value">{
"<span class="hljs-attribute">country</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">city</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">street_1</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">street_2</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">postcode</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">province</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span>
</span>}</span>,
"<span class="hljs-attribute">billing_address</span>": <span class="hljs-value">{
"<span class="hljs-attribute">country</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">city</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">street_1</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">street_2</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">postcode</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">province</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span>
</span>}</span>,
"<span class="hljs-attribute">tax_info</span>": <span class="hljs-value">{
"<span class="hljs-attribute">vat_name</span>": <span class="hljs-value"><span class="hljs-string">"IVA"</span></span>,
"<span class="hljs-attribute">vat_number</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span>
</span>}</span>,
"<span class="hljs-attribute">phone</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">comment</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">blog</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">website</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">role</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">price</span>": <span class="hljs-value"><span class="hljs-string">"EUR 100"</span></span>,
"<span class="hljs-attribute">event</span>": <span class="hljs-value">{
"<span class="hljs-attribute">id</span>": <span class="hljs-value"><span class="hljs-string">"43AB243"</span></span>,
"<span class="hljs-attribute">title</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">start</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">end</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">location</span>": <span class="hljs-value">{
"<span class="hljs-attribute">country</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">country_code</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">city</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span>
</span>}
</span>}
</span>}
]</code></pre><div style="height: 1px;"></div><h5>Schema</h5><pre><code>{
"<span class="hljs-attribute">$schema</span>": <span class="hljs-value"><span class="hljs-string">"http://json-schema.org/draft-04/schema#"</span></span>,
"<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"array"</span>
</span>}</code></pre><div style="height: 1px;"></div></div></div></div></div></section><section id="evaluations" class="resource-group"><h2 class="group-heading">Evaluations <a href="#evaluations" class="permalink">¶</a></h2><div id="evaluations-evaluations" class="resource"><h3 class="resource-heading">Evaluations <a href="#evaluations-evaluations" class="permalink"> ¶</a></h3><p>An evaluation is a feedback provided by attendee to trainer. It consists of the answers
to 10 questions.</p>
<div id="evaluations-evaluations-post" class="action post"><h4 class="action-heading"><div class="name">Create New Evaluation</div><a href="#evaluations-evaluations-post" class="method post">POST</a><code class="uri">/evaluations</code></h4><p>Adds a new evaluation to the system and informs a trainer (or trainers) about it
via email</p>
<div class="warning">
<h4 id="header-caution-1"><i class="fa fa-warning"></i> Caution <a class="permalink" href="#header-caution-1" aria-hidden="true">¶</a></h4>
<p>this method is available only for knowledge brand’s accounts. The owners of trainer
accounts will get <code>403 Forbidden</code> response.</p>
</div>
<h4>Example URI</h4><div class="definition"><span class="method post">POST</span> <span class="uri"><span class="hostname">https://api.workshopbutler.com</span>/evaluations</span></div><div class="title"><strong>Response <code>201</code></strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span></code></pre><div style="height: 1px;"></div><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">evaluation_id</span>": <span class="hljs-value"><span class="hljs-number">4302</span>
</span>}</code></pre><div style="height: 1px;"></div><h5>Schema</h5><pre><code>{
"<span class="hljs-attribute">$schema</span>": <span class="hljs-value"><span class="hljs-string">"http://json-schema.org/draft-04/schema#"</span></span>,
"<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"object"</span></span>,
"<span class="hljs-attribute">properties</span>": <span class="hljs-value">{
"<span class="hljs-attribute">evaluation_id</span>": <span class="hljs-value">{
"<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"number"</span></span>,
"<span class="hljs-attribute">description</span>": <span class="hljs-value"><span class="hljs-string">"The ID of a created evaluation"</span>
</span>}
</span>}
</span>}</code></pre><div style="height: 1px;"></div></div></div><div class="title"><strong>Response <code>403</code></strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span></code></pre><div style="height: 1px;"></div><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">code</span>": <span class="hljs-value"><span class="hljs-number">403</span></span>,
"<span class="hljs-attribute">message</span>": <span class="hljs-value"><span class="hljs-string">"Forbidden Request"</span>
</span>}</code></pre><div style="height: 1px;"></div></div></div><div class="title"><strong>Response <code>409</code></strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span></code></pre><div style="height: 1px;"></div><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">code</span>": <span class="hljs-value"><span class="hljs-number">403</span></span>,
"<span class="hljs-attribute">message</span>": <span class="hljs-value"><span class="hljs-string">"An evaluation for the attendee exists. Only one evaluation per attendee per event is allowed"</span>
</span>}</code></pre><div style="height: 1px;"></div></div></div><div class="title"><strong>Response <code>422</code></strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span></code></pre><div style="height: 1px;"></div><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">code</span>": <span class="hljs-value"><span class="hljs-number">422</span></span>,
"<span class="hljs-attribute">message</span>": <span class="hljs-value"><span class="hljs-string">"Validation failed"</span></span>,
"<span class="hljs-attribute">info</span>": <span class="hljs-value">{
"<span class="hljs-attribute">event_id</span>": <span class="hljs-value"><span class="hljs-string">"This parameter is required"</span>
</span>}
</span>}</code></pre><div style="height: 1px;"></div></div></div></div><div id="evaluations-evaluations-get" class="action get"><h4 class="action-heading"><div class="name">Get Evaluations</div><a href="#evaluations-evaluations-get" class="method get">GET</a><code class="uri">/evaluations{?sort}</code></h4><p>Returns the list of all your evaluations. The evaluations are returned sorted by creation date,
with the most recent evaluations appearing last.</p>
<div class="warning">
<h4 id="header-caution-2"><i class="fa fa-warning"></i> Caution <a class="permalink" href="#header-caution-2" aria-hidden="true">¶</a></h4>
<p>this method is available only for trainer’s accounts. The owners of knowledge
brand accounts will get <code>403 Forbidden</code> response.</p>
</div>
<h4>Example URI</h4><div class="definition"><span class="method get">GET</span> <span class="uri"><span class="hostname">https://api.workshopbutler.com</span>/evaluations?<span class="hljs-attribute">sort=</span><span class="hljs-literal"></span></span></div><div class="title"><strong>URI Parameters</strong><div class="collapse-button show"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><dl class="inner"><dt>sort</dt><dd><code>string</code> <span>(optional)</span> <span class="text-info default"><strong>Default: </strong><span>+created</span></span> <p>Sort field and order</p>
<p class="choices"><strong>Choices: </strong><code>+created</code> <code>-created</code> </p></dd></dl></div><div class="title"><strong>Response <code>200</code></strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span></code></pre><div style="height: 1px;"></div><h5>Body</h5><pre><code>[
{
"<span class="hljs-attribute">event</span>": <span class="hljs-value">{
"<span class="hljs-attribute">id</span>": <span class="hljs-value"><span class="hljs-number">123</span></span>,
"<span class="hljs-attribute">title</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span>
</span>}</span>,
"<span class="hljs-attribute">attendee</span>": <span class="hljs-value">{
"<span class="hljs-attribute">id</span>": <span class="hljs-value"><span class="hljs-number">1</span></span>,
"<span class="hljs-attribute">first_name</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">last_name</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">email</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span>
</span>}</span>,
"<span class="hljs-attribute">id</span>": <span class="hljs-value"><span class="hljs-number">1</span></span>,
"<span class="hljs-attribute">question_1</span>": <span class="hljs-value">{
"<span class="hljs-attribute">question</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">answer</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span>
</span>}</span>,
"<span class="hljs-attribute">question_2</span>": <span class="hljs-value">{
"<span class="hljs-attribute">question</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">answer</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span>
</span>}</span>,
"<span class="hljs-attribute">question_3</span>": <span class="hljs-value">{
"<span class="hljs-attribute">question</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">answer</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span>
</span>}</span>,
"<span class="hljs-attribute">question_4</span>": <span class="hljs-value">{
"<span class="hljs-attribute">question</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">answer</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span>
</span>}</span>,
"<span class="hljs-attribute">question_5</span>": <span class="hljs-value">{
"<span class="hljs-attribute">question</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">answer</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span>
</span>}</span>,
"<span class="hljs-attribute">question_6</span>": <span class="hljs-value">{
"<span class="hljs-attribute">question</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">answer</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span>
</span>}</span>,
"<span class="hljs-attribute">question_7</span>": <span class="hljs-value">{
"<span class="hljs-attribute">question</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">answer</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span>
</span>}</span>,
"<span class="hljs-attribute">question_8</span>": <span class="hljs-value">{
"<span class="hljs-attribute">question</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">answer</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span>
</span>}</span>,
"<span class="hljs-attribute">question_9</span>": <span class="hljs-value">{
"<span class="hljs-attribute">question</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">answer</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span>
</span>}</span>,
"<span class="hljs-attribute">question_10</span>": <span class="hljs-value">{
"<span class="hljs-attribute">question</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span></span>,
"<span class="hljs-attribute">answer</span>": <span class="hljs-value"><span class="hljs-string">"Hello, world!"</span>
</span>}
</span>}
]</code></pre><div style="height: 1px;"></div><h5>Schema</h5><pre><code>{
"<span class="hljs-attribute">$schema</span>": <span class="hljs-value"><span class="hljs-string">"http://json-schema.org/draft-04/schema#"</span></span>,
"<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"array"</span>
</span>}</code></pre><div style="height: 1px;"></div></div></div></div></div></section><section id="events" class="resource-group"><h2 class="group-heading">Events <a href="#events" class="permalink">¶</a></h2><div id="events-events-list" class="resource"><h3 class="resource-heading">Events List <a href="#events-events-list" class="permalink"> ¶</a></h3><div id="events-events-list-get" class="action get"><h4 class="action-heading"><div class="name">Get Events</div><a href="#events-events-list-get" class="method get">GET</a><code class="uri">/events{?future}{&public}{&archived}{&countryCode}{&eventType}{&trainerId}{&widgetId}{&confirmed}{&fields}</code></h4><p>Get a list of events</p>
<h4>Example URI</h4><div class="definition"><span class="method get">GET</span> <span class="uri"><span class="hostname">https://api.workshopbutler.com</span>/events?<span class="hljs-attribute">future=</span><span class="hljs-literal">true</span>&<span class="hljs-attribute">public=</span><span class="hljs-literal">false</span>&<span class="hljs-attribute">archived=</span><span class="hljs-literal">true</span>&<span class="hljs-attribute">countryCode=</span><span class="hljs-literal">"DE"</span>&<span class="hljs-attribute">eventType=</span><span class="hljs-literal">1</span>&<span class="hljs-attribute">trainerId=</span><span class="hljs-literal">5</span>&<span class="hljs-attribute">widgetId=</span><span class="hljs-literal">"xjl34"</span>&<span class="hljs-attribute">confirmed=</span><span class="hljs-literal">false</span>&<span class="hljs-attribute">fields=</span><span class="hljs-literal">"title,city"</span></span></div><div class="title"><strong>URI Parameters</strong><div class="collapse-button show"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><dl class="inner"><dt>future</dt><dd><code>boolean</code> <span>(optional)</span> <span class="text-muted example"><strong>Example: </strong><span>true</span></span><p>If true, only future events in the list. If false, only past events in the list.</p>
</dd><dt>public</dt><dd><code>boolean</code> <span>(optional)</span> <span class="text-muted example"><strong>Example: </strong><span>false</span></span><p>If true, only public events in the list. If false, only private events int he list.</p>
</dd><dt>archived</dt><dd><code>boolean</code> <span>(optional)</span> <span class="text-muted example"><strong>Example: </strong><span>true</span></span><p>If true, only archived events in the list. If false, only active events in the list</p>
</dd><dt>countryCode</dt><dd><code>string</code> <span>(optional)</span> <span class="text-muted example"><strong>Example: </strong><span>"DE"</span></span><p>ISO 8166-2 country code. If set, only events from this country in the list.</p>
</dd><dt>eventType</dt><dd><code>number</code> <span>(optional)</span> <span class="text-muted example"><strong>Example: </strong><span>1</span></span><p>Id of event type. If set, only events with this type in the list.</p>
</dd><dt>trainerId</dt><dd><code>number</code> <span>(optional)</span> <span class="text-muted example"><strong>Example: </strong><span>5</span></span><p>If set, only the events ran by this trainer are returned</p>
</dd><dt>confirmed</dt><dd><code>boolean</code> <span>(optional)</span> <span class="text-muted example"><strong>Example: </strong><span>false</span></span><p>If set, events are filtered by their confirmation state</p>
</dd><dt>widgetId</dt><dd><code>string</code> <span>(optional)</span> <span class="text-muted example"><strong>Example: </strong><span>"xjl34"</span></span><p>DEPRECATED</p>
</dd><dt>fields</dt><dd><code>string</code> <span>(optional)</span> <span class="text-muted example"><strong>Example: </strong><span>"title,city"</span></span><p>The output contains only the defined fields</p>
</dd></dl></div><div class="title"><strong>Response <code>200</code></strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span></code></pre><div style="height: 1px;"></div><h5>Body</h5><pre><code>[
{
"<span class="hljs-attribute">id</span>": <span class="hljs-value"><span class="hljs-number">193</span></span>,
"<span class="hljs-attribute">title</span>": <span class="hljs-value"><span class="hljs-string">"Management 3.0 two day course"</span></span>,
"<span class="hljs-attribute">type</span>": <span class="hljs-value">{
"<span class="hljs-attribute">id</span>": <span class="hljs-value"><span class="hljs-number">1</span></span>,
"<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"Standard 2-days Course"</span>
</span>}</span>,
"<span class="hljs-attribute">spoken_languages</span>": <span class="hljs-value">[
<span class="hljs-string">"German"</span>
]</span>,
"<span class="hljs-attribute">start</span>": <span class="hljs-value"><span class="hljs-string">"2011-11-24"</span></span>,
"<span class="hljs-attribute">end</span>": <span class="hljs-value"><span class="hljs-string">"2011-11-25"</span></span>,
"<span class="hljs-attribute">hours_per_day</span>": <span class="hljs-value"><span class="hljs-number">8</span></span>,
"<span class="hljs-attribute">total_hours</span>": <span class="hljs-value"><span class="hljs-number">16</span></span>,
"<span class="hljs-attribute">facilitators</span>": <span class="hljs-value">[
{
"<span class="hljs-attribute">id</span>": <span class="hljs-value"><span class="hljs-number">31</span></span>,
"<span class="hljs-attribute">first_name</span>": <span class="hljs-value"><span class="hljs-string">"Mischa"</span></span>,
"<span class="hljs-attribute">last_name</span>": <span class="hljs-value"><span class="hljs-string">"Ramseyer"</span></span>,
"<span class="hljs-attribute">photo</span>": <span class="hljs-value"><span class="hljs-literal">null</span></span>,
"<span class="hljs-attribute">country</span>": <span class="hljs-value"><span class="hljs-string">"CH"</span></span>,
"<span class="hljs-attribute">rating</span>": <span class="hljs-value"><span class="hljs-literal">null</span>
</span>}
]</span>,
"<span class="hljs-attribute">city</span>": <span class="hljs-value"><span class="hljs-string">"Zürich"</span></span>,
"<span class="hljs-attribute">country</span>": <span class="hljs-value"><span class="hljs-string">"CH"</span></span>,
"<span class="hljs-attribute">rating</span>": <span class="hljs-value"><span class="hljs-number">8</span></span>,
"<span class="hljs-attribute">confirmed</span>": <span class="hljs-value"><span class="hljs-literal">true</span></span>,
"<span class="hljs-attribute">free</span>": <span class="hljs-value"><span class="hljs-literal">false</span></span>,
"<span class="hljs-attribute">online</span>": <span class="hljs-value"><span class="hljs-literal">false</span>
</span>},
{
"<span class="hljs-attribute">id</span>": <span class="hljs-value"><span class="hljs-number">270</span></span>,
"<span class="hljs-attribute">title</span>": <span class="hljs-value"><span class="hljs-string">"Management 3.0 two day course"</span></span>,
"<span class="hljs-attribute">type</span>": <span class="hljs-value">{
"<span class="hljs-attribute">id</span>": <span class="hljs-value"><span class="hljs-number">1</span></span>,
"<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"Standard 2-days Course"</span>
</span>}</span>,
"<span class="hljs-attribute">spoken_languages</span>": <span class="hljs-value">[
<span class="hljs-string">"French"</span>
]</span>,
"<span class="hljs-attribute">start</span>": <span class="hljs-value"><span class="hljs-string">"2012-03-22"</span></span>,
"<span class="hljs-attribute">end</span>": <span class="hljs-value"><span class="hljs-string">"2012-03-23"</span></span>,
"<span class="hljs-attribute">hours_per_day</span>": <span class="hljs-value"><span class="hljs-number">8</span></span>,
"<span class="hljs-attribute">total_hours</span>": <span class="hljs-value"><span class="hljs-number">16</span></span>,
"<span class="hljs-attribute">facilitators</span>": <span class="hljs-value">[
{
"<span class="hljs-attribute">id</span>": <span class="hljs-value"><span class="hljs-number">36</span></span>,
"<span class="hljs-attribute">first_name</span>": <span class="hljs-value"><span class="hljs-string">"François"</span></span>,
"<span class="hljs-attribute">last_name</span>": <span class="hljs-value"><span class="hljs-string">"Beauregard"</span></span>,
"<span class="hljs-attribute">photo</span>": <span class="hljs-value"><span class="hljs-literal">null</span></span>,
"<span class="hljs-attribute">country</span>": <span class="hljs-value"><span class="hljs-string">"CA"</span></span>,
"<span class="hljs-attribute">rating</span>": <span class="hljs-value"><span class="hljs-literal">null</span>
</span>}
]</span>,
"<span class="hljs-attribute">city</span>": <span class="hljs-value"><span class="hljs-string">"Montréal"</span></span>,
"<span class="hljs-attribute">country</span>": <span class="hljs-value"><span class="hljs-string">"CA"</span></span>,
"<span class="hljs-attribute">rating</span>": <span class="hljs-value"><span class="hljs-number">5.65</span></span>,
"<span class="hljs-attribute">confirmed</span>": <span class="hljs-value"><span class="hljs-literal">false</span></span>,
"<span class="hljs-attribute">free</span>": <span class="hljs-value"><span class="hljs-literal">true</span></span>,
"<span class="hljs-attribute">online</span>": <span class="hljs-value"><span class="hljs-literal">false</span>
</span>}
]</code></pre><div style="height: 1px;"></div></div></div></div></div><div id="events-event" class="resource"><h3 class="resource-heading">Event <a href="#events-event" class="permalink"> ¶</a></h3><div id="events-event-get" class="action get"><h4 class="action-heading"><div class="name">Get Event</div><a href="#events-event-get" class="method get">GET</a><code class="uri">/events/{id}?{fields}</code></h4><p>Get a detailed info about event</p>
<h4>Example URI</h4><div class="definition"><span class="method get">GET</span> <span class="uri"><span class="hostname">https://api.workshopbutler.com</span>/events/<span class="hljs-attribute" title="id">id</span>?<span class="hljs-attribute" title="fields">fields</span></span></div><div class="title"><strong>URI Parameters</strong><div class="collapse-button show"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><dl class="inner"><dt>id</dt><dd><code>number|string</code> <span class="required">(required)</span> <p>It could be either a numerical or string (hashed) event id. The latter is preferable.</p>
</dd><dt>fields</dt><dd><code>string</code> <span>(optional)</span> <p>Comma-separated list of event attributes to return. ‘trainer.rating’ adds a public trainer ratings for each trainer (brands only)</p>
</dd></dl></div><div class="title"><strong>Response <code>200</code></strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span></code></pre><div style="height: 1px;"></div><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">id</span>": <span class="hljs-value"><span class="hljs-number">1234</span></span>,
"<span class="hljs-attribute">title</span>": <span class="hljs-value"><span class="hljs-string">"Management 3.0 - Curso de 2 días"</span></span>,
"<span class="hljs-attribute">type</span>": <span class="hljs-value">{
"<span class="hljs-attribute">id</span>": <span class="hljs-value"><span class="hljs-number">1</span></span>,
"<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"Standard 2-days Course"</span>
</span>}</span>,
"<span class="hljs-attribute">description</span>": <span class="hljs-value"><span class="hljs-string">"Curso Oficial Management 3.0 en Castellano"</span></span>,
"<span class="hljs-attribute">spoken_languages</span>": <span class="hljs-value">[
<span class="hljs-string">"Spanish"</span>
]</span>,
"<span class="hljs-attribute">materials_language</span>": <span class="hljs-value"><span class="hljs-string">"English"</span></span>,
"<span class="hljs-attribute">additional_info</span>": <span class="hljs-value"><span class="hljs-string">"precios Early Bird hasta el 31 de ...."</span></span>,
"<span class="hljs-attribute">start</span>": <span class="hljs-value"><span class="hljs-string">"2013-02-04"</span></span>,
"<span class="hljs-attribute">end</span>": <span class="hljs-value"><span class="hljs-string">"2013-02-05"</span></span>,
"<span class="hljs-attribute">hours_per_day</span>": <span class="hljs-value"><span class="hljs-number">8</span></span>,
"<span class="hljs-attribute">total_hours</span>": <span class="hljs-value"><span class="hljs-number">16</span></span>,
"<span class="hljs-attribute">facilitators</span>": <span class="hljs-value">[
{
"<span class="hljs-attribute">id</span>": <span class="hljs-value"><span class="hljs-number">76</span></span>,
"<span class="hljs-attribute">first_name</span>": <span class="hljs-value"><span class="hljs-string">"Angel"</span></span>,
"<span class="hljs-attribute">last_name</span>": <span class="hljs-value"><span class="hljs-string">"Medinilla"</span></span>,
"<span class="hljs-attribute">photo</span>": <span class="hljs-value"><span class="hljs-string">"https://secure.gravatar.com/avatar/bfe39d10318bb80b9efe49c72065c548?s=300"</span></span>,
"<span class="hljs-attribute">country</span>": <span class="hljs-value"><span class="hljs-string">"ES"</span></span>,
"<span class="hljs-attribute">rating</span>": <span class="hljs-value"><span class="hljs-number">9.55</span>
</span>}
]</span>,
"<span class="hljs-attribute">city</span>": <span class="hljs-value"><span class="hljs-string">"Barcelona"</span></span>,
"<span class="hljs-attribute">country</span>": <span class="hljs-value"><span class="hljs-string">"ES"</span></span>,
"<span class="hljs-attribute">website</span>": <span class="hljs-value"><span class="hljs-string">"http://www.proyectalis.com/2012/12/10/semana-de-formacion-barcelona-2013/"</span></span>,
"<span class="hljs-attribute">registration_page</span>": <span class="hljs-value"><span class="hljs-string">"http://www.proyectalis.com/2012/12/10/semana-de-formacion-barcelona-2013/"</span></span>,
"<span class="hljs-attribute">rating</span>": <span class="hljs-value"><span class="hljs-number">5.5</span></span>,
"<span class="hljs-attribute">confirmed</span>": <span class="hljs-value"><span class="hljs-literal">true</span></span>,
"<span class="hljs-attribute">free</span>": <span class="hljs-value"><span class="hljs-literal">true</span></span>,
"<span class="hljs-attribute">online</span>": <span class="hljs-value"><span class="hljs-literal">false</span>
</span>}</code></pre><div style="height: 1px;"></div></div></div><div class="title"><strong>Response <code>400</code></strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span></code></pre><div style="height: 1px;"></div></div></div></div></div></section><section id="event-requests" class="resource-group"><h2 class="group-heading">Event Requests <a href="#event-requests" class="permalink">¶</a></h2><div id="event-requests-event-requests" class="resource"><h3 class="resource-heading">Event Requests <a href="#event-requests-event-requests" class="permalink"> ¶</a></h3><div id="event-requests-event-requests-post" class="action post"><h4 class="action-heading"><div class="name">Create New Event Request</div><a href="#event-requests-event-requests-post" class="method post">POST</a><code class="uri">/event-requests</code></h4><p>Adds a new event request to the system</p>
<h4>Example URI</h4><div class="definition"><span class="method post">POST</span> <span class="uri"><span class="hostname">https://api.workshopbutler.com</span>/event-requests</span></div><div class="title"><strong>Response <code>201</code></strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span></code></pre><div style="height: 1px;"></div></div></div><div class="title"><strong>Response <code>400</code></strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span></code></pre><div style="height: 1px;"></div></div></div></div></div></section><section id="facilitators" class="resource-group"><h2 class="group-heading">Facilitators <a href="#facilitators" class="permalink">¶</a></h2><div id="facilitators-facilitators" class="resource"><h3 class="resource-heading">Facilitators <a href="#facilitators-facilitators" class="permalink"> ¶</a></h3><div id="facilitators-facilitators-get" class="action get"><h4 class="action-heading"><div class="name">Facilitator List</div><a href="#facilitators-facilitators-get" class="method get">GET</a><code class="uri">/facilitators{?fields}</code></h4><p>Returns the list of all trainers for the account. The trainers are returned sorted by name.</p>
<p>The content of the list depends on the type of account:</p>
<ul>
<li>
<p>for knowledge brands, it contains all active trainers/facilitators</p>
</li>
<li>
<p>for training companies, it contains all active trainers, both employees and external trainers</p>
</li>
<li>
<p>for trainers, it contains the only record of the trainer himself</p>
</li>
</ul>
<h4>Example URI</h4><div class="definition"><span class="method get">GET</span> <span class="uri"><span class="hostname">https://api.workshopbutler.com</span>/facilitators?<span class="hljs-attribute">fields=</span><span class="hljs-literal">"first_name,email_address"</span></span></div><div class="title"><strong>URI Parameters</strong><div class="collapse-button show"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><dl class="inner"><dt>fields</dt><dd><code>string</code> <span>(optional)</span> <span class="text-muted example"><strong>Example: </strong><span>"first_name,email_address"</span></span><p>The output contains only the defined fields</p>
</dd></dl></div><div class="title"><strong>Response <code>200</code></strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span></code></pre><div style="height: 1px;"></div><h5>Body</h5><pre><code>[
{
"<span class="hljs-attribute">id</span>": <span class="hljs-value"><span class="hljs-number">12</span></span>,
"<span class="hljs-attribute">first_name</span>": <span class="hljs-value"><span class="hljs-string">"Nick"</span></span>,
"<span class="hljs-attribute">last_name</span>": <span class="hljs-value"><span class="hljs-string">"Doom"</span></span>,
"<span class="hljs-attribute">photo</span>": <span class="hljs-value"><span class="hljs-literal">null</span></span>,
"<span class="hljs-attribute">country</span>": <span class="hljs-value"><span class="hljs-string">"GB"</span></span>,
"<span class="hljs-attribute">languages</span>": <span class="hljs-value">[
<span class="hljs-string">"English"</span>
]</span>,
"<span class="hljs-attribute">countries</span>": <span class="hljs-value">[
<span class="hljs-string">"GB"</span>
]</span>,
"<span class="hljs-attribute">rating</span>": <span class="hljs-value"><span class="hljs-number">6.416666984558105</span></span>,
"<span class="hljs-attribute">badges</span>": <span class="hljs-value">[
{
"<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"Certificate of Attendance"</span></span>,
"<span class="hljs-attribute">url</span>": <span class="hljs-value"><span class="hljs-string">"https://d2ttjh3tmuazph.cloudfront.net/badges/3761a40b388780d62d73abb88896cef671c981c1.jpg"</span>
</span>},
{
"<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"Certificate of Knowledge"</span></span>,
"<span class="hljs-attribute">url</span>": <span class="hljs-value"><span class="hljs-string">"https://d2ttjh3tmuazph.cloudfront.net/badges/e473d0a30a730c33a2f41a47d178c57c9963e8b5.jpg"</span>
</span>},
{
"<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"Change For Happiness"</span></span>,
"<span class="hljs-attribute">url</span>": <span class="hljs-value"><span class="hljs-string">"https://d2ttjh3tmuazph.cloudfront.net/badges/ca751785ba194f43d7b19afa8226008e332f1976.jpg"</span>
</span>}
]
</span>},
{
"<span class="hljs-attribute">id</span>": <span class="hljs-value"><span class="hljs-number">14</span></span>,
"<span class="hljs-attribute">first_name</span>": <span class="hljs-value"><span class="hljs-string">"Alejandra"</span></span>,
"<span class="hljs-attribute">last_name</span>": <span class="hljs-value"><span class="hljs-string">"Dojo"</span></span>,
"<span class="hljs-attribute">photo</span>": <span class="hljs-value"><span class="hljs-literal">null</span></span>,
"<span class="hljs-attribute">country</span>": <span class="hljs-value"><span class="hljs-string">"ES"</span></span>,
"<span class="hljs-attribute">languages</span>": <span class="hljs-value">[
<span class="hljs-string">"Spanish"</span>
]</span>,
"<span class="hljs-attribute">countries</span>": <span class="hljs-value">[
<span class="hljs-string">"ES"</span>,
<span class="hljs-string">"CO"</span>
]</span>,
"<span class="hljs-attribute">rating</span>": <span class="hljs-value"><span class="hljs-number">8.321</span></span>,
"<span class="hljs-attribute">badges</span>": <span class="hljs-value">[]
</span>}
]</code></pre><div style="height: 1px;"></div></div></div></div><div id="facilitators-facilitators-get-1" class="action get"><h4 class="action-heading"><div class="name">Get Facilitator</div><a href="#facilitators-facilitators-get-1" class="method get">GET</a><code class="uri">/facilitators/{id}</code></h4><p>Get a detailed info about facilitator</p>
<h4>Example URI</h4><div class="definition"><span class="method get">GET</span> <span class="uri"><span class="hostname">https://api.workshopbutler.com</span>/facilitators/<span class="hljs-attribute" title="id">id</span></span></div><div class="title"><strong>URI Parameters</strong><div class="collapse-button show"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><dl class="inner"><dt>id</dt><dd><code>number</code> <span class="required">(required)</span> <p>Id of the facilitator</p>
</dd></dl></div><div class="title"><strong>Response <code>200</code></strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span></code></pre><div style="height: 1px;"></div><h5>Body</h5><pre><code>{
<span class="hljs-string">"id"</span> : <span class="hljs-number">25</span>,
<span class="hljs-string">"first_name"</span> : <span class="hljs-string">"Sergey"</span>,
<span class="hljs-string">"last_name"</span> : <span class="hljs-string">"Kotlov"</span>,
<span class="hljs-string">"email_address"</span> : <span class="hljs-string">"skotlov@gmail.com"</span>,
<span class="hljs-string">"image"</span> : <span class="hljs-string">"https://secure.gravatar.com/avatar/996e4a0e5366080a444e43a4b446fcf6?s=300"</span>,
<span class="hljs-string">"address"</span> : {
<span class="hljs-string">"street_1"</span> : <span class="hljs-string">"3 Kotelnikova alley 75"</span>,
<span class="hljs-string">"street_2"</span> : <span class="hljs-literal">null</span>,
<span class="hljs-string">"city"</span> : <span class="hljs-string">"Saint-Petersburg"</span>,
<span class="hljs-string">"post_code"</span> : <span class="hljs-string">"197341"</span>,
<span class="hljs-string">"province"</span> : <span class="hljs-string">"----"</span>,
<span class="hljs-string">"country"</span> : <span class="hljs-string">"RU"</span>
},
<span class="hljs-string">"bio"</span> : <span class="hljs-string">"blabla"</span>,
<span class="hljs-string">"interests"</span> : <span class="hljs-literal">null</span>,
<span class="hljs-string">"twitter_handle"</span> : <span class="hljs-string">"skotlov"</span>,
<span class="hljs-string">"facebook_url"</span> : <span class="hljs-literal">null</span>,
<span class="hljs-string">"linkedin_url"</span> : <span class="hljs-literal">null</span>,
<span class="hljs-string">"google_plus_url"</span> : <span class="hljs-literal">null</span>,
<span class="hljs-string">"website"</span> : <span class="hljs-string">"http://changegeek.ru"</span>,
<span class="hljs-string">"blog"</span> : <span class="hljs-string">"http://changegeek.ru"</span>,
<span class="hljs-string">"active"</span> : <span class="hljs-literal">true</span>,
<span class="hljs-string">"organisations"</span> : [ {
<span class="hljs-string">"id"</span> : <span class="hljs-string">"24"</span>,
<span class="hljs-string">"name"</span> : <span class="hljs-string">"Happy Melly One BV"</span>,
<span class="hljs-string">"city"</span> : <span class="hljs-string">"Rotterdam"</span>,
<span class="hljs-string">"country"</span> : <span class="hljs-string">"NL"</span>,
<span class="hljs-string">"website"</span> : <span class="hljs-literal">null</span>
} ],
<span class="hljs-string">"endorsements"</span> : [ {
<span class="hljs-string">"content"</span> : <span class="hljs-string">"I was impressed by his passion"</span>,
<span class="hljs-string">"name"</span> : <span class="hljs-string">"Sergey Kotlov"</span>,
<span class="hljs-string">"company"</span> : <span class="hljs-string">"Happy Melly"</span>
} ],
<span class="hljs-string">"materials"</span> : [ {
<span class="hljs-string">"type"</span> : <span class="hljs-string">"article"</span>,
<span class="hljs-string">"link"</span> : <span class="hljs-string">"http://mail.ru"</span>
}, {
<span class="hljs-string">"type"</span> : <span class="hljs-string">"video"</span>,
<span class="hljs-string">"link"</span> : <span class="hljs-string">"http://hithat.com"</span>
}, {
<span class="hljs-string">"type"</span> : <span class="hljs-string">"casestudy"</span>,
<span class="hljs-string">"link"</span> : <span class="hljs-string">"http://hithat.com"</span>
} ],
<span class="hljs-string">"years_of_experience"</span> -> <span class="hljs-number">3</span>,
<span class="hljs-string">"number_of_events"</span> -> <span class="hljs-number">65</span>,
<span class="hljs-string">"rating"</span>: <span class="hljs-number">0.0</span>,
<span class="hljs-string">"statistics"</span>: {
<span class="hljs-string">"public_rating"</span>: <span class="hljs-number">4.56</span>,
<span class="hljs-string">"private_rating"</span>: <span class="hljs-number">4.56</span>,
<span class="hljs-string">"public_median"</span>: <span class="hljs-number">7</span>,
<span class="hljs-string">"private_rating"</span>: <span class="hljs-number">6</span>,
<span class="hljs-string">"public_nps"</span>: <span class="hljs-number">45.5</span>,
<span class="hljs-string">"private_nps"</span>: <span class="hljs-number">56.7</span>,
<span class="hljs-string">"number_of_public_evaluations"</span>: <span class="hljs-number">57</span>,
<span class="hljs-string">"number_of_private_evaluations"</span>: <span class="hljs-number">156</span>
},
<span class="hljs-string">"badges"</span> : [ {
<span class="hljs-string">"name"</span> : <span class="hljs-string">"Yay4Monday"</span>,
<span class="hljs-string">"url"</span> : <span class="hljs-string">"https://d2ttjh3tmuazph.cloudfront.net/badges/aae9390445ddb5e3935f8a2f0cd1eb5388f21619.jpg"</span>
}, {
<span class="hljs-string">"name"</span> : <span class="hljs-string">"Conference Talk"</span>,
<span class="hljs-string">"url"</span> : <span class="hljs-string">"https://d2ttjh3tmuazph.cloudfront.net/badges/7281fe689afb695f0c1f84baaf0af18e1460514a.jpg"</span>
} ]
}</code></pre><div style="height: 1px;"></div></div></div><div class="title"><strong>Response <code>404</code></strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span></code></pre><div style="height: 1px;"></div></div></div></div></div></section></div></div></div><p style="text-align: center;" class="text-muted">Generated by <a href="https://github.com/danielgtaylor/aglio" class="aglio">aglio</a> on 17 Apr 2018</p><script>/* eslint-env browser */
/* eslint quotes: [2, "single"] */
'use strict';
/*
Determine if a string ends with another string.
*/
function endsWith(str, suffix) {
return str.indexOf(suffix, str.length - suffix.length) !== -1;
}
/*
Get a list of direct child elements by class name.
*/
function childrenByClass(element, name) {
var filtered = [];
for (var i = 0; i < element.children.length; i++) {
var child = element.children[i];
var classNames = child.className.split(' ');
if (classNames.indexOf(name) !== -1) {
filtered.push(child);
}
}
return filtered;
}
/*
Get an array [width, height] of the window.
*/
function getWindowDimensions() {
var w = window,
d = document,
e = d.documentElement,
g = d.body,
x = w.innerWidth || e.clientWidth || g.clientWidth,
y = w.innerHeight || e.clientHeight || g.clientHeight;
return [x, y];
}
/*
Collapse or show a request/response example.
*/
function toggleCollapseButton(event) {
var button = event.target.parentNode;
var content = button.parentNode.nextSibling;
var inner = content.children[0];
if (button.className.indexOf('collapse-button') === -1) {
// Clicked without hitting the right element?
return;
}
if (content.style.maxHeight && content.style.maxHeight !== '0px') {
// Currently showing, so let's hide it
button.className = 'collapse-button';
content.style.maxHeight = '0px';
} else {
// Currently hidden, so let's show it
button.className = 'collapse-button show';
content.style.maxHeight = inner.offsetHeight + 12 + 'px';
}
}
function toggleTabButton(event) {
var i, index;
var button = event.target;
// Get index of the current button.
var buttons = childrenByClass(button.parentNode, 'tab-button');
for (i = 0; i < buttons.length; i++) {
if (buttons[i] === button) {
index = i;
button.className = 'tab-button active';
} else {
buttons[i].className = 'tab-button';
}
}
// Hide other tabs and show this one.
var tabs = childrenByClass(button.parentNode.parentNode, 'tab');
for (i = 0; i < tabs.length; i++) {
if (i === index) {
tabs[i].style.display = 'block';
} else {
tabs[i].style.display = 'none';
}
}
}
/*
Collapse or show a navigation menu. It will not be hidden unless it
is currently selected or `force` has been passed.
*/
function toggleCollapseNav(event, force) {
var heading = event.target.parentNode;
var content = heading.nextSibling;
var inner = content.children[0];
if (heading.className.indexOf('heading') === -1) {
// Clicked without hitting the right element?
return;
}
if (content.style.maxHeight && content.style.maxHeight !== '0px') {
// Currently showing, so let's hide it, but only if this nav item
// is already selected. This prevents newly selected items from
// collapsing in an annoying fashion.
if (force || window.location.hash && endsWith(event.target.href, window.location.hash)) {
content.style.maxHeight = '0px';
}
} else {
// Currently hidden, so let's show it
content.style.maxHeight = inner.offsetHeight + 12 + 'px';
}
}
/*
Refresh the page after a live update from the server. This only
works in live preview mode (using the `--server` parameter).
*/
function refresh(body) {
document.querySelector('body').className = 'preload';
document.body.innerHTML = body;
// Re-initialize the page
init();
autoCollapse();
document.querySelector('body').className = '';
}
/*
Determine which navigation items should be auto-collapsed to show as many
as possible on the screen, based on the current window height. This also
collapses them.
*/
function autoCollapse() {
var windowHeight = getWindowDimensions()[1];
var itemsHeight = 64; /* Account for some padding */
var itemsArray = Array.prototype.slice.call(
document.querySelectorAll('nav .resource-group .heading'));
// Get the total height of the navigation items
itemsArray.forEach(function (item) {
itemsHeight += item.parentNode.offsetHeight;
});
// Should we auto-collapse any nav items? Try to find the smallest item
// that can be collapsed to show all items on the screen. If not possible,
// then collapse the largest item and do it again. First, sort the items
// by height from smallest to largest.
var sortedItems = itemsArray.sort(function (a, b) {
return a.parentNode.offsetHeight - b.parentNode.offsetHeight;
});
while (sortedItems.length && itemsHeight > windowHeight) {
for (var i = 0; i < sortedItems.length; i++) {
// Will collapsing this item help?
var itemHeight = sortedItems[i].nextSibling.offsetHeight;
if ((itemsHeight - itemHeight <= windowHeight) || i === sortedItems.length - 1) {
// It will, so let's collapse it, remove its content height from
// our total and then remove it from our list of candidates
// that can be collapsed.
itemsHeight -= itemHeight;
toggleCollapseNav({target: sortedItems[i].children[0]}, true);
sortedItems.splice(i, 1);
break;
}
}
}
}
/*
Initialize the interactive functionality of the page.
*/
function init() {
var i, j;
// Make collapse buttons clickable
var buttons = document.querySelectorAll('.collapse-button');
for (i = 0; i < buttons.length; i++) {
buttons[i].onclick = toggleCollapseButton;
// Show by default? Then toggle now.
if (buttons[i].className.indexOf('show') !== -1) {
toggleCollapseButton({target: buttons[i].children[0]});
}
}
var responseCodes = document.querySelectorAll('.example-names');
for (i = 0; i < responseCodes.length; i++) {
var tabButtons = childrenByClass(responseCodes[i], 'tab-button');
for (j = 0; j < tabButtons.length; j++) {
tabButtons[j].onclick = toggleTabButton;
// Show by default?
if (j === 0) {
toggleTabButton({target: tabButtons[j]});
}
}
}
// Make nav items clickable to collapse/expand their content.
var navItems = document.querySelectorAll('nav .resource-group .heading');
for (i = 0; i < navItems.length; i++) {
navItems[i].onclick = toggleCollapseNav;
// Show all by default
toggleCollapseNav({target: navItems[i].children[0]});
}
}
// Initial call to set up buttons
init();
window.onload = function () {
autoCollapse();
// Remove the `preload` class to enable animations
document.querySelector('body').className = '';
};
</script></body></html>