Adding couriers
After adding depots, add to the database a list of couriers who will complete orders.
Note.
Use your company ID to access the Track & Trace API. If you don't have an ID, contact us.
- In the routing workspace interface
-
- Open routing workspace.
- In the menu on the left, choose.
- Enter the courier information and click Add.
- In the API
- Note. When you add a courier via the API, you can specify their phone number
phone
, loginnumber
, and namename
.Send a request to the couriers-batch resource. The request must provide employee information.
Attention. The specification contains required fields for existing objects, but new objects require more fields to be filled out. When you add new objects via a request to thecouriers-batch
resource, fill out the required fields when sending a request to 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":"+71234524423", "name":"Ivan" }, { "number":"224", "phone":"+71234553425", "name":"Olesya" } ]
Copied to clipboardcURL
curl -H "Content-Type: application/json" -H "Authorization: Auth your-OAuth-token" -X POST -d '[{"number":"222", "phone":"+71234524423", "name":"Ivan"}, {"number":"224", "phone":"+71234553425", "name":"Olesya"}]' https://courier.yandex.ru/api/v1/companies/<your-company-id>/couriers-batch
Copied to clipboardResult:
{ "inserted": 2, "updated": 0 }
The phone numbers of the couriers for Yandex Courier
If couriers use the Yandex Courier app, add their numbers to the database using the interface. Otherwise, they won't be able to use the app.
- Open the routing workspace.
- In the menu on the left, choose.
- Enter the courier's phone number and click Add.
You can add multiple courier phone numbers at once. To do so, enter the numbers separated by commas.