---
metadata:
  - name: generator
    content: Diplodoc Platform v5.48.2
alternate:
  - https://yandex.com/support/taxi-distr/en/api/deeplinks.md
  - https://yandex.com/support/taxi-distr/ru/api/deeplinks.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/support/taxi-distr/en/llms.txt

# Advanced generating links to an order

To redirect a user to a website or mobile app, you need to create a link that contains the trip parameters. After clicking on this link, the user will see the route of the trip and will be able to order a taxi.

By default the link leads to the app if the user has it installed. If the application is not installed, the further behavior of the link is determined by a set of parameters `app_code` and `appmetrica_tracking_id`:

{% cut "The possible values of the parameters" %}

#|
|| **Service** | **Destination** | **`app_code` parameter value** | **`appmetrica_tracking_id` parameter value** ||
||Yandex Go | Yandex Go app page in the app store | 3 | 1178268795219780156 ||
|| Yandex Go | [Yandex Go](https://taxi.yandex.ru/#index) site | 3 | 25395763362139037 ||
|#

{% endcut %}

You can use links to collect order statistics. To receive statistics on your orders, write to [taxi-api@yandex-team.ru](mailto://taxi-api@yandex-team.ru).

## Link format {#section_qfs_zmb_dcb}

```
https://[<app_code>](*app_code).redirect.appmetrica.yandex.com/route?
[start-lat](*start-lat)=<latitude>
&[start-lon](*start-lon)=<longitude>
&[end-lat](*end-lat)=<latitude>
&[end-lon](*end-lon)=<longitude>
&[tariffClass](*tariffClass)=<tariff>
&[ref](*ref)=<source>
&[appmetrica_tracking_id](*appmetrica_tracking_id)=<redirect_id>
&[lang](*lang)=<language>
```

Parameters:

**app_code**
:   ID of the service whose application you want to open. Required parameter. Value for the Yandex Go app: `3`.
    If the application is not installed on the user's device, the redirect logic is determined by the [appmetrica_tracking_id](#apptracking-param) parameter.

**start-lat**
:   Departure point latitude. Optional parameter. Used with the `start-lon` parameter.

**start-lon**
:   Departure point longitude. Optional parameter. Used with the `start-lat` parameter.

**end-lat**
:   Destination latitude. Optional parameter. Used with the `end-lon` parameter.

**end-lon**
:   Destination longitude. Optional parameter. Used with the `end-lat` parameter.

**tariffClass**
:   [Text fare ID](https://yandex.com/support/taxi-distr/en/api/trip-info.md#class-name-desc). Coincides with `class` values in requests to API and with the API response in the `class_name` field. Optional parameter. The parameter is only available when the departure or destination points for the journey are indicated.

**ref**
:   Source ID. This parameter is used for passing on your [affiliate program](https://go.yandex/ru_ru/lp/partner-program) ID, or the name of your resource if you don't have an ID. The value in this parameter must contain Latin characters only. For example, mywebsite.ru can have the ID, `mywebsiteru`.

**appmetrica_tracking_id**
:   ID that determines the redirect logic. Required parameter.
    If the user already has the Yandex Go app, then the link will work as a deeplink and send the user to the app.
    
    The possible values depend on the service (which is specified in the [app_code](#app-code-param) parameter) and redirect destination:

    #|
    || **Service** | **Destination** | **`app_code` parameter value** | **`appmetrica_tracking_id` parameter value** ||
    ||Yandex Go | Yandex Go app page in the app store | 3 | 1178268795219780156 ||
    || Yandex Go | [Yandex Go](https://taxi.yandex.ru/#index) site | 3 | 25395763362139037 ||
    |#
    
    For example, if you want to redirect a user who logs in from a mobile device to the Yandex Go page in the app store, you need to specify the following parameters:
    
    ```
    https://3.redirect.appmetrica.yandex.com/route?start-lat=55.73400123907955&amp;start-lon=37.588533418821726&amp;end-lat=55.76776211471192&amp;end-lon=37.60714921124336&amp;tariffClass=econom&amp;ref=yoursiteru&amp;appmetrica_tracking_id=1178268795219780156
    ```

{% note info %}

- The departure and destination point parameters are optional. To receive the coordinates for addresses given by users, use the [Geocoder API](https://tech.yandex.ru/maps/geocoder/).
    
- We do not recommend setting links in `iframe` or using the `target="_blank"` parameter, since some browsers may block the link from opening in a new window.
    
- For iOS, links are supported in [Universal Links](https://developer.apple.com/ios/universal-links/) format.

{% endnote %}
 
## Link example

The link for a trip departing from `Ulitsa L'va Tolstogo, 16, Moscow`, to arrive at `Ulitsa Malaya Dmitrovka, 6, Moscow` for Yandex Go looks like this:

```
https://3.redirect.appmetrica.yandex.com/route?start-lat=55.73400123907955&amp;start-lon=37.588533418821726&amp;end-lat=55.76776211471192&amp;end-lon=37.60714921124336&amp;tariffClass=econom&amp;ref=mywebsiteru&amp;appmetrica_tracking_id=1178268795219780156
```


[*lang]: `lang` for the response language. Optional parameter. Possible values:
- `ru` for Russian. Default value.
- `en` for English.
- `uk` for Ukrainian.
- `kk` for Kazakh.
- `az` for Azerbaijani.
- `ka` for Georgian.
- `hy` for Armenian.
- `ky` for Kyrgyz.
- `lv` for Latvian.
- `ro` for Romanian.
- `uz` for Uzbek.
- `et` for Estonian.
- `fr` for French.

[*appmetrica_tracking_id]: ID that determines the redirect logic. Required parameter.
If the user already has the Yandex Go app, then the link will work as a deeplink and send the user to the app.
The possible values depend on the service (which is specified in the [app_code](*#section_qfs_zmb_dcb) parameter) and redirect destination:
Service | Destination | `app_code` parameter value*| `appmetrica_tracking_id` parameter value
----- | ----- | ----- | -----
Yandex Go | Yandex Go app page in the app store | 3 | 1178268795219780156 
Yandex Go | [Yandex Go](https://taxi.yandex.ru/#index) site | 3 | 25395763362139037
 
For example, if you want to redirect a user who logs in from a mobile device to the Yandex Go page in the app store, you need to specify the following parameters:
```
https://3.redirect.appmetrica.yandex.com/route?start-lat=55.73400123907955&start-lon=37.588533418821726&end-lat=55.76776211471192&end-lon=37.60714921124336&tariffClass=econom&ref=yoursiteru&appmetrica_tracking_id=1178268795219780156
```

[*ref]: Source ID. This parameter is used for passing on your [affiliate program](https://go.yandex/ru_ru/lp/partner-program) ID, or the name of your resource if you don't have an ID. The value in this parameter must contain Latin characters only. For example, mywebsite.ru can have the ID, `mywebsiteru`.

[*tariffClass]: [Text fare ID](https://yandex.com/support/taxi-distr/api/trip-info.html#trip-info__class-name-desc). Coincides with `class` values in requests to API and with the API response in the `class_name` field. Optional parameter. The parameter is only available when the departure or destination points for the journey are indicated.

[*end-lon]: Destination longitude. Optional parameter. Used with the `end-lat` parameter.

[*end-lat]: Destination latitude. Optional parameter. Used with the `end-lon` parameter.

[*start-lon]: Departure point longitude. Optional parameter. Used with the `start-lat` parameter.

[*start-lat]: Departure point latitude. Optional parameter. Used with the `start-lon` parameter.

[*app_code]: ID of the service whose application you want to open. Required parameter. Value for the Yandex Go app: 3.
If the application is not installed on the user's device, the redirect logic is determined by the [appmetrica_tracking_id](#section_qfs_zmb_dcb) parameter.
