The Wisenet Next of Kin Endpoint allows your applications to get information about the next of kin for a student.
Next of Kin Properties
The following are mandatory for a PUT / POST request:
- InternationalNextOfKin
- Address
- LocalNextOfKin
- Address
- StudentId
The following are optional for a PUT / POST request:
- InternationalNextOfKin
- Email (maxlength:100)
- FirstName (maxlength:20)
- HomePhone (maxlength:20)
- LastName (maxlength:50)
- MiddleName (maxlength:20)
- Mobile (maxlength:20)
- WorkPhone (maxlength:20)
- LocalNextOfKin
- Email (maxlength:100)
- FirstName (maxlength:20)
- HomePhone (maxlength:20)
- LastName (maxlength:40)
- MiddleName (maxlength:20)
- Mobile (maxlength:20)
- Nationality (see dropdowns: Country)
- Occupation (maxlength:100)
- PassportCountry (see dropdowns: Country)
- PassportNumber (maxlength:20)
- Relationship (custom dropdown: available in References)
- WorkPhone (maxlength:20)
The following are only returned on a GET request:
- Link
- RefInternal
- StudentFirstName
- StudentLastName
- StudentLink
Read Next of Kin for Student
GET /students/student/{id}/nextofkin
Returns the next of kin for the student with the given {id}
Sample request:
curl _X GET \ -H "Accept: application/vnd.mywisenet.api.v1+xml" \ https://tst-api.wisenet.co/students/student/1/nextofkin
Sample response:
xmlns="http://api.mywisenet.com.au/v1/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> > >> Pemberley>> 1 Darcy Street>> Lambton>> >
2100>> United Kingdom> >> 1080>> Derbyshire> >> old.mr@darcy.com.au>> Old>> 0211111111>> Darcy>> Mister>> 0411111111>> 0211111112> > >> students/student/1/nextofkin>> self>> STD0000001: Fitzwilliam Darcy - Next Of Kin> >> >> 1 Darcy Street>> Parramatta>> >
1101>> Australia> >> 2150>> >
01>> NSW> > >> lady.anne@darcy.com.au>> Lady>> 0211111111>> Darcy>> Anne>> 0411111111>> >
1101>> Australia> >> Homemaker>> >
1101>> Australia> >> AU1234>> Mother> > <RefInternal>STD0000001RefInternal>> Fitzwilliam>> 1>> Darcy>> > students/student/1>> student>> STD0000001: Fitzwilliam Darcy> > >
C# Code Sample
public static void GetCourseEnrolmentsSample() { const string url = "https://tst-api.wisenet.co/students/student/{id}/nextofkin"; var request = HttpWebRequest.Create(url) as HttpWebRequest; request.Accept = "application/vnd.mywisenet.api.v1+xml"; request.Method = "GET"; request.UserAgent = "C# Sample Client"; try { // Get response using (var response = request.GetResponse() as HttpWebResponse) { // Get the response stream using (var responseReader = new StreamReader(response.GetResponseStream())) { string responseBody = responseReader.ReadToEnd(); // Console application output Console.WriteLine(responseBody); } } } catch (WebException ex) { Console.WriteLine("Error: {0}", ex.Message); } }
Update Next of Kin for a Student
PUT /students/student/{id}/nextofkin
Updates the next of kin for the student record with the specified {id}.
If you like to receive newly updated object back please use reload=true param
PUT /students/student/{id}/nextofkin?reload=true
Sample request:
curl -X PUT \ -H "Content-Type: application/vnd.mywisenet.api.v1+xml" \ -v \ -d @NextOfKin1.xml \ https://tst-api.wisenet.co/students/student/1/nextofkin
NextOfKin1.xml:
xmlns="http://api.mywisenet.com.au/v1/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> > >> Pemberley>> 1 Darcy Street>> Lambton>> >
2100>> United Kingdom> >> 1080>> Derbyshire> >> old.mr@darcy.com.au>> Old>> 0211111111>> Darcy>> Mister>> 0411111111>> 0211111112> >> >> 1 Darcy Street>> Parramatta>> >
1101>> Australia> >> 2150>> >
01>> NSW> > >> lady.anne@darcy.com.au>> Lady>> 0211111111>> Darcy>> Anne>> 0411111111>> >
1101>> Australia> >> Homemaker>> >
1101>> Australia> >> AU1234>> Mother> >> 1> >
Sample response:
< HTTP/1.1 200 OK < Date: Mon, 04 Jul 2011 23:34:04 GMT < Content-Length: 0
C# Code Sample
private static void UpdateSample() { const string url = "https://tst-api.wisenet.co/students/student/1/nextofkin"; var request = HttpWebRequest.Create(url) as HttpWebRequest; request.ContentType = "application/vnd.mywisenet.api.v1+xml"; request.Method = "PUT"; request.UserAgent = "C# Sample Client"; byte[] byteData = File.ReadAllBytes("NextOfKin1.xml"); // Set the content length in the request headers request.ContentLength = byteData.Length; // Write data using (Stream postStream = request.GetRequestStream()) { postStream.Write(byteData, 0, byteData.Length); } try { // Get response using (var response = request.GetResponse() as HttpWebResponse) { // Get the response stream using (var responseReader = new StreamReader(response.GetResponseStream())) { string responseBody = responseReader.ReadToEnd(); // Console application output Console.WriteLine(responseBody); } } } catch (WebException ex) { Console.WriteLine("Error: {0}", wex.Message); } }