Adding couriers

After adding depots, add a list of couriers who will complete orders to the database.

Note

Use your company ID to access the Track & Trace API. If you don't have an ID, contact us.

In both cases, you can use the following as a courier's username:

Username

Description

Risk factors

Courier's phone number in the +1хххххххххх format

The vehicle is used by one driver. They won't have to enter a username to use the RouteQ app.

Anyone who knows the number and has access to the phone can access the app and routes.

Vehicle number

The vehicle is used by several drivers.

Each courier can log in to the app and access their colleagues' routes.

Unique identifier
(driver's license number, passport number, etc.)

Each courier uses a personal phone number and username.

The most secure scheme.

Adding couriers via the interface

  1. Open Routing Workspace.

  2. In the menu on the left, go to Track & Trace → Couriers.

  3. Enter each courier's information (phone number and username) and click Add.

    To learn how to register couriers, see Managing the courier list.

  4. In the menu on the left, go to Settings → Mobile app.

  5. Enter the couriers' phone numbers and click Add. These couriers will be able to use the RouteQ app.

    To learn how to add couriers, see Couriers.

Adding couriers via the API

Note

When you add a courier using the API, you can enter their phone number (phone), username (number), and name (name).

Send a request to the couriers-batch resource. The request must contain information about the employees.

To send API requests, you can use the Routing API collection. To learn how to import the collection into Postman or Bruno, see Working with an existing request collection.

Alert

The specification contains required fields for existing objects, but there are more fields for new objects. When you add new objects by sending a request to the couriers-batch resource, fill in all of the fields that are required for the couriers resource.

Request:

cURL

curl -H "Content-Type: application/json" -H "Authorization: OAuth <your-token>" -X POST -d @<File_path_in_UTF-8_encoding> https://courier.yandex.ru/api/v1/companies/<your-company-id>/couriers-batch

File

[
  {
    "number":"222",
    "phone":"+15551234567",
    "name":"Mark"
  },
  {
    "number":"224",
    "phone":"+15551234568",
    "name":"Sarah"
  }
]

cURL

curl -H "Content-Type: application/json" -H "Authorization: OAuth <your-OAuth-token>" -X POST -d '[{"number":"222", "phone":"+15551234567", "name":"Mark"}, {"number":"224", "phone":"+15551234568", "name":"Sara"}]' https://courier.yandex.ru/api/v1/companies/<your-company-id>/couriers-batch

Result:

{
  "inserted": 2,
  "updated": 0
}

Couriers' phone numbers for the RouteQ app

If couriers use the RouteQ app, you need to add their numbers to the database, otherwise they won't be able to use the app.

Via Routing Workspace

  1. Open Routing Workspace.
  2. In the menu on the left, go to Settings → Mobile app.
  3. Enter the courier's phone number and click Add.

You can add multiple couriers' phone numbers at once. To do so, enter the numbers separated by a comma.

Via the API
Send a request to the app-user resource. In the request, specify the courier's phone number in E.164 format. Example: +79012345678.

To send API requests, you can use the Routing API collection. To learn how to import the collection into Postman or Bruno, see Working with an existing request collection.

Request:

cURL

curl -H "Content-Type: application/json" -H "Authorization: OAuth <your-token>" -X POST -d @<File_path_in_UTF-8_encoding> https://courier.yandex.ru/api/v1/companies/<your-company-id>/app-user

File

{
  "login":"+15551234567"
}

cURL

curl -H "Content-Type: application/json" -H "Authorization: OAuth <your-OAuth-token>" -X POST -d '{"login":"+15551234567"}' https://courier.yandex.ru/api/v1/companies/<your-company-id>/app-user

Result:

{}
Contact support