{
  "id": "conn-interpol-api",
  "name": "Interpol watchlist screening API",
  "kind": "api",
  "description": "Screens an applicant against the watchlist. Sandbox uses recorded mocks, then the sandbox target.",
  "operations": [
    {
      "kind": "api",
      "name": "screen",
      "method": "POST",
      "pathTemplate": "/v2/screen",
      "bodyTemplate": "{\"fullName\":\"{fullName}\",\"dob\":\"{dob}\",\"passportNo\":\"{passportNo}\"}",
      "auth": { "type": "apiKeyHeader", "headerName": "X-Api-Key", "secret": "secret://interpol-api-key" },
      "headers": { "Accept": "application/json" },
      "parameters": [
        { "name": "fullName", "type": "string", "required": true },
        { "name": "dob", "type": "date", "required": true },
        { "name": "passportNo", "type": "string", "required": true }
      ],
      "outputs": [
        { "name": "hit", "type": "bool", "nullable": false },
        { "name": "matchScore", "type": "number", "nullable": true }
      ],
      "timeoutMs": 3000,
      "retryPolicy": { "count": 1, "backoffMs": 200 },
      "circuitBreaker": { "failures": 5, "windowSec": 60, "openSec": 30 },
      "responseMap": [
        { "output": "hit", "path": "$.result.hit" },
        { "output": "matchScore", "path": "$.result.matches[0].score" }
      ],
      "errorMap": [
        { "whenStatus": 404, "then": "HitFalse" },
        { "whenPath": "$.error.throttled", "then": "Flag" }
      ]
    }
  ],
  "prodTarget": { "baseUrl": "https://api.interpol.example/" },
  "testTarget": { "baseUrl": "https://sandbox.interpol.example/" }
}
