REST API
Accessing the API
the gethealthy dispensary api allows practices to integrate their storefront with custom applications to create and and manage patients, recommendations and orders processed through the gethealthy platform overview the dispensary api is organized around the rest protocols and and aims to offer predictable, resource oriented urls it generally returns json encoded responses but may also return simple integer and boolean responses for some requests review the documentation for each endpoint and it’s possible responses authentication the gethealthy api uses api keys to authenticate requests the api key must be passed on every request using the bearer token authorizaton method the api key must be delivered via the authorizaton header example authorization bearer 2heoeg91vuwx52ix4tjbk2cn4ny35ji2 obtaining an api key api keys must presently be obtained by the practice via the gethealthy customer support team constructing requests each practice in the gethealthy ecosystem has its own, distinct api url the url consists of of a custom host name as well as a scope identifier both, url and scope identifier will be communicated by the gethealthy customer support team along with the api key request the host routes the api requests to the proper server, while the scope identifier automatically limits the results to the practice's scope scope modifier generally, the scope is identical to the subdomain e g for drlevi gethealthy store the practice scope code would most likely be drlevi however some practices may choose to have a custom domain e g shop drleviwhite com where the scope modifier could not be determined from the hostname this why the modifier for the scope needs to be determined by the storelist or practice config call the scope modifier is always equivalent to the store code special all modifier all dispensary api requests use the scope modifier to limit results to that particular practice scope additionally, some endpoints support a special all modifier and will return the results for the entire instance the support of these modifiers is documented in each api call the all modifier is primarily used to give access to catalog data at the instance level pseudo api request template https //{api host}/rest/{scopemodifier}/{api version}/{endpoint} the current api version is v1 example https //drlevi gethealthy store/rest/drlevi/v1/dispensary/recommendation