{
  "info": {
    "name": "DVVZ Routing API",
    "description": "Pre-built requests for the self-hosted DVVZ Routing API at `https://routing.dvz.services`.\n\n**Coverage:** South Africa (full country)\n**Auth:** `X-API-Key` header on every gated endpoint. Self-serve a key at https://routing.dvz.services/playground/.\n**Coordinate order:** longitude, latitude (NOT lat, lng — easy to flip).\n\n## Collection variables\n- `baseUrl` — defaults to the production URL. Change to `http://localhost` for local dev.\n- `apiKey` — paste your key here once; every request inherits it.\n- `profile` — `driving-car` or `foot-walking`.\n\n## Endpoints\n- **Service**: health, status\n- **Directions**: GET (simple) + POST (waypoints, alternatives, instructions)\n- **Matrix**: N-to-N distance + duration\n- **Isochrones**: reach polygons by time or distance\n- **Snap**: nearest-road snapping\n- **Geocoding**: forward (address → coords) + reverse (coords → address). DVZ-wrapped response.\n\nFull docs: https://routing.dvz.services/playground/\nORS reference: https://giscience.github.io/openrouteservice/api-reference/",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    { "key": "baseUrl", "value": "https://routing.dvz.services", "type": "string", "description": "Routing API base URL. Use http://localhost for local dev." },
    { "key": "apiKey", "value": "YOUR_API_KEY_HERE", "type": "string", "description": "X-API-Key value. Generate one at /playground/." },
    { "key": "profile", "value": "driving-car", "type": "string", "description": "driving-car | foot-walking" }
  ],
  "auth": {
    "type": "apikey",
    "apikey": [
      { "key": "key", "value": "X-API-Key", "type": "string" },
      { "key": "value", "value": "{{apiKey}}", "type": "string" },
      { "key": "in", "value": "header", "type": "string" }
    ]
  },
  "item": [
    {
      "name": "Service",
      "item": [
        {
          "name": "Health check",
          "request": {
            "auth": { "type": "noauth" },
            "method": "GET",
            "header": [{ "key": "Accept", "value": "application/json" }],
            "url": { "raw": "{{baseUrl}}/ors/v2/health", "host": ["{{baseUrl}}"], "path": ["ors", "v2", "health"] },
            "description": "Public — no API key needed. Returns `{\"status\":\"ready\"}` once profiles are loaded."
          }
        },
        {
          "name": "Status (profiles + build info)",
          "request": {
            "auth": { "type": "noauth" },
            "method": "GET",
            "header": [{ "key": "Accept", "value": "application/json" }],
            "url": { "raw": "{{baseUrl}}/ors/v2/status", "host": ["{{baseUrl}}"], "path": ["ors", "v2", "status"] },
            "description": "Public — no API key needed. Enabled profiles, ORS engine build, graph state."
          }
        }
      ]
    },
    {
      "name": "Directions",
      "item": [
        {
          "name": "GET — Johannesburg → Cape Town (driving)",
          "request": {
            "method": "GET",
            "header": [{ "key": "Accept", "value": "application/json" }],
            "url": {
              "raw": "{{baseUrl}}/ors/v2/directions/{{profile}}?start=28.0473,-26.2041&end=18.4241,-33.9249",
              "host": ["{{baseUrl}}"], "path": ["ors", "v2", "directions", "{{profile}}"],
              "query": [
                { "key": "start", "value": "28.0473,-26.2041", "description": "Johannesburg (lon,lat)" },
                { "key": "end",   "value": "18.4241,-33.9249", "description": "Cape Town (lon,lat)" }
              ]
            },
            "description": "Simple GET — single best route, GeoJSON LineString. ~1400 km, ~14 hours by car."
          }
        },
        {
          "name": "GET — Johannesburg → Durban (driving)",
          "request": {
            "method": "GET",
            "header": [{ "key": "Accept", "value": "application/json" }],
            "url": {
              "raw": "{{baseUrl}}/ors/v2/directions/{{profile}}?start=28.0473,-26.2041&end=31.0218,-29.8587",
              "host": ["{{baseUrl}}"], "path": ["ors", "v2", "directions", "{{profile}}"],
              "query": [
                { "key": "start", "value": "28.0473,-26.2041", "description": "Johannesburg" },
                { "key": "end",   "value": "31.0218,-29.8587", "description": "Durban" }
              ]
            }
          }
        },
        {
          "name": "POST — full options (GeoJSON)",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Accept", "value": "application/geo+json" },
              { "key": "Content-Type", "value": "application/json" }
            ],
            "url": {
              "raw": "{{baseUrl}}/ors/v2/directions/{{profile}}/geojson",
              "host": ["{{baseUrl}}"], "path": ["ors", "v2", "directions", "{{profile}}", "geojson"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"coordinates\": [[28.0473, -26.2041], [18.4241, -33.9249]],\n  \"instructions\": true,\n  \"preference\": \"recommended\",\n  \"units\": \"km\"\n}"
            },
            "description": "Same Joburg → Cape Town but POST with full options. Returns GeoJSON with turn-by-turn instructions."
          }
        },
        {
          "name": "POST — multiple waypoints (Joburg → Bloemfontein → Cape Town)",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Accept", "value": "application/json" },
              { "key": "Content-Type", "value": "application/json" }
            ],
            "url": {
              "raw": "{{baseUrl}}/ors/v2/directions/{{profile}}",
              "host": ["{{baseUrl}}"], "path": ["ors", "v2", "directions", "{{profile}}"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"coordinates\": [\n    [28.0473, -26.2041],\n    [26.1596, -29.0852],\n    [18.4241, -33.9249]\n  ],\n  \"instructions\": true\n}"
            }
          }
        }
      ]
    },
    {
      "name": "Matrix (distance/time between many points)",
      "item": [
        {
          "name": "POST — 3×3 matrix (Joburg, Cape Town, Durban)",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Accept", "value": "application/json" },
              { "key": "Content-Type", "value": "application/json" }
            ],
            "url": {
              "raw": "{{baseUrl}}/ors/v2/matrix/{{profile}}",
              "host": ["{{baseUrl}}"], "path": ["ors", "v2", "matrix", "{{profile}}"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"locations\": [\n    [28.0473, -26.2041],\n    [18.4241, -33.9249],\n    [31.0218, -29.8587]\n  ],\n  \"metrics\": [\"distance\", \"duration\"]\n}"
            },
            "description": "Returns 3×3 grids of pairwise distance (m) and duration (s)."
          }
        },
        {
          "name": "POST — one origin, many destinations",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Accept", "value": "application/json" },
              { "key": "Content-Type", "value": "application/json" }
            ],
            "url": {
              "raw": "{{baseUrl}}/ors/v2/matrix/{{profile}}",
              "host": ["{{baseUrl}}"], "path": ["ors", "v2", "matrix", "{{profile}}"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"locations\": [\n    [28.0473, -26.2041],\n    [18.4241, -33.9249],\n    [31.0218, -29.8587],\n    [22.1170, -31.5891]\n  ],\n  \"sources\": [0],\n  \"destinations\": [1, 2, 3],\n  \"metrics\": [\"distance\", \"duration\"]\n}"
            },
            "description": "Joburg → Cape Town, Durban, and a midway point. `sources` / `destinations` indexes into `locations`."
          }
        }
      ]
    },
    {
      "name": "Isochrones (reachability polygons)",
      "item": [
        {
          "name": "POST — 5/10/15/30 min drive from Joburg",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Accept", "value": "application/geo+json" },
              { "key": "Content-Type", "value": "application/json" }
            ],
            "url": {
              "raw": "{{baseUrl}}/ors/v2/isochrones/{{profile}}",
              "host": ["{{baseUrl}}"], "path": ["ors", "v2", "isochrones", "{{profile}}"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"locations\": [[28.0473, -26.2041]],\n  \"range\": [300, 600, 900, 1800],\n  \"range_type\": \"time\"\n}"
            },
            "description": "Polygons of everywhere reachable within 5/10/15/30 minutes by car."
          }
        }
      ]
    },
    {
      "name": "Snap to road",
      "item": [
        {
          "name": "POST — snap a point",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Accept", "value": "application/json" },
              { "key": "Content-Type", "value": "application/json" }
            ],
            "url": {
              "raw": "{{baseUrl}}/ors/v2/snap/{{profile}}",
              "host": ["{{baseUrl}}"], "path": ["ors", "v2", "snap", "{{profile}}"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"locations\": [[28.0473, -26.2041]],\n  \"radius\": 350\n}"
            },
            "description": "Find the closest point on the road network within the radius (m)."
          }
        }
      ]
    },
    {
      "name": "Geocoding",
      "description": "Self-hosted geocoder (Photon-backed in production). Returns a stable DVZ-wrapped JSON envelope regardless of upstream provider — see /playground/ for the full schema.",
      "item": [
        {
          "name": "GET — Forward geocode (address → coords)",
          "request": {
            "method": "GET",
            "header": [{ "key": "Accept", "value": "application/json" }],
            "url": {
              "raw": "{{baseUrl}}/geocode?q=Sandton, Johannesburg&limit=5&country=za",
              "host": ["{{baseUrl}}"], "path": ["geocode"],
              "query": [
                { "key": "q",       "value": "Sandton, Johannesburg", "description": "Free-text address or place name" },
                { "key": "limit",   "value": "5",  "description": "Max results, 1–20 (default 5)" },
                { "key": "country", "value": "za", "description": "ISO-3166-1 alpha-2 country bias. Pass empty for worldwide." }
              ]
            },
            "description": "Returns `{query, provider, count, results: [{lat, lon, display_name, type, address: {…}}]}`."
          }
        },
        {
          "name": "GET — Reverse geocode (coords → address)",
          "request": {
            "method": "GET",
            "header": [{ "key": "Accept", "value": "application/json" }],
            "url": {
              "raw": "{{baseUrl}}/reverse?lat=-26.2041&lon=28.0473",
              "host": ["{{baseUrl}}"], "path": ["reverse"],
              "query": [
                { "key": "lat", "value": "-26.2041", "description": "Latitude (–90 to 90)" },
                { "key": "lon", "value": "28.0473",  "description": "Longitude (–180 to 180)" }
              ]
            },
            "description": "Returns `{lat, lon, provider, result: {lat, lon, display_name, type, address: {…}}}`."
          }
        }
      ]
    }
  ]
}
