Sie sind auf Seite 1von 9

Conductor App API‟s Documentation

API TEST URL: http://10.0.0.5/portalV3/App_Assets/Api/index.html

All successful API requests will return in the following format (status:200):

Sample Fields Type Description


{ status string Whether the call was successful or
"status": "OK", failed
"data": { } data object JSON Data
}

All failed api requests will return in the following format (status:200):

Sample Fields Type Description


{ status string The call failed
"status": "ERROR", message string Message why the call failed
"message": ""
}

List of API‟s(Response in Json Format)

# Method API API-URI PARAMETERS DETAIL


/{username}
/{password} To check and get conductor information with
1 POST Login API api/conductor/login
(Parameters passed school detail
from form body)
/{schoolId}
2 GET Bus Info. api/conductor/businfo
/{conductorId}
To get bus list with driver information
/{schoolId}
/{sessionid}
3 GET Route Info api/conductor/routeinfo
/{conductorId}
To get route list
/{busid}
/{schoolId}
/{sessionid}
4 GET Stop Info api/conductor/stopinfo /{conductorId} To get bus stop list
/{busid}
/{routeid}
/{schoolId}
/{sessionid}
/{conductorId}
Student api/conductor/studentinf
5 GET info o
/{busid} To get stop wise student list
/{routeid}
/{stoppageId}
/{date}
/{schoolId}
/{conductorId}
/{busid}
Student /{routeid}
api/conductor/updateatt To update attendance of students according to
6 POST Attendance
endance
/{date}
API /{studentId} route type(Pickup or Drop off )
/{attendancetype}
/{attendance}
/{timein}
/{timeout}

API‟s Detail :
1) Login API : api/conductor/login

Post data:

Sample Fields Type Description


{ username string Username (text-box)
"username": "RamKumar",
"password": "ram@12345"
} password string text-box

Response data (Conductor detail):

Sample Fields Type Description


It stores school id of school in
SchoolId int
encrypted form
It stores id of conductor in
ConductorId int
encrypted form
ConductorName string Name of Conductor
{
"status": "OK", Employee Code of Conductor
EmployeeCode string
"data": { (Given by School)
"SchoolId": "MQ==", EmailId string Email-Id of Conductor
"ConductorId": "NDAwNTE=",
"ConductorName": "Ram Kumar Sharma", ContactNo string Contact No. of Conductor
"EmployeeCode": "20180044", It stores active session id of
ActiveSessionId string
"EmailId": "", school in encrypted form
"ContactNo": "0",
Result of response data
"ActiveSessionId": "MzA=", result int (as described in below table)
"result": "1",
"SchoolLatitude": "0",
Latitude information of school
"SchoolLongitude": "0", SchoolLatitude string
current location
"message": "Awesome! You're in..."
Longitude information of
} SchoolLongitude string
school current location
} It return a message according
to‟ result‟ value (as described in
message string
below table)
Response Value Type Description Message Shown
-1 int Account disabled “Oops! Seems like your account isn't active.”
0 int Invalid credentials "Sorry, we couldn't find the account you're trying
to enter. Please try again..."
result
1 int Authenticated "Awesome! You're in..."
<-1 int Unhandled Error "Uh oh, something isn't right. Please try again
later or contact support."

2) Bus Info API (List of Buses) : api/conductor/businfo

Url definition: http://10.0.0.5/portalV3/App_Assets/Api/conductor/businfo/{schoolId}/{conductorId}

Sample Data URL: http://10.0.0.5/portalV3/api/conductor/businfo/MQ==/NDAwNTE=

Response data:
{
"status": "OK",
"data": [
{
"BusId": "ODIxMw==",
"BusNo": "Bus-90833",
"RegistrationNo": "345345345",
"GPSTrackerNo": "",
"SeatingCapacity": "30",
"FuelType": "Diesel",
"DriverId": "MTU5NDU=",
"DriverName": "Tanaw Kumar",
"DriverContactNo": "",
"DriverDOTNo": "",
"DriverLicenseNo": "",
"DriverEmployeeCode": "20140003",
"DriverEmailId": ""
},
{
"BusId": "ODIxNA==",
"BusNo": "Ch-90823",
"RegistrationNo": "3545345",
"GPSTrackerNo": "",
"SeatingCapacity": "50",
"FuelType": "Petrol",
"DriverId": "MTg2Ng==",
"DriverName": "Reshma Khan",
"DriverContactNo": "",
"DriverDOTNo": "",
"DriverLicenseNo": "",
"DriverEmployeeCode": "20160029",
"DriverEmailId": ""
}
]
}
Detail of response data:

