API Documentation
Setup
Setting up access to our API is incredibly easy. Simply contact me for a unique API key.
How to call an API method
When calling an API method, the GET url should follow the following format
http://api.frugalpharmacies.com/api/<METHOD>/<PARAMS>/.<FORMAT>?key=<KEY>&username=<USERNAME>For example: http://api.frugalpharmacies.com/api/drugs/calcitrol/.json?key=XXXXXXXXXXX&username=myusername
-
METHOD:The name of the method you wish to call (full list can be seen below).
-
PARAMS:Methods usually, though not always, require a set of parameters. Parameters should be used in the correct order and must be seperated by a forward slash. Specific details can be found against each of the methods outlined below.
-
FORMAT:Responses can be returned in either json or xml format.
-
KEY:The API key you were allocated.
-
USERNAME:Your frugalpharmacies.com username.
Certain Methods
Your API key will allow you to consume the following methods:
/api/drugs/
-
Description:This method allows you to search for a drug based on its name.
-
Parameter 1:Drug name (or part thereof if you are trying to search for a drug). The drug name must be a minimum of 3 characters long.
/api/prices/
-
Description:This method allows you to search for drug prices based on the drug name.
-
Parameter 1:The name of the drug.
/api/drug-access-stats/
-
Description:Returns other drugs that users searched for when viewing the drug name passed.
-
Parameter 1:The name of the drug.
/api/pharmacies/
-
Description:Returns a list of nearby pharmacies based on the radius and zipcode passed.
-
Parameter 1:The zipcode you wish to search against.
-
Parameter 2:The radius you wish to use along with the zipcode.
