Using The SMS API (2.0)

Using The SMS API (2.0)


I. Login

A. Description

This API function is used to authenticate the user with SMS. If successful, it returns a token that 
can be used to authorize calls to the other functions of SMS API.

B. Information

URL: https://api.rto.net.au/api/Login
Method: POST
Request Header: 
Content-Type: application/json
Request Body:
{
“username”: “string”,
“subDomain”: “string”,
“lmsToken”: “string”
}

C. Sample Usage in PHP

$ch = curl_init();
$headers = array(
 'Content-Type: application/json',
 'Access-Control-Allow-Origin: *',
);
$data = array(
 'username' => $config->smsemail,
 'lmstoken' => $config->smstoken,
 'subDomain' => $config->smssubdomain
);
$data = json_encode($data);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_URL, $curl_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
$response = json_decode(curl_exec($ch));
if (curl_getinfo($ch,CURLINFO_HTTP_CODE)==200)
{
 return $response->token;
}


D. Successful

If the username, lmsToken and subdomain is verified against the SMS database, the HTTP Code 
should return 200, and JSON response body should contain an element named “token”. Save the 
value for this item to be able to use the other functions in the API.

E. Error

If the user does not exist or the username, lmsToken and subdomain fields doesn’t match with 
the database, HTTP Code should be 401 for Unauthorized.

II. Add Students Details

A. Description

This API function is used to add a student record to SMS. Needs a valid token added to the HTTP 
header for authorization. RTO where the student is added depends on the email address and 
password used to get the token.

B. Information

URL: https://api.rto.net.au/api/StudentInfo
Method: POST
Request Header: 
Content-Type: application/json
Authorization: Bearer <token from login>
Request Body: Refer to schema/model Student
Response Body: Refer to schema/model APIResponse

C. Sample Usage in PHP


$ch = curl_init();
$headers = [
 'Accept: application/json',
 'Content-Type: application/json',
 'Access-Control-Allow-Origin: *',
 'Authorization: Bearer ' . $token,
];
$data = [
 'studentName' => $student->firstname,
 'studentSurname' => $student->lastname,
 'studentEmail' => $student->email,
];
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_URL, $curl_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
$response = json_decode(curl_exec($ch));
if ($response->success)
{
 return $response->newId;
}


D. Successful

If user was successfully added, the API will respond with JSON string containing element success
set to true, and element newId set to an integer value representing the student number of the 
added record in SMS.

E. Error

If login token was not authenticated, the HTTP Code will be returned as 401 for Unauthorized. If 
authenticated, the API will respond with JSON string containing element success set to false, and 
element msg containing additional information on the error.

III. Update Students Details

A. Description

This function is used to update an existing student record in SMS. Needs a valid token added to 
the HTTP header for authorization. RTO depends on the email address and password used to get 
the token.

B. Information

URL: https://api.rto.net.au/api/StudentInfo
Method: PUT
Request Header: 
Content-Type: application/json
Authorization: Bearer <token from login>
Request Body: Refer to schema/model Student
Response Body: Refer to schema/model APIResponse

C. Sample Usage in PHP

