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"
}

VIII. Adding and Updating Group

Overview

This API provides endpoints to add new groups and update existing groups within SMS. It allows applications to send structured data to create or modify group records efficiently. By using this API, integrations can manage group information programmatically without manual intervention, ensuring consistency and faster operations.
Property
Description
URL
Methods supported
POST, PUT

Add Group

Other applications can integrate with SMS to create new groups by sending a POST request to the API url.

Authentication
This API function needs a valid token added to the HTTP header for authorization.
InfoNOTE: Client where the group will be added depends on the username and subdomain used to get the token.

Fields for Adding Group via API
FieldDescriptionRequiredRules
GroupName
The name assigned to the student group
Yes
If group name is more than 45 characters, group will not be created and API will respond with error “Group name is too long. Please use 45 characters or less”
ProgramInstanceId
Refers to the specific instance of the program/course the group is linked to
Yes
If Program Instance ID passed in API request is not a program instance of the client, group will not be created and API will respond with error “Program Instance Id Invalid”
Active
Indicates whether the group is currently active and available for use or enrolments
No
Set to false/0 if not passed in API request
StartDate
The date on which the group officially commences training or classes
Only if Program Instance’s type is Intake

EndDate
The date on which the group completes its training or classes
Only if Program Instance’s type is Intake

AutoRemove
Automatically removes students from the group under certain conditions (Never, Date only, Max students only, Max students or date)
No
Set to ‘Never’ if not passed in API request, and will ignore passed values of Max Students and Prior Hours (if there’s any)
MaxStudents
Defines the maximum number of students that can be enrolled in the group
Only if Auto Remove is ‘Max Students‘ or ‘Max Students or Date’

PriorHours
Sets a threshold of hours before the group start time during which students can no longer enrol via the enrolment form
Only if Auto Remove is ‘Date Only ‘or ‘Max Students or Date’

Location
The physical location or campus where the training will be delivered
Yes
If Location passed in API request is not a location of the client, group will not be created and API will respond with error “Location is Invalid”

Accepts Location ID (NOT the actual id from database table)
Trainers
List of email addresses of trainers assigned to deliver the training for the group
No
If Trainer passed in API request is not a trainer of the client or is a trainer of the client but not active, group will not be created and API will respond with error “Trainer not Valid”

Can also accept email addresses of users with no trainer access but also provides training

Example of Request and Response
Request: 

Header:
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6...

Body:
{
"GroupName": "Group 1",
"ProgramInstanceId": "675",
"Active": true,
"StartDate": "04/11/2025",
"EndDate": "29/11/2025",
"AutoRemove": "Max Students or Date",
"MaxStudents": 10,
"PriorHours": 2,
"Location": "001",
"Trainers": ["trainer@email.com", “trainer2@email.com”]
}

Response:
If group was successfully added, the API will respond with JSON string containing element success set to true, element msg set to success message, and element groupId set to the group ID of the added record in SMS.
{
“success”: true,
“msg”: “Group Successfully Added”,
“groupId:”: 743
}


Update Group

Other applications can integrate with SMS to update existing groups by sending a PUT request to the API url.

Authentication
This API function needs a valid token added to the HTTP header for authorization.

Fields for Updating Group via API
FieldDescriptionRequiredRules
GroupIdThe ID of the group to be updatedYesIf Group ID passed in API request is not a group of the client, group will not be updated and API will respond with error “Invalid Group Id”
GroupNameThe name assigned to the student groupYesIf group name is more than 45 characters, group will not be updated and API will respond with error “Group name is too long. Please use 45 characters or less”
ProgramInstanceIdRefers to the specific instance of the program/course the group is linked toYesIf Program Instance ID passed in API request is not a program instance of the client, group will not be updated and API will respond with error “Program Instance Id Invalid”

If Program Instance ID passed in API request is a program instance of the client but already has students enrolled, group will not be updated and API will respond with error “Program Instance cannot be changed for the Group”
ActiveIndicates whether the group is currently active and available for use or enrolmentsNo
StartDateThe date on which the group officially commences training or classesOnly if Program Instance’s type is Intake
EndDateThe date on which the group completes its training or classesOnly if Program Instance’s type is Intake
AutoRemoveAutomatically removes students from the group under certain conditions (Never, Date only, Max students only, Max students or date)No
MaxStudentsDefines the maximum number of students that can be enrolled in the groupOnly if Auto Remove is ‘Max Students‘ or ‘Max Students or Date’
PriorHoursSets a threshold of hours before the group start time during which students can no longer enrol via the enrolment formOnly if Auto Remove is ‘Date Only ‘or ‘Max Students or Date’
LocationThe physical location or campus where the training will be deliveredYes
If Location passed in API request is not a location of the client, group will not be updated and API will respond with error “Location is Invalid”

