The myHealthbox Web API – v2.0

Release 2.0.2

26-01-2016

Before You Begin

This document is intended for website and mobile developers who want to use the healthcare products information supplied by the myHealthbox platform within their applications or services.

To use the myHealthbox API, you need an API key.

All API calls support the GET protocol and results are returned in JSON format as default, the xml format is also supported, to get a result in xml format simply use the extension .xml in the funcione call ( i.e. https://myhealthbox.eu/api/2.0/search/fulltextsearch.xml?q=gab&language=el&country=gr&key=your_assigned_key&ref=caller_IP_number ).

All API calls support a key parameter, this is a unique identifier assigned by myHealthbox.

All API calls support a referrer parameter, the use of this parameter is compulsory if using php or other server-side scripting, it is not required if calling the myHealthbox API from javascript. The referrer parameter is used to identify the actual caller of the function. If using php for example the referrer parameter must be set to $_SERVER['REMOTE_ADDR'].

Attribution

Any web or mobile applications using the myHealthbox API(s) must display the “powered by myHealthbox” attribution and a link to the myHealthbox web site (myhealthbox.eu) in a suitable place.

Usage restrictions

If your myHealthbox API Implementation generates a high volume of transactions, myHealthbox reserves the right to set transaction limits.

Supported APIs

fulltextsearch (https://myhealthbox.eu/api/2.0/search/fulltextsearch) – perform a full text search on the myHealthbox data and return a set of matches, a number of parameters allow to limit the search to a specific country and/or language

barcodesearch (https://myhealthbox.eu/api/2.0/search/barcodesearch) – perform a specialized search based on the barcode number and return a set of matches, a number of parameters allow to limit the search to a specific country and/or language

browse (https://myhealthbox.eu/api/2.0/search/browse) – return a list of product names starting with given character, this is useful to build lists of products

product (https://myhealthbox.eu/api/2.0/search/product) – return the product details given a product id

myHealthbox Fulltextsearch API Request Format

/**
 * @url   GET 		fulltextsearch
 * @param string		$q 		required	The minimum length of the search string is 3
 * @param string		$country 	optional	Use 2 letters alpha code – it (Italy), gr (Greece), de (Germany), etc.
 * @param string		$language 	optional Use 2 letters alpha code – it (Italian), el (Greek), en (English), etc.
 * @param int		$limit 		optional {min 1 - max 100} – how many results to return
 * @param int		$from 		optional {min 0} – return results starting from element number
 * @param string		$ref 		required  Caller IP number
 **/

--- Call examples ---
https://myhealthbox.eu/api/2.0/search/fulltextsearch?q=gabapentin&language=el&country=gr&key=your_assigned_key&ref=caller_IP_number

https://myhealthbox.eu/api/2.0/search/fulltextsearch?q=cardioaspirin&country=it&key=your_assigned_key&ref=caller_IP_number

https://myhealthbox.eu/api/2.0/search/fulltextsearch?q=cardioaspirin&language=it&country=it&key=your_assigned_key&ref=caller_IP_number

https://myhealthbox.eu/api/2.0/search/fulltextsearch?q=cardioaspirin&language=en&country=it&key=your_assigned_key&ref=caller_IP_number

https://myhealthbox.eu/api/2.0/search/fulltextsearch?q=aspirin&limit=5&key=your_assigned_key&ref=caller_IP_number

--- Results examples ---
"total_results": 10,	// Total number of results or limit if the limit parameter is used
  "results": [		// search result details
{
      "documentId": "494868",
      "medicineId": "1038797",
      "name": "DEPON",
      "commercial_name": "DEPON 500MG/TAB TAB",
      "mah": "BRISTOL-MYERS SQUIBB A.E.",
      "dosage": "500MG/TAB",
      "active_ingredient": "PARACETAMOL",
      "pharmaceutical_form": "ΔΙΣΚΙΟ",
      "countryCode": "gr",
      "languageCode": "el",
      "pilLink": "https://myhealthbox.eu/en/view/802586/d8b9056e2137290af096c68c4be752a8/leaflet",
      "spcLink": "https://myhealthbox.eu/en/view/811603/56e85efd13be606fc288e30a19b813ce/leaflet"
    },
    {
…... other results 

myHealthbox Barcodesearch API Request Format

/**
   * @url   GET           barcodesearch
   * @param string      $q 		required The minimum length of the barcode string is 5
   * @param string      $country     	required Use 2 letters alpha code – it (Italy), gr (Greece), de (Germany), etc.
   * @param int           $limit         	optional {min 1 - max 100} – how many results to return
   * @param int           $from           optional {min 0} – return results starting from element number
   * @param string      $ref		required Caller IP number
**/

--- Call examples ---
https://myhealthbox.eu/api/2.0/search/barcodesearch?q=2800232801011&country=gr&key=your_assigned_key&ref=caller_IP_number

https://myhealthbox.eu/api/2.0/search/barcodesearch?q=0232801&country=gr&key=your_assigned_key&ref=caller_IP_number

myHealthbox browse API Request Format



/**
 * @url   GET 		browse
 * @param string		$q 		required {@min 1} {@max 2}
 * @param string		$country 	optional  Use 2 letters alpha code – it (Italy), gr (Greece), de (Germany), etc.
 * @param string		$language 	optional  Use 2 letters alpha code – it (Italian), el (Greek), en (English), etc.
 * @param string		$field	 	optional  Browse by: name,active ingredient
 * @param string		$species		optional  Destination species: human,animal,plant (empty string indicates all species)
 * @param string		$type	 	optional  Product type: medicine, non_medicine, devices, supplements, cosmetic, 						nutritional, homeopathic, herbal (empty string indicates all types)
 * @param int		$limit 		optional {min 1 - max 100} – how many results to return
 * @param int		$from 		optional {min 0} – return results starting from element number
 * @param string 	$ref            	required  Caller IP number
 **/

--- Browse searches ---
https://myhealthbox.eu/api/2.0/search/browse?q=b&country=it&language=it&species=human&key=your_assigned_key&ref=caller_IP_number

https://myhealthbox.eu/api/2.0/search/browse?q=a&country=it&language=it&species=human&type=medicine&key=your_assigned_key&ref=caller_IP_number



myHealthbox product API Request Format

/**
 * @url   GET 		product
 * @param int		$id 		required {@min 1}
 * @param string 	$ref            	required  Caller IP number
 **/

--- Product searches (the product ID is one of the parameters returned by a search or browse call) ---
https://myhealthbox.eu/api/2.0/search/product?id=782833&key=your_assigned_key&ref=caller_IP_number