{
  "info": {
    "name": "TrueViewly Location Risk API",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "description": "Create async location-risk jobs, retrieve reports, run batches, inspect usage, and manage webhooks."
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://portal.trueviewly.com"
    },
    {
      "key": "apiKey",
      "value": "tvly_live_replace_me"
    },
    {
      "key": "jobId",
      "value": "job_replace_me"
    },
    {
      "key": "reportId",
      "value": "00000000-0000-0000-0000-000000000000"
    },
    {
      "key": "batchId",
      "value": "batch_replace_me"
    },
    {
      "key": "webhookId",
      "value": "we_replace_me"
    }
  ],
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{apiKey}}",
        "type": "string"
      }
    ]
  },
  "item": [
    {
      "name": "Create report job",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Idempotency-Key",
            "value": "{{idempotencyKey}}",
            "disabled": true
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v1/location-risk/report-jobs",
          "host": [
            "{{baseUrl}}"
          ],
          "path": []
        },
        "body": {
          "mode": "raw",
          "raw": "{\r\n  \u0022latitude\u0022: 36.98154,\r\n  \u0022longitude\u0022: -122.02934\r\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "Get report job",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{baseUrl}}/api/v1/location-risk/report-jobs/{{jobId}}",
          "host": [
            "{{baseUrl}}"
          ],
          "path": []
        },
        "body": null
      }
    },
    {
      "name": "Get report summary",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{baseUrl}}/api/v1/location-risk/reports/{{reportId}}?detail=summary",
          "host": [
            "{{baseUrl}}"
          ],
          "path": []
        },
        "body": null
      }
    },
    {
      "name": "Download report PDF",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{baseUrl}}/api/v1/location-risk/reports/{{reportId}}/pdf",
          "host": [
            "{{baseUrl}}"
          ],
          "path": []
        },
        "body": null
      }
    },
    {
      "name": "Create batch",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Idempotency-Key",
            "value": "{{idempotencyKey}}",
            "disabled": true
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v1/location-risk/batches",
          "host": [
            "{{baseUrl}}"
          ],
          "path": []
        },
        "body": {
          "mode": "raw",
          "raw": "{\r\n  \u0022name\u0022: \u0022West Coast sample\u0022,\r\n  \u0022items\u0022: [\r\n    { \u0022externalId\u0022: \u0022site-001\u0022, \u0022latitude\u0022: 36.98154, \u0022longitude\u0022: -122.02934 },\r\n    { \u0022externalId\u0022: \u0022site-002\u0022, \u0022latitude\u0022: 33.248205, \u0022longitude\u0022: -116.670794 }\r\n  ]\r\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "Get batch",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{baseUrl}}/api/v1/location-risk/batches/{{batchId}}",
          "host": [
            "{{baseUrl}}"
          ],
          "path": []
        },
        "body": null
      }
    },
    {
      "name": "Get usage",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{baseUrl}}/api/v1/usage/current",
          "host": [
            "{{baseUrl}}"
          ],
          "path": []
        },
        "body": null
      }
    },
    {
      "name": "Get operations summary",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{baseUrl}}/api/v1/observability/current?hours=24",
          "host": [
            "{{baseUrl}}"
          ],
          "path": []
        },
        "body": null
      }
    },
    {
      "name": "Create webhook endpoint",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Idempotency-Key",
            "value": "{{idempotencyKey}}",
            "disabled": true
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v1/webhooks",
          "host": [
            "{{baseUrl}}"
          ],
          "path": []
        },
        "body": {
          "mode": "raw",
          "raw": "{\r\n  \u0022name\u0022: \u0022Production webhook\u0022,\r\n  \u0022url\u0022: \u0022https://example.com/trueviewly/webhooks\u0022,\r\n  \u0022events\u0022: [\u0022report.job.completed\u0022, \u0022report.job.failed\u0022]\r\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "List webhook deliveries",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{baseUrl}}/api/v1/webhooks/deliveries?limit=25",
          "host": [
            "{{baseUrl}}"
          ],
          "path": []
        },
        "body": null
      }
    }
  ]
}