Hidden Clinic Still Returned by API – ClinicNum/ Clinic Parameter Ignored?

For requests or help with our API
Post Reply
APIwarrior
Posts: 4
Joined: Thu May 29, 2025 3:30 pm

Hidden Clinic Still Returned by API – ClinicNum/ Clinic Parameter Ignored?

Post by APIwarrior » Thu May 29, 2025 3:38 pm

Hi everyone,

We’ve run into a strange issue with the OpenDental API and are hoping someone here has encountered something similar.

We’re integrating with a multi-location practice group. Their OpenDental environment has multiple active clinics configured, including:
• *** Clinic A – General
• *** Clinic B – Pediatrics
• *** Clinic C – Ortho
(All of these have thousands of patients and are not hidden)

However, there’s one additional clinic configured as:
• “DO NOT USE – *** 3223”
This clinic is hidden and has 0 patients.

The problem is:
When we make requests to the API (e.g., GET /appointments?clinic=5, GET /appointments?ClinicNum=5), we only receive data from the ***3223 clinic — despite it being hidden. We’ve also hit /clinics, and that endpoint only returns this one hidden clinic, not the active ones we expect.

What we’ve confirmed:
• The correct clinics are active and not hidden
• The “DO NOT USE” clinic is definitely marked as hidden
• We are passing the clinic parameter in API calls (e.g., GET /appointments?clinic=5)
• Our API key is correctly configured and functional
• No changes on our side have been made recently

Questions:
• Does the API ignore the “Hidden” flag on clinics when returning results or determining defaults?
• Is there any reason the /clinics endpoint would return only one clinic (especially a hidden one)?
• Are there API-level permissions or user/group filters that could cause the correct clinics to be omitted?

If anyone has insight or has seen this before, we’d really appreciate the help. We’re open to collaborating outside the forum and would be happy to compensate any developers willing to help us troubleshoot this further.

Image: https://imgur.com/a/DOblVF5
Image

RyanH
Posts: 27
Joined: Thu Dec 19, 2024 8:33 am

Re: Hidden Clinic Still Returned by API – ClinicNum/ Clinic Parameter Ignored?

Post by RyanH » Fri May 30, 2025 12:46 pm

Hello APIwarrior,
• Does the API ignore the “Hidden” flag on clinics when returning results or determining defaults?
• Is there any reason the /clinics endpoint would return only one clinic (especially a hidden one)?
Each endpoint is unique. For the two endpoints mentioned:
GET /clinics only returns non-hidden clinics.
GET /appointments can filter for any valid ClinicNum, whether the clinic is hidden or otherwise.
• Are there API-level permissions or user/group filters that could cause the correct clinics to be omitted?
There are no API-level permissions.
• We are passing the clinic parameter in API calls (e.g., GET /appointments?clinic=5)
There is no "clinic" parameter for GET /appointments. To filter by clinic, you'd need to use the ClinicNum parameter. Thanks!

APIwarrior
Posts: 4
Joined: Thu May 29, 2025 3:30 pm

Re: Hidden Clinic Still Returned by API – ClinicNum/ Clinic Parameter Ignored?

Post by APIwarrior » Fri May 30, 2025 1:38 pm

Thanks for the response — I appreciate the clarification, though I think there may be a disconnect here, so I’d love to clarify further:

1. You mentioned that GET /clinics only returns non-hidden clinics, but in our case, we are only seeing one hidden clinic returned — the one labeled “DO NOT USE – *** 3223” — and none of the active, non-hidden clinics (which have thousands of patients) are returned in the API response.

2. The API key was generated correctly and is functioning, and there’s no role-based restriction in play as you noted. So if /clinics is returning only a hidden clinic, it feels like something is misconfigured deeper in the environment, or the key is scoped in a way that’s limiting access to only one ClinicNum (despite the clinics being visible in OpenDental and not hidden).

Happy to post logs or screenshots if helpful. At this point, I’d really appreciate any ideas on where to look next — or if someone in the community has time to help debug this live, I’d be happy to coordinate and compensate for that time.

