The provider object
| Field | Type | Description |
|---|---|---|
id | string | The id. |
clinicId | string | The clinic the provider belongs to. |
firstName, lastName | string | The name. |
name | string | The name with the credential, for example Elena Ruiz, M.D.. |
npi | string | The 10-digit National Provider Identifier. |
licensedStates | string list | Two-letter codes of the states the provider is licensed in. |
active | boolean | Whether the provider can currently be used. |
List providers
GET/v1/providers
Returns every provider of your clinic that matches, sorted by last name. This list is not paged.
Who can call it
Any signed-in role.
Query parameters
| Name | Type | Description |
|---|---|---|
q | string | Searches the first name, last name, full name and NPI. Matching ignores case. |
active | string | true or false. |
state | string | Two letters. Keeps providers licensed in that state. |
Response
200 A list of providers.
{ "data": [ {
"id": "6aeb0da3503a52507f605e7c",
"clinicId": "6aeb0da3503a52507f605e76",
"firstName": "Elena",
"lastName": "Ruiz",
"name": "Elena Ruiz, M.D.",
"npi": "1234567893",
"licensedStates": ["FL", "NY", "PA", "TX"],
"active": true
} ] }Errors
| Status | Code | When it happens |
|---|---|---|
| 401 | unauthenticated | There is no session. |
Examples
curl -b cookies.txt "https://app-api.homelyrx.com/v1/providers?state=FL&active=true"Get one provider
GET/v1/providers/:id
Returns one provider of your clinic.
Who can call it
Any signed-in role.
Response
200 The provider.
{ "data": {
"id": "6aeb0da3503a52507f605e7c",
"clinicId": "6aeb0da3503a52507f605e76",
"firstName": "Elena",
"lastName": "Ruiz",
"name": "Elena Ruiz, M.D.",
"npi": "1234567893",
"licensedStates": ["FL", "NY", "PA", "TX"],
"active": true
} }Errors
| Status | Code | When it happens |
|---|---|---|
| 400 | validation | The id is not a valid id. |
| 404 | notFound | The provider does not exist in the clinic you are working in. |
Examples
curl -b cookies.txt "https://app-api.homelyrx.com/v1/providers/PROVIDER_ID"Add a provider
POST/v1/providers
Adds a prescriber to the clinic you are working in. Orders name an active provider of the clinic as the prescriber.
Who can call it
super_admin, owner, admin.
Request body
| Name | Type | Required | Description |
|---|---|---|---|
firstName | string | Required | The first name. |
lastName | string | Required | The last name. |
npi | string | Required | Exactly 10 digits. |
credential | string | Optional | For example M.D. or NP. |
licensedStates | string list | Optional | Two-letter state codes. Defaults to an empty list. |
clinicId | string | Optional | The clinic, for a super admin. |
Response
201 The new provider.
{ "data": {
"id": "6aeb0da3503a52507f605e7c",
"clinicId": "6aeb0da3503a52507f605e76",
"firstName": "Elena",
"lastName": "Ruiz",
"name": "Elena Ruiz, M.D.",
"npi": "1234567893",
"licensedStates": ["FL", "NY", "PA", "TX"],
"active": true
} }Errors
| Status | Code | When it happens |
|---|---|---|
| 400 | validation | A field is invalid, for example the NPI is not 10 digits. |
| 400 | pickClinic | You are working in an organization. Choose a clinic. |
| 400 | clinicRequired | A super admin did not choose a clinic. |
| 403 | forbidden | Your role cannot add providers (staff cannot). |
Examples
curl -b cookies.txt -X POST "https://app-api.homelyrx.com/v1/providers" \
-H "content-type: application/json" \
-d '{"firstName":"Elena","lastName":"Ruiz","credential":"M.D.","npi":"1234567893","licensedStates":["FL","NY","PA","TX"]}'