Adding couriers
After adding depots, add a list of couriers who will complete orders to the database.
Use your company ID to access the Track & Trace API. If you don't have an ID, contact us.
- Routing workspace
-
- Open the routing workspace.
- In the menu on the left, go to.
Enter the courier's information and click Add.
If you use the courier's mobile phone number in
+1xxxxxxxxxx
format as their username, they will not have to enter a username to log in to the Yandex Courier app.For more information on adding a courier's phone number for the app, see Couriers.
- 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 via Postman, you can use the RouteQ API collection.
Attention. The specification contains required fields for existing objects, but new objects require more fields to be filled out. When you add new objects by sending a request to thecouriers-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: Auth your-token" -X POST -d @<File_path_in_UTF-8_encoding> https://courier.yandex.ru/api/v1/companies/<your-company-id>/couriers-batch
Copied to clipboardFile
[ { "number":"222", "phone":"+15551234567", "name":"Mark" }, { "number":"224", "phone":"+15551234568", "name":"Sarah" } ]
Copied to clipboardcURL
curl -H "Content-Type: application/json" -H "Authorization: Auth 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
Copied to clipboardResult:
{ "inserted": 2, "updated": 0 }
Phone numbers from Yandex Courier
If couriers use the Yandex Courier app, add their numbers to the database from the interface. They otherwise won't be able to use the app.
- Open the routing workspace.
- In the menu on the left, go to.
- 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.