Developer docs

Providers

Providers are the prescribers of a clinic. Each has an NPI number and the states they are licensed in.

The provider object

Fields of a provider
FieldTypeDescription
idstringThe id.
clinicIdstringThe clinic the provider belongs to.
firstName, lastNamestringThe name.
namestringThe name with the credential, for example Elena Ruiz, M.D..
npistringThe 10-digit National Provider Identifier.
licensedStatesstring listTwo-letter codes of the states the provider is licensed in.
activebooleanWhether 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

NameTypeDescription
qstringSearches the first name, last name, full name and NPI. Matching ignores case.
activestringtrue or false.
statestringTwo letters. Keeps providers licensed in that state.

Response

200 A list of providers.

Example response
{ "data": [ {
      "id": "6aeb0da3503a52507f605e7c",
      "clinicId": "6aeb0da3503a52507f605e76",
      "firstName": "Elena",
      "lastName": "Ruiz",
      "name": "Elena Ruiz, M.D.",
      "npi": "1234567893",
      "licensedStates": ["FL", "NY", "PA", "TX"],
      "active": true
    } ] }

Errors

StatusCodeWhen it happens
401unauthenticatedThere is no session.

Examples

curl
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.

Example response
{ "data": {
    "id": "6aeb0da3503a52507f605e7c",
    "clinicId": "6aeb0da3503a52507f605e76",
    "firstName": "Elena",
    "lastName": "Ruiz",
    "name": "Elena Ruiz, M.D.",
    "npi": "1234567893",
    "licensedStates": ["FL", "NY", "PA", "TX"],
    "active": true
  } }

Errors

StatusCodeWhen it happens
400validationThe id is not a valid id.
404notFoundThe provider does not exist in the clinic you are working in.

Examples

curl
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

NameTypeRequiredDescription
firstNamestringRequiredThe first name.
lastNamestringRequiredThe last name.
npistringRequiredExactly 10 digits.
credentialstringOptionalFor example M.D. or NP.
licensedStatesstring listOptionalTwo-letter state codes. Defaults to an empty list.
clinicIdstringOptionalThe clinic, for a super admin.

Response

201 The new provider.

Example response
{ "data": {
    "id": "6aeb0da3503a52507f605e7c",
    "clinicId": "6aeb0da3503a52507f605e76",
    "firstName": "Elena",
    "lastName": "Ruiz",
    "name": "Elena Ruiz, M.D.",
    "npi": "1234567893",
    "licensedStates": ["FL", "NY", "PA", "TX"],
    "active": true
  } }

Errors

StatusCodeWhen it happens
400validationA field is invalid, for example the NPI is not 10 digits.
400pickClinicYou are working in an organization. Choose a clinic.
400clinicRequiredA super admin did not choose a clinic.
403forbiddenYour role cannot add providers (staff cannot).

Examples

curl
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"]}'