# Route\_v2

| Method | Request URI                            | Response Type |
| ------ | -------------------------------------- | ------------- |
| POST   | <https://api.fatos.biz/mogos/v2/route> | json(geojson) |

### Parameters

### Request

<table><thead><tr><th>Parameter</th><th width="109">Required</th><th>Description</th><th>Sample</th></tr></thead><tbody><tr><td>key</td><td>Y</td><td>Your API Key</td><td>key : xxxxxxxxxxx</td></tr><tr><td>origin</td><td>Y</td><td>Start point (lat, lng)</td><td>origin:'37.482767, 126.896290'</td></tr><tr><td>destination</td><td>Y</td><td>End point (lat, lng) For multiple locations '|' Use pipeline</td><td>destination:"37.5413623,127.222658|37.750899297688065,127.06066732772979"</td></tr><tr><td>option</td><td>Y</td><td>Route search option "1" Fixed</td><td>"option": "1"</td></tr><tr><td>option_ex</td><td>Y</td><td>Route search additional option "1" Fixed</td><td>"option_ex": "1"</td></tr><tr><td>cartype</td><td>Y</td><td><p>Vehicle type (transportation means) </p><p>1 : passenger car</p><p>127 : Motorcycle </p></td><td>"cartype": "1"</td></tr><tr><td>case</td><td>Y</td><td>Single Route = case "1" Multi Route = case "2"</td><td>"case": "1"</td></tr><tr><td>lang</td><td>N</td><td>Select Result Language(Korean: ko, English: en)default = ko</td><td>lang:ko</td></tr><tr><td>returntype</td><td>N</td><td><p>Output format </p><p>default = json</p></td><td>returntype:json</td></tr></tbody></table>

​

### POST Request Sample

```
body: {
    "key": <API KEY>,
    "origin": "37.482767, 126.896290",
    "destination": "37.5413623,127.222658|37.750899297688065,127.06066732772979",    
    "option": "1",
    "option_ex": "1",
    "cartype": "1",
    "case": "1",
    "lang": "en",
    "returntype": "json"
}
```

### Response

| type              | string         | A GeoJSON object with the type "FeatureCollection" is a feature collection object  |
| ----------------- | -------------- | ---------------------------------------------------------------------------------- |
| features          | node           | An object of type "FeatureCollection" must have a member with the name "features". |
| type              | string         | A GeoJSON object with the type "Feature" is a feature object                       |
| geometry          | object         | Geometry has type and coordinates information                                      |
| coordinates       | array\<double> | position                                                                           |
| properties        | object         | Property information                                                               |
| summary           | string         | road information                                                                   |
| distance          | int            | Total or link distance / m                                                         |
| duration          | int            | Total or link duration /sec                                                        |
| start\_name       | string         | start name                                                                         |
| end\_name         | string         | end name                                                                           |
| max\_lat          | double         | Maximum latitude                                                                   |
| max\_lng          | double         | Maximum longitude                                                                  |
| min\_lat          | double         | Minimum latittude                                                                  |
| min\_lng          | double         | Minimum longitude                                                                  |
| length            | int            | link length                                                                        |
| remainder\_dist   | int            | remainder distance                                                                 |
| remainder\_time   | int            | remainder time                                                                     |
| attr\_turn\_code  | int            | turn code                                                                          |
| attr\_road\_cate  | int            | road type code                                                                     |
| attr\_link\_facil | int            | Facility code                                                                      |
| attr\_oneway      | int            | a one-way street                                                                   |
| attr\_lane        | int            | the number of lanes                                                                |
| attr\_median      | int            | Presence of median strip                                                           |

### Response Sample

