Here's an example curl request body for a single origin, single-destination
route. It uses field masks to request a route token, along with the route
duration, distance, and route polyline:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-15 UTC."],[[["\u003cp\u003eTo get a route token from the Routes API, you must set \u003ccode\u003etravelMode\u003c/code\u003e to \u003ccode\u003eDRIVE\u003c/code\u003e and \u003ccode\u003eroutingPreference\u003c/code\u003e to either \u003ccode\u003eTRAFFIC_AWARE\u003c/code\u003e or \u003ccode\u003eTRAFFIC_AWARE_OPTIMAL\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eEnsure that none of your route waypoints are via waypoints when requesting a route token.\u003c/p\u003e\n"],["\u003cp\u003eUse the \u003ccode\u003eroutes.routeToken\u003c/code\u003e field mask in your request to ensure that a route token is returned.\u003c/p\u003e\n"],["\u003cp\u003eThe route generated with a token may vary slightly from the planned route due to dynamic road conditions, and it's recommended to use the token soon after generation.\u003c/p\u003e\n"],["\u003cp\u003eThe route token can be used in the Navigation SDK for your planned route.\u003c/p\u003e\n"]]],["To obtain a route token from the Routes API, set `travelMode` to `DRIVE` and `routingPreference` to `TRAFFIC_AWARE` or `TRAFFIC_AWARE_OPTIMAL`. Ensure no waypoints are \"via\" waypoints. Include `routes.routeToken` in the `X-Goog-FieldMask`. Use the token promptly, as dynamic road conditions can cause deviations. The token can be used in the Navigation SDK. An example cURL request demonstrates how to request a token with other route data.\n"],null,[]]