NOTICE
December 1, 2015
DailyMed is changing its base URLs from HTTP to HTTPS.
The new base URL for the web application is: https://dailymed.nlm.nih.gov/
The new base URL for the web service is: https://dailymed.nlm.nih.gov/dailymed/services/
If you are using our web services with HTTP, please update your code to use HTTPS by January 31, 2016. After that date, HTTP access will be disabled. If you have questions about the switch to HTTPS, please visit our customer support.
Previous API Versions
Version 1
- The base URI for these web services is: https://dailymed.nlm.nih.gov/dailymed/services/
- The web service is versioned, and the version number must be included after the base URI. These resources are Version 1 (v1).
- The service can return data in XML or JSON format. You can specify which format by appending the appropriate extension (.xml or .json) to the URI.
- A sample URI is: https://dailymed.nlm.nih.gov/dailymed/services/v1/ndc/{ndc}/spls.xml
- The web service only supports the HTTP method GET, since the web service function is to retrieve data from DailyMed.
Resources
The following table lists all resources available for this version. Note that the base URI and file extensions are omitted from the table for readability.
RESTful WEB SERVICE RESOURCES | Description |
---|---|
/ndc/{ndc}/spls | Returns a list of all SPLs with the given NDC. |
/ndc/{ndc}/imprintdata | Returns imprint data associated with the given NDC. |
/drugname/{name}/{label_type}/spls | Returns a list of all SPLs with the given drug name. |
/drugclass/{class_type}/list | Returns a list of all drug classes and codes with the given class type. |
/drugclass/{class_type}/{name}/spls | Returns a list of all SPLs belonging to the drug class with the given name. |
/drugclass/{code}/spls | Returns a list of all SPLs belonging to the drug class with the given code. |
Error Codes
Errors are returned using standard HTTP error code syntax. Additional information is included in the response header. The following table lists standard API errors.
CODE | Description |
---|---|
404 | Not found. |
415 | Unsupported Media Type. |
5xx | Server Error. |