Situation
When sending a POST request to the user/facility endpoint
(i.e., /apis/default/api/facility
) I am getting the following validation error:
{
“validationErrors”: {
“facility_npi”: {
“Required::NON_EXISTENT_KEY”: “facility_npi must be provided, but does not exist”
}
},
“internalErrors”: ,
“data”: ,
“links”:
}
This requirement is also present in the /swagger/openemr-api.yaml
file.
However, this is not a required field when creating a facility in OpenEMR. I created a facility with the same information as the payload in the API request and did not receive any errors.
The expected result was to be able to create a facility using the Standard API without an NPI. It makes sense not to require the facility_npi
in the business logic since you can have a location without an NPI and also for international users they would not have an NPI.
OpenEMR Version
I’m using OpenEMR version 7.0.2 (3)
Also reproduced in version 7.0.3-dev
Browser:
I’m using: Google Chrome 134.0.6998.89 (Official Build) (arm64)
Operating System
I’m using: macOS 15.3.2
Search
Did you search the forum for similar questions? Yes
Logs
Did you check the logs? Yes
Was there anything pertinent in them? No