Get started
The DineSafe API returns JSON metadata about establishments in Toronto regarding how establishments preform in the DineSafe food safety program.
API End Point
https://api-dinesafe.herokuapp.com/establishment/
get establishment
To get information on a specific establishment id you need to make a GET call to the following
url:
https://api-dinesafe.herokuapp.com/establishment/{id}
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
id | Integer | Id of row according to the Dinesafe xml file |
Search establishments
To get information on a specific establishment id you need to make a GET call to the following
url:
https://api-dinesafe.herokuapp.com/establishment/search?query=
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
id | Integer | Id of row in DineSafe.xml |
establishmentId | Integer | Id of establishment according to the Dinesafe xml file |
inspectionId | Integer | Id of inspection according to Dinesafe xml file |
establishmentName | String | Name of the establishment in capitals |
establishmentType | String | Type of establishment |
establishmenAddress | String | Location of establishment in capitals (example: 870 MARKHAM RD) |
latitude | Integer | Latitude of where the establishment is located |
longitude | Integer | Longitude of where the establishment is located |
establishmentStatus | Integer | Status of the inspection (Pass, Conditional Pass, Closed) |
minimumInspectionsPerYear | Integer | Minimum number of inspections made to the establishment per year |
infractionDetails | String | If there is an infraction it will contain the details for it |
inspectionDate | Integer | Year the inspection took place |
severity | Integer | How severe the infraction was if there was one (NA - Not Applicable, M - Minor, S - Significant, C - Crucial, {sometimes there is no value here ie ''}) |
action | Integer | If there was an infraction what action does the establishment need to take (Notice to comply, Corrected During Inspection, '', Ticket, Closure Order, Summons, Not in Compliance, Summons and Health Hazard Order, Education Provided, Prohibition Order Requested) |
courtOutcome | Integer | If the establishment went to court what the outcome was |
amountFined | Integer | Amount the establishment has to pay if they were fined |
QUERY PREDICATES
Field | Predicate | Example |
---|---|---|
EQUALS | : | https://api-dinesafe.herokuapp.com/establishment/search?query=establishmentId:1222579 |
GREATER THAN | > | https://api-dinesafe.herokuapp.com/establishment/search?query=amountFined>0 |
LESS THAN | < | https://api-dinesafe.herokuapp.com/establishment/search?query=minimumInspections<2 |
Types of Establishments
- Food Take Out
- Restaurant
- Cafeteria
- Commissary
- Private Club
- Child Care - Catered
- Food Store (Convenience / Variety)
- Child Care - Food Preparation
- Food Depot
- Food Court Vendor
- Serving Kitchen
- Banquet Facility
- Butcher Shop
- Food Processing Plant
- Bakery
- Supermarket
- Other Educational Facility Food Services
- Cafeteria - Public Access
- Nursing Home / Home for the Aged
- Ice Cream / Yogurt Vendors
- Retirement Homes(Licensed)
- Institutional Food Service
- Secondary School Food Services
- Fish Shop
- School Nourishment Program
- Food Caterer
- Cocktail Bar / Beverage Room
- Bake Shop
- Boarding / Lodging Home - Kitchen
- Flea Market
- College/University Food services
- Hospitals & Health Facilities
- Refreshment Stand (Stationary)
- Meat Processing Plant
- Community Kitchen Meal Program
- Church Banquet Facility
- Elementary School Food services
- Chartered Cruise Boats
- Food Bank
- Mobile Food Preparation Premises
- Hot Dog Cart
- Food Vending Facility
- Locker Plant
- Retirement Homes(Un-licensed)
- Bed & Breakfast
- Milk Pasteurization Plant
- Cheese Plant
- Rest Home
- Food Cart
- Brew Your Own Beer / Wine
- Catering Vehicle
- Fairs / Festivals / Special Occasions
- Bottling Plant
- Food Recovery Program
- Ice Cream Plant
- Cannery