-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathapiary.apib
937 lines (652 loc) · 24.5 KB
/
apiary.apib
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
FORMAT: 1A
HOST: https://school-time.co/app2/index.php/api
# SchoolTime
Integrate your app with SchoolTime. This unified API gives you access to SchoolTime, in a click, your customer can connect to SchoolTime from your app, and instantly access their SchoolTime data.
**What kind of applications can make use of SchoolTime API?**
If you have an application in any of these categories, you can tap into the extremely popular SchoolTime customer base and also provide your customers with single click relevant data exchange.
1. Education Technology Applications like Learning Management Systems, MOOC Content providers, and similar apps can pull student and teacher related information from SchoolTime to provide organised access and authentication inside their app.
2. Payroll and HRIS Applications can pull staff data from SchoolTime to automatically populate their database and access to their application. Also includes Employee Time Tracking apps, Biometric Systems, project management tools and similar.
3. Finance and Accounting applications can pull income details as well as dues from SchoolTime. This will help in reduction of overheads as all invoices can be populated into any accounting system from SchoolTime with a single click.
##Requirements for apps using the SchoolTime API
SchoolTime API supports non-rich internet SaaS apps that users access with a web browser. Mobile extensions to these SaaS apps are also supported.
If you plan to integrate your app with SchoolTime, your app must:
* Be a web app available for use within a browser.
* Pass the technical, security, and marketing reviews.
The API is organized around REST. All requests should be made over SSL. All request and response bodies, including errors, are encoded in JSON.This collection of API provides various methods to pull data from SchoolTime.
*Note*
ST-API-KEY must be passed in the request header. It can be obtained from your SchoolTime admin login.
Comma can be used in the paramenter (https://school-time.co/app2/index.php/api/students?id=9,2,10)
## Students [/students/{?id,board,class}]
### GET [GET]
This retrieves the list of student data from your institute on SchoolTime. You can retrieve students by their ID, board, or class. One or more combinations of these parameters (id, board, class) can be passed to pull the data from SchoolTime.
+ Request (application/json)
+ Headers
ST-API-KEY: StRest@123
+ Parameters
+ id (optional, number) ... Student ID
+ board (optional, string) ... Name of the board / sub-school
+ class (optional, string) ... Name of the class belong to board/sub-school
+ Response 200 (application/json)
{
"id": "9",
"name": "Kumar"
"birthday": "23/06/2013"
"sex": "male"
"religion": ""
"blood_group": ""
"address": "Hyderabad"
"phone": "9913456788"
"email": "chandradas.lokesh@stplglobal.com"
"nationality": null
"board": "State Board"
"class": "2"
"section": "B"
}
+ Response 403 (application/json)
{
"status": "false"
"message": "Invalid API key"
}
+ Response 404 (application/json)
{
"status": false
"message": "data could not be found"
}
### POST [POST]
You can use this method to pass the student data to SchoolTime (to create new student). Below values can be passed in the request body with JSON format.
name (string) : Student Name
email (string) : Email ID of the Student. this will be used to Login
password (optional, string) : Password to login ST. If not provided the default password is Student@123
roll (optinonal, string) : Roll number of the student
board (optional, string) : Name of the board / sub-school
class (optional, string) : Name of the class belong to board/sub-school
section (optional, string) : Section of the class
birthday (optional, date) : Date of birth, if not provided current date reduced with 3 years and stored accordingly
sex (optional, string) : Gender of the student, if not provided, "male" is default type
address (optional, string) : Address details in one line
phone (optional, string) : Phone number
Note :
Students created with API will be inactive by default. The admin user has to activate them.
This API as of now accepting one student data per request. Batch optoin will be added soon.
+ Request (application/json)
+ Headers
ST-API-KEY: StRest@123
+ Body
{
"name": "Roshan Kumar",
"email":"chandradas.lokesh@stplglobal.com",
"birthday": "23/Jan/2013",
"sex": "male",
"religion": "Hindu",
"blood_group": "O Plus",
"address": "Hyderabad",
"phone": "9913456788",
"nationality": "Indian",
"board": "State Board",
"class": "2",
"section": "B"
}
+ Response 201 (application/json)
{
"id": 616,
"name": "Roshan Kumar",
"email": "chandradas.lokesh@stplglobal.com",
"message": "Added Student"
}
+ Response 403 (application/json)
{
"status": "false"
"message": "Invalid API key"
}
+ Response 404 (application/json)
{
"status": false
"message": "data could not be found"
}
+ Response 400 (application/json)
{
"status": "false",
"message": "Email Already Exists. Choose PUT if you want to update existing student"
}
### PUT [PUT]
You can use this method to update existing the student data in SchoolTime. Below values can be passed in the request body with JSON format.
id (int) : Unique ID of the student from ST
name (optional, string) : Student Name
email (optional, string) : Email ID of the Student. this will be used to Login
password (optional, string) : Password to login ST
roll (optinonal, string) : Roll number of the student
board (optional, string) : Name of the board / sub-school
class (optional, string) : Name of the class belong to board/sub-school
section (optional, string) : Section of the class
birthday (optional, date) : Date of birth, if not provided current date reduced with 3 years and stored accordingly
sex (optional, string) : Gender of the student, if not provided, "male" is default type
address (optional, string) : Address details in one line
phone (optional, string) : Phone number
Note :
This API as of now accepting one student data per request. Batch optoin will be added soon.
+ Request (application/json)
+ Headers
ST-API-KEY: StRest@123
+ Body
{
"id": 617,
"name": "Roshan Kumar",
"birthday": "23/06/2013",
"sex": "male",
"religion": "Hindu",
"blood_group": "O-",
"address": "Hyderabad",
"phone": "9913456788",
"email": "chandradas.lokesh@stplglobal.com",
"nationality": null,
"board": "State Board",
"class": "2",
"section": "B"
}
+ Response 201 (application/json)
{
"id": 617,
"message": "Student Updated"
}
+ Response 403 (application/json)
{
"status": "false"
"message": "Invalid API key"
}
+ Response 404 (application/json)
{
"status": false
"message": "data could not be found"
}
+ Response 400 (application/json)
{
"status": "false",
"message": "Email Already Exists. Choose PUT if you want to update existing student"
}
## Admins [/admins/{?id}]
### GET [GET]
This gets list of admin user data from your institute on SchoolTime. Comma separated *id* parameter can be passed to retrieve one ore more specific users data.
+ Request (application/json)
+ Headers
ST-API-KEY: StRest@123
+ Parameters
+ id (optional, number) ... Admin ID
+ Response 200 (application/json)
{
"name": "Lokesh"
"qualification": "BTECH"
"birthday": "11/08/1995"
"doj": "11/02/2015"
"sex": "male"
"religion": ""
"blood_group": "a+"
"address": "test"
"phone": "9000675658"
"email": "lokeshdas251@gmail.com"
}
+ Response 403 (application/json)
{
"status": "false"
"message": "Invalid API key"
}
+ Response 404 (application/json)
{
"status": false
"message": "data could not be found"
}
## Accountant [/accountant/{?id}]
### GET [GET]
This gets list of accountant user data from your institute on SchoolTime. Comma separated *id* parameter can be passed to retrieve one ore more specific users data.
+ Request (application/json)
+ Headers
ST-API-KEY: StRest@123
+ Parameters
+ id (optional, number) ... Accountant ID
+ Response 200 (application/json)
{
"name": "Rama"
"qualification": "MCom"
"birthday": "07/13/1995"
"doj": "09/11/2014"
"sex": "male"
"religion": ""
"blood_group": "a+"
"address": ""
"phone": "9630258741"
"email": "finance.user@school.com"
}
+ Response 403 (application/json)
{
"status": "false"
"message": "Invalid API key"
}
+ Response 404 (application/json)
{
"status": false
"message": "data could not be found"
}
## Teachers [/teachers/{?id,department,designation}]
### GET [GET]
This gets list of teaching/non-teaching user data from your institute on SchoolTime.
Available parameters to use are *id*, *department*, and *designation*. Combination of one or more of thse can used. Comma can be applied to filter down.
+ Request (application/json)
+ Headers
ST-API-KEY: StRest@123
+ Parameters
+ id (optional, number) ... Staff ID
+ department (optional, string) ... Name of the department
+ designation (optional, string) ... Name of the designation / job title
+ Response 200 (application/json)
{
"name": "Avinash dfg"
"qualification": "B.TECH"
"birthday": "07/04/1979"
"doj": "03/26/2015"
"sex": "male"
"religion": ""
"blood_group": ""
"address": "Hyderabad"
"phone": ""
"email": "avinassgdfgh@school.com"
"department": "Physics"
"designation": "Professor"
"previous_experience": null
}
+ Response 403 (application/json)
{
"status": "false"
"message": "Invalid API key"
}
+ Response 404 (application/json)
{
"status": false
"message": "data could not be found"
}
### POST [POST]
This methods help you to create teacher data of your school in SchoolTime
name (string) : Teacher Name
email (string) : Email ID of the Teacher. This will be used to Login
password (optional, string) : Password to login ST
birthday (optional, date) : Date of birth, if not provided current date reduced with 3 years and stored accordingly
joindate (optional, date) : Date of joining, if not provided current date reduced with 1 year and stored accordingly
sex (optional, string) : Gender of the student, if not provided, "male" is default type
address (optional, string) : Address details in one line
phone (optional, string) : Phone number
religion (optional, string) : Religion name
blood_group(optional,string): Blood group of the teacher
qualification(optional, string) : Qualification of the teacher
experience (optional, string): Previous experince details of the teacher
Note :
This API as of now accepting one teacher data per request. Batch optoin will be added soon.
+ Request (application/json)
+ Headers
ST-API-KEY: StRest@123
+ Body
{
"name": "Anand Mohan Pal",
"email": "anandmoham.pal@stplglobal.com",
"qualification": "B.TECH",
"birthday": "07/04/1989",
"joindate": "03/26/2015",
"sex": "male",
"religion": "Hindu",
"blood_group": "O+",
"address": "Hyderabad",
"phone": "+914065887875",
"previous_experience": "NONE"
}
+ Response 201 (application/json)
{
"id": 150,
"name": "Anand Mohan Pal",
"email": "anandmoham.pal@stplglobal.com",
"message": "Added Teacher"
}
+ Response 403 (application/json)
{
"status": "false"
"message": "Invalid API key"
}
+ Response 404 (application/json)
{
"status": false
"message": "data could not be found"
}
+ Response 400 (application/json)
{
"status": "false",
"message": "Email Already Exists. Choose PUT if you want to update existing staff"
}
### PUT [PUT]
This methods help you to create teacher data of your school in SchoolTime. Below values can be passed in JSON request body
name (string) : Teacher Name
email (string) : Email ID of the Teacher. This will be used to Login
password (optional, string) : Password to login ST
birthday (optional, date) : Date of birth, if not provided current date reduced with 3 years and stored accordingly
joindate (optional, date) : Date of joining, if not provided current date reduced with 1 year and stored accordingly
sex (optional, string) : Gender of the student, if not provided, "male" is default type
address (optional, string) : Address details in one line
phone (optional, string) : Phone number
religion (optional, string) : Religion name
blood_group(optional,string): Blood group of the teacher
qualification(optional, string) : Qualification of the teacher
experience (optional, string): Previous experince details of the teacher
Note :
This API as of now accepting one teacher data per request. Batch optoin will be added soon.
+ Request (application/json)
+ Headers
ST-API-KEY: StRest@123
+ Body
{
"id":150,
"name": "Anand Mohan Pal",
"email": "anandmoham.pal@stplglobal.com",
"qualification": "MCA",
"birthday": "07/07/1989",
"joindate": "04/28/2015",
"sex": "male",
"religion": "Hindu",
"blood_group": "O+",
"address": "Hyderabad",
"phone": "+914065887875",
"previous_experience": "1 Years"
}
+ Response 200 (application/json)
{
"id": 150,
"message": "Teacher Updated"
}
+ Response 403 (application/json)
{
"status": "false"
"message": "Invalid API key"
}
+ Response 404 (application/json)
{
"status": false
"message": "data could not be found"
}
## Collections [/collections/{?board,class}]
### GET [GET]
This gets list of collections data from your institute on SchoolTime. i.e., the invoices that are paid by the parents will be listed in this.
Parameters allowed are *board*, *class*.
+ Request (application/json)
+ Headers
ST-API-KEY: StRest@123
+ Parameters
+ board (optional, string) ... Name of the board / school
+ class (optional, string) ... Name of the class
+ Response 200 (application/json)
{
"invoice_code": "INV-1-19"
"name": "Nanee"
"board": "State Board"
"class": "3"
"section": "C"
"total_amount": "6346.00"
"payment_status": "Paid"
"date_added": "2015-11-30 00:07:21"
"due_date": "2015-12-25 00:00:00"
"date_paid": "2015-11-30 12:00:00"
}
+ Response 403 (application/json)
{
"status": "false"
"message": "Invalid API key"
}
+ Response 404 (application/json)
{
"status": false
"message": "data could not be found"
}
## Dues [/dues/{?board,class}]
### GET [GET]
This gets list of outstanding collections data from your institute on SchoolTime. i.e., the invoices against the payment is not done.
Parameters allowed are *board*, *class*.
+ Request (application/json)
+ Headers
ST-API-KEY: StRest@123
+ Parameters
+ board (optional, string) ... Name of the board / school
+ class (optional, string) ... Name of the class
+ Response 200 (application/json)
{
"invoice_code": "INV-2-9"
"name": "Kumar"
"board": "State Board"
"class": "2"
"section": "B"
"total_amount": "3053.25"
"payment_status": "Unpaid"
"date_added": "2015-11-30 05:33:14"
"due_date": "2015-12-30 00:00:00"
"date_paid": null
}
+ Response 403 (application/json)
{
"status": "false"
"message": "Invalid API key"
}
+ Response 404 (application/json)
{
"status": false
"message": "data could not be found"
}
## Expenses [/expenses/{?category,from,to}]
### GET [GET]
This gets list of expense data from your institute on SchoolTime.
Available parameters are *category*, *from*, and *to*
+ Request (application/json)
+ Headers
ST-API-KEY: StRest@123
+ Parameters
+ category (optional, string) ... Name of the expense category
+ from (optional, date) ... Starting date to apply
+ to (optional, date) ... Ending date to apply
+ Response 200 (application/json)
{
"category": "Vehicle Maintenance"
"title": "Vehicle Repair"
"amount": "500"
"method": "card"
"date": "2015-08-05 00:00:00"
}
+ Response 403 (application/json)
{
"status": "false"
"message": "Invalid API key"
}
+ Response 404 (application/json)
{
"status": false
"message": "data could not be found"
}
## Boards [/boards/{?board}]
### GET [GET]
This gets list of boards/branch data from your institute on SchoolTime.
+ Request (application/json)
+ Headers
ST-API-KEY: StRest@123
+ Parameters
+ board (optional, string) ... Name of the board / branch
+ Response 200 (application/json)
[
{
"id": "1",
"name": "State Board",
"description": "State Board System"
},
{
"id": "2",
"name": "CBSE",
"description": "CBSE Board"
}
]
+ Response 403 (application/json)
{
"status": "false"
"message": "Invalid API key"
}
+ Response 404 (application/json)
{
"status": false
"message": "data could not be found"
}
### POST [POST]
This allows you to add a new board/branch data to SchoolTime
name (string) : Name of the board / school branch
description (optinoal, string) : Comments about the board
+ Request (application/json)
+ Headers
ST-API-KEY: StRest@123
+ Body
{
"name": "api test board",
"description" : "this board name added via api call"
}
+ Response 201 (application/json)
{
"id": 14,
"name": "api test board",
"description": "this board name added via api call",
"message": "Added Board"
}
+ Response 403 (application/json)
{
"status": "false"
"message": "Invalid API key"
}
+ Response 404 (application/json)
{
"status": false
"message": "data could not be found"
}
+ Response 400 (application/json)
{
"status": "false",
"message": "Board name already exists"
}
### PUT [PUT]
This allows you to update the existing board/branch data on SchoolTime.
id (int) : Board ID as per SchoolTime
name (string) : Name of the board / school branch
description (optinoal, string) : Comments about the board
+ Request (application/json)
+ Headers
ST-API-KEY: StRest@123
+ Body
{
"id": 14,
"name": "api board name update",
"description" : "this board name updated via api call"
}
+ Response 200 (application/json)
{
"id": 14,
"message": "Updated Board"
}
+ Response 403 (application/json)
{
"status": "false"
"message": "Invalid API key"
}
+ Response 404 (application/json)
{
"status": false
"message": "data could not be found"
}
## Class [/class/{?board,class}]
### GET [GET]
This gets list of classes/batches for the boards/branch from your institute on SchoolTime.
+ Request (application/json)
+ Headers
ST-API-KEY: StRest@123
+ Parameters
+ board (optional, string) ... Name of the board/branch
+ class (optional, string) ... Name of the class
+ Response 200 (application/json)
[
{
"id": "1",
"class": "1",
"board": "State Board"
},
{
"id": "2",
"class": "2",
"board": "State Board"
}
]
+ Response 403 (application/json)
{
"status": "false"
"message": "Invalid API key"
}
+ Response 404 (application/json)
{
"status": false
"message": "data could not be found"
}
### POST [POST]
This allows you to add a new board/branch data to SchoolTime
name (string) : Name of the class / batch
board (string) : Name of the board / school branch
+ Request (application/json)
+ Headers
ST-API-KEY: StRest@123
+ Body
{
"name": "api batch",
"board": "api board name update"
}
+ Response 201 (application/json)
{
"id": 18,
"name": "api batch",
"board": "api board name update",
"message": "Added Class"
}
+ Response 403 (application/json)
{
"status": "false"
"message": "Invalid API key"
}
+ Response 404 (application/json)
{
"status": false
"message": "data could not be found"
}
+ Response 400 (application/json)
{
"status": "false",
"message": "Class name already exists in this board"
}
### PUT [PUT]
This allows you to update the existing board/branch data on SchoolTime.
id (int) : Class ID as per SchoolTime
name (string) : Name of the class / batch
board (string) : Name of the board / school branch
+ Request (application/json)
+ Headers
ST-API-KEY: StRest@123
+ Body
{
"id": 18,
"name": "api batch update",
"board": "State Board"
}
+ Response 200 (application/json)
{
"id": 18,
"message": "Class Updated"
P}
+ Response 403 (application/json)
{
"status": "false"
"message": "Invalid API key"
}
+ Response 404 (application/json)
{
"status": false
"message": "data could not be found"
}