# Route for truck

The Routing API will show you how to get where you’re going.\
With the Routing API, you can:

* Provide precise instructions to a destination using routing plans for various types of trucks
* To request directions, call four values: a start point, destination, and car type, and waypoint (optional).

{% hint style="info" %}
See the [**API Key Issuance page**](https://nostramap-doc.fatos.biz/get-your-api-key) for information on using keys.
{% endhint %}

## Routing API for Truck

<mark style="color:blue;">`GET`</mark> `https://api.fatos.biz/nostra/api/route`

​Example API Call:\
\
<https://api.fatos.biz/nostra/api/route?key=YOUR\\_API\\_KEY\\&origin=37.483294848898396,126.89654749206602\\&destination=37.51702306480502,127.0416190159097\\&angle=-1\\&rpoption=1\\&unixtime=1604626833\\&gmtoffset=32400\\&cartype=1>

#### Query Parameters

| Name        | Type    | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ----------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| startname   | string  | Starting place name                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| destname    | string  | Destination name                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| weight      | number  | <p>Vehicle Weight<br>i.e.<br>45 => 4.5t<br>55 => 5.5t<br><br>Default: 4.5t</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| height      | string  | <p>Vehicle Height<br>i.e.<br>35 => 3.5m<br>45 => 4.5m<br><br>Default: 3.5m</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| length      | string  | <p>Vehicle Length<br>i.e.<br>100 => 10m<br>150 => 15m<br><br>Default: 0m</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| uturn       | string  | <p>Available U-Turn Lanes<br><br>Default: 4</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| hipass      | integer | <p>0: None<br>1: Yes<br>Default: 0</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| fueltype    | integer | <p>0: Gasoline<br>1: Diesel<br>2: LPG<br>3: CNG<br>4: Electric<br>5: BioDiesel</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| pattern     | integer | <p>Reflect pattern information<br>0: Ignore<br>1: Reflect pattern information<br>Default: 0</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| gmtoffset   | string  | Timezone                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| unixtime    | string  | Time when requesting for RP                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| traffic     | integer | <p>Reflect traffic information<br>0: Ignore<br>1: Reflect traffic information<br>Default: 0</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| carspeed    | integer | <p>0\~255<br>Default: 0</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| reqtype     | string  | <p>0: Initial RP request<br>1. Retry RP request on route deviation<br>2. User RP request<br>3. Periodic RP request<br>4. Request Route detail<br>Default: 0</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| origin      | string  | Start point (lat, lng)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| destination | string  | End point (lat, lng)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| key         | string  | Your API Key                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| via         | number  | Waypoint (lat, lng), In the case of multiple waypoints, list them in order in the query string.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| cartype     | integer | <p>car type <br>101: 2 Axles, less than 16 persons<br>102: 2 Axles, less than 32 persons<br>103: 2 Axles, less than 33 persons<br>104: 3 Axles, between 10 to 20 Ton<br>105: 4 Axles or above (Over 20 Ton)<br>106: 2 Axles, less than 1000cc<br><br>111: Truck with dangerous load<br>112: Truck<br>113: Construction Machinery<br>114: Construction Vehicle<br>115: Trailer<br>116: Farm Vehicle<br><br>121: Bus<br>122: Taxi<br>123: Taxi without passenger<br>124: Cart<br>125: HOV<br>126: Emergency<br>127: Motorcycle<br>128: 3 Wheel Motorcycle<br><br>141: Bicycle<br>142: Tricycle<br>143: Pedestrian<br>144: Pet<br>145: WheelChair<br>146: Visually Impaired<br></p> |
| rpoption    | integer | <p>Routing Plan Option<br>Sum of each option value.<br>1: Recommended 1<br>2: Recommended 2<br>4: Highway Priority<br>8: General road Priority<br>16: Shortest Distance<br>32: Free road (in the shortest time)<br>64: Exclude Car-only<br>256: Free road (in the shortest distance)<br><br>ex) rpoption 3 => Recommended 1 + Recommended 2<br></p>                                                                                                                                                                                                                                                                                                                              |
| gpsangle    | number  | degrees (0\~359)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
**Display of Directions Results**

After you receive the requested results, you must decode the result into a geometry code. Call the Fatos.polyLine() function as the decoded result and display the result on the map.
{% endhint %}