Thanks again!

RyanH
Posts: 27
Joined: Thu Dec 19, 2024 8:33 am

Re: Hidden Clinic Still Returned by API – ClinicNum/ Clinic Parameter Ignored?

Post by RyanH » Fri May 30, 2025 3:48 pm

APIwarrior wrote:
Fri May 30, 2025 1:38 pm
Thanks for the response — I appreciate the clarification, though I think there may be a disconnect here, so I’d love to clarify further:

1. You mentioned that GET /clinics only returns non-hidden clinics, but in our case, we are only seeing one hidden clinic returned — the one labeled “DO NOT USE – *** 3223” — and none of the active, non-hidden clinics (which have thousands of patients) are returned in the API response.

2. The API key was generated correctly and is functioning, and there’s no role-based restriction in play as you noted. So if /clinics is returning only a hidden clinic, it feels like something is misconfigured deeper in the environment, or the key is scoped in a way that’s limiting access to only one ClinicNum (despite the clinics being visible in OpenDental and not hidden).

Happy to post logs or screenshots if helpful. At this point, I’d really appreciate any ideas on where to look next — or if someone in the community has time to help debug this live, I’d be happy to coordinate and compensate for that time.

Thanks again!
If you post the requests and responses (with all PHI redacted), I could help investigate this further. Another option besides GET /clinics is to use the Queries PUT ShortQuery endpoint to retrieve all clinics from the database, hidden and non-hidden. Thanks!

ayushdentel
Posts: 1
Joined: Mon Jun 02, 2025 4:09 am

Re: Hidden Clinic Still Returned by API – ClinicNum/ Clinic Parameter Ignored?

Post by ayushdentel » Mon Jun 02, 2025 4:13 am

After further investigation, something even weirder is happening:

- We are not able to see a clinic with the name "Headquarters" neither in the API nor through SQL query
- We have confirmed we do get both hidden and non-hidden clinics from the SQL query
- We have confirmed that the UI's "hidden" column does not reflect what the "isHidden" param returns through the SQL query

Any ideas why this might be happening?

Response from the ShortQuery API for "SELECT * from clinic":

https://gist.github.com/ayshptk/02a0c86 ... 7662dd5930

Response from the /clinics API:
https://gist.github.com/ayshptk/01cab54 ... d9760fa7e4

^^ this is after we did a PUT query to make isHidden false for another clinic (which already appears as not hidden in the screenshot above)

RyanH
Posts: 27
Joined: Thu Dec 19, 2024 8:33 am

Re: Hidden Clinic Still Returned by API – ClinicNum/ Clinic Parameter Ignored?

Post by RyanH » Mon Jun 02, 2025 8:43 am

ayushdentel wrote:
Mon Jun 02, 2025 4:13 am
After further investigation, something even weirder is happening:

- We are not able to see a clinic with the name "Headquarters" neither in the API nor through SQL query
- We have confirmed we do get both hidden and non-hidden clinics from the SQL query
- We have confirmed that the UI's "hidden" column does not reflect what the "isHidden" param returns through the SQL query

Any ideas why this might be happening?

Response from the ShortQuery API for "SELECT * from clinic":

https://gist.github.com/ayshptk/02a0c86 ... 7662dd5930

Response from the /clinics API:
https://gist.github.com/ayshptk/01cab54 ... d9760fa7e4

^^ this is after we did a PUT query to make isHidden false for another clinic (which already appears as not hidden in the screenshot above)
Good morning, ayushdentel.
- We are not able to see a clinic with the name "Headquarters" neither in the API nor through SQL query
This is because there is no entry for the "Headquarters" clinic in the database. The "Headquarters" clinic has a ClinicNum=0, and is handled in the UI and business layer.
- We have confirmed that the UI's "hidden" column does not reflect what the "isHidden" param returns through the SQL query
Please run the same SQL query as you did via the API within the User Query window in Open Dental.

Thanks!

Post Reply