Edvak EHR FHIR API uses standard HTTP status codes to indicate the success or failure of an API request. Below is a summary of supported status codes and how to interpret and respond to them.General Behavior#
2xx — Successful operation
4xx — Client-side error (invalid input, missing parameters, unauthorized access, etc.)
5xx — Server-side error (unexpected issue on Edvak FHIR server)
All 4xx errors that are programmatically resolvable (like missing resources) return a OperationOutcome
as per FHIR standards.
Common Status Codes#
Status Code | Description |
---|
200 OK | Request was successful |
401 Unauthorized | Missing/invalid token or insufficient scope |
404 Not Found | Resource not found or incorrect endpoint |
422 Unprocessable Entity | Input was syntactically correct but semantically invalid |
500 Server Error | Unexpected error on Edvak server |
OperationOutcome Example Responses#
Invalid Query Parameter#
{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "invalid",
"expression": ["_sort"],
"details": {
"text": "The requested sorting parameter '_sort' is not supported for this resource type."
}
}
]
}
Insufficient Permissions#
{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "forbidden",
"details": {
"text": "Your app lacks required scope: 'patient/Observation.read'"
}
}
]
}
Modified at 2025-05-14 16:43:43