Locations

Location Instance

Represents a single location instance.

URI

https://www.ntjobcentre.ca/api/v1.1/locations/{id}

Properties

Property Type Description
id Int32 Unique identifier of the loction.
name String (max 256) Human readable name for the location.
description String (max 300) Human readable description for the location.
type String (max 50) The type of location.
latitude Decimal (9,6) Centroid latitude.
longitude Decimal (9,6) Centroid longitude.
swLatitude Decimal (9,6) Bounding box south west latitude.
swLongitude Decimal (9,6) Bounding box south west longitude.
neLatitude Decimal (9,6) Bounding box north east latitude
neLongitude Decimal (9,6) Bounding box north east longitude
area Array of Arrays Array of paths that defines a geospacial area of the location. Each array item contains 2 values, a latitude followed by a longitude.

HTTP GET

Authentication: Not Required

Example

Request

https://www.ntjobcentre.ca/api/v1.1/locations/156

Response
{
    "id":156,
    "neLatitude":49.309410,
    "swLongitude":-123.268227,
    "area": [
        { "latitude": 49.234343, "longitude": -123.267883 },
        { "latitude": 49.200929, "longitude": -123.134274 },
        { "latitude": 49.19891, "longitude": -123.02298 },
        { "latitude": 49.294523, "longitude": -123.022637 },
        { "latitude": 49.30941, "longitude": -123.141312 },
        { "latitude": 49.29206, "longitude": -123.268227 }
    ],
    "swLatitude":49.198910,
    "description":"Vancouver, BC",
    "name":"Vancouver",
    "longitude":-123.145264,
    "neLongitude":-123.022637,
    "latitude":49.267239,
    "type":"Town"
}
    

HTTP POST, PUT, and DELETE

Not supported.

Locations List

Represents a list of locations.

URI

https://www.ntjobcentre.ca/api/v1.1/locations

HTTP GET

Returns a list of locations. The list includes paging information and is sorted by the name length in ascending order.

Authentication: Not Required


Query String

Paramter Type Required? Description
q String No Location query term. This will match partial names. For example, van will match Vancouver, North Vancouver, and Vanderhoof. If this parameter is ommitted, then locations will not be filtered by term.
types String No Comma separated list of location types to return. Supported types:
  • suburb
  • town
  • province
  • territory
  • country
pageSize Int32 No Specifies the number of records to return at a time. The default is 10 and the maximum is 100.
page Int32 No Specifies which page to return. The default is 1.

Example

Request all location headers.

Request

https://www.ntjobcentre.ca/api/v1.1/locations?types=province,territory

Response
HTTP/1.1 200 OK
Content-Length: 802
Content-Type: application/json

{
    "data":[
        {
            "id": 429,
            "name": "Yukon",
            "type": "Territory",
            "description": "Yukon",
            "latitude": 64.836899,
            "longitude": -136.791992,
            "swLatitude": 59.999680,
            "swLongitude": -141.002701,
            "neLatitude": 69.674118,
            "neLongitude": -123.788017,
            "area": [
                { "latitude": 59.99968, "longitude": -141.002701 },
                { "latitude": 59.99968, "longitude": -123.788017 },
                { "latitude": 62.520776, "longitude": -128.995537 },
                { "latitude": 67.029776, "longitude": -133.587822 },
                { "latitude": 67.281777, "longitude": -135.741142},
                { "latitude": 69.628274, "longitude": -136.444267 },
                { "latitude": 69.674118, "longitude": -141.002701}
            ]
        },
        ...
    ],
    "paging":{
        "total":448,
        "previous":null,
        "page":1,
        "pages":2,
        "next":"https://www.ntjobcentre.ca/api/v1.1/locations?types=province,territory&pageSize=10&page=2",
        "pageSize":10
    }
}