![]() | |
Status Codes and Error Responses |
HTTP Status Codes and Explanations
Status Code | Description |
200 Ok | A Get or Head request performed successfully. |
201 Created | A request to insert a resource performed successfully. |
204 No content | A request to modify or delete resources performed successfully. |
400 Bad request | A request could not be understood. Likely, there is a syntactic error such as a json body being in improper format. |
401 Unauthorized | A request was not authorised. Examples include passing invalid credentials or attempting to access a method that caller is not licensed for. To resolve an error of this type, it would often be neccessary to contact support. |
403 Forbidden | A request encountered a semantic validation error. There are a wide range of validation errors. Some common messages include: A required property is missing. -This signals that there is some input that must be entered. The resource corresponding to the input either does not exist or is not applicable for this field. -This signals that some input value does not match an expected set of valid input. To resolve an error of this type, read the error response and adjust the integration to pass expected input. Often the 'information' field if the error reponse will give advice on how to obtain valid input for the offending field. |
404 Not Found | A request URI does not match any in the service. It is not understood which method should be invoked. To resolve an error of this type, a valid URI must be entered. A list valid URIs can be obtained from the about page (/api). They also can be obtained from certain insert methods and error reponses. Please watch for spelling mistakes in the URI. |
405 Not Found | A request contains an valid URI, but uses a method verb that is not supported for that URI. For Example, calling /api/lookup_search with the 'Patch' verb. To resolve an error of this type, use a method verb that is supported for the URI. Refer to the section of documentation corresponding to the URI for information on how to access that functionality. |
409 Conflict | A request encountered a concurrency issue. There are only 3 possible messages: 1. Method call failed since another user has taken a lock on the same area. 2. Method call failed since the object has changed. Try again. 3. The database being connected is locked. To resolve an error of this fault type, it may often only require waiting and trying the call later. However, in some cases a lock may not be released properly and the lock on the area may persist until it’s manually removed from Epic. For example, system locks can be released using Epic from Utilities > Diagnostic > Release System Locks. |
500 Internal Server Error | A request encountered an unexpected error. To resolve an error of this type, contact support. |
Error Response Fields and Explanations
Field | Description |
message | Text that explains what error occured. We aim to keep this text fairly static incase an integration intends to detect the occurrence of a certain exception by matching against the message text. |
field | Contains the field that caused the error inorder to identify which input an integration should adjust. |
information | Contains various information to help resolve the issue. For instance, instructions on how to obtain valid input or other information that can better identify the offending field. |
refer_uri | Contains a URI that can be used to obtain valid input. For instance, instructions on how to obtain valid input or other information that can better identify the offending field. This field only appears in cases where a restful method can be used to obtain the valid input. This field intends to reduce the effort to consume the prerequsite restful method. |
Examples
{
"field": "lookup_type",
"refer_uri": "/api/lookup_search",
"message": "The resource corresponding to the input either does not exist or is not applicable for this field."
}