$ch = curl_init();
$headers = [
 'Accept: application/json',
 'Content-Type: application/json',
 'Access-Control-Allow-Origin: *',
 'Authorization: Bearer ' . $token,
];
$data = [
'studentID' => $smsProfile->contactid,
'studentName' => $student->_instance->firstname,
'studentSurname' => $student->_instance->lastname,
'studentEmail' => $student->_instance->email,
'studentUniqueStudentIdentifier' => $smsProfile->usi,
'studentMobileNumber' => $smsProfile->mobile_number,
'studentDOB' => date('d-m-Y', $smsProfile->date_of_birth),
'studentGender' => $smsProfile->gender,
'studentPostalPropertyName' => $smsProfile->postal_apartment,
'studentPostalStreetNumber' => $smsProfile->postal_house_number,
'studentPostalStreetName' => $smsProfile->postal_street,
'studentPostalBox' => $smsProfile->post_office_box,
'studentPostalSuburb' => $smsProfile->postal_suburb,
'studentPostalPostcode' => $smsProfile->postal_post_code,
'studentPostalState' => $this->normalizeTerritory($smsProfile-
>postal_state),
'studentPropertyName' => $smsProfile->residental_apartment,
'studentStreetNumber' => $smsProfile->residental_house_number,
'studentStreetName' => $smsProfile->residental_street,
'studentSuburb' => $smsProfile->residental_suburb,
'studentPostcode' => $smsProfile->residental_post_code,
'studentCountryOfResidence' => $smsProfile->residental_country,
'studentState' => $this->normalizeTerritory($smsProfile->residental_state),
'studenDisabilityFlag' => $disabilityFlag,
'studentIndividualHearing' => $hearing,
'studentIndividualPhysical'=> $physical,
'studentIndividualIntellectual'=> $intellectual,
'studentIndividualLearning'=> $learning,
'studentIndividualMentalIllness'=> $mental,
'studentIndividualAcquiredBrainImpairment'=> $brain,
'studentIndividualVision'=> $vision,
'studentIndividualMedicalCondition'=> $condition,
'studentIndividualOther'=> $other
];
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_URL, $curl_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
$response = json_decode(curl_exec($ch));
if ($response->success)
{
 // insert additional code for successful update here
}


D. Successful

If user was successfully added, the API will respond with JSON string containing element success
set to true.

E. Error

If login token was not authenticated, the HTTP Code will be returned as 401 for Unauthorized. If 
authenticated, the API will respond with JSON string containing element success set to false, and 
element msg containing additional information on the error.

IV. Enrol Student

A. Description

This function is used to enrol a student in a program instance in SMS via the group ID. Needs a 
valid token added to the HTTP header for authorization. RTO depends on the email address and 
password used to get the token.

B. Information

URL: https://api.rto.net.au/api/Enrolment
Method: POST
Request Header: 
Content-Type: application/json
Authorization: Bearer <token from login>
Parameters:
StudentNumber: integer
GroupID: integer
Request Body: N/A
Response Body: Refer to schema/model APIResponse

C. Sample Usage in PHP

$ch = curl_init();
$headers = [
 'Accept: application/json',
 'Content-Type: application/json',
 'Access-Control-Allow-Origin: *',
 'Authorization: Bearer ' . $token,
];
$data = array();
$studentnumber . '&GroupID=' . $groupid;
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_URL, $curl_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
$response = json_decode(curl_exec($ch));
if ($response->success)
{
 return $response->newId;
}


D. Successful

If enrolment was successful, the API will respond with JSON string containing element success
set to true, and element newId set to an integer value representing the enrolment ID of the 
added record in SMS.

E. Error

If login token was not authenticated, the HTTP Code will be returned as 401 for Unauthorized. If 
authenticated, the API will respond with JSON string containing element success set to false, and 
element msg containing additional information on the error.

V. Search Unit Results

A. Description

This API function is used to retrieve a list of unit information using the Enrolment ID and a date 
range. The start date is compared to the Unit’s Proposed Start or Actual Start date while the end 
date is compared to the Date Proposed for Final Assessment or Date Deemed Competent. 
Needs a valid token added to the HTTP header for authorization. RTO depends on the email 
address and password used to get the token.

B. Information

URL: https://api.rto.net.au/api/SearchUnits 
Method: GET
Request Header: 
Content-Type: application/json
Authorization: Bearer <token from login>
Parameters:
EnrolID: integer
StartDate: string (date in yyyy-mm-dd format)
EndDate: string (date in yyyy-mm-dd format)
Request Body: N/A
Response Body: Refer to schema/model APIResponseUnits

C. Sample Usage in PHP