Accepts Location ID (NOT the actual id from database table)
AddTrainers
List of email addresses of trainers to be added in the group
No
If Trainer passed in API request is not a trainer of the client or is a trainer of the client but not active, group will not be updated and API will respond with error “Trainer not Valid”

Can also accept email addresses of users with no trainer access but also provides training
RemoveTrainers
List of email addresses of trainers to be removed in the group
No


Example of Request and Response
Request:

Header:
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6...

Body:
{
"GroupId": "743",
"GroupName": "Group 2",
"ProgramInstanceId": "675",
"StartDate": "01/01/2025",
"EndDate": "01/01/2026",
"AutoRemove": "Max Students or Date",
"MaxStudents": 2,
"PriorHours": 2,
"Location": "testcampus",
"AddTrainers":["trainer3@email.com"],
"RemoveTrainers":["trainer@email.com"]
}

InfoNOTE: Unchanged fields can be excluded from the API PUT request. Current values of the fields not passed in the request will be retained.

Response:
If group was successfully updated, the API will respond with JSON string containing element success set to true, element msg set to success message, and element groupId set to the group ID of the updated record in SMS.
{
“success”: true,
“msg”: “Group Successfully Updated”,
“groupId:”: 743
}

IX. Adding and Updating Event

Overview

This API provides endpoints to add new events and update existing events within SMS. It allows applications to send structured data to create or modify event records efficiently. By using this API, integrations can manage event information programmatically without manual intervention, ensuring consistency and faster operations.
PropertyDescription
URLhttps://api.rto.net.au/api/Event/schedule
Methods supportedPOST, PUT

Add Event

Other applications can integrate with SMS to create new events by sending a POST request to the API url.

Authentication
This API function needs a valid token added to the HTTP header for authorization.
Info
NOTE: Client where the event will be added depends on the username and subdomain used to get the token.

Fields for Adding Event via API
FieldDescriptionRequiredRules
ScheduleGroupUnitsList of groups who will be attending the event and the related unit(s)YesIf Group passed in API request is not a group of the client, event will not be created and API will respond with error “Group is invalid”

If Unit passed in API request is not related to the group, event will not be created and API will respond with error “Unit is not related to the group”
Note: It is not required to pass units, it may be the group only.
TitleA descriptive title or schedule name to the calendar entryYesIf Title is more than 255 characters, event will not be created and API will respond with error “Title is too long. Please use 255 characters or less.”
LocationThe location for the eventNoIf Location is not passed in API request, location of the first group in the event will be set to the event

If Location passed in API request is not a location of the client, event will not be created and API will respond with error “Location is invalid”

