Skip to content

API error codes and messages

Pablo Pazos edited this page Jun 24, 2016 · 16 revisions
Action Error Code Message HTTP Status
/login no record for provided username e01.0001 401 Unauthorized
/login user disabled e01.0002 401 Unauthorized
/login user account expired e01.0003 401 Unauthorized
/login user account locked e01.0004 401 Unauthorized
/login provided password don't match e01.0005 401 Unauthorized
/login no organization number provided e01.0006 401 Unauthorized
/login organization with number provided doesn't exists e01.0007 401 Unauthorized
/login organization not associated with user e01.0008 401 Unauthorized
/commit ehrUid not provided e02. 400 Bad Request
/commit auditSystemId not provided e02. 400 Bad Request
/commit auditCommitter not provided e02. 400 Bad Request
/commit no EHR found for the provided ehrUid e02. 400 Bad Request
/commit user can't access the EHR, it belongs to an organization not associated with the user e02. 400 Bad Request (FIX to 401 Unauthorized)
/commit request body is empty or versions XML element not found e02. 400 Bad Request
/commit parsed versions is empty (error during parsing) e02. 400 Bad Request
/commit parsed versions root node is empty (error accessing the root version element) e02. 400 Bad Request
/commit some parsed versions failed XSD validation e02. 400 Bad Request
/commit other generic error related to processing the parsed versions/compositions (TODO: specify the internal errors: duplicated file name, folder doesnt exists, cant write to folder, etc. make RUntimeExceptions for everything see #282) e02. 400 Bad Request
/checkout ehrUid not provided e03. 400 Bad Request
/checkout compositionUid not provided e03. 400 Bad Request
/checkout user can't access the EHR that contains the composition, because it belongs to an organization not associated with the user e03. 401 Unauthorized
/checkout no versions found for the compositionUid e03. 404 Not Found
/checkout the requested composition is not the latest version e03. 400 Bad Request
/checkout the requested composition is not the latest version e03. 500 Internal Server Error
/ehrs requested output format is not supported e04.0066 400 Bad Request
/ehrs/subjectUid/$subjectUid subjectUid not provided e05.0001 400 Bad Request
/ehrs/subjectUid/$subjectUid patient doesn't exists e05.0002 404 Not Found
/ehrs/subjectUid/$subjectUid user can't access the patient, because it belongs to an organization not associated with the user e05.0003 401 Unauthorized
/ehrs/subjectUid/$subjectUid the patient doesn't have an EHR e05.0004 404 Not Found
/ehrs/subjectUid/$subjectUid requested output format is not supported e05.0066 400 Bad Request
/ehrs/ehrUid/$ehrUid ehrUid not provided e06.0006 400 Bad Request
/ehrs/ehrUid/$ehrUid the EHR doesn't exists e06.0007 404 Not Found
/ehrs/ehrUid/$ehrUid user can't access the EHR, because it belongs to an organization not associated with the user e06.0008 401 Unauthorized
/ehrs/ehrUid/$ehrUid requested output format is not supported e06.0066 400 Bad Request
/patients requested output format is not supported e07.0066 400 Bad Request
/patients/$uid uid not provided e08.0001 400 Bad Request
/patients/$uid patient not found e08.0002 404 Not Found
/patients/$uid requested output format is not supported e08.0066 400 Bad Request
/queries/$queryUid queryUid not provided e09.0001 400 Bad Request
/queries/$queryUid query not found e09.0002 404 Not Found
/queries/$queryUid requested output format is not supported e09.0066 400 Bad Request
/queries/$queryUid/execute queryUid not provided e10.0005 400 Bad Request
/queries/$queryUid/execute organizationUid not provided e10.0006 400 Bad Request (To Be Changed)
/queries/$queryUid/execute ehrUid provided but an EHR doesn't exists for it e10.0007 404 Not Found
/queries/$queryUid/execute the user doesn't have permissions to query the EHR e10.0008 401 Unauthorized
/queries/$queryUid/execute query doesn't exists for the given queryUid e10.0009 404 Not Found
/queries/$queryUid/execute fromDate given but has an invalid format e10.0010 400 Bad Request
/queries/$queryUid/execute toDate given but has an invalid format e10.0011 400 Bad Request
/queries/$queryUid/execute fromDate and toDate filters are present but fromDate is greater than toDate e10.0012 400 Bad Request
/queries/$queryUid/execute given group not supported e10.0013 400 Bad Request
/queries/$queryUid/execute query doesn't exists for the given queryUid e10.0014 404 Not Found
/queries/$queryUid/execute requested output format is not supported e10.0066 400 Bad Request
/queries requested output format is not supported e11.0066 400 Bad Request
/contributions requested output format is not supported e12.0066 400 Bad Request
/contributions from date not parsable e12.0001 400 Bad Request
/contributions to date not parsable e12.0002 400 Bad Request
/contributions from and to date filters are present but from is greater than to e12.0003 400 Bad Request
/contributions user can't access the EHR with uid = $ehrUid e12.0004 400 Bad Request