---
metadata:
  - name: generator
    content: Diplodoc Platform v5.19.6
alternate:
  - https://docs.routeq.com/doc/en/delivery/functions/shared.md
title: RouteQ — functions — order sharing between companies
---
> **Documentation Index:** Fetch the complete configuration index at https://docs.routeq.com/doc/en/llms.txt


# Order sharing between companies

The sharing function lets you grant observer companies permission to view orders. For example, if you delegate orders to different transport companies, you can upload data for them to Track & Trace.

They'll only be able to see the orders that you give them access to in their workspace. To access orders, observers must have an account in [RouteQ](https://routeq.com/).

An observer company doesn't have access to the dashboard of the head of the company that granted it access, but it does have access to their own company head's dashboard where all available orders will be displayed.

If the recipient needs to track a specific order, use the [Client widget](https://docs.routeq.com/doc/en/delivery/functions/client-widget.md).

## Use cases of sharing {#example}

1. A large transportation company grants access to other companies for them to deliver orders. A contractor company can view routes with orders that they've been granted access to.

1. A transportation company that delivers orders grants access to a client company so that they can track delivery information.

You can't change orders and add a courier. Couries must be added to the company that granted access. After gaining access, an observer company can view order and route information in [Routing Workspace](#check-ui) and via the [API](#check-api).

## Identifiers {#ids}

To enable access, one of the following IDs is required:

- `company_id`: The observer company's ID in RouteQ.

- Alias: The observer company's external number that can be additionally created for easier identification:

  - If you can't store the contractor's `company_id` in the internal database.
  - Not to add the contractor's `company_id`.

  To do this, [map](https://yandex.ru/routing/doc/en/delivery/redoc/index.html#operation/addsOrEditsContractorNumber) the `contractor_company_id` and external `number`.

    {% cut "Limitations" %}

    - Aliases can be any sequence of letters and numbers.

    - Aliases can't contain commas because commas are used as delimiters.

    - Aliases are case-sensitive.

    {% endcut %}

## Enabling access {#open-access}

Possible ways:

- When planning in [Excel](#excel).
- When planning via the [API](#api).
- Via [Routing Workspace](#ui).

When observers are added via Excel or the API, access is granted to individual orders. If this is done through Routing Workspace, access is granted to all orders in the selected route.

### Excel {#excel}

{% list tabs %}

- Using `company_id`

  1. In the route file, open the **Orders** sheet and add the column `shared_with_company_ids`.

  1. In the `shared_with_company_ids` column, specify the `company_id` [*](*id_компании) for orders that observers should have access to.

  1. In Routing Workspace, [upload the file](https://docs.routeq.com/doc/en/delivery/load-data.md) to Track & Trace.

     In the route import window, the observers' IDs are shown on the **Orders** tab in the **Tracking companies (id)** field. If necessary, you can change the data directly in the interface.

- Using an alias

    {% note warning %}

    Before using this method, [map](https://yandex.ru/routing/doc/en/delivery/redoc/index.html#operation/addsOrEditsContractorNumber) the `contractor_company_id` and the `number` alias.

    {% endnote %}


    1. In the route file, open the **Orders** sheet and add the column `shared_with_company_numbers`.

    1. In the `shared_with_company_numbers` column, specify the alias of the observer company for the orders that it should have access to.

    1. {% include [excel-load-file](../_includes/load-file-75184670a564.md) %}

        In the route import window, the observer IDs are shown on the **Orders** tab in the **Tracking companies (numbers)** field. If necessary, you can change the data directly in the interface.

{% endlist %}

These two methods are not mutually exclusive and can be combined: you can add some observers using the `company_id`, and others using the alias.

| id      | shared_with_company_ids | shared_with_company_numbers |
|---------|-------------------------|-----------------------------|
| Order 1 | 1, 2, 3, 4              |                             |
| Order 2 | 5, 6, 7, 8              | Winter Rose, East77      |
| Order 3 |                         | Indigo, 555                 |

### API {#api}

{% list tabs %}

- Using `company_id`

    Specify the `company_id` [*](*id_компании) in the `shared_with_company_ids` field.

    The field is used in the request body when performing the following operations:

    - [Adding an order](https://yandex.ru/routing/doc/en/delivery/redoc/index.html#operation/addsAnOrder).
    - [Editing an order](https://yandex.ru/routing/doc/en/delivery/redoc/index.html#operation/editsOrder).
    - [Editing multiple orders](https://yandex.ru/routing/doc/en/delivery/redoc/index.html#operation/editsMultipleOrders).

- Using an alias

  1. Link the `contractor_company_id` and its `number` alias. [Learn more](https://yandex.ru/routing/doc/en/delivery/redoc/index.html#operation/addsOrEditsContractorNumber).

  1. Specify the `number` alias in the `shared_with_company_numbers` field.

     {% include [api-shared-orders-methods](../_includes/shared-orders-methods-6b414c35c2a7.md) %}

  {% include [excel-several](../_includes/several-ee422c2dd796.md) %}

{% endlist %}

### Routing Workspace interface {#ui}

Contact support if you need to:

- Create an account for a company that you want to make an observer.
- Enable adding observers to routes.
- [Link](https://yandex.ru/routing/doc/en/delivery/redoc/index.html#operation/addsOrEditsContractorNumber) the `contractor_company_id` and the `number` alias.

You can map the company ID and the alias manually if the observer already has an account in the service and you know their ID.

To add observers to a route:

1. [Upload routes](https://docs.routeq.com/doc/en/delivery/load-data.md) to Track & Trace.
1. Select a route that you want to share.
1. Click the icon <svg data-stacking-context="true" aria-owns="i-ua1" width="43.143291" height="24" viewBox="1767 601 43.143291 24" version="1.1" id="rnd-422cf86__svg2194" sodipodi:docname="add-viewers.svg" inkscape:version="1.2 (dc2aedaf03, 2022-05-15)" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"><defs id="rnd-422cf86__defs2198"/><sodipodi:namedview id="rnd-422cf86__namedview2196" pagecolor="#ffffff" bordercolor="#000000" borderopacity="0.25" inkscape:showpageshadow="2" inkscape:pageopacity="0.0" inkscape:pagecheckerboard="0" inkscape:deskcolor="#d1d1d1" showgrid="false" inkscape:zoom="14.946429" inkscape:cx="36.931899" inkscape:cy="19.536439" inkscape:window-width="1920" inkscape:window-height="1017" inkscape:window-x="-8" inkscape:window-y="-8" inkscape:window-maximized="1" inkscape:current-layer="svg2194"/><!--Generated by dom-to-svg from https://yandex.ru/courier/companies/37704/depots/all/couriers/3729701/routes/10126621?date=2023-01-26--><g data-tag="button" id="rnd-422cf86__bb-ui-button2" class="bb-ui-button bb-ui-button_priority_secondary bb-ui-button_shape_regular bb-ui-button_with-icon-left change-shared-with-companies__button" data-z-index="auto" data-stacking-context="true" role="button" aria-labelledby="" aria-owns="bb-ui-button__icon2 bb-ui-counter1" transform="matrix(0.58536585,0,0,0.58536585,730.43598,244.21951)"><g data-stacking-layer="rootBackgroundAndBorders" id="rnd-422cf86__g1360"><rect width="72.703125" height="40" x="1771.2969" y="610" fill="#ffffff" stroke="#e1efff" stroke-width="1px" rx="8" ry="8" id="rnd-422cf86__rect1358"/></g><g data-tag="svg" id="rnd-422cf86__bb-ui-button__icon2" class="bb-ui-button__icon bb-ui-button__icon_left" data-z-index="auto" data-stacking-context="true" mask="url(#rnd-422cf86__mask-for-bb-ui-button__icon21)"><g data-stacking-layer="rootBackgroundAndBorders" id="rnd-422cf86__g1362"/><g data-stacking-layer="childStackingContextsWithNegativeStackLevels" id="rnd-422cf86__g1364"/><g data-stacking-layer="inFlowNonInlineNonPositionedDescendants" id="rnd-422cf86__g1366"/><g data-stacking-layer="nonPositionedFloats" id="rnd-422cf86__g1368"/><g data-stacking-layer="inFlowInlineLevelNonPositionedDescendants" id="rnd-422cf86__g1370"/><g data-stacking-layer="childStackingContextsWithStackLevelZeroAndPositionedDescendantsWithStackLevelZero" id="rnd-422cf86__g1372"/><g data-stacking-layer="childStackingContextsWithPositiveStackLevels" id="rnd-422cf86__g1374"/><mask id="rnd-422cf86__mask-for-bb-ui-button__icon21"><rect width="24" height="24" x="1780.2969" y="618" fill="#ffffff" id="rnd-422cf86__rect1376"/></mask><g class="svg-content bb-ui-button__icon bb-ui-button__icon_left" data-view-box="" data-width="24" data-height="24" transform="translate(1780.3,618)" id="rnd-422cf86__g1381"><path d="M 8.496,13.8 C 6.238,13.8 4.632,11.357 4.632,8.51 4.632,5.663 6.002,4 8.496,4 c 2.495,0 3.863,1.663 3.863,4.51 0,2.847 -1.604,5.29 -3.863,5.29 z M 8.5,20 C 5.153,20 3.063,19.732 2.23,19.195 A 0.497,0.497 0 0 1 2.001,18.745 C 2.149,16.515 4.314,15.4 8.496,15.4 c 4.18,0 6.348,1.114 6.503,3.343 a 0.497,0.497 0 0 1 -0.23,0.453 C 13.936,19.732 11.847,20 8.5,20 Z M 14.024,9.665 c 0,2.313 1.236,4.298 2.973,4.298 1.737,0 2.972,-1.985 2.972,-4.298 C 19.969,7.352 18.916,6 16.997,6 15.079,6 14.024,7.352 14.024,9.665 Z M 17,19 c -0.13,0 -0.256,0 -0.38,-0.002 -0.287,-1.372 -1.31,-2.587 -2.72,-3.308 0.788,-0.285 1.82,-0.428 3.097,-0.428 3.215,0 4.883,0.906 5.002,2.717 a 0.412,0.412 0 0 1 -0.176,0.368 C 21.182,18.782 19.574,19 17,19 Z" fill="#0077ff" color="#0077ff" stroke="none" id="rnd-422cf86__path1379"/></g></g><g data-tag="span" id="rnd-422cf86__bb-ui-counter1" class="bb-ui-counter bb-ui-counter_primary bb-ui-counter_theme_light change-shared-with-companies__counter change-shared-with-companies__counter_isEmpty" data-z-index="auto" data-stacking-context="true"><g data-stacking-layer="rootBackgroundAndBorders" id="rnd-422cf86__g1386"><rect width="18.703125" height="17" x="1812.2969" y="621.5" fill="#f5f6f7" rx="8.5" ry="8.5" id="rnd-422cf86__rect1384"/></g><text color="#92a1b2" dominant-baseline="text-after-edge" font-family="'YS Text', Helvetica, Arial, sans-serif" font-size="12px" font-stretch="100%" font-style="normal" font-variant="normal" font-weight="700" direction="ltr" letter-spacing="0.1px" text-decoration="none" text-anchor="start" text-rendering="geometricprecision" unicode-bidi="normal" word-spacing="0px" writing-mode="lr-tb" user-select="auto" fill="#92a1b2" id="rnd-422cf86__text1390" style="text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000"><tspan xml:space="preserve" x="1818.2969" y="637.5" lengthAdjust="spacingAndGlyphs" id="rnd-422cf86__tspan1388">0</tspan></text></g></g></svg>.
1. In the drop-down list, select the companies and click **Apply**.

Observers will get access to all orders of the selected route.

![](../_images/observers.png)

## Viewing observers {#check}

In Routing Workspace, you can view order observer details:

- In the [courier performance report](https://docs.routeq.com/doc/en/delivery/interface/quality-report.md): in the fields **Observer 1**, **Observer 2**, and so on.
- In the [order card](https://docs.routeq.com/doc/en/delivery/interface/orders.md) in the **Observers** field.
- On the route page, in the **Observers** column.


## Gaining access {#access}

By default, orders that another company grants access to are only visible to the observer company's administrators. To make these orders available to managers, a user with the administrator role must grant them [access permissions](https://docs.routeq.com/doc/en/delivery/interface/managers.md) in Routing Workspace.

{% cut "Instructions" %}

Go to **Settings** → **Managers** and enable the option next to the appropriate company or select **Access to all companies**.

![](../_images/shared-access.png)

{% endcut %}


## Viewing order and route information {#check-access}


### API {#check-api}

{% note info %}

In the `company_id` field, specify the ID of the company that granted access.

{% endnote %}

The observer company can get route and order information via the API:

- [Get multiple routes](https://yandex.ru/routing/doc/en/delivery/redoc/index.html#operation/getsMultipleRoutes). The response will display the IDs of available routes.

- [Get multiple orders](https://yandex.ru/routing/doc/en/delivery/redoc/index.html#operation/getsMultipleOrders). Specify the route ID in `route_id`. The response will display information on orders in this route.

- [Get delivery quality information](https://yandex.ru/routing/doc/en/delivery/redoc/index.html#operation/getsDeliveryQualityInformation). The response will display a delivery quality report.

- [Get photos](https://yandex.ru/routing/doc/en/delivery/redoc/index.html#operation/getsPhotos). The response will display a list of photos that the courier attached. 

- [Get route information](https://yandex.ru/routing/doc/en/delivery/redoc/index.html#operation/getsRouteInfo). The response will display information about the routes and their orders, including the estimated time of arrival.

This information is also available in Routing Workspace.

### Routing Workspace interface {#check-ui}

To see the routes and orders that you have access to, in Routing Workspace, select one of the companies from the drop-down list in the upper-left corner.

{% cut "View routes and orders" %}

![](../_images/logistics-workplace-interface.png =790x){style="border: solid 1px #cccccc; max-width: 800px;"}

{% endcut %}

The information on available routes and orders matches the company that granted access, but can't be changed.

{% include [warehouse-feedback](../_includes/feedback-7b71896f9bc3.md) %}

[*id_компании]: Observer company ID in RouteQ