Accepts Location ID (NOT the actual id from database table
RoomIf location has rooms available, a room can also be set for the eventNoIf Room passed in API request is not related to the location, event will not be created and API will respond with error “Room is invalid”
TrainerEmailsList of assigned trainers for the eventYesIf Trainer passed in API request is not related to the group, event will not be created and API will respond with error “Trainer is invalid”
ColorThe colour of the calendar entry for quick categorisation and visualisationNoOnly accepts certain colours; if Colour passed is not included in the valid colour list, event will not be created and API will respond with error “Color is invalid. Accepted color names: black, blue, cool gray, cyan, dandelion, green, indigo, magenta, mauve, melrose, mercury, navy blue, lime, orange, pink, purple, red, teal, turquoise, yellow”

If Colour is not passed in API request, colour from the Program Instance of the first group in the event will be set to the event; and if there is no colour in the Program Instance, the first colour in the valid colour list will be set to the event
StartDateTimeThe date and time event startsOnly if CustomRecurrence is ‘None’
EndDateTimeThe date and time event startsOnly if CustomRecurrence is ‘None’If EndDateTime is set as before the StartDateTime, event will not be created and API will respond with error “End Date Time is invalid, End Date Time cannot be before the Start Date Time”
ScheduleHoursThe number of actual event hoursOnly if CustomRecurrence is ‘None’If ScheduleHours is set as 00:00 or longer than the duration of the event (from StartDateTime to EndDateTime), event will not be created and API will respond with error “Scheduled hours must be greater than 00:00 and cannot be longer than the duration of event”
CustomRecurrence
Determines if event to be created is a recurring event or not
No
Only accepts: None, Weekly, Monthly, and MonthlyDay

If CustomRecurrence is not passed in API request, CustomRecurrence will be set to None by default
Days
For CustomRecurrence = Weekly

List of specific Days the event will occur, as well as the Start Time, End Time, and Scheduled Hours for each Day
Only if CustomRecurrence is Weekly
Day only accepts: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, and Sunday

If Day passed in API request is not included in valid day list, event will not be created and API will respond with error “Invalid Day ‘<Day>’”

If EndTime is set as before the StartTime, event will not be created and API will respond with error “Invalid time range for <Day>”

If ScheduledHours is set as 00:00 or longer than the duration of the event for a day (from StartTime to EndTime), event will not be created and API will respond with error “Scheduled hours must be greater than 00:00 and cannot be longer than the duration of event”
NumberOfWeeksRecurring
For CustomRecurrence = Weekly

The number of weeks when each event will recur for the specified days of the week.

e.g. If recur every 1 week is set, the schedule will be plotted every week during the specified days
Only if CustomRecurrence is Weekly

RecurrenceStartDate
For CustomRecurrence = Weekly/Montly/MonthlyDay

The date when recurrence starts
Only if CustomRecurrence is Weekly, Monthly, or MonthlyDay

RecurrenceStopRepeatOnSpecificDate
For CustomRecurrence = Weekly/Montly/MonthlyDay

The date until when the last recurrence will be created in the calendar
Only if CustomRecurrence is Weekly, Monthly, or MonthlyDay
If RecurrenceStopRepeatOnSpecificDate is set as before the RecurrenceStartDate , event will not be created and API will respond with error “Invalid End Date”
RecurrenceStartTime
For CustomRecurrence = Montly/MonthlyDay

The time when event starts for each of the day of the selected schedule
Only if CustomRecurrence is Monthly or MonthlyDay

RecurrenceEndTime
For CustomRecurrence = Montly/MonthlyDay

The time when event ends for each of the day of the selected schedule
Only if CustomRecurrence is Monthly or MonthlyDay
If RecurrenceEndTime is set as before the RecurrenceStartTime, event will not be created and API will respond with error “RecurrenceStartTime must be earlier than RecurrenceEndTime”
RecurrenceScheduleHours
For CustomRecurrence = Montly/MonthlyDay

The number of actual event hours
Only if CustomRecurrence is Monthly or MonthlyDay
If RecurrenceScheduleHours is set as 00:00 or longer than the duration of the event for a day (from RecurrenceStartTime to RecurrenceEndTime), event will not be created and API will respond with error "RecurrenceScheduleHours must be greater than 00:00 and cannot exceed the duration"
ScheduleDateRecurEvery
For CustomRecurrence = MonthlyDay

The number of interval for the monthly recurrence

e.g. If recur every 1 month is set, the schedule will be plotted every month specified day
Only if CustomRecurrence is MonthlyDay

MonthlyDayWeek
For CustomRecurrence = MonthlyDay

The ordinal week of the month

e.g. If recur every first week, the schedule will be plotted every first week of the month on the specified day
Only if CustomRecurrence is MonthlyDay
MonthlyDayWeek only accepts: First, Second, Third, Fourth, and Last
MonthlyDayDay
For CustomRecurrence = MonthlyDay

The day of the month the event will repeat

e.g. If recur every Monday, the schedule will be plotted every Monday of the month on the specified ordinal week
Only if CustomRecurrence is MonthlyDay
MonthlyDay only accepts: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, and Sunday

Example of Request and Response
Request:

Header:
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6...

Body:
{
"scheduleGroupUnits": [
{
"groupId": 804,
"unitCodes": ["ABCD0001", "ABCDEF100s"]
},
{
"groupId": 805,
"unitCodes": ["ABCD0001", "ABCD0003"]
}
],
"title": "Event With Weekly Recur",
"location": "testcampus",
"room": "test room",
"trainerEmails": ["trainer@email.com"],
"color": "blue",
"CustomRecurrence": "weekly",
"days": [
{
"day": "Wednesday",
"startTime": "08:00",
"endTime": "09:00",
"scheduledHours": "01:00"
},
{
"day": "Thursday",
"startTime": "08:00",
"endTime": "09:00",
"scheduledHours": "01:00"
}
],
"numberOfWeeksRecurring": 1,
"recurrenceStartDate": "01-12-2025",
"recurrenceStopRepeatOnSpecificDate": "31-12-2025"
}

Response:
If event was successfully added, the API will respond with JSON string containing element success set to true, element msg set to success message, and element scheduleId set to the event ID of the added record in SMS.
{
"success": true,
"msg": "Added New Schedule 9259",
"scheduleId": 9259
}

Update Event

Other applications can integrate with SMS to update existing events by sending a PUT request to the API url.

Authentication
This API function needs a valid token added to the HTTP header for authorization.

Fields for Updating Event via API
FieldDescriptionRequiredRules
EventIdThe ID of the event to be updatedYesIf event ID passed in API request is not an event of the client, group will not be updated and API will respond with error “Schedule is invalid”
ScheduleGroupUnitsList of groups who will be attending the event and the related unit(s)YesIf Group passed in API request is not a group of the client, event will not be updated and API will respond with error “Group is invalid”

If Unit passed in API request is not related to the group, event will not be updated and API will respond with error “Unit is not related to the group”
TitleA descriptive title or schedule name to the calendar entryYesIf Title is more than 255 characters, event will not be updated and API will respond with error “Title is too long. Please use 255 characters or less.”
LocationThe location for the eventNoIf Location passed in API request is not a location of the client, event will not be updated and API will respond with error “Location is invalid”

Accepts Location ID (NOT the actual id from database table)
RoomIf location has rooms available, a room can also be set for the eventNoIf Room passed in API request is not related to the location, event will not be updated and API will respond with error “Room is invalid”
TrainerEmailsList of assigned trainers for the eventYesIf Trainer passed in API request is not related to the group, event will not be updated and API will respond with error “Trainer is invalid”
ColorThe colour of the calendar entry for quick categorisation and visualisation NoOnly accepts certain colours; if Colour passed is not included in the valid colour list, event will not be updated and API will respond with error “Color is invalid. Accepted color names: black, blue, cool gray, cyan, dandelion, green, indigo, magenta, mauve, melrose, mercury, navy blue, lime, orange, pink, purple, red, teal, turquoise, yellow”

If Colour is passed but an empty string (e.g. “Color”: “”) in API request, colour from the Program Instance of the first group in the event will be set to the event; and if there is no colour in the Program Instance, the first colour in the valid colour list will be set to the event
StartDateTime
The date and time event starts
Only if CustomRecurrence is ‘None’

EndDateTime
The date and time event starts
Only if CustomRecurrence is ‘None’
If EndDateTime is set as before the StartDateTime, event will not be updated and API will respond with error “End Date Time is invalid, End Date Time cannot be before the Start Date Time”
ScheduleHours
The number of actual event hours
Only if CustomRecurrence is ‘None’
If ScheduleHours is set as 00:00 or longer than the duration of the event (from StartDateTime to EndDateTime), event will not be updated and API will respond with error “Scheduled hours must be greater than 00:00 and cannot be longer than the duration of event”
UpdateOtherEvents
Determines if other related events will be updated as well or not, for events created with CustomRecurrence
No
Only accepts: 1, 2, or 3

1 = will update only the specified event ID in API request

2 = will update the event ID set in API request and the succeeding related events

3 = will update all the related events (including the preceding and succeeding events)

If UpdateOtherEvents is not passed in API request, only the specified event ID will be updated

Example of Request and Response
Request:

Header:
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6...

Body:
{
"eventId": 9259,
"scheduleGroupUnits": [
{
"groupId": 804,
"unitCodes": ["ABCD0001", "ABCDEF100s"]
},
{
"groupId": 805,
"unitCodes": ["ABCD0001", "ABCD0003"]
}
],
"title": "Updated Event",
"location": "001",
"room": "Room test",
"trainerEmails": ["trainer2@email.com"],
"color": "cyan",
"startDateTime": "01-01-2026 07:00",
"endDateTime": "31-01-2026 08:00",
"scheduleHours": "01:00",
"updateOtherEvents": 3
}

Info
NOTE: Unchanged fields can be excluded from the API PUT request. Current values of the fields not passed in the request will be retained.

Response:
If event was successfully updated, the API will respond with JSON string containing element success set to true, element msg set to success message, and element scheduleId set to the event ID of the updated record in SMS.
{
"success": true,
"msg": "Updated Schedule 9259",
"scheduleId": 9259
}
    • Related Articles

    • How to Integrate Stripe on the SMS

      Overview This tutorial on SMS Stripe Integration provides a guide for users on integrating Stripe payment processing within the eSkilled Student Management System (SMS). It covers steps to retrieve Stripe API keys, configure Stripe settings in the ...
    • How to Set up Worldpay in the SMS

      Overview Worldpay is a global payment processing provider that allows businesses to accept card payments online, in-store, and over the phone. It supports a wide range of payment methods and currencies, making it suitable for local and international ...
    • Using Worldpay (previously Payrix) in the SMS - Merchant FAQ

      PROCESSING PAYMENTS IN THE SMS THROUGH WORLDPAY FREQUENTLY ASKED QUESTIONS Who is Worldpay? Worldpay is a payment partner that provides a secure payment gateway and payment processing integrated within the eSkilled SMS. Is Worldpay secure 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. ...