Contact us to get your API token.
Ensure that your token is included in each request in the HTTP_AUTHORIZATION
header.
Creates or updates a dev site record for each of the dev site objects provided.
The body of your request must include the following field:
dev_sites
(required): the array of objects that represent the dev sites to be added or updated.
Each dev site object should contain the following fields:
dev_site_id
(required): a unique ID or file number for the siteward
(required): the name of the ward where the site is locatedmunicipality
(required): the name of the municipality where the dev site is locatedbuild_type
(optional): the building typetitle
(optional): the title of the sitedescription
(optional): description of the siteward_councillor_email
(optional): a valid email address for the ward councillorurban_planner_name
(optional): the name of the planner for this siteurban_planner_email
(optional): a valid email address for the planner for this siteapplicant
(optional): the name of the applicanton_behalf_of
(optional): the name of the organization or company behind the applicationreceived_date
(optional): the date on which the application was received in the format DD/MM/YYYYactive_at
(optional): the date on which the application is deemed complete DD/MM/YYYYaddresses_attributes
(required): an array of one object representing the address of the sitestreet
(required): the street addresscity
(required): the name of the cityprovince_state
(optional): the name of the province or statecountry
(optional): the name of the country
application_types_attributes
(required): an array of objects containing thename
of the application types applying to this site.meetings_attributes
(optional): an array of objects containing the meetings relevant to this site. Each meeting object should contain:meeting_type
(required): eitherpublic
orcouncil
time
(required): the date and time of the meeting, in the format DD/MM/YYYY-HH:MMlocation
(required): the address for the meeting
statuses_attributes
(required): an array of objects containing:status
(required): name of the status of the sitestatus_date
(required): the date the status became active`
{
"dev_sites": [{
"dev_site_id": "S987Z7",
"ward": "Ward 1",
"municipality": "Guelph",
"build_type": "Derelict",
"title": "123 Fake St.",
"description": "New subdivision on 123 Fake St.",
"ward_councillor_email": "[email protected]",
"urban_planner_email": "[email protected]",
"urban_planner_name": "Jane Planner",
"applicant": "Awesome Applicant",
"on_behalf_of": "Buildings & Co",
"received_date": "June 1, 2017",
"active_at": "June 8, 2017",
"application_types_attributes": [{
"name": "Site Plan Approval"
},
{
"name": "Plan of Subdivision"
}
],
"meetings_attributes": [{
"meeting_type": "public",
"time": "Tue, 27 Jun 2017 19:15:54 +0000",
"location": "123 Fake St."
},
{
"meeting_type": "council",
"time": "Tue, 27 Jun 2017 19:15:54 +0000",
"location": "123 Fake St."
}
],
"statuses_attributes": [{
"status": "Application File Pending",
"status_date": "June 7, 2017"
}],
"addresses_attributes": [
{ "street": "123 Fake St" }
]
}]
}
The response will contain a results
object that has a failed
array and success
array. For each site that was successfully updated, there will be an object in the success
array that has the dev_site_id
, and status
of the site (either created
or updated
. The failed array contains objects representing any sites that were not updated. The object contains the dev_site_id
, status
(it will be error
), and message
which explains the error.
{
"results": {
"failed": [],
"success": [{
"dev_site_id": "test-id",
"status": "created"
}]
}
}
Returns a collections of development sites, ordered by ward number.
- limit (optional): The limit of development site you want returned. Default is 20 if the page is set.
- page (optional): The page number of development site. Default is 0 if the limit is set.
Note: if limit and page are both bot provided then all development sites are returned.
Array of development sites. Check out the result of /dev_sites/:id
Returns a development site.
- id : The id of the development site.
{
"id":998,
"devID":"D07-12-13-0216",
"application_type":"Site Plan Control",
"title":null,
"status":"Application Approved",
"status_date":"June 20, 2014",
"address":"1234 Prestone Drive, Ottawa, Ontario, Canada",
"images":[],
"description":"New single storey addition to existing one storey brick and siding clad",
"ward_name":"ORLEANS",
"ward_num":1,
"image_url":"https://maps.googleapis.com/maps/api/streetview?size=600x600&location=1234 Prestone Drive, Ottawa, Ontario, Canada&key=AIzaSyAwocEz4rtf47zDkpOvmYTM0gmFT9USPAw",
"hearts":null,
"updated_at":"2016-07-15 22:54:09 UTC",
"latitude":45.479557990068,
"longitude":-75.503323992099,
"addresses":[
{
"id":1414,
"street":"1234 Prestone Drive, Ottawa, Ontario, Canada"
}
],
"statuses":[
{
"id":3173,
"status":"Comment Period in Progress",
"status_date":"2013-12-12 00:00:00 UTC"
},{
"id":3174,
"status":"Application on Hold",
"status_date":"2014-01-21 00:00:00 UTC"
},{
"id":3175,
"status":"Application Approved",
"status_date":"2014-06-20 00:00:00 UTC"
}
],
"comments":[]
}
Returns an array of images that have uploaded via Milieu.
- id : The id of the development site.
{
"images":
[
{
"src":"https://milieu.s3.amazonaws.com/images/dev_site/images/1390/books-alot-of-books-dark.jpg",
"w":2560,
"h":1440
},{
"src":"https://milieu.s3.amazonaws.com/images/dev_site/images/1390/books-alot-of-books.jpg",
"w":2560,
"h":1440
},{
"src":"https://milieu.s3.amazonaws.com/images/dev_site/images/1390/clearmountains.jpg",
"w":2880,
"h":1800
}
]
}
Returns a collections of events.
- limit (optional): The limit of events you want returned. Default is 20 if the page is set.
- page (optional): The page number of events. Default is 0 if the limit is set.
Note: if limit and page are both not provided then all events are returned.
Array of events. Check out the result of /dev_sites/:id
Returns a event.
- id : The id if the event.
{
"id":11,
"title":"Armstrong Street Area Consultation Walkabout",
"description":"The public is invited to join Councillor Jeff Leiper...",
"time":"10:00am-12:00pm",
"date":"2016-06-25",
"images_cache":null,
"location":"294 Carruthers Ave, Ottawa, ON K1Y 2Y8",
"contact_email":"[email protected]",
"contact_tel":" 6135802424 ex 28884",
"image_url":"https://milieu.s3.amazonaws.com/images/event/images/11/web_Armstrong_-_possible_cover_2.JPG",
"longitude":-75.7271582,
"latitude":45.4028173
}