One of our laboratory customers, StarAligners wanted to be able to programmatically sign up their orthodontists practices with EasyRx at the same time they were signing up for their product.
My project was to speak with the people at Star Aligners and assess what they wanted to be able to do, and then create new API endpoints to enable that. Keeping the API endpoints focused and appropriate for other laboratory’s to use while still addressing their needs was the development's fulcrum.
The endpoints I wrote use both client credential and authorization code grant types, and we use apiDoc to generate api documentation for our customers.
There are endpoints which:
- Check if an email address already exists as a user in our database.
- Create a practice including the practices doctors and offices.
- Connect the lab to a practice with an authorization code grant.
- Resend emails sent from EasyRx to validate new practices email addresses.
- Set the ID the laboratory wants to identify the practice office with.
- Set an ID the laboratory wants to identify a doctor with.
- Get a list of practice offices and info.
- Get a list of practice doctors and info.
All the while ensuring that the calling lab does not have access to practices, patients, or other data they are not authorized to have.