Schools API - Fetch School Details
In this section, we’ll look at how you can query for school details from the database using the school_id
and tokenID
parameters. This is useful when you want to fetch information about a specific school programmatically using the API.
The School Model
The school model contains all the information about a school, such as its name, state, city, and the number of enrolled students. It also contains a reference to the school's enrollment data and timestamps for when the data was created or updated.
Properties
- Name
school_id
- Type
- string
- Description
Unique identifier for the school.
- Name
school_name
- Type
- string
- Description
The name of the school.
- Name
created_at
- Type
- timestamp
- Description
Timestamp of when the school record was created.
- Name
updated_at
- Type
- timestamp
- Description
Timestamp of when the school record was last updated.
Fetch Details
This endpoint allows you to retrieve details about a specific school based on the provided school_id
. You must also provide a valid tokenID
to authenticate the request.
Required attributes
- Name
school_id
- Type
- string
- Description
The unique identifier of the school you want to fetch details for.
- Name
tokenID
- Type
- string
- Description
The user's token ID for authentication.
Request
curl -G "https://api.shkolafit.com/v1/fetchSchoolDetails" \
-d "school_id=12345" \
-d "tokenID=b9d32969-e8aa-42fd-8755-61f6a6ef8f8d"
Response
{
"apirequest": {
"tid": "b9d32969-e8aa-42fd-8755-61f6a6ef8f8d",
"trequestmade": "get_school_details:12345",
"ttimemade": "2025-01-22T13:41:06.689Z",
"trequestcost": 1
},
"requestresult": {
"school_id": "12345",
"data": {
"school_name": "St Paul's School",
"state": "QLD",
"city": "Woodridge",
"total_enrolments": 1200,
"boys_enrolments": 600,
"girls_enrolments": 600,
"created_at": "2025-01-22T13:41:06.689Z",
"updated_at": "2025-01-22T13:41:06.689Z"
}
}
}
Fetch Addresses
This endpoint allows you to retrieve a list of all addresses for a specific school based on the provided school_id
. You must also provide a valid tokenID
to authenticate the request.
Required attributes
- Name
school_id
- Type
- string
- Description
The unique identifier of the school you want to fetch addresses for.
- Name
tokenID
- Type
- string
- Description
The user's token ID for authentication.
Request
curl -G "https://api.shkolafit.com/v1/fetchSchoolAddress" \
-d "school_id=12345" \
-d "tokenID=b9d32969-e8aa-42fd-8755-61f6a6ef8f8d"
Response
{
"apirequest": {
"tid": "b9d32969-e8aa-42fd-8755-61f6a6ef8f8d",
"trequestmade": "get_addresses_for_school:12345",
"ttimemade": "2025-01-22T13:41:06.689Z",
"trequestcost": 1
},
"requestresult": [
{
"address_id": "1",
"school_id": "12345",
"address": "123 School St.",
"city": "Woodridge",
"state": "QLD",
"postal_code": "4114",
"created_at": "2025-01-22T13:41:06.689Z",
"updated_at": "2025-01-22T13:41:06.689Z"
},
{
"address_id": "2",
"school_id": "12345",
"address": "456 School Ave.",
"city": "Bald Hills",
"state": "QLD",
"postal_code": "4036",
"created_at": "2025-01-22T13:41:06.689Z",
"updated_at": "2025-01-22T13:41:06.689Z"
}
]
}
Fetch Campus
This endpoint allows you to retrieve campus information for a specific school based on the provided school_id
. You must also provide a valid tokenID
to authenticate the request.
Required attributes
- Name
school_id
- Type
- string
- Description
The unique identifier of the school for which you want to fetch campus information.
- Name
tokenID
- Type
- string
- Description
The user's token ID for authentication.
Request
curl -G "https://api.shkolafit.com/v1/fetchSchoolCampus" \
-d "school_id=12345" \
-d "tokenID=b9d32969-e8aa-42fd-8755-61f6a6ef8f8d"
Response
{
"apirequest": {
"tid": "b9d32969-e8aa-42fd-8755-61f6a6ef8f8d",
"trequestmade": "get_campus_information:12345",
"ttimemade": "2025-01-22T13:41:06.689Z",
"trequestcost": 1
},
"requestresult": {
"school_id": "12345",
"campus_information": [
{
"campusid": "1",
"schoolid": "12345",
"parentschoolid": null,
"schoolcampusid": "A1",
"campustype": "Primary"
},
{
"campusid": "2",
"schoolid": "12345",
"parentschoolid": null,
"schoolcampusid": "B1",
"campustype": "Secondary"
}
]
}
}
Fetch Distance
This endpoint allows you to calculate the distance from a user's location to a specific school based on the provided school_id
, latitude
, and longitude
. You must also provide a valid tokenID
to authenticate the request.
Required attributes
- Name
school_id
- Type
- string
- Description
The unique identifier of the school for distance calculation.
- Name
tokenID
- Type
- string
- Description
The user's token ID for authentication.
- Name
latitude
- Type
- number
- Description
The user's current latitude for distance calculation.
- Name
longitude
- Type
- number
- Description
The user's current longitude for distance calculation.
Request
curl -G "https://api.shkolafit.com/v1/fetchSchoolDistance" \
-d "school_id=12345" \
-d "tokenID=b9d32969-e8aa-42fd-8755-61f6a6ef8f8d" \
-d "latitude=37.7749" \
-d "longitude=-122.4194"
Response
{
"apirequest": {
"tid": "b9d32969-e8aa-42fd-8755-61f6a6ef8f8d",
"trequestmade": "calculate_distance:12345",
"ttimemade": "2025-01-22T13:41:06.689Z",
"trequestcost": 1
},
"requestresult": {
"schoolDistance": {
"distance": 12.5,
"unit": "km"
}
}
}
Fetch Enrolments
This endpoint allows you to retrieve enrolment information for a specific school based on the provided school_id
. You must also provide a valid tokenID
to authenticate the request.
Required attributes
- Name
school_id
- Type
- string
- Description
The unique identifier of the school you want to fetch enrolment details for.
- Name
tokenID
- Type
- string
- Description
The user's token ID for authentication.
Request
curl -G "https://api.shkolafit.com/v1/fetchSchoolEnrolment" \
-d "school_id=12345" \
-d "tokenID=b9d32969-e8aa-42fd-8755-61f6a6ef8f8d"
Response
{
"apirequest": {
"tid": "b9d32969-e8aa-42fd-8755-61f6a6ef8f8d",
"trequestmade": "fetch_school_enrolment:12345",
"ttimemade": "2025-01-22T13:41:06.689Z",
"trequestcost": 1
},
"requestresult": {
"school_id": "12345",
"data": {
"school_name": "St Paul's School",
"total_enrolments": 1200,
"boys_enrolments": 600,
"girls_enrolments": 600,
"created_at": "2025-01-22T13:41:06.689Z",
"updated_at": "2025-01-22T13:41:06.689Z"
}
}
}
Fetch Governing Body
This endpoint allows you to retrieve the governing body information for a specific school based on the provided school_id
. You must also provide a valid tokenID
to authenticate the request.
Required attributes
- Name
school_id
- Type
- string
- Description
The unique identifier of the school you want to fetch governing body information for.
- Name
tokenID
- Type
- string
- Description
The user's token ID for authentication.
Request
curl -G "https://api.shkolafit.com/v1/fetchSchoolGoverningBody" \
-d "school_id=12345" \
-d "tokenID=b9d32969-e8aa-42fd-8755-61f6a6ef8f8d"
Response
{
"apirequest": {
"tid": "b9d32969-e8aa-42fd-8755-61f6a6ef8f8d",
"trequestmade": "get_governing_body:12345",
"ttimemade": "2025-01-22T13:41:06.689Z",
"trequestcost": 1
},
"requestresult": {
"school_id": "12345",
"governingBody": [
{
"governingbodyid": "1",
"governingbodyname": "Education Authority of QLD",
"governingbodyurl": "https://education.qld.gov.au"
}
]
}
}
Fetch Grid Location
This endpoint allows you to retrieve the grid location (latitude and longitude) based on the provided address_id
or school_id
. You must also provide a valid tokenID
to authenticate the request.
Required attributes
- Name
address_id
- Type
- string
- Description
The unique identifier of the address you want to fetch the grid location for.
- Name
school_id
- Type
- string
- Description
The unique identifier of the school to fetch an address if address_id is not provided.
- Name
tokenID
- Type
- string
- Description
The user's token ID for authentication.
Request
curl -G "https://api.shkolafit.com/v1/fetchSchoolGridLocation" \
-d "address_id=12345" \
-d "tokenID=b9d32969-e8aa-42fd-8755-61f6a6ef8f8d"
Response
{
"apirequest": {
"tid": "b9d32969-e8aa-42fd-8755-61f6a6ef8f8d",
"trequestmade": "get_gridlocation_from_address:12345",
"ttimemade": "2025-01-22T13:41:06.689Z",
"trequestcost": 1
},
"requestresult": {
"latitude": -27.6188,
"longitude": 152.9857
}
}
Fetch Language Background
This endpoint allows you to retrieve language background information for a specific school based on the provided school_id
. You must also provide a valid tokenID
to authenticate the request.
Required attributes
- Name
school_id
- Type
- string
- Description
The unique identifier of the school to fetch language background for.
- Name
tokenID
- Type
- string
- Description
The user's token ID for authentication.
Request
curl -G "https://api.shkolafit.com/v1/fetchSchoolLanguageBackground" \
-d "school_id=12345" \
-d "tokenID=b9d32969-e8aa-42fd-8755-61f6a6ef8f8d"
Response
{
"apirequest": {
"tid": "b9d32969-e8aa-42fd-8755-61f6a6ef8f8d",
"trequestmade": "get_language_background:12345",
"ttimemade": "2025-01-22T13:41:06.689Z",
"trequestcost": 1
},
"requestresult": {
"school_id": "12345",
"language_background": [
{
"languagebackgroundid": "1",
"schoolid": "12345",
"languagebackgroundotheryespercent": 10,
"languagebackgroundothernopercent": 20,
"languagebackgroundothernotstatedpercent": 70
}
]
}
}
Fetch ICSEA
This endpoint allows you to retrieve the ICSEA (Index of Community Socio-Educational Advantage) data for a specific school based on the provided school_id
. You must also provide a valid tokenID
to authenticate the request.
Required attributes
- Name
school_id
- Type
- string
- Description
The unique identifier of the school for which ICSEA data is being fetched.
- Name
tokenID
- Type
- string
- Description
The user's token ID for authentication.
Request
curl -G "https://api.shkolafit.com/v1/fetchSchoolPerformance" \
-d "school_id=12345" \
-d "tokenID=b9d32969-e8aa-42fd-8755-61f6a6ef8f8d"
Response
{
"apirequest": {
"tid": "b9d32969-e8aa-42fd-8755-61f6a6ef8f8d",
"trequestmade": "get_icsea_data:12345",
"ttimemade": "2025-01-22T13:41:06.689Z",
"trequestcost": 1
},
"requestresult": {
"school_id": "12345",
"icsea": {
"icseaid": "1",
"icseavalue": 1100,
"icseapercentile": 75,
"bottomseaquarterpercent": 10,
"lowermiddleseaquarterpercent": 20,
"uppermiddleseaquarterpercent": 30,
"topseaquarterpercent": 40
}
}
}
Fetch School Staffing Details
This endpoint allows you to retrieve details about the staffing at a specific school, including teaching and non-teaching staff. You must provide a valid school_id
and tokenID
to authenticate the request.
Required attributes
- Name
school_id
- Type
- string
- Description
The unique identifier of the school for which staffing details are to be retrieved.
- Name
tokenID
- Type
- string
- Description
The user's token ID for authentication.
Request
curl -G https://api.shkolafit.com/v1/fetchSchoolStaffing" \
-d "school_id=12345" \
-d "tokenID=b9d32969-e8aa-42fd-8755-61f6a6ef8f8d"
Response
{
"apirequest": {
"tid": "b9d32969-e8aa-42fd-8755-61f6a6ef8f8d",
"trequestmade": "get_school_staffing:12345",
"ttimemade": "2025-01-22T13:41:06.689Z",
"trequestcost": 1
},
"requestresult": {
"school_id": "12345",
"teaching_staff": {
"total_teaching_staff": 50,
"teaching_staff_full_time_equivalent": 45
},
"non_teaching_staff": {
"total_non_teaching_staff": 30,
"non_teaching_staff_full_time_equivalent": 28
}
}
}
Fetch School Requirements
This endpoint allows you to retrieve specific requirements for a school based on the provided school_id
. You must also provide a valid tokenID
to authenticate the request.
Required attributes
- Name
school_id
- Type
- string
- Description
The unique identifier of the school for which the requirements are to be retrieved.
- Name
tokenID
- Type
- string
- Description
The user's token ID for authentication.
Request
curl -G "https://api.shkolafit.com/v1/fetchSchoolRequirements" \
-d "school_id=12345" \
-d "tokenID=b9d32969-e8aa-42fd-8755-61f6a6ef8f8d"
Response
{
"apirequest": {
"tid": "b9d32969-e8aa-42fd-8755-61f6a6ef8f8d",
"trequestmade": "get_school_requirements:12345",
"ttimemade": "2025-01-22T13:41:06.689Z",
"trequestcost": 1
},
"requestresult": {
"school_id": "12345",
"requirements": [
{
"requirementid": "1",
"schoolid": "12345",
"type": "Health and Safety",
"shortforms": "First Aid, Safety Equipment"
},
{
"requirementid": "2",
"schoolid": "12345",
"type": "Curriculum",
"shortforms": "Math, Science"
}
]
}
}
Search Schools
This endpoint allows you to search for schools based on a query string. You can filter the search results by state and paginate the results. You must provide a valid tokenID
for authentication and a query
to search for schools.
Required attributes
- Name
query
- Type
- string
- Description
The search query for finding schools.
- Name
tokenID
- Type
- string
- Description
The user's token ID for authentication.
Optional attributes
- Name
offset
- Type
- integer
- Description
The number of results to skip (used for pagination).
- Name
limit
- Type
- integer
- Description
The maximum number of results to return (up to 25).
- Name
stateCode
- Type
- string
- Description
A state code to filter the results by state.
Request
curl -G "https://api.shkolafit.com/v1/fetchSchoolSearch" \
-d "query=St Paul's School" \
-d "tokenID=b9d32969-e8aa-42fd-8755-61f6a6ef8f8d" \
-d "limit=10" \
-d "stateCode=QLD"
Response
{
"apirequest": {
"tid": "b9d32969-e8aa-42fd-8755-61f6a6ef8f8d",
"trequestmade": "search_schools:St Paul's School",
"ttimemade": "2025-01-22T13:41:06.689Z",
"trequestcost": 1
},
"requestresult": {
"schools": [
{
"school_id": "12345",
"school_name": "St Paul's School",
"state": "QLD",
"city": "Woodridge",
"total_enrolments": 1200,
"created_at": "2025-01-22T13:41:06.689Z"
},
{
"school_id": "67890",
"school_name": "St Peter's School",
"state": "QLD",
"city": "Brisbane",
"total_enrolments": 1000,
"created_at": "2025-01-22T13:41:06.689Z"
}
]
}
}