Website logo

Look up school zones around a point

Look up school zones around a point

URL: https://api.trademe.co.nz/v1/Property/SchoolZones/Lookup.{file_format}
HTTP Method: GET
Requires Authentication? Yes
Permission Required: None
Supported Formats: XML, JSON
Rate Limited? Yes

URL parameters

file_format Enumeration (required) The format of the response.
xml Serialize responses into XML.
json Serialize responses into JSON.

Query String parameters

latitude Number (optional)

Latitude of the point, between -90 and 90.

longitude Number (optional)

Longitude of the point, between -180 and 180.

Returns

<SchoolZonesResponse>

At most 10 school zones, zones covering the point first and then nearest first. Empty when nothing is found.

SchoolZones Collection of <SchoolZone> or null

The matching school zones. Empty when nothing matches.

Slug String or null

The identifier of the school zone. This is the school zone slug, or the school id when the school has no zone.

SchoolName String or null

The name of the school, including the year levels when the school has separate zones by level.

GeographicLocation <GeographicLocation> or null

The location of the school.

Latitude Number

The latitude of the location, in degrees (WGS84).

Longitude Number

The longitude of the location, in degrees (WGS84).

Location String or null

The Trade Me suburb of the school, or its district, or its region when there is no suburb.

Gender String or null

The gender of the school, for example co-ed or boys.

InstitutionType String or null

The type of institution, for example Secondary (Year 9-13).

Authority String or null

The authority of the school, for example State or Private.

ZonedSchool Boolean

Whether the school has an enrollment zone.

CalloutText String or null

Additional display text relating to the school zone, for example when the school has no enrollment zone. Not returned when there is no display text.

Example XML Response (switch to JSON)

<SchoolZonesResponse xmlns="http://api.trademe.co.nz/v1">
  <SchoolZones>
    <SchoolZone>
      <Slug>ABC</Slug>
      <SchoolName>ABC</SchoolName>
      <GeographicLocation>
        <Latitude>123.0</Latitude>
        <Longitude>123.0</Longitude>
      </GeographicLocation>
      <Location>ABC</Location>
      <Gender>ABC</Gender>
      <InstitutionType>ABC</InstitutionType>
      <Authority>ABC</Authority>
      <ZonedSchool>false</ZonedSchool>
      <CalloutText>ABC</CalloutText>
    </SchoolZone>
    <SchoolZone>
      <Slug>ABC</Slug>
      <SchoolName>ABC</SchoolName>
      <GeographicLocation>
        <Latitude>123.0</Latitude>
        <Longitude>123.0</Longitude>
      </GeographicLocation>
      <Location>ABC</Location>
      <Gender>ABC</Gender>
      <InstitutionType>ABC</InstitutionType>
      <Authority>ABC</Authority>
      <ZonedSchool>false</ZonedSchool>
      <CalloutText>ABC</CalloutText>
    </SchoolZone>
  </SchoolZones>
</SchoolZonesResponse>

Example JSON Response (switch to XML)

{
  "SchoolZones": [
    {
      "Slug": "ABC",
      "SchoolName": "ABC",
      "GeographicLocation": {
        "Latitude": 123.0,
        "Longitude": 123.0
      },
      "Location": "ABC",
      "Gender": "ABC",
      "InstitutionType": "ABC",
      "Authority": "ABC",
      "ZonedSchool": false,
      "CalloutText": "ABC"
    },
    {
      "Slug": "ABC",
      "SchoolName": "ABC",
      "GeographicLocation": {
        "Latitude": 123.0,
        "Longitude": 123.0
      },
      "Location": "ABC",
      "Gender": "ABC",
      "InstitutionType": "ABC",
      "Authority": "ABC",
      "ZonedSchool": false,
      "CalloutText": "ABC"
    }
  ]
}