Skip to content
steve9001 edited this page Oct 10, 2012 · 3 revisions

Web Service API

All requests must be over HTTPS with a username and password for HTTP Basic Authentication.

Registration

This endpoint is used to authenticate the end user caregiver so they can access bus assignments for their students.

Request

GET /aspen_contact_id?last_name=SMITH&student_no=123&dob=2000-03-15

Response: 200 OK

The triple (last_name, student_no, dob) is a valid combination for which there is an aspen_contact_id. The response status is 200 and the body is the aspen_contact_id.

54321

Response: 404 Not Found

The triple (last_name, student_no, dob) is not a valid combination and there is no aspen_contact_id. The response body is empty.

Bus Assignments

This endpoint is used to retrieve the bus assignments for today for all students (the family) associated with the aspen_contact_id.

Request

GET /bus_assignments?aspen_contact_id=54321

Response: 200 OK

The aspen_contact_id 54321 exists. The response body contains a JSON array of records, one for each student in the family. Each record contains student_no, student_name, arrival_bus_no, departure_bus_no. For example:

[
  {
    student_no: 123,
    student_name: 'John Smith',
    arrival_bus_no: 66,
    departure_bus_no: 87
  },
  {
    student_no: 234,
    student_name: 'Mary Smith',
    arrival_bus_no: 66,
    departure_bus_no: 87
  }
]

Response: 404 Not Found

The aspen_contact_id provided in the URL does not exist.

Clone this wiki locally