Vaccine Identification Database Search Application Program Interface (API) Guide
From Public Health Agency of Canada
Table of Contents
Introduction
The Vaccine Identification Database brings together important vaccine information from Health Canada in order to provide Canadian consumers with a central location to search for information on different vaccines.
This Application Programming Interface (API) allows developers to access that information in JSON format for reuse in their own applications.
The base URI for the Vaccine Identification site is https://vids-siv.phac-aspc.gc.ca/api/
. Any requests are made relative to this URI.
Vaccine Search
The API offers limited search functionality.
Parameters
Note that these parameters are passed in the query string:
Parameter | Meaning | Values | Required? | Notes |
---|---|---|---|---|
/api/vaccine.php?&product_name=productName |
Search by vaccine's product name | productName - the text string to search the database for |
Optional. | Response will contain search results for productName . |
/api/vaccine.php?&immunizing_agent=immunizingAgent |
Search by vaccine's immunizing agent | immunizingAgent - the text string to search the database for |
Optional. | Response will contain search results for immunizingAgent . |
/api/vaccine.php?&manufacturer=manufacturer |
Search by vaccine's manufacturer | manufacturer - the text string to search the database for |
Optional. | Response will contain search results for manufacturer . |
/api/vaccine.php?&din=din |
Search by vaccine's Drug Identification Number (DIN) | din - a valid DIN |
Optional. | Response will contain search results for din . |
/api/vaccine.php?>in=gtin |
Search by vaccine's Global Trade Item Number (GTIN) | gtin - a valid GTIN |
Optional. | Response will contain search results for gtin . |
/api/vaccine.php?&lot=lot |
Search by vaccine's lot number | lot - a valid lot number |
Optional. | Response will contain search results for lot . |
/api/vaccine.php?gtin=############ &lang=lang |
Changes language |
|
Optional, defaults to English if not specified. | Response will return results based on lang . |
/api/vaccine.php?limit=### |
Limits number of results returned | limit - a valid number |
Optional, defaults to 50. | Response will contain a specific amount of results based on limit . |
/api/vaccine.php?offset=### |
Offsets number of results returned | offset - a valid number |
Optional, defaults to no offset. | Response will offset results based on offset . |
Example request URIs:
- https://vids-siv.phac-aspc.gc.ca/api/vaccine.php?product_name=INFANRIX&immunizing_agent=&manufacturer=GlaxoSmithKline&din=02253852>in=&lot=&limit=10&offset=&lang=en
- https://vids-siv.phac-aspc.gc.ca/api/vaccine.php?product_name=INFLUVAC&immunizing_agent=&manufacturer=&din=>in=055873035000&lot=&limit=10&offset=&lang=fr
Response format
The response is in JSON, and consists of an array that contains objects consisting of the following values:
Key | Value |
---|---|
gtin | Global Trade Item Number of the resulting vaccine |
product_name | Product name of the resulting vaccine |
manufacturer | Name of the Manufacturer or Supplier of the resulting vaccine |
din | Drug Identification Number of the resulting vaccine |
Sample response
[ {"gtin": "055873035000", "product_name": "INFLUVAC", "manufacturer": "Abbott Laboratories Limited", "din": "02269562"}, {"gtin": "063601006451", "product_name": "Agriflu", "manufacturer": "Novartis Pharmaceuticals Canada Inc.", "din": "02346850"}, {"gtin": "063601040868", "product_name": "Fluad", "manufacturer": "Novartis Pharmaceuticals Canada Inc.", "din": "02362384"}, {"gtin": "621027070076", "product_name": "DIFLUCAN", "manufacturer": "Pfizer Canada Inc.", "din": "02141442"}, {"gtin": "621027070083", "product_name": "DIFLUCAN", "manufacturer": "Pfizer Canada Inc.", "din": "02024152"}, {"gtin": "621027070113", "product_name": "DIFLUCAN", "manufacturer": "Pfizer Canada Inc.", "din": "00891835"}, {"gtin": "621027070144", "product_name": "DIFLUCAN", "manufacturer": "Pfizer Canada Inc.", "din": "02141442"}, {"gtin": "621027070151", "product_name": "DIFLUCAN", "manufacturer": "Pfizer Canada Inc.", "din": "00891835"}, {"gtin": "00063601206455", "product_name": "Agriflu", "manufacturer": "Novartis Pharmaceuticals Canada Inc.", "din": "02346850"} ]
jQuery example
Example for a function that appends a list of vaccine search results to an element with id "#vaccines", given the search parameters:
function search(productName, immunizingAgent, manufacturer, din, gtin, lang){ var base = "https://vids-siv.phac-aspc.gc.ca/api/vaccine.php"; var uri = base + '?product_name=' + productName + '&immunizing_agent=' + immunizingAgent + '&manufacturer=' + manufacturer + '&din=' + din + '>in=' + gtin + '&lang=' + lang; $.ajax({ url: uri, type: 'GET', dataType: 'json', success: function(data){ $.each(data, function(key, value) { $("#vaccines").append("<strong>GTIN:</strong> " + value.gtin + "<br />"); $("#vaccines").append("<strong>Product Name:</strong> " + value.product_name + "<br />"); $("#vaccines").append("<strong>Manufacturer:</strong> " + value.manufacturer + "<br />"); $("#vaccines").append("<strong>DIN:</strong> " + value.din + "<br /><br />"); }); }, error: function(error){ console.log(error); } }); return; }
Vaccine Details
When requesting the vaccine details you have to specify two parameters in the API call: the GTIN number of the vaccine and the language (en
or fr
) that you would like the output in.
Parameters
Parameter | Meaning | Values | Required? | Notes |
---|---|---|---|---|
/api/vaccineDetails.php?gtin=############ |
Returns vaccine details | ############ - GTIN of the vaccine to be returned |
Yes | GTIN numbers can be found within the vaccine database. |
/api/vaccineDetails.php?gtin=############ &lang=value |
Changes language |
|
Optional, defaults to English if not specified | Determines whether the response is in English or French. |
Example request URIs:
Response format
The response is in JSON, and consists of an object containing the following objects:
Key | Value |
---|---|
basic_information | Basic Information of the resulting vaccine |
manufacturer_information | Manufacturer Information of the resulting vaccine |
ingredients | Ingredients of the resulting vaccine |
measurements | Measurements of the resulting vaccine |
packaging_details | Packaging Details of the resulting vaccine |
classifications | Classifications from the resulting vaccine |
other_information | Other Information from the resulting vaccine |
lots | Lots from the resulting vaccine |
Sample response
{ "basic_information": { "vaccine_id": "434", "product_name": "Havrix 1440 (single dose)", "manufacturer": "GlaxoSmithKline Inc. (Pharmaceuticals)", "gtin": "770933323025", "din": "02187078", "short_description": "Hepatitis A Vaccine", "extended_description": "Active immunizing agent against infection by hepatitis A virus", "generic_name": "n\/a", "label_storage_condition": "Do not freeze. Discard if frozen. Store between 2-8", "route_of_administration": "IH", "discontinue_date": "", "reinstatement_date": "", "substituted_for_gtin": "" }, "manufacturer_information": { "name": "GlaxoSmithKline Inc. (Pharmaceuticals)", "primary_address": "", "secondary_address": "", "city": "", "province": "", "country": "", "website": "" }, "ingredients": [{ "name": "HEPATITIS A VACCINE, INACTIVATED", "strength": "1440", "strength_uom": "UN", "typical_dosage": "0", "typical_dosage_uom": "" }], "measurements": { "dosage_form": "SUSP", "size": "1.00000", "size_uom": "ML", "temperature_control_range": "TCREF", "temperature_control_range_other": "", "strength_uom": "0.5 mL" }, "packaging_details": [{ "name": "Each", "gtin": "770933323025", "total_units": "1" }], "classifications": { "ahfs_code": "80:12.00", "atc_code": "J07BC02", "drug_type": "NA", "eccnet_classification_code": "000310", "global_product_classification_code": "10005845", "handling_code": "" }, "other_information": { "package_inserts": "", "package_inserts_link": "", "product_monograph": "", "product_monograph_link": "", "contraindications": "", "precautions": "" }, "lots": [{ "lot_id": "393", "lot_number": "AHAVB613BB", "expiry_date": "2014-09-30 00:00:00", "status": "Active, Expired" }, { "lot_id": "394", "lot_number": "AHAVB613BF", "expiry_date": "2014-09-30 00:00:00", "status": "Active, Expired" }, { "lot_id": "457", "lot_number": "AHAVB497ED", "expiry_date": "2013-07-31 00:00:00", "status": "Active, Expired" }, { "lot_id": "574", "lot_number": "AHAVB727AN", "expiry_date": "2015-11-30 00:00:00", "status": "Active, Expired" }] }
jQuery example
Example for a function that appends the vaccine details to an element with id "#vaccine-details", given a GTIN and language selection:
function getVaccineDetails(gtin, lang){ var base = "https://vids-siv.phac-aspc.gc.ca/api/vaccineDetails.php"; var uri = base + '?gtin=' + gtin + '&lang=' + lang; $.ajax({ url: uri, type: 'GET', dataType: 'json', success: function(data){ $.each(data, function(index, object) { $("#vaccine-details").append("<p>"); $.each(object, function(key, value) { $("#vaccine-details").append("<strong>" + key + ":</strong> " + value + "<br />"); }); $("#vaccine-details").append("</p>"); }); }, error: function(error){ console.log(error); } }); return; }
Lot Details
When requesting the lot details of a vaccine, you have to specify two parameters in the API call: the lot number and the language (en
or fr
) that you would like the output in.
Parameters
Parameter | Meaning | Values | Required? | Notes |
---|---|---|---|---|
/api/lotDetails.php?lot=### |
Returns lot details | ############ - lot number to be returned |
Yes | Lot numbers can be found within the vaccine database. |
/api/lotDetails.php?lot=### &lang=value |
Changes language |
|
Optional, defaults to English if not specified | Determines whether the response is in English or French. |
Example request URIs:
Response format
The response is in JSON, and consists of an object containing the following values:
Key | Value |
---|---|
lot_id | Identification number of a lot |
lot_name | Name of a lot |
lot_number | Number of a lot |
description | Description of a lot |
reason_for_recall | Reason for the recall of a lot |
date_expired | Date the lot expired |
date_created | Date the lot was created |
date_modified | Date the lot was modified |
state | State of a lot (1 - enabled, 0 - disabled) |
vaccine_id | Identification number of the associated vaccine |
vaccine_gtin | GTIN of the associated vaccine |
vaccine_name | Name of the associated vaccine |
vaccine_manufacturer | Manufacturer of the associated vaccine |
vaccine_din | DIN of the associated vaccine |
Sample response
{ "lot_id": "400", "lot_name": "AHAVB473CG", "lot_number": "AHAVB473CG", "description": "", "reason_for_recall": "", "date_expired": "2014-03-31 00:00:00", "date_created": "2012-11-05 16:20:47", "date_modified": "0000-00-00 00:00:00", "state": "1", "vaccine_id": "427", "vaccine_gtin": "770933000025", "vaccine_name": "Havrix 1440 vaccine (PFS)", "vaccine_manufacturer": "GlaxoSmithKline Inc. (Pharmaceuticals)", "vaccine_din": "02187078" }
jQuery example
Example for a function that appends the lot details to an element with id "#lot-details", given a lot number and language selection:
function getLotDetails(lot, lang){ var base = "https://vids-siv.phac-aspc.gc.ca/api/lotDetails.php"; var uri = base + '?lot=' + lot + '&lang=' + lang; $.ajax({ url: uri, type: 'GET', dataType: 'json', success: function(data){ $("#lot-details").append("<p>"); $.each(data, function(key, value) { $("#lot-details").append("<strong>" + key + ":</strong> " + value + "<br />"); }); $("#lot-details").append("</p>"); }, error: function(error){ console.log(error); } }); return; }
Notifications
This request returns a response with all the vaccine notifications from the database.
Parameters
There is only one parameter in the request: language.
Parameter | Meaning | Values | Required? | Notes |
---|---|---|---|---|
&lang=lang |
Changes language |
|
Optional, defaults to English if not specified. | Determines whether the response is in English or French. |
Example request URIs:
Response format
The response is in JSON, and consists of an array that contains objects consisting of the following values:
Key | Value |
---|---|
id | Identification number of a notification |
name | Name of the notification |
source | Hyperlink to the notification |
date_created | Date the notification was created |
date_modified | Date the notification was modified |
Sample response
[{ "id": "9", "name": "Novartis Suspends Distribution of Seasonal Flu Vaccines Agriflu and Fluad in Canada as a Precaution", "source": "http:\/\/www.hc-sc.gc.ca\/ahc-asc\/media\/advisories-avis\/_2012\/2012_162-eng.php", "date_created": "2012-10-26 00:00:00", "date_modified": "2012-10-29 00:00:00" }, { "id": "14", "name": "Voluntary Suspension of Flu Vaccines (Agriflu and Fluad) Lifted", "source": "http:\/\/www.hc-sc.gc.ca\/ahc-asc\/media\/advisories-avis\/_2012\/2012_164-eng.php", "date_created": "2012-10-31 00:00:00", "date_modified": "2012-10-31 00:00:00" }, { "id": "17", "name": "Voluntary recall of GlaxoSmithKline (GSK) Infanrix Hexa\u00ae Vaccine Lot A21CB242A due to potential microbiological contamination", "source": "", "date_created": "2012-11-06 00:00:00", "date_modified": "2012-11-06 00:00:00" }, { "id": "20", "name": "Public Communication Agriflu and Fluad", "source": "Novartis", "date_created": "2012-11-08 00:00:00", "date_modified": "2012-11-08 00:00:00" }, { "id": "21", "name": "Dear Health Care Professional Health Canada Endorsed Important Information on", "source": "Novartis", "date_created": "2012-11-08 00:00:00", "date_modified": "2012-11-08 00:00:00" }, { "id": "27", "name": "New Immunization and Vaccines landing page", "source": "http:\/\/www.phac-aspc.gc.ca\/im\/index-eng.php", "date_created": "2014-05-22 00:00:00", "date_modified": "2014-05-22 00:00:00" }]
jQuery example
Example for a function that appends a list of notifications to an element with id "#notifications", given a language selection:
function getNotifications(lang){ var base = "https://vids-siv.phac-aspc.gc.ca/api/notification.php"; var uri = base + '?lang=' + lang; $.ajax({ url: uri, type: 'GET', dataType: 'json', success: function(data){ $.each(data, function(index, object) { $("#notifications").append("<p>"); $.each(object, function(key, value) { $("#notifications").append("<strong>" + key + ":</strong> " + value + "<br />"); }); $("#notifications").append("</p>"); }); }, error: function(error){ console.log(error); } }); return; }
Notification Details
When requesting the vaccine notification details you have to specify two parameters in the API call: the id of the notification and the language (en
or fr
) that you would like the output in.
Parameters
Parameter | Meaning | Values | Required? | Notes |
---|---|---|---|---|
&id=id |
Retrieves notification details using its identification number. | id - Identification Number of notification |
Yes | The query will contain details of a notification. |
&lang=lang |
Changes language |
|
Optional, defaults to English if not specified. | Determines whether the response is in English or French. |
Example request URIs:
Response format
The response is in JSON, and consists of an object containing the following values:
Key | Value |
---|---|
id | Identification number of a notification |
name | Name of the notification |
source | Hyperlink of the notification |
description | Description of the notification |
date_created | Date the notification was created |
date_modified | Date the notification was modified |
attachments | Attachments for the notification |
links | Links for the notification |
Sample response
{ "id": "27", "name": "New Immunization and Vaccines landing page", "source": "http:\/\/www.phac-aspc.gc.ca\/im\/index-eng.php", "description": "The new Immunization and Vaccines landing page on the Agency website is now live.", "date_created": "2014-05-22 00:00:00", "date_modified": "2014-05-22 00:00:00", "attachments": [], "links": [{ "url": "http:\/\/www.phac-aspc.gc.ca\/im\/index-eng.php", "date_created": "2014-05-22 13:31:25", "date_modified": "2014-05-22 13:32:28" }, { "url": "http:\/\/www.phac-aspc.gc.ca\/im\/index-fra.php", "date_created": "2014-05-22 13:31:25", "date_modified": "2014-05-22 13:32:28" }] }
jQuery example
Example for a function that appends the notification details to an element with id "#notification-details", given an id and language selection:
function getNotificationDetails(id, lang){ var base = "https://vids-siv.phac-aspc.gc.ca/api/notificationDetails.php"; var uri = base + '?id=' + id + '&lang=' + lang; $.ajax({ url: uri, type: 'GET', dataType: 'json', success: function(data){ $("#notification-details").append("<p>"); $.each(data, function(key, value) { $("#notification-details").append("<strong>" + key + ":</strong> " + value + "<br />"); }); $("#notification-details").append("</p>"); }, error: function(error){ console.log(error); } }); return; }
Extract
The API offers an extract function to export all vaccine information from the database into a spreadsheet. These vaccine extracts can be accessed via these URIs: