{
  "info": {
    "name": "Wayline API",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "description": "The Wayline Distance & Routing API is a developer-first routing service providing\naccurate road distance, duration, multi-point routes, distance matrices, and road snapping.\nAll distances reflect real roads from OpenStreetMap (never straight-line Euclidean distance).\n\nCoordinates are accepted in `lat,lng` order (Google-style). Degrees-minutes-seconds as copied from a map (`23°45'08.8\"N 90°22'38.6\"E`) is also accepted.\n\nRouting profiles: `car` and `motorcycle` (alias `bike`) where the region offers\nthem; see `profiles` in `GET /v1/coverage`. Drive times are typical daytime\nestimates per region, not live traffic.\nMap data © OpenStreetMap contributors (https://www.openstreetmap.org/copyright).\n"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{apiKey}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.example.com"
    },
    {
      "key": "apiKey",
      "value": "wl_test_your_key"
    }
  ],
  "item": [
    {
      "name": "Routing",
      "item": [
        {
          "name": "Point-to-point road distance and travel time",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/distance",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "distance"
              ],
              "query": [
                {
                  "key": "origin",
                  "value": "37.788,-122.4075"
                },
                {
                  "key": "destination",
                  "value": "37.8044,-122.2712"
                },
                {
                  "key": "units",
                  "value": "imperial"
                }
              ]
            },
            "description": "Calculates driving distance and estimated time between an origin and a destination along the road network."
          }
        },
        {
          "name": "Point-to-point road distance and travel time (JSON body)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/distance",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "distance"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"origin\": \"37.788,-122.4075\",\n  \"destination\": \"37.8044,-122.2712\",\n  \"units\": \"imperial\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "POST alternative for distance calculation, allowing structured coordinates."
          }
        },
        {
          "name": "Driving directions and full route geometry",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/route",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "route"
              ],
              "query": [
                {
                  "key": "origin",
                  "value": "37.788,-122.4075"
                },
                {
                  "key": "destination",
                  "value": "37.8044,-122.2712"
                },
                {
                  "key": "steps",
                  "value": "true"
                },
                {
                  "key": "geometry",
                  "value": "polyline"
                }
              ]
            },
            "description": "Returns full route geometries, turn-by-turn navigation steps, and leg breakdowns."
          }
        },
        {
          "name": "Driving directions and full route geometry (JSON body)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/route",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "route"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"origin\": \"37.788,-122.4075\",\n  \"destination\": \"37.8044,-122.2712\",\n  \"steps\": \"true\",\n  \"geometry\": \"polyline\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Calculates optimal driving directions, turn-by-turn maneuvers, and geometries."
          }
        },
        {
          "name": "Consecutive distance calculation across an ordered sequence of points",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/distance/batch",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "distance",
                "batch"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"points\": [\n    {\n      \"lat\": 37.788,\n      \"lng\": -122.4075\n    },\n    {\n      \"lat\": 37.8313,\n      \"lng\": -122.2852\n    },\n    {\n      \"lat\": 37.8716,\n      \"lng\": -122.2727\n    },\n    {\n      \"lat\": 37.9358,\n      \"lng\": -122.3478\n    }\n  ],\n  \"units\": \"imperial\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Computes road distance and duration for each consecutive leg in an ordered sequence of waypoints.\nUnits charged equals the number of pairs (N - 1)."
          }
        },
        {
          "name": "Many-to-many travel time and road distance matrix",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/matrix",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "matrix"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"origins\": [\n    {\n      \"lat\": 37.788,\n      \"lng\": -122.4075\n    },\n    {\n      \"lat\": 37.8313,\n      \"lng\": -122.2852\n    }\n  ],\n  \"destinations\": [\n    {\n      \"lat\": 37.8044,\n      \"lng\": -122.2712\n    },\n    {\n      \"lat\": 37.8716,\n      \"lng\": -122.2727\n    },\n    {\n      \"lat\": 37.9358,\n      \"lng\": -122.3478\n    }\n  ],\n  \"units\": \"imperial\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Calculates road distances and durations between every origin and destination.\nUnits charged equals `origins × destinations`."
          }
        }
      ]
    },
    {
      "name": "Snapping",
      "item": [
        {
          "name": "Snap coordinate to the nearest road network point",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/nearest",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "nearest"
              ],
              "query": [
                {
                  "key": "point",
                  "value": "37.7694,-122.4862"
                }
              ]
            },
            "description": "Finds the nearest street or highway segment to a given coordinate."
          }
        }
      ]
    },
    {
      "name": "Geocoding",
      "item": [
        {
          "name": "Address and place name for a coordinate",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/reverse-geocode",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "reverse-geocode"
              ],
              "query": [
                {
                  "key": "point",
                  "value": "23.7465,90.376"
                }
              ]
            },
            "description": "Returns the address or place at (or nearest to) a `lat,lng` coordinate, closest\nfirst, from OpenStreetMap data, plus the administrative areas containing the point\n(`admin_areas`; in Bangladesh division, district, upazila and union). When\n`radius_meters` is not set and nothing is found within about 1 km (sparse rural\nareas), the search widens to 5 km once. Use it to show a human-readable location for a GPS\nfix or a pin dropped on a map. Billed as one `reverse_geocode` unit per successful\nrequest (an empty `results` list is a successful answer).\n\n`summary` flattens the closest match and the admin areas into the fields most apps\ndisplay (`house_number`, `road`, `neighbourhood`, `suburb`, `city`, `upazila`,\n`district`, `division`, `postcode`), with `distance_meters` to the match and a\n`label` that is honest about distance: \"Near House 11, Road No. 14, Sobhanbag, Dhaka\"\nor \"1.2 km from Sobhanbag, Dhaka\"."
          }
        },
        {
          "name": "Addresses and admin areas for up to 100 coordinates",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/reverse-geocode/batch",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "reverse-geocode",
                "batch"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Reverse geocodes up to 100 points in one request, e.g. a rep's check-ins for the\nday. Each point gets its closest place and its administrative areas. Billed as one\n`reverse_geocode` unit per point inside coverage; out-of-coverage points are\nreturned with status `OUT_OF_COVERAGE` and not billed."
          }
        },
        {
          "name": "Search places and addresses by text",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/geocode",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "geocode"
              ],
              "query": [
                {
                  "key": "q",
                  "value": "Dhanmondi 27"
                },
                {
                  "key": "near",
                  "value": "23.7925,90.4078"
                },
                {
                  "key": "limit",
                  "value": "1"
                }
              ]
            },
            "description": "Free-text place and address search within one coverage region, ranked by relevance\nand, when `near` is given, by proximity. Suitable for autocomplete as the user types.\nBilled as one `geocode` unit per successful request."
          }
        }
      ]
    },
    {
      "name": "Field operations",
      "item": [
        {
          "name": "Best order to visit a day's stops",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/optimize",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "optimize"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"stops\": [\n    {\n      \"lat\": 37.788,\n      \"lng\": -122.4075\n    },\n    {\n      \"lat\": 37.8313,\n      \"lng\": -122.2852\n    },\n    {\n      \"lat\": 37.8716,\n      \"lng\": -122.2727\n    },\n    {\n      \"lat\": 37.9358,\n      \"lng\": -122.3478\n    },\n    {\n      \"lat\": 37.8044,\n      \"lng\": -122.2712\n    }\n  ],\n  \"end\": \"start\",\n  \"units\": \"imperial\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Returns the visiting order that minimizes total drive time for up to 100 stops,\nwith road distance and time per leg and in total. Typical use: a sales rep's or\nrider's daily plan. By default the first stop is the start (e.g. home or depot)\nand the plan ends at whichever stop is best; use `end: \"start\"` to come back, or\n`end: \"last\"` to finish at the last stop given. Starting and ending anywhere is not\nsupported. Billed as one `optimize` unit per stop."
          }
        }
      ]
    },
    {
      "name": "Maps",
      "item": [
        {
          "name": "Static map image with a route and numbered stops",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/staticmap",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "staticmap"
              ],
              "query": [
                {
                  "key": "size",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "width",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "height",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "scale",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "format",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "padding",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "center",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "zoom",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "path",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "markers",
                  "value": "",
                  "disabled": true
                }
              ]
            },
            "description": "Renders a PNG (or WebP) map up to 1280x1280, at `scale=2` for retina screens and\nzooming, with base map tiles from OpenStreetMap, your paths and numbered markers, and\n\"© OpenStreetMap contributors\" drawn in the bottom-right corner (so the image meets\nthe ODbL attribution requirement on its own).\n\nWithout `center`/`zoom` the map fits every path vertex and marker inside the image\nminus `padding`. Paths and markers use Google Static Maps-like syntax:\n\n- `path=color:0x2563eb|weight:5|opacity:0.9|enc:<polyline>` (`enc:` must be last;\n  add `precision:6` for `polyline6`), or `path=color:red|lat,lng|lat,lng|…`\n- `markers=numbered:1|lat,lng|lat,lng|…` labels the points 1, 2, 3 …\n- `markers=style:start|label:1|lat,lng`, `markers=style:end|label:15|lat,lng`,\n  `markers=color:0x7c3aed|label:A|lat,lng`, `markers=style:dot|lat,lng`\n\nKeep GET URLs under 16 KB (use `overview=simplified` on `/v1/route`), or POST a JSON\nbody for long paths. One `static_map` unit per image; images served from the\nserver-side cache are billed the same, and errors are never billed."
          }
        },
        {
          "name": "Static map image (JSON body, for long paths)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/staticmap",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "staticmap"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Same image as `GET /v1/staticmap`, with a JSON body (up to 2 MB). Pass\n`routes[0].geometry` from `/v1/route` unchanged as `paths[].polyline`."
          }
        },
        {
          "name": "Raster XYZ map tile (256 px, or 512 px with @2x)",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/tiles/{z}/{x}/{y}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "tiles",
                "{z}",
                "{x}",
                "{y}"
              ],
              "query": []
            },
            "description": "Standard XYZ (Web Mercator) raster tile for Leaflet, MapLibre (raster source) and\nFlutter `flutter_map`: `https://api.wayline.cloud/v1/tiles/{z}/{x}/{y}@2x.png?key=…`.\n`{y}` is the tile row followed by `.png` or `@2x.png`. One `map_tile` unit per tile;\nresponses are cacheable for 24 hours, and tiles your app or browser caches are\nnever billed again.\n\nTiles are loaded from browsers and apps, so use a **publishable key**: a key whose only\nscope is `map_tile`, with allowed origins set for websites. The origin check also uses\nthe `Referer` header, because image requests do not send `Origin`."
          }
        },
        {
          "name": "Vector map style (MapLibre) with your key in its tile and font URLs",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/maps/styles/{style}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "maps",
                "styles",
                "{style}"
              ],
              "query": [
                {
                  "key": "region",
                  "value": "",
                  "disabled": true
                }
              ]
            },
            "description": "`wayline-light.json` is a MapLibre style whose vector-tile and glyph URLs point back at\nthis API with the key you called it with. Pass the URL straight to MapLibre GL JS,\nFlutter `maplibre_gl` or MapLibre Native for a zoomable, rotatable map. Not billed."
          }
        },
        {
          "name": "Vector map tile (Mapbox Vector Tile, OpenMapTiles schema)",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/tiles/vector/{z}/{x}/{y}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "tiles",
                "vector",
                "{z}",
                "{x}",
                "{y}"
              ],
              "query": []
            },
            "description": "Gzip-encoded MVT for zoom 0 to 14 (`{y}` is the row followed by `.pbf`). One `map_tile`\nunit per tile with data; empty tiles return 204 and are not billed."
          }
        },
        {
          "name": "Font glyphs for map labels (referenced by the style; not billed)",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/maps/fonts/{fontstack}/{range}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "maps",
                "fonts",
                "{fontstack}",
                "{range}"
              ],
              "query": []
            },
            "description": ""
          }
        }
      ]
    },
    {
      "name": "Google Compatibility",
      "item": [
        {
          "name": "Google Maps Distance Matrix compatible endpoint",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/maps/api/distancematrix/json",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "maps",
                "api",
                "distancematrix",
                "json"
              ],
              "query": [
                {
                  "key": "origins",
                  "value": "37.788,-122.4075"
                },
                {
                  "key": "destinations",
                  "value": "37.8044,-122.2712|37.8313,-122.2852"
                },
                {
                  "key": "units",
                  "value": "imperial"
                }
              ]
            },
            "description": "Drop-in compatible endpoint matching the Google Distance Matrix API JSON response structure."
          }
        }
      ]
    },
    {
      "name": "Metadata & Health",
      "item": [
        {
          "name": "Region coverage metadata",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/coverage",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "coverage"
              ],
              "query": []
            },
            "description": "Returns the active coverage regions, boundary bounding boxes, and map build versions.\nAuthentication is optional."
          }
        },
        {
          "name": "Gateway service and map status",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/status",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "status"
              ],
              "query": []
            },
            "description": "Public status endpoint showing service operational health and region map versions.\nNo authentication required."
          }
        },
        {
          "name": "Process liveness probe",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/healthz",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "healthz"
              ],
              "query": []
            },
            "description": "Kubernetes/Docker liveness probe. Returns 200 OK as long as the process is running."
          }
        }
      ]
    }
  ]
}