```
{
    "name": "0,rp_info",
    "type": "FeatureCollection",
    "features": [
        {
            "type": "Feature",
            "geometry": {
                "type": "Point",
                "coordinates": [
                    126.89654767513275,
                    37.48329453587037
                ]
            },
            "properties": {
                "summary": "여의대방로|올림픽대로|동부간선도로",
                "summary_ex": "126.921298,37.502302,3482|127.061807,37.521288,24116|127.055271,37.651043,13540",
                "distance": 78927,
                "duration": 9435,
                "start_name": "start1",
                "end_name": "dest1",
                "max_lat": 37.75095262788366,
                "max_lng": 127.22248350407688,
                "min_lat": 37.482647803168845,
                "min_lng": 126.89699827472333,
                "type": "start"
            }
        },
        {
            "type": "Feature",
            "geometry": {
                "type": "Point",
                "coordinates": [
                    127.22265601158142,
                    37.54136032779845
                ]
            },
            "properties": {
                "type": "via"
            }
        },
        {
            "type": "Feature",
            "geometry": {
                "type": "Point",
                "coordinates": [
                    127.060666680336,
                    37.75090006731859
                ]
            },
            "properties": {
                "type": "end"
            }
        },
        {
            "type": "Feature",
            "geometry": {
                "type": "LineString",
                "coordinates": [
                    [
                        126.89654767513275,
                        37.48329453587037
                    ],
                    [
                        126.89654767513275,
                        37.48329453587037
                    ]
                ]
            },
            "properties": {
                "type": 1,
                "attr": 0,
                "attr_has_hipass": 0,
                "attr_has_ic": 0,
                "attr_has_jc": 0,
                "attr_has_outpath": 0,
                "attr_has_sa": 0,
                "attr_has_toll": 0,
                "attr_lane": 0,
                "attr_link_cate": 0,
                "attr_link_facil": 0,
                "attr_max_speed": 0,
                "attr_median": 0,
                "attr_oneway": 0,
                "attr_road_cate": 0,
                "attr_string": "0",
                "attr_surface": 0,
                "attr_traffic": 0,
                "attr_turn_code": 0,
                "duration": 0,
                "lane_guide": "0",
                "length": 0,
                "link_dir": 0,
                "link_id": 0,
                "link_idx": 0,
                "remainder_dist": 0,
                "remainder_time": 0,
                "service_link_idx": 0,
                "string_info": ""
            }
        },
        
     	...
        
        {
            "type": "Feature",
            "geometry": {
                "type": "LineString",
                "coordinates": [
                    [
                        127.06038773059845,
                        37.75068769883081
                    ],
                    [
                        127.0604145526886,
                        37.75079813044446
                    ]
                ]
            },
            "properties": {
                "type": 3,
                "attr": 517543628800.0,
                "attr_has_hipass": 0,
                "attr_has_ic": 0,
                "attr_has_jc": 0,
                "attr_has_outpath": 0,
                "attr_has_sa": 0,
                "attr_has_toll": 0,
                "attr_lane": 2,
                "attr_link_cate": 1,
                "attr_link_facil": 0,
                "attr_max_speed": 30,
                "attr_median": 0,
                "attr_oneway": 0,
                "attr_road_cate": 8,
                "attr_string": "517543628800",
                "attr_surface": 0,
                "attr_traffic": 0,
                "attr_turn_code": 0,
                "duration": 2,
                "length": 12,
                "link_dir": 0,
                "link_id": 221131,
                "link_idx": 516,
                "remainder_dist": 29,
                "remainder_time": 5,
                "service_link_idx": 0,
                "string_info": "|거북로4번길||||||"
            }
        },
        {
            "type": "Feature",
            "geometry": {
                "type": "LineString",
                "coordinates": [
                    [
                        127.0604145526886,
                        37.75079813044446
                    ],
                    [
                        127.06045210361481,
                        37.750951035755655
                    ]
                ]
            },
            "properties": {
                "type": 3,
                "attr": 517543628850.0,
                "attr_has_hipass": 0,
                "attr_has_ic": 0,
                "attr_has_jc": 0,
                "attr_has_outpath": 0,
                "attr_has_sa": 0,
                "attr_has_toll": 0,
                "attr_lane": 2,
                "attr_link_cate": 1,
                "attr_link_facil": 0,
                "attr_max_speed": 30,
                "attr_median": 0,
                "attr_oneway": 0,
                "attr_road_cate": 8,
                "attr_string": "517543628850",
                "attr_surface": 0,
                "attr_traffic": 0,
                "attr_turn_code": 50,
                "duration": 3,
                "length": 17,
                "link_dir": 1,
                "link_id": 220580,
                "link_idx": 517,
                "remainder_dist": 17,
                "remainder_time": 3,
                "service_link_idx": 0,
                "string_info": "|거북로4번길||||||목적지"
            }
        },
        {
            "type": "Feature",
            "geometry": {
                "type": "LineString",
                "coordinates": [
                    [
                        127.06045210361481,
                        37.750951035755655
                    ],
                    [
                        127.060666680336,
                        37.75090006731859
                    ]
                ]
            },
            "properties": {
                "type": 5,
                "attr": 0,
                "attr_has_hipass": 0,
                "attr_has_ic": 0,
                "attr_has_jc": 0,
                "attr_has_outpath": 0,
                "attr_has_sa": 0,
                "attr_has_toll": 0,
                "attr_lane": 0,
                "attr_link_cate": 0,
                "attr_link_facil": 0,
                "attr_max_speed": 0,
                "attr_median": 0,
                "attr_oneway": 0,
                "attr_road_cate": 0,
                "attr_string": "0",
                "attr_surface": 0,
                "attr_traffic": 0,
                "attr_turn_code": 0,
                "duration": 39,
                "lane_guide": "0",
                "length": 20,
                "link_dir": 0,
                "link_id": 0,
                "link_idx": 0,
                "remainder_dist": 0,
                "remainder_time": 0,
                "service_link_idx": 0,
                "string_info": "|거북로4번길||||||목적지"
            }
        }
    ]
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://fatos-doc.fatos.biz/fatos-api/routing/route_v2.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