$ch = curl_init();
$headers = [
 'Accept: application/json',
 'Content-Type: application/json',
 'Access-Control-Allow-Origin: *',
 'Authorization: Bearer ' . $token,
];
$curl_url = 
01&EndDate=2022-03-05';
curl_setopt($ch, CURLOPT_URL, $curl_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
$response = json_decode(curl_exec($ch));
if ($response->success)
{
 return $response->unitLst;
}


D. Successful

If successful, the API will respond with JSON string containing element success set to true, and 
element unitLst set to an array of unit information.

E. Error

If login token was not authenticated, the HTTP Code will be returned as 401 for Unauthorized. If 
authenticated, the API will respond with JSON string containing element success set to false, and 
element msg containing additional information on the error.

VI. Search LLN Completion

A. Description

This API function is used to retrieve a list of completed LLN using a date range. The system 
checks if the enrolment’s LLN completion date is within the supplied date range. Needs a valid 
token added to the HTTP header for authorization. RTO depends on the email address and 
password used to get the token.

B. Information

URL: https://api.rto.net.au/api/LLNCompletion
Method: GET
Request Header: 
Content-Type: application/json
Authorization: Bearer <token from login>
Parameters:
StartDate: string (date in yyyy-mm-dd format)
EndDate: string (date in yyyy-mm-dd format)
Request Body: N/A
Response Body: Refer to schema/model APIResponseLLN

C. Sample Usage in PHP

$ch = curl_init();

$headers = [
 'Accept: application/json',
 'Content-Type: application/json',
 'Access-Control-Allow-Origin: *',
 'Authorization: Bearer ' . $token,
];

01&EndDate=2022-03-05';

curl_setopt($ch, CURLOPT_URL, $curl_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);

$response = json_decode(curl_exec($ch));

if ($response->success)
{
 return $response->llnLst;
}


D. Successful

If successful, the API will respond with JSON string containing element success set to true, and 
element llnLst set to an array of LLN information.

E. Error

If login token was not authenticated, the HTTP Code will be returned as 401 for Unauthorized. If 
authenticated, the API will respond with JSON string containing element success set to false, and 
element msg containing additional information on the error.

VII. Schemas / Models

A. APIResponse

{
 "success": "true",
 "msg": "string",
 "newId": "integer"
}

B. APIResponseUnits

{
 "success": "true",
 "msg": "string",
 "unitLst": [
{
"UnitID" = "integer",
"EnrolID" = "integer",
"CompetencyIdentifier" = "string",
"QualificationCode" = "string",
"UnitType" = "string",
"StudentID" = "integer",
"ProposedStartDate" = "string",
"ActualStartDate" = "string",
"DateDeemedCompetent" = "string",
"DateForFinalAssessment" = "string",
"GroupID" = "integer",
"OutcomeIdentifier" = "string"
}
]
}

C. APIResponseLLN

{
 "success": "true",
 "msg": "string",
 "llnLst": [
{
"studentId" = "string",
"enrolId" = "string",
"llnCompletionDate" = "string"
}
]
}
D. Student
{
 "victorianStudentNumber": "string",
 "educationIdentifier": "string",
 "yearHighestSchool": "string",
 "residencyStatus": "string",
 "mostRecentSchoolIdentifier": "string",
 "multpliExternalEnrolments": [
 {
 "studentRegDeliveryModeName": "string",
 "courseCode": "string",
 "studentRegAttendanceGroup": "string",
 "startDate": "string"
 }
 ],
 "usiStatus": "string",
 "educationAgentId": "string",
 "studentDeclaration": "string",
 "guardianName": "string",
 "guardianRelationship": "string",
 "guardianEmail": "string",
 "guardianHomeAddress": "string",
 "guardianBusinessHoursNumber": "string",
 "guardianAfterHoursNumber": "string",
 "guardianMobileNumber": "string",
 "guardianPostalAddress": "string",
 "minorLivingWith": "string",
 "minorLivingWithDetails": "string",
 "studentPassportStatus": "string",
 "studentIssuedBy": "string",
 "studentPassportNumber": "string",
 "studentPassportExpiryDate": "string",
 "studentInternationalRefusedVisa": "string",
 "studentVisaCountryofLodgement": "string",
 "studentVisaCityofLodgement": "string",
 "studentVisaDateofIntendedApplication": "string",
 "studentVisaType": "string",
 "studentVisaStatus": "string",
 "studentVisaNumber": "string",
 "studentVisaExpiryDate": "string",
 "studentVisaCurrentlyInAustralia": "string",
 "studentInternationalEnglishTest": "string",
 "studentHealthCoverInsurerName": "string",
 "studentHealthCoverMemberNumber": "string",
 "studentHealthCoverExpiryDate": "string",
 "studentInternationalEnglishatHome": "string",
 "studentInternationalEnglishSkills": "string",
 "studentInternationalEnglishTestDate": "string",
 "studentInternationalEnglishTestScore": "string",
 "studentInternationalEnglishTestProposedDate": "string",
 "studentEnroledWithOtherProvider": "string",
 "studentInternationalQual1Name": "string",
 "studentInternationalQual1Institute": "string",
 "studentInternationalQual1Country": "string",
 "studentInternationalQual1DateofCompletion": "string",
 "studentInternationalQual2Name": "string",
 "studentInternationalQual2Institute": "string",
 "studentInternationalQual2Country": "string",
 "studentInternationalQual2DateofCompletion": "string",
 "studentInternationalRequestedCourseCredits": "string",
 "studentInternationalEducationAgentName": "string",
 "studentInternationalEducationAgentCode": "string",
 "studentInternationalAgentBusinessAddress": "string",
 "studentInternationalAgentEmail": "string",
 "unreadMsgs": "string",
 "rtoNumber": "string",
 "paraProviderId": "string",
 "courseCode": "string",
 "courseRegistrationId": "string",
 "studyReason": "string",
 "studentRegAttendanceGroup": "string",
 "hasAccreditedCourse": "string",
 "domainName": "string",
 "studentUsername": "string",
 "studentPassword": "string",
 "studentReferralSource": "string",
 "studentRegVetinSchoolsFlag": "string",
 "studentRegDeliveryLocationIdentifier": "string",
 "studentRegEnrolmentStartDate": "string",
 "studentRegEnrolmentEndDate": "string",
 "studentRegDeliveryModeName": "string",
 "studentRegNominalDuration": "string",
 "studentRegEnrolmentExpirydate": "string",
 "studentRegEnrolmentOutcome": "string",
 "studentRegYearProgramCompleted": "string",
 "studentRegQualificationIssuedFlag": "string",
 "studentRegDateCertificateissued": "string",
 "studentRegdatestatementissued": "string",
 "studentRegDateTranscriptIssued": "string",
 "studentRegCommencingCourseIdentifierName": "string",
 "studentRegFundingSourceNationalName": "string",
 "studentRegFundingSourceSTAName": "string",
 "studentRegAssociatedcourseidentifier": "string",
 "studentRegSpecificprogramidentifier": "string",
 "studentRegFeeExemptionConcessionTypeIdentifier": "string",
 "studentRegPurchasingContractIdentifier": "string",
 "studentRegPurchasingContractScheduleIdentifier": "string",
 "studentRegTrainingContractIdentifierNewApprenticeships": "string",
 "studentRegTrainingContractIdentifierPrevious": "string",
 "studentRegClientIdentifierApprenticeships": "string",
 "studentRegDateofTrainingContractCommencement": "string",
 "studentRegDateofTrainingContractCompletion": "string",
 "studentRegTypeofApprenticeship": "string",
 "studentRegAdditionalNotesorRelevantInformation": "string",
 "studentRegEmploymentArrangement": "string",
 "studentRegExistingWorkerFlag": "string",
 "studentRegSchoolBasedFlag": "string",
 "studentRegFulltimeorparttime": "string",
 "studyReasonIdentifierName": "string",
 "studentRegEnrolmentID": "string",
 "studentFundingSourceNational": "string",
 "studentSpecificProgramIdentifier": "string",
 "studentSchoolTypeIdentifier": "string",
 "lmsAccess": "string",
 "student_number": 0,
 "previousStudentID": "string",
 "studentID": 0,
 "studentTitle": "string",
 "studentPreferredName": "string",
 "studentName": "string",
 "studentSurname": "string",
 "studentMiddleName": "string",
 "studentNumber": "string",
 "studentDOB": "string",
 "studentGender": "string",
 "studentCountryOfBirth": "string",
 "studentHomeNumber": "string",
 "studentMobileNumber": "string",
 "studentWorkNumber": "string",
 "studentInternationalNumber": "string",
 "studentEmail": "string",
 "studentEmailAlt": "string",
 "studentSurvery": "string",
 "studentOverseas": "string",
 "studentIndividualNeedsInfo": "string",
 "studentPropertyName": "string",
 "studentFlatNumber": "string",
 "studentStreetNumber": "string",
 "studentStreetName": "string",
 "studentSuburb": "string",
 "studentPostcode": "string",
 "studentState": "string",
 "studentCountryOfResidence": "string",
 "studentPostalPropertyName": "string",
 "studentPostalFlatNumber": "string",
 "studentPostalStreetNumber": "string",
 "studentPostalStreetName": "string",
 "studentPostalBox": "string",
 "studentPostalSuburb": "string",
 "studentPostalPostcode": "string",
 "studentPostalState": "string",
 "studentEducationAtSchool": "string",
 "studentEducationSchoolLevelIdentifier": "string",
 "studentPriorEducationFlag": "string",
 "studentEducationAdvancedDiploma": "string",
 "studentEducationBachelorDegree": "string",
 "studentEducationCertificateI": "string",
 "studentEducationCertificateII": "string",
 "studentEducationCertificateIII": "string",
 "studentEducationCertificateIV": "string",
 "studentEducationDiploma": "string",
 "studentEducationMiscEducation": "string",
 "studentPriorEducationFlagAE": "string",
 "studentEducationAdvancedDiplomaAE": "string",
 "studentEducationBachelorDegreeAE": "string",
 "studentEducationCertificateIAE": "string",
 "studentEducationCertificateIIAE": "string",
 "studentEducationCertificateIIIAE": "string",
 "studentEducationCertificateIVAE": "string",
 "studentEducationDiplomaAE": "string",
 "studentEducationMiscEducationAE": "string",
 "studentPriorEducationFlagInternational": "string",
 "studentEducationAdvancedDiplomaInternational": "string",
 "studentEducationBachelorDegreeInternational": "string",
 "studentEducationCertificateIInternational": "string",
 "studentEducationCertificateIIInternational": "string",
 "studentEducationCertificateIIIInternational": "string",
 "studentEducationCertificateIVInternational": "string",
 "studentEducationDiplomaInternational": "string",
 "studentEducationMiscEducationInternational": "string",
 "studentIndividualIndigenousStaus": "string",
 "studentIndividualEmploymentStaus": "string",
 "studentIndividualMainLanguageSpokenAtHome": "string",
 "studentUniqueStudentIdentifier": "string",
 "studenDisabilityFlag": "string",
 "studentIndividualHearing": "string",
 "studentIndividualPhysical": "string",
 "studentIndividualIntellectual": "string",
 "studentIndividualLearning": "string",
 "studentIndividualMentalIllness": "string",
 "studentIndividualAcquiredBrainImpairment": "string",
 "studentIndividualVision": "string",
 "studentIndividualMedicalCondition": "string",
 "studentIndividualOther": "string",
 "studentRegWelfareEmergencyContact": "string",
 "studentRegWelfareRelationship": "string",
 "studentRegWelfareEmail": "string",
 "studentRegWelfareMobilePhone": "string",
 "studentRegWelfareBusinessPhone": "string",
 "studentRegWelfareHomePhone": "string",
 "studentRegWelfareComments": "string",
 "studentRegWelfareDoctorsName": "string",
 "studentRegWelfareDoctorsContactNumber": "string",
 "studentRegWelfareMedicateNumber": "string",
 "studentRegWelfareHealthInsurer": "string",
 "studentRegWelfareHeathInsurerNumber": "string",
 "studentRegWelfareAllegories": "string",
 "studentRegWelfareMedications": "string",
 "studentRegChose": "string",
 "studentRegTownCityofBirth": "string",
 "studentRegcountrystudyingin": "string",
 "studentRegCountryofresidenceforUSI": "string",
 "studentRegPermittedUSIExemptionConfirmed": "string",
 "studentRegDVSCheckRequiredOverridePermission": "string",
 "studentRegDVSDocumenttyperequired": "string",
 "studentRegBirthcertificateRegNumber": "string",
 "studentRegbirthcertificateregstate": "string",
 "studentRegBirthcertificateregdate": "string",
 "studentRegBirthCertificateRegYear": "string",
 "studentRegBirthcertificatedateprinted": "string",
 "studentRegBirthCertificatenumber": "string",
 "studentRegDescentdocumentstocknumber": "string",
 "studentRegDescentdocumentacquisitionDate": "string",
 "studentRegCitizenshipCertStocknumber": "string",
 "studentRegCitizenshipAcquisitiondate": "string",
 "studentRegDriverslicencenumber": "string",
 "studentRegDriverslicencestate": "string",
 "studentRegpassportdocumentnumber": "string",
 "studentRegCountryOfIssue": "string",
 "studentRegMedicareCardnumber": "string",
 "studentRegIndividualRefNumber": "string",
 "studentRegMedicareCardColour": "string",
 "studentRegMedicareExpiryDate": "string",
 "studentRegMedicareName": "string",
 "studentRegImmiCardNumber": "string",
 "studentHealthCoverInsurerCost": "string",
 "studentStat1": "string",
 "studentStat2": "string",
 "learnerUniqueIdentifier": "string",
 "clientIndustryofEmployment": "string",
 "clientOccupationIdentifier": "string",
 "eligibilityExemptionIndicator": "string",
 "fundingEligibilityKey": "string",
 "enrolledSchoolIdentifier": "string",
 "currentSchoolLevelIdentifier": "string",
 "trainingTypeIdentifier": "string",
 "specificFundingIdentifier": "string"
}
    • Related Articles

    • Using Payrix in the SMS - Merchant FAQ

      PROCESSING PAYMENTS IN THE SMS THROUGH PAYRIX FREQUENTLY ASKED QUESTIONS Who is Payrix? Payrix is a payment partner that provides a secure payment gateway and payment processing integrated within the eSkilled SMS. Is Payrix secure and compliant with ...
    • SMS Stripe Integration

      OVERVIEW This tutorial on SMS Stripe Integration guides users on integrating Stripe payment processing within the eSkilled Student Management System (SMS). It includes steps to retrieve Stripe API keys, configure Stripe settings in the SMS, and ...
    • How to Pay for Student Invoice using Company Credit (Maximise)

      Overview This tutorial will introduce the function to pay for Student Invoices using Company Credit within the Student Management System (SMS). By leveraging Company Credit Invoices, companies can ensure a seamless and efficient enrolment process, ...
    • How to Email Students using the Companies Portal

      Overview The Companies feature of the SMS provide you with an option to allow your partner Companies (Employers, Host Employers, Agents, etc.) to have their own access to the SMS to allow them to view and manage enrolments related to their Company. ...
    • How to Validate a Certificate Using the QR Code

      Overview In this tutorial, we will show how users or outside parties can access the SMS Certificate Validation page and check the authenticity of a student Certificate. Step Tutorial 1. You can validate a Certificate through the QR Code found on the ...