{
  "info": {
    "name": "InspectionVoice Public API",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "description": "Requests pre-configured for the InspectionVoice Public API. Set the {{api_key}} and {{base_url}} environment variables."
  },
  "variable": [
    { "key": "base_url", "value": "https://inspectionvoice.com/api/v1" },
    { "key": "api_key", "value": "iv_sk_REPLACE_ME" }
  ],
  "auth": {
    "type": "bearer",
    "bearer": [{ "key": "token", "value": "{{api_key}}", "type": "string" }]
  },
  "item": [
    {
      "name": "List projects",
      "request": {
        "method": "GET",
        "url": { "raw": "{{base_url}}/projects?per_page=25", "host": ["{{base_url}}"], "path": ["projects"], "query": [{ "key": "per_page", "value": "25" }] }
      }
    },
    {
      "name": "Create project",
      "request": {
        "method": "POST",
        "header": [{ "key": "Content-Type", "value": "application/json" }],
        "body": { "mode": "raw", "raw": "{\"name\":\"Example project\",\"address\":\"100 Example St\"}" },
        "url": { "raw": "{{base_url}}/projects", "host": ["{{base_url}}"], "path": ["projects"] }
      }
    },
    {
      "name": "List inspections",
      "request": {
        "method": "GET",
        "url": { "raw": "{{base_url}}/inspections", "host": ["{{base_url}}"], "path": ["inspections"] }
      }
    },
    {
      "name": "Get inspection",
      "request": {
        "method": "GET",
        "url": { "raw": "{{base_url}}/inspections/:id", "host": ["{{base_url}}"], "path": ["inspections", ":id"] }
      }
    },
    {
      "name": "List observations",
      "request": {
        "method": "GET",
        "url": { "raw": "{{base_url}}/inspections/:id/observations", "host": ["{{base_url}}"], "path": ["inspections", ":id", "observations"] }
      }
    },
    {
      "name": "Get report signed URL",
      "request": {
        "method": "GET",
        "url": { "raw": "{{base_url}}/inspections/:id/report", "host": ["{{base_url}}"], "path": ["inspections", ":id", "report"] }
      }
    },
    {
      "name": "Create webhook",
      "request": {
        "method": "POST",
        "header": [{ "key": "Content-Type", "value": "application/json" }],
        "body": { "mode": "raw", "raw": "{\"name\":\"Example\",\"target_url\":\"https://example.com/hooks\",\"events\":[\"inspection.sent\"]}" },
        "url": { "raw": "{{base_url}}/webhooks", "host": ["{{base_url}}"], "path": ["webhooks"] }
      }
    },
    {
      "name": "Top deficiencies",
      "request": {
        "method": "GET",
        "url": { "raw": "{{base_url}}/analytics/deficiencies?limit=10", "host": ["{{base_url}}"], "path": ["analytics", "deficiencies"], "query": [{ "key": "limit", "value": "10" }] }
      }
    }
  ]
}
