{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Common Workflows","llmstxt":{"title":"GraphHopper Directions API","description":"REST API for route optimization (vehicle routing, traveling salesman), route planning, turn-by-turn navigation, distance matrices, isochrones, geocoding, map matching, and location clustering. Built on OpenStreetMap and TomTom data. Base URL: https://graphhopper.com/api/1\n"}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"common-workflows","__idx":0},"children":["Common Workflows"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The APIs are designed to be combined. Here are the most common patterns."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"delivery-or-field-service-app","__idx":1},"children":["Delivery or field service app"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Geocoding → Route Optimization → Routing"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/openapi/geocoding"},"children":["Geocoding"]},": convert customer addresses to coordinates. Note: the Geocoding response uses ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["point.lng"]}," while the Optimization request uses ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["lon"]}," — map the field name accordingly."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/openapi/route-optimization"},"children":["Route Optimization"]}," (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /vrp"]},"): pass the coordinates as service addresses along with your vehicles. Set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["configuration.routing.calc_points"]}," to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," to get route geometries in the response. The solver assigns stops to vehicles, sequences them, and returns routes with arrival times."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/openapi/routing"},"children":["Routing"]}," (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /route"]},"): optionally, call this per driver route to get turn-by-turn instructions. Pass the stop coordinates from the optimization solution as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["points"]},", set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["instructions"]}," to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you only need geometries (no turn-by-turn instructions), step 3 is unnecessary — ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["calc_points"]}," in step 2 already provides them."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"eta-or-distance-matrix","__idx":2},"children":["ETA or distance matrix"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Geocoding → Matrix"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/openapi/geocoding"},"children":["Geocoding"]},": convert addresses to coordinates."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/openapi/matrices"},"children":["Matrix"]}," (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /matrix"]},"): compute travel times and distances between all pairs (or specific origin/destination sets). Useful for displaying ETAs to customers or pre-filtering stops before optimization."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"simple-a-to-b-navigation","__idx":3},"children":["Simple A-to-B navigation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Routing only"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Call ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/openapi/routing"},"children":["Routing"]}," (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /route"]},") with two or more ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["points"]},". No optimization or geocoding needed if you already have coordinates."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To integrate turn-by-turn navigation for an app (iOS or Android) have a look into the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/maplibre/maplibre-navigation-android/"},"children":["Maplibre Navigation SDK"]}," (Kotlin Multiplatform). Contact us if you need more information."]}]},"headings":[{"value":"Common Workflows","id":"common-workflows","depth":1},{"value":"Delivery or field service app","id":"delivery-or-field-service-app","depth":2},{"value":"ETA or distance matrix","id":"eta-or-distance-matrix","depth":2},{"value":"Simple A-to-B navigation","id":"simple-a-to-b-navigation","depth":2}],"frontmatter":{"seo":{"title":"Common Workflows"}},"lastModified":"2026-11-30T03:21:15.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/common-workflows","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}