{
  "info": {
    "name": "Urim KYC API",
    "description": "Urim KYC Screening API v1.5.0\n\nAuth: Set your API key in the collection variable `api_key`.\nAll requests use the `X-API-Key` header.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {
      "key": "base_url",
      "value": "https://urimkyc.com/api",
      "type": "string"
    },
    {
      "key": "api_key",
      "value": "YOUR_API_KEY_HERE",
      "type": "string"
    },
    {
      "key": "screen_id",
      "value": "",
      "type": "string"
    }
  ],
  "auth": {
    "type": "apikey",
    "apikey": [
      { "key": "key", "value": "X-API-Key", "type": "string" },
      { "key": "value", "value": "{{api_key}}", "type": "string" },
      { "key": "in", "value": "header", "type": "string" }
    ]
  },
  "item": [
    {
      "name": "System",
      "item": [
        {
          "name": "Health Check",
          "request": {
            "method": "GET",
            "header": [],
            "url": { "raw": "{{base_url}}/health", "host": ["{{base_url}}"], "path": ["health"] },
            "description": "Public — no auth required. Returns API version and status."
          }
        },
        {
          "name": "DB Status",
          "request": {
            "method": "GET",
            "header": [],
            "url": { "raw": "{{base_url}}/dbstatus", "host": ["{{base_url}}"], "path": ["dbstatus"] },
            "description": "Sanctions DB stats — entity counts per list."
          }
        },
        {
          "name": "Tenant Logs",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/tenant/logs?limit=50",
              "host": ["{{base_url}}"],
              "path": ["tenant", "logs"],
              "query": [{ "key": "limit", "value": "50" }]
            },
            "description": "Activity logs for your tenant."
          }
        }
      ]
    },
    {
      "name": "Account",
      "item": [
        {
          "name": "Get My Info",
          "request": {
            "method": "GET",
            "header": [],
            "url": { "raw": "{{base_url}}/me", "host": ["{{base_url}}"], "path": ["me"] },
            "description": "Returns your user info, role, tenant, and plan."
          }
        },
        {
          "name": "Rotate API Key",
          "request": {
            "method": "POST",
            "header": [],
            "url": { "raw": "{{base_url}}/me/rotate-key", "host": ["{{base_url}}"], "path": ["me", "rotate-key"] },
            "description": "Generate a new API key. Old key is immediately invalidated. Save the new key!"
          }
        }
      ]
    },
    {
      "name": "Screening",
      "item": [
        {
          "name": "Screen Individual",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "var json = pm.response.json();",
                  "if (json.screen_id) {",
                  "    pm.collectionVariables.set('screen_id', json.screen_id);",
                  "}"
                ],
                "type": "text/javascript"
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Vladimir Putin\",\n  \"dob\": \"1952-10-07\",\n  \"nationality\": \"Russian\",\n  \"location\": \"Moscow\",\n  \"alias\": \"\",\n  \"types\": \"sanctions,pep,criminal\",\n  \"force\": false\n}"
            },
            "url": { "raw": "{{base_url}}/screen", "host": ["{{base_url}}"], "path": ["screen"] },
            "description": "Full screening (sanctions + PEP + criminal). Returns complete JSON result.\n\nThe screen_id is auto-saved to collection variables for use in other requests."
          }
        },
        {
          "name": "Screen Individual (Stream)",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Vladimir Putin\",\n  \"dob\": \"1952-10-07\",\n  \"nationality\": \"Russian\",\n  \"location\": \"Moscow\",\n  \"alias\": \"\",\n  \"types\": \"sanctions,pep,criminal\",\n  \"force\": false\n}"
            },
            "url": { "raw": "{{base_url}}/screen/stream", "host": ["{{base_url}}"], "path": ["screen", "stream"] },
            "description": "Same as /screen but returns Server-Sent Events for live progress. Best for UI integrations."
          }
        },
        {
          "name": "List All Screens",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/screens?limit=50",
              "host": ["{{base_url}}"],
              "path": ["screens"],
              "query": [{ "key": "limit", "value": "50" }]
            },
            "description": "All screening results for your tenant."
          }
        },
        {
          "name": "List Pending Screens",
          "request": {
            "method": "GET",
            "header": [],
            "url": { "raw": "{{base_url}}/screens/pending", "host": ["{{base_url}}"], "path": ["screens", "pending"] },
            "description": "Screens awaiting analyst review (no disposition yet)."
          }
        },
        {
          "name": "Get Screen by ID",
          "request": {
            "method": "GET",
            "header": [],
            "url": { "raw": "{{base_url}}/screens/{{screen_id}}", "host": ["{{base_url}}"], "path": ["screens", "{{screen_id}}"] },
            "description": "Full details for a specific screen. Uses screen_id from collection variables."
          }
        },
        {
          "name": "Get Screen History",
          "request": {
            "method": "GET",
            "header": [],
            "url": { "raw": "{{base_url}}/screens/{{screen_id}}/history", "host": ["{{base_url}}"], "path": ["screens", "{{screen_id}}", "history"] },
            "description": "Disposition history and analyst notes for a screen."
          }
        },
        {
          "name": "Dispose Screen",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"disposition\": \"confirmed_hit\",\n  \"note\": \"Verified match — OFAC SDN list\",\n  \"override\": false,\n  \"approval_requested\": false\n}"
            },
            "url": { "raw": "{{base_url}}/screens/{{screen_id}}/dispose", "host": ["{{base_url}}"], "path": ["screens", "{{screen_id}}", "dispose"] },
            "description": "Record analyst disposition.\n\nOptions: confirmed_hit | false_positive | needs_review | cleared | approved (admin only)"
          }
        },
        {
          "name": "Set Rescreen Date",
          "request": {
            "method": "PATCH",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"rescreen_date\": \"2026-05-01\"\n}"
            },
            "url": { "raw": "{{base_url}}/screens/{{screen_id}}/rescreen-date", "host": ["{{base_url}}"], "path": ["screens", "{{screen_id}}", "rescreen-date"] },
            "description": "Set or update the next rescreen date for a screen."
          }
        },
        {
          "name": "Delete Screen",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": { "raw": "{{base_url}}/screens/{{screen_id}}", "host": ["{{base_url}}"], "path": ["screens", "{{screen_id}}"] },
            "description": "Permanently delete a screen. Admins can delete any, analysts only their own."
          }
        }
      ]
    },
    {
      "name": "Batch Screening",
      "item": [
        {
          "name": "Batch Screen (Stream)",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"subjects\": [\n    {\n      \"name\": \"Vladimir Putin\",\n      \"dob\": \"1952-10-07\",\n      \"nationality\": \"Russian\"\n    },\n    {\n      \"name\": \"Ali Khamenei\",\n      \"nationality\": \"Iranian\"\n    },\n    {\n      \"name\": \"John Smith\",\n      \"location\": \"London\"\n    }\n  ],\n  \"types\": \"sanctions,pep,criminal\",\n  \"force\": false\n}"
            },
            "url": { "raw": "{{base_url}}/batch/stream", "host": ["{{base_url}}"], "path": ["batch", "stream"] },
            "description": "Batch screen up to 500 subjects. Returns SSE stream with progress.\n\nRequires Growth plan or above."
          }
        },
        {
          "name": "Batch Screen + Add to Clients (Stream)",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"subjects\": [\n    {\n      \"name\": \"Test Client One\",\n      \"nationality\": \"British\",\n      \"notes\": \"New onboarding\"\n    },\n    {\n      \"name\": \"Test Client Two\",\n      \"location\": \"Wellington, NZ\"\n    }\n  ],\n  \"types\": \"sanctions,pep,criminal\",\n  \"force\": false\n}"
            },
            "url": { "raw": "{{base_url}}/batch/clients/stream", "host": ["{{base_url}}"], "path": ["batch", "clients", "stream"] },
            "description": "Batch screen AND register each subject as an ongoing client.\n\nRequires Growth plan or above."
          }
        }
      ]
    },
    {
      "name": "Clients",
      "item": [
        {
          "name": "Add Client",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Jane Doe\",\n  \"dob\": \"1985-03-15\",\n  \"nationality\": \"American\",\n  \"location\": \"New York\",\n  \"alias\": \"\",\n  \"types\": \"sanctions,pep,criminal\",\n  \"notes\": \"New mortgage applicant\"\n}"
            },
            "url": { "raw": "{{base_url}}/clients", "host": ["{{base_url}}"], "path": ["clients"] },
            "description": "Register a client for ongoing monitoring with scheduled re-screens."
          }
        },
        {
          "name": "List Clients",
          "request": {
            "method": "GET",
            "header": [],
            "url": { "raw": "{{base_url}}/clients", "host": ["{{base_url}}"], "path": ["clients"] },
            "description": "All registered client profiles for your tenant."
          }
        },
        {
          "name": "List Screened Subjects",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/clients/screened?limit=500",
              "host": ["{{base_url}}"],
              "path": ["clients", "screened"],
              "query": [{ "key": "limit", "value": "500" }]
            },
            "description": "All unique subjects ever screened — deduped by name, showing most recent screen."
          }
        },
        {
          "name": "List Reviewed Subjects",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/clients/reviewed?limit=500",
              "host": ["{{base_url}}"],
              "path": ["clients", "reviewed"],
              "query": [{ "key": "limit", "value": "500" }]
            },
            "description": "Subjects that have been reviewed (have a disposition)."
          }
        },
        {
          "name": "Trigger Auto-Rescreen",
          "request": {
            "method": "POST",
            "header": [],
            "url": { "raw": "{{base_url}}/clients/rescreen/auto/trigger", "host": ["{{base_url}}"], "path": ["clients", "rescreen", "auto", "trigger"] },
            "description": "Manually trigger the auto-rescreen scheduler for clients due for rescreening."
          }
        }
      ]
    }
  ]
}
