{"openapi":"3.1.0","info":{"title":"VetGate Eligibility API","version":"1.0.0","description":"Fail-closed carrier-eligibility decisions. Dispatch only when eligible===true."},"servers":[{"url":"https://165.227.65.218.nip.io"}],"paths":{"/v1/eligibility":{"post":{"summary":"Get a fail-closed eligibility verdict for a carrier (by MC).","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["mc_number"],"properties":{"mc_number":{"type":"string","example":"16536"}}}}}},"responses":{"200":{"description":"Verdict (eligible true/false). Unknown carriers and degraded backends return eligible:false.","content":{"application/json":{"schema":{"type":"object","properties":{"eligible":{"type":"boolean"},"found":{"type":"boolean"},"tier":{"type":["string","null"]},"reasons":{"type":"array","items":{"type":"string"}},"degraded":{"type":"boolean"},"decision_id":{"type":"string"},"ruleset_version":{"type":["integer","null"]},"data_as_of":{"type":["string","null"]},"evaluated_at":{"type":"string"},"cache_hit":{"type":"boolean"}}}}}},"401":{"description":"Missing/invalid/inactive/expired key."},"403":{"description":"Key lacks the eligibility scope."},"429":{"description":"Rate limit exceeded (see Retry-After)."}}}},"/v1/health":{"get":{"summary":"Service + data-freshness health.","responses":{"200":{"description":"ok"}}}},"/v1/batch":{"post":{"summary":"Screen a whole roster asynchronously (needs the batch scope). v1 screens by MC; dot/uei/ref are echoed into the report.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","maxItems":5000,"items":{"type":"object","properties":{"mc":{"type":"string","example":"16536"},"dot":{"type":"string"},"uei":{"type":"string"},"ref":{"type":"string","description":"your row label, echoed back"}}}}}}}}},"responses":{"202":{"description":"Job accepted: {job_id,total,status,poll,report}. Rows draw from the key's per-minute rate budget."},"401":{"description":"Missing/invalid key."},"403":{"description":"Key lacks the batch scope."},"409":{"description":"This key already has an active job."},"422":{"description":"Empty or oversized roster (max 5000 rows)."}}}},"/v1/batch/{id}":{"get":{"summary":"Job status + outcome summary (eligible / review / hard_stop / not_found / not_screened / error).","security":[{"apiKey":[]}],"responses":{"200":{"description":"status"},"404":{"description":"Unknown job (or not this key's job)."}}}},"/v1/batch/{id}/report":{"get":{"summary":"Per-row results as a CSV download.","security":[{"apiKey":[]}],"responses":{"200":{"description":"text/csv"},"404":{"description":"Unknown job."}}}}},"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"x-api-key"}}}}