Sample Fields Type Description


It stores bus id in encrypted
BusId int
form
BusNo string Bus no.

RegistrationNo string Bus Registration No


{
"BusId": "ODIxMw==", GPSTrackerNo string GPS Tracker No.
"BusNo": "Bus-90833", SeatingCapacity string Seating capacity of Bus
"RegistrationNo": "345345345",
"GPSTrackerNo": "", FuelType string Fuel type of bus
"SeatingCapacity": "30",
It stores driver id of bus in
"FuelType": "Diesel", DriverId string
encrypted form
"DriverId": "MTU5NDU=",
Driver Name
"DriverName": "Tanaw Kumar", DriverName int
"DriverContactNo": "",
"DriverDOTNo": "", DriverContactNo string Driver Contact No.
"DriverLicenseNo": "", DriverDOTNo string Driver DOT No.
"DriverEmployeeCode": "20140003", Driver License No
"DriverEmailId": "" DriverLicenseNo string
},
Employee Code of Driver
DriverEmployeeCode string
(Given by School)
DriverEmailId string Driver EmailId

3) Route Info API : api/conductor/ routeinfo

URL definition: http://10.0.0.5/portalV3/App_Assets/Api/conductor/


routeinfo/{schoolId}/{sessionid}/{conductorId}/{busid}

Sample Data URL: http://10.0.0.5/portalV3/api/conductor/routeinfo/MQ==/MzA=/NDAwNTE=/ODIxMw==

Response data (List of Routes):

{
"status": "OK",
"data": [
{
"RouteId": "MTYyMTA=",
"RouteTypeId": "1",
"RouteType": "Pickup",
"RouteOrigin": "Sector 35",
"RouteDestination": "School",
"RouteColor": "#4242FF"
},
{
"RouteId": "MTYyMTE=",
"RouteTypeId": "0",
"RouteType": "DropOff",
"RouteOrigin": "School",
"RouteDestination": "Sector -35",
"RouteColor": "#4242FF"
}
]
}

Detail of response data:

Sample Fields Type Description


It stores route id in encrypted
RouteId int
form
Route type id
{ RouteTypeId string
(1 :Pickup,0: Drop-off)
"RouteId": "MTYyMTA=",
Type of Route
"RouteTypeId": "1", RouteType string
(Pick up or Drop-off)
"RouteType": "Pickup",
Origin of Route
"RouteOrigin": "Sector 35", RouteOrigin string
(From where route starts)
"RouteDestination": "School",
"RouteColor": "#4242FF" Destination of Route
RouteDestination string
}, (where route ends)
Colour of Route(for highlight
RouteColor string
route in Google map)

4) Bus Stops Info API : api/conductor/ stopinfo

URL definition: http://10.0.0.5/portalV3/App_Assets/Api/conductor/


stopinfo/{schoolId}/{sessionid}/{conductorId}/{busid}/{routeid}

Sample Data URL: http://10.0.0.5/portalV3/api/conductor/stopinfo/MQ==/MzA=/NDAwNTE=/ODIxMw==/MTYyMTA=

Response data(List of Bus Stops) :

"status": "OK",

"data": [

{
"BusStopId": "MTkzODA=",

"BusStopName": "In front of Gopal Sweets ( 8:00AM ) ",

"BusStopDescription": "",

"BusStopLatitude": "45.000000",

"BusStopLongitude": "34.000000"

},

"BusStopId": "MTkzODE=",

"BusStopName": "mini market ( 8:10AM ) ",

"BusStopDescription": "",

"BusStopLatitude": "23.000000",

"BusStopLongitude": "34.000000"

Detail of response data:

Sample Fields Type Description


It stores stop id in encrypted
BusStopId int
form
{
BusStopName string Name of Bus Stop
"BusStopId": "MTkzODA=", BusStopDescription string Description of Bus Stop
Latitude information of stop
"BusStopName": "In front of Gopal BusStopLatitude string
location
Sweets ( 8:00AM ) ",
Longitude information of stop
BusStopLongitude string
"BusStopDescription": "", location

"BusStopLatitude": "45.000000",

"BusStopLongitude": "34.000000"

},

5) Student Info API : api/conductor/ studentinfo

URL definition: http://10.0.0.5/portalV3/App_Assets/Api/conductor/


studentinfo/{schoolId}/{sessionid}/{conductorId}/{busid}/{routeid}/{stoppageId}/{date}

Sample Data URL:


