lwcApiLogo
API Documentation

Lindsey Wilson College offers an API to approved third parties that provides access to our data. Contact the Department of Information Systems to gain access.

Upon approval, you will be issued a unique client ID and a secret key that allows access to approved API endpoints.

Overview

All requests to the API endpoints must be negotiated over HTTPS (e.g. https://api.lindsey.edu/rest/{endPoint}.)

Each HTTP request must be accompanied with a secure token in the header. Review the documentation for authToken under the Authorization section to see how to obtain this token.

Fields in the response data are case sensitive.

All HTTP GET methods are developed with the following standard set of parameters:

Parameters
Description
fields
Comma delimited list of fields that you want the API to return. Omitting this from your URI returns all fields from the API.
Example:
https://api.lindsey.edu/rest/courses/info.json?fields=courseNumber,termUID,UID,startDate,endDate
orderBy
Comma delimited list of fields by which to sort the data.
Example:
https://api.lindsey.edu/rest/students/info.json?termUID=201601&orderBy=lastName,firstName
count
Limits the number of rows returned in the data.
Example:
https://api.lindsey.edu/rest/students/info.json?termUID=201601&count=100

Authorization

    /auth/authenticate

Endpoint /auth/authenticate

Verifies a user's login credentials on our domain.

Important: All parameters MUST be received as form variables.

POST Method (returns JSON datatype: string)

Parameters
Description
Notes
userID
The user id of the account you want to verify.
This parameter is required if the email parameter is not specified.
email
The email address of the account you want to verify. Must be a valid LWC email address such as someone@lindsey.edu
This parameter is required if the userID parameter is not specified.
password
The password of the account you want to verify.
Required
 
Example:

jQuery AJAX call
				
$.ajax({
	url: 'https://api.lindsey.edu/rest/auth/authenticate.json',
	type: 'post',
	data: {
		userID: 'someone',
		password: 'mySecret'
	},
	headers: {
		Authorization: 'Basic token:{clientToken}'
	},                              
	dataType: 'json',
	success: function (data) {
		console.log(data);
	},
	error: function(xhr, status, error) {
		console.log(error);
	}
}); 
				
  • Response Data Fields
  •  
  • uid (LWC unique identifier for the account owner)
  • auth ('Y' if authenticated, otherwise 'N')
    /auth/token

Endpoint /auth/token

Returns a security token to be used by the client when accessing the APIs.

POST Method (returns JSON datatype: string)

Once you have recieved your client ID {clientID} and secret key {clientSecret}, follow these guidlines to access /auth/token:

  1. Concatenate the two strings in this format: {clientID}:{clientSecret}
  2. Encode the concatenated string using Base64: {encodedString}.
  3. Include this encoded string in the Authorization header of an HTTP POST request to the /auth/token endpoint.
		
Example:
Authorization: Basic credentials:{encodedString}
	
PHP
		
$credentials = base64_encode('{clientID}' . ':' . '{clientSecret}');
$url = 'https://api.lindsey.edu/rest/auth/token.xml';

$options = array(
  'http' => 
	array(
	'method' => 'POST', 
	'header' => array(
					'Authorization: Basic credentials:' . $credentials,
					'Content-Length: 0'
					)
  )
);

$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
				

/auth/token will send you a token {clientToken}. This token will expire 5 minutes after it has been issued.

Each request to the API endpoints must have the {clientToken} in the Authorization header.

  • Example:
  • Authorization: Basic token:{clientToken}
  • Response Data Fields
  •  
  • token

Students

    /students/info

Endpoint /students/info

Provides access to student information such as name and UID.

GET Method (returns JSON datatype: array)

Parameters
Description
Notes
UID
Unique internal identifier for the student.
Not specifying this parameter will return all students.
ID
Student ID
Not specifying this parameter returns all students. For internal usage only. Do not use this parameter in conjunction with the UID
termUID
The unique identifier for the term which the student is enrolled. (For more information about our terms see the INFO API.)
If this parameter is not specified the API will return student data for the term currently in session.
  • Example:
  • https://api.lindsey.edu/rest/students/info.json?termUID=201601&orderBy=lastName,firstName
  • Returns all students enrolled for the term 201601 and sorts the response data by lastName and firstName.
  • Response Data Fields
  •  
  • UID
  • firstName
  • lastName
  • emailAddress
  • gender
  • birthdate
  • role
  • expectedYearOfGraduation
    /students/courses

Endpoint /students/courses

Provides course enrollment for students.

GET Method (returns JSON datatype: array)

Parameters
Description
Notes
UID
Unique internal identifier for the student.
Not specifying this parameter will return all the courses for each student.
ID
Student ID
Not specifying this parameter will return all the courses for each student.
termUID
The unique identifier for the term which the student is enrolled. (For more information about our terms see the INFO API.)
If this parameter is not specified the API will return student course data for the term currently in session.
  • Example:
  • https://portal.lindsey.edu/rest/students/courses.json?UID=225172&termUID=201601
  • Returns all courses that the student with UID 225172 was enrolled for in the 201601 term.
  • Response Data Fields
  •  
  • UID
  • courseUID
  • termUID
  • crn

Courses

    /courses/info

Endpoint /courses/info

Provides access to course information for all courses offered during a given termUID.

GET Method (returns JSON datatype: array)

Parameters
Description
Notes
UID
Unique internal identifier for the course.
Not specifying this parameter will return information for all the courses offered.
termUID
The unique identifier for the term that the course is offered. (For more information about our terms see the INFO API.)
If this parameter is not specified the API will return all course data for the term currently in session.
  • Example:
  • https://api.lindsey.edu/rest/courses/info.json
  • Returns all course data for the current term.
  • Response Data Fields
  •  
  • UID
  • termUID
  • subjectUID
  • subjectDesc
  • courseNumber
  • courseTitle
  • sectionNumber
  • crn
  • sectionSize
  • startDate
  • endDate
  • startTime
  • endTime
  • meetDays
  • building
  • room
  • description
  • facultyUID
  • facultyFirstName
  • facultyLastName

Info

    /info/subjects

Endpoint /info/subjects

Provides access to course subject descriptions.

GET Method (returns JSON datatype: array)

Parameters
Description
Notes
UID
Unique identifier for the subject.
Not specifying this parameter will return all course subjects.
  • Example:
  • https://api.lindsey.edu/rest/info/subjects.json?UID=PHSC
  • Returns the subject description 'Physical Science'.
  • Response Data Fields
  •  
  • UID
  • subjectDesc
    /info/terms

Endpoint /info/terms

Provides access to term information.

GET Method (returns JSON datatype: array)

Parameters
Description
Notes
UID
Unique identifier for the term.
Not specifying this parameter will return information for all the terms.
  • Example:
  • https://api.lindsey.edu/rest/info/terms.json?UID=201601
  • Returns data for the term 201601.
  • Response Data Fields
  •  
  • UID
  • termDesc
  • startDate
  • endDate
  • academicYear

RaiderBucks

    /raiderbucks/trans

Endpoint /raiderbucks/trans

Allows for RaiderBucks balance checking and transaction processing.

GET Method (returns JSON datatype: string)

Parameters
Description
Notes
UID
Unique identifier of the person to check RaiderBucks balance for.
You must include one of the following: UID, ID, or trackData.
ID
Lindsey Wilson College ID (L########) to check RaiderBucks balance for.
 
trackData
The base-64 encoded track data received from swiping a Lindsey Wilson College ID card.
Can be track 1, track 2, or both.
  • Example:
  • https://api.lindsey.edu/rest/raiderBucks/trans.json?UID=225172
  • Returns the balance for UID 225172, such as: 200.00
  • Response Data Fields
  •  
  • UID
  • balance
    /raiderbucks/trans

Post/raiderbucks/trans

POST Method (returns JSON datatype: string)

Parameters
Description
Notes
UID
Unique identifier of the RaiderBucks account being posted to.
You must include one of the following: UID, ID, or trackData.
ID
Lindsey Wilson College ID (L########) of the account being posted to.
 
trackData
The base-64 encoded track data received from swiping a Lindsey Wilson College ID card.
Can be track 1, track 2, or both.
type
The type of transaction to process.
CHARGE or CREDIT
amount
The amount to be charged/credited for the transaction.
Specify amount in US dollars, i.e. 200.50 is $200.50. If purchaser does not have required funds on their account for a CHARGE, an error will be returned.
sourceCode
The source code of the transaction.
This is unique to each vendor and is provided by Lindsey Wilson College.
transNo
The transaction number of the related CHARGE request.
This parameter is required for CREDIT requests. The transNo will be provided as a return field when completing a CHARGE request - this must be passed in for a CREDIT request. Amount credited cannot be higher than amount charged during the related CHARGE transaction.
 

Example:

jQuery AJAX call

$.ajax({ url: 'https://api.lindsey.edu/rest/raiderbucks/trans.json', type: 'post', data: { UID: 225172, type: 'CREDIT', amount: 100, sourceCode: 'RBAPI', transNo: 123456 }, headers: { Authorization: 'Basic token:{clientToken}' }, dataType: 'json', success: function (data) { console.log(data); }, error: function(xhr, status, error) { console.log(error); } });
  • Response Data Fields
  •  
  • UID
  • balance
  • transNo

Error Codes

Error codes returned by LWC APIs:

Code
Reason
Notes
200
OK
Response to a successful GET, PUT, PATCH or DELETE. Can also be used for a POST that doesn't result in a creation.
201
Created
Response to a POST that results in a creation.
204
No Content
Response to a successful request that won't be returning a body (like a DELETE request)
400
Bad Request
The request is malformed, such as if the body does not parse
401
Unauthorized
When no or invalid authentication details are provided.
403
Forbidden
When authentication succeeded but authenticated user doesn't have access to the resource
404
Not Found
When a non-existent resource is requested. This error code is also returned when a query returns no results.
405
Method Not Allowed
When an HTTP method is being requested that isn't allowed for the authenticated user.
409
Resource Already Exists
When inserting new records and the primary key already exists.
410
Gone
Indicates that the resource at this end point is no longer available.
415
Unsupported Media Type.
If incorrect content type was provided as part of the request.
422
Invalid Field Selection
Used for validation errors such as sorting or selecting columns that do not exists.
429
Too many requests
When a request is rejected due to rate limiting.