Mantys Eligibility API

Overview

Submit an eligibility check to a UAE payer and poll for the structured result.

The Mantys Eligibility API answers one question: is this patient covered, by this payer, for this kind of visit, right now? You get back the coverage, the network, the copay breakdown, and a screenshot of what the payer showed.

The check runs against the payer's own system and takes seconds to minutes, so the API is asynchronous. You create a task, then poll one endpoint until the task reaches a terminal status. The response you are polling is the result, so there is no third call.

Base URL

https://prod.api.mantys.org/v2/api-integration-v3

Every path on this site is relative to that. There is no sandbox host. See Quickstart for how to make a safe first call.

The flow

Steps 2, 3 and 4 are the same request. When its status stops being an in-flight one, the response you already have is the result.

Poll eligibility-result, not task-status

GET /eligibility-result/{task_id} reports progress and returns the result, so it is the only endpoint you need after create. The task-status endpoint is a narrower view of the same task, kept for existing integrations; the comparison is on the polling page. Search-all checks use the same flow and report progress in search_all_status.

Interactive example

Try it simulates the whole flow in the browser: pick a payer, step through the status changes, and copy the cURL for each request. Every response there is generated locally, so nothing you click reaches the API.

End to end

One task, from create to result. The loop below is minimal; production code should add the timeout and backoff described in Quickstart.

BASE=https://prod.api.mantys.org/v2/api-integration-v3
AUTH=(-H "x-api-key: Bearer $MANTYS_API_KEY"
      -H "X-Clinic-ID: $MANTYS_CLINIC_ID"
      -H "X-Client-ID: $MANTYS_CLIENT_ID")

TASK_ID=$(curl -sS "${AUTH[@]}" -H 'Content-Type: application/json' \
  -X POST "$BASE/create-task" \
  -d '{"tpa_name":"TPA004","id_type":"EMIRATESID","id_value":"784-0000-0000000-0","visit_type":"OUTPATIENT"}' \
  | python3 -c 'import json,sys; print(json.load(sys.stdin)["data"]["task_id"])')

while :; do
  RESULT=$(curl -sS "${AUTH[@]}" "$BASE/eligibility-result/$TASK_ID")
  STATUS=$(printf '%s' "$RESULT" | python3 -c 'import json,sys; print(json.load(sys.stdin)["status"])')
  case "$STATUS" in
    PROCESS_COMPLETE|CANCELLED|FAILED) break ;;
  esac
  sleep 5
done

printf '%s' "$RESULT" | python3 -m json.tool

Where to go next

On this page