Get list of specialties using GraphQL Playground

With the SDK-integrated search screens, users can enter specialties to find and map healthcare professionals (HCPs) within your app. The specialties in get requests made by your app, with or without a UI, are passed by GraphQL in queries to the Activity API of HealthCare Locator. Examples of specialties include Anaesthesiology, Biochemistry, Cardiology, Dentistry, Dermatology, General Medicine, Neurology, Paediatrics, Physical Therapy, Radiology, Urology, and so on.  

To test the API, you can directly access GraphQL and make a query using GraphQL Playground to get the list of HCP specialties that comes with your pro version subscription and is available to your app for searches.

To get the list of specialties using GraphQL Playground, do the following:

1.      On your web browser, enter one of the following URLs ...

https://api.healthcarelocator.com/api/graphql/v2?subscription-key=XXXXXXXX  

... where "https://api.healthcarelocator.com/api/graphql/v2" is the endpoint and "subscription-key=XXXXXXXX" specifies your valid subscription API key. The browser displays the GraphQL Playground screen.

2.      On the Playground screen, enter a query to get the list of HCP specialties that comes with your subscription, such as ...

query{

codesByLabel (first:100 offset:0 codeTypes:["SP"]) {

  codes{id,longLbl}

 }

}

... where the "SP" code type indicates locale HCP specialties, "id" and "longLbl" specifies the code ID and label of each specialty are to be returned.

The following Playground screen shows the query entered in the left pane and response (after clicking the play button ) with specialties in the right pane.