{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"📄 TraceRoute – Beginner Tutorial with a CSV Route","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"-traceroute--beginner-tutorial-with-a-csv-route","__idx":0},"children":["📄 TraceRoute – Beginner Tutorial with a CSV Route"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["“How to convert a CSV file into a routing request”"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"-what-we-want-to-do","__idx":1},"children":["🎯 What We Want to Do"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["“I have a list of GPS points in a CSV file and I want to build a route from it using TraceRoute.”"]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"-step-1-understand-your-csv","__idx":2},"children":["🗂 Step 1: Understand Your CSV"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Here’s a sample of the CSV you might have:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"css","header":{"controls":{"copy":{}}},"source":"latitude;longitude;date;section;speed;time;heading\n43.7316541;7.4207476;23/10/2020;1;6;09:43:35;90.0\n43.7310649;7.4184731;23/10/2020;1;6;09:43:38;93.0\n...\n\n","lang":"css"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["What we care about:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["latitude"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["longitude"]}," → GPS position"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["speed"]}," → speed in km/h"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["time"]}," → the hour/minute/second"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["heading"]}," → optional direction"," ","We will ignore ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["date"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["section"]},", etc. for now."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"-step-2-convert-csv-to-json-coordinates","__idx":3},"children":["🛠 Step 2: Convert CSV to JSON Coordinates"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Each row becomes a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["destination"]}," in the request. For example:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"coordinateSat\": {\n    \"lon\": 7.4207476,\n    \"lat\": 43.7316541,\n    \"speed\": 6.0,\n    \"time\": 1603446215000,\n    \"heading\": 90.0\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["🕒 The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["time"]}," must be converted into ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Unix timestamp in milliseconds"]},". If you don’t know how to do this, just use tools or ask for help — it’s usually okay to reuse existing examples."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"️-step-3-build-the-full-request","__idx":4},"children":["⚙️ Step 3: Build the Full Request"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["We will add:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["transport mode"]}," (e.g. CAR)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Options"]}," like ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ROUTESHEET"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POLYLINE"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The list of destinations from your CSV"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"-final-json-request-example","__idx":5},"children":["✅ Final JSON Request Example"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Here’s a complete JSON built from the first 10 rows of your CSV:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"{\n  \"routingVehicleProfile\": {\n    \"transportMode\": \"CAR\"\n  },\n  \"options\": [\"ROUTESHEET\", \"POLYLINE\"],\n  \"destinations\": [\n    {\n      \"coordinateSat\": {\n        \"lon\": 7.4207476,\n        \"lat\": 43.7316541,\n        \"speed\": 6.0,\n        \"time\": 1603446215000,\n        \"heading\": 90.0\n      }\n    },\n    {\n      \"coordinateSat\": {\n        \"lon\": 7.4184731,\n        \"lat\": 43.7310649,\n        \"speed\": 6.0,\n        \"time\": 1603446218000,\n        \"heading\": 93.0\n      }\n    },\n    {\n      \"coordinateSat\": {\n        \"lon\": 7.4166278,\n        \"lat\": 43.7298245,\n        \"speed\": 6.0,\n        \"time\": 1603446230000,\n        \"heading\": 77.8\n      }\n    },\n    {\n      \"coordinateSat\": {\n        \"lon\": 7.4155120,\n        \"lat\": 43.7290182,\n        \"speed\": 6.0,\n        \"time\": 1603446236000,\n        \"heading\": -33.4\n      }\n    },\n    {\n      \"coordinateSat\": {\n        \"lon\": 7.4143962,\n        \"lat\": 43.7279638,\n        \"speed\": 6.0,\n        \"time\": 1603446244000,\n        \"heading\": -31.4\n      }\n    },\n    {\n      \"coordinateSat\": {\n        \"lon\": 7.4138383,\n        \"lat\": 43.7273746,\n        \"speed\": 6.0,\n        \"time\": 1603446254000,\n        \"heading\": -33.4\n      }\n    },\n    {\n      \"coordinateSat\": {\n        \"lon\": 7.4128512,\n        \"lat\": 43.7279328,\n        \"speed\": 6.0,\n        \"time\": 1603446269000,\n        \"heading\": -37.6\n      }\n    },\n    {\n      \"coordinateSat\": {\n        \"lon\": 7.4137954,\n        \"lat\": 43.7286461,\n        \"speed\": 6.0,\n        \"time\": 1603446333000,\n        \"heading\": -34.7\n      }\n    },\n    {\n      \"coordinateSat\": {\n        \"lon\": 7.4137954,\n        \"lat\": 43.7297935,\n        \"speed\": 6.0,\n        \"time\": 1603446348000,\n        \"heading\": -21.2\n      }\n    },\n    {\n      \"coordinateSat\": {\n        \"lon\": 7.4123792,\n        \"lat\": 43.7311890,\n        \"speed\": 6.0,\n        \"time\": 1603446360000,\n        \"heading\": -28.3\n      }\n    }\n  ]\n}\n"},"children":[]}]},"headings":[{"value":"📄 TraceRoute – Beginner Tutorial with a CSV Route","id":"-traceroute--beginner-tutorial-with-a-csv-route","depth":1},{"value":"🎯 What We Want to Do","id":"-what-we-want-to-do","depth":2},{"value":"🗂 Step 1: Understand Your CSV","id":"-step-1-understand-your-csv","depth":3},{"value":"🛠 Step 2: Convert CSV to JSON Coordinates","id":"-step-2-convert-csv-to-json-coordinates","depth":3},{"value":"⚙️ Step 3: Build the Full Request","id":"️-step-3-build-the-full-request","depth":3},{"value":"✅ Final JSON Request Example","id":"-final-json-request-example","depth":2}],"frontmatter":{"seo":{"title":"📄 TraceRoute – Beginner Tutorial with a CSV Route"}},"lastModified":"2025-09-29T08:13:56.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/api-reference/traceroute/tutorial/1traceroute_first_requestwithcsv","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}