Mantys Eligibility API

Error codes

Every v4 error code, when it is returned, and what to do.

Headers are checked in this order, and the first failure is the one returned: the Bearer prefix, the key, the clinic, then the tenant.

HTTPcodeWhenWhat to do
401MALFORMED_AUTH_HEADERX-Api-Key lacks the Bearer prefix (case-sensitive)Send Bearer <key>
401INVALID_API_KEYKey not recognisedCheck the key
403CLINIC_NOT_AUTHORIZEDKey is valid but not for this X-Clinic-IdUse a clinic on your key, or ask Mantys to add it
403UNKNOWN_TENANTX-Client-ID not recognisedCheck your tenant id
403UAT_TEST_IDS_ONLYOnly on a Mantys UAT server, which answers test IDs and nothing else: a real check or any other requestUse a test ID there, and the production host for real checks
422VALIDATION_FAILEDMissing header, malformed JSON, unknown field, bad query parameter or cursorFix the field named in details
400VALIDATION_FAILEDThe payer does not accept the request (see details)Fix every item in details, then resend
400VISIT_TYPE_UNDERIVABLEOnly on accounts whose visit type comes from the encounter: no known value in the encounter fieldsSend visit_type, or a recognised encounter value
400ROUTING_NOT_CONFIGUREDAppointment checks not set up for your accountContact Mantys
400CANCELLATION_NOT_SUPPORTEDThe check's payer requests are all with payers that cannot be cancelledNone; cancel at the payer directly
404CHECK_NOT_FOUNDUnknown id, or another clinic's checkCheck the id and X-Clinic-Id
409CHECK_NOT_CANCELLABLECheck already cancelledNone needed
409NOT_SUBMITTED_TO_PAYERNo row on the check carries a payer referenceIf the check is still running, retry once it progresses; otherwise nothing to cancel
500INTERNAL_ERRORUnexpected error on our sideRetry later; send Mantys the request_id

On malformed JSON, the 422's details[].field is the character position where parsing failed (for example "23"), and its message is "JSON decode error".

details[].code on a 400:

details[].codeMeaning
MISSING_REQUIRED_FIELDdoctorId/doctorName is missing on INS026, D004, INS078 or TPA023. Reported with field: "doctor_id". An empty value is not "missing": an empty visit_type is UNSUPPORTED_VISIT_TYPE where a value is needed
UNKNOWN_TPAtpa_name is not a payer code we support
UNSUPPORTED_ID_TYPEThis payer does not accept this id_type; field is identifiers[N].id_type
UNSUPPORTED_VISIT_TYPEThis payer does not accept this visit_type; see Visit types by payer
INVALID_EMIRATES_IDAn EMIRATESID entry is not a valid Emirates ID format; field is identifiers[N].id_value
VISIT_TYPE_UNDERIVABLEAn encounter field named no known value; field is extra_args.<name> (encounter accounts only)
VALIDATION_FAILEDA test ID that names no known case, or a test ID sent to POST /v4/appointment-checks

New codes may be added. Treat an unknown code by its HTTP status.