http://10.0.0.5/portalV3/api/conductor/studentinfo/MQ==/MzA=/NDAwNTE=/ODIxMw==/MTYyMTA=/MTkzODA=/20
18-05-21
Response data:

{
"status": "OK",
"data": [
{
"StudentId": "NzA5MzI=",
"StudentName": "Keemti Manoj",
"AdmissionNo": "2017394",
"GenderShort": "M",
"ParentAccountCode": "1060",
"GradeName": "Std-5-A",
"FatherName": "Manoj",
"StudentPhone": "",
"StudentEmail": "",
"GPSTrackingNo": "",
"PickUpAttendance": "1",
"PickUpTimeIn": "12:13:17.4636797",
"PickUpTimeOut": "12:13:20.3074366",
"DropOffAttendance": "-1",
"DropOffTimeIn": "",
"DropOffTimeOut": ""
}
]
}

Detail of response data (List of Students):

Sample Fields Type Description


It stores student id in
StudentId int
encrypted form
StudentName string Name of Student
{ AdmissionNo string Admission No of Student
"StudentId": "NzA5MzI=", GenderShort string Gender of Student
"StudentName": "Keemti Manoj",
ParentAccountCode string Account No of Student
"AdmissionNo": "2017394",
"GenderShort": "M", It contains grade and section
GradeName string
"ParentAccountCode": "1060", information of Student
"GradeName": "Std-5-A", FatherName string Father Name of Student
"FatherName": "Manoj", StudentPhone string Student Contact no
"StudentPhone": "",
StudentEmail string Student Email-id
"StudentEmail": "",
"GPSTrackingNo": "", GPSTrackingNo string GPSTracking No.
"PickUpAttendance": "1", Pick up Attendance of student
"PickUpTimeIn": "12:13:17.4636797", (“-1”:”-“)
PickUpAttendance int
"PickUpTimeOut": "12:13:20.3074366", (“1”: “Present”)
"DropOffAttendance": "-1", (“0”: “Absent”)
"DropOffTimeIn": "", Pick up Bus In Time of
PickUpTimeIn Timespan
"DropOffTimeOut": "" student when entered bus.
}
Pick up Bus Out Time of
PickUpTimeOut Timespan
student when leaved bus.
Drop off Attendance of
student
DropOffAttendance int
(“-1”:”-“)
(“1”: “Present”)
(“0”: “Absent”)
Drop off Bus In Time of
DropOffTimeIn Timespan
student when entered bus.
Drop off Bus Out Time of
DropOffTimeOut Timespan
student when leaved bus.

6) Mark Student Attendance API : api/conductor/ updateattendance

URL definition: http://10.0.0.5/portalV3/App_Assets/Api/conductor/


updateattendance/{schoolId}/{conductorId}/{busid}/{routeid}/{date}/{studentId}/{attendancetype
}/{attendance}/{timein}/{timeout}

Sample Data URL:


http://10.0.0.5/portalV3/api/conductor/updateattendance/MQ==/NDAwNTE=/ODIxMw==/MTYyMTA=/2018-05-
21/NzA5MzI=/PTI/0/true/true

Post Data:

Fields Type Description


schoolId string Id of school
conductorId string Id of active conductor
busid string Id of selected bus from bus list
routeid string Id of selected route from route list
date string Selected attendance date(Date Picker Control)
studentId string Id of selected student from student list
Attendance type : It is a flag that is used to tell database server
about type of attendance. There are 4 types
1) PTI : Pick up Bus Time In
attendancetype string
2) PTO: Pick up Bus Time Out
3) DTI: Drop off Bus Time In
4) DTO: Drop off Bus Time Out
Attendance of Student : 3 Types :
1) „-1‟: „-‟ (Not Marked)
attendance string
2) „1‟ : „Present‟
3) „0‟ : „Absent‟
timein Boolean Bus Time In (Check box)
timeout Boolean Bus Time Out (Check box)

Response data:

{
"status": "OK",
"data": {
"ResultKey": "2",
"ResultValue": "Updated Successfully"
}
}
Detail of response data (Attendance updation):

Sample Fields Type Description


{ Result of response data
ResultKey int
"status": "OK", (as described in below table)
"data": { It return a message according
"ResultKey": "2", to‟ result‟ value (as described
ResultValue string
"ResultValue": "Updated Successfully" in below table)
}
}

Response Value Type Description Message Shown


-1 int Not updated “Not updated.”
result 1 int Saved "Saved Successfully"
2 int updated "Updated Successfully"

Das könnte Ihnen auch gefallen