Adding depots

Before getting started, the company should set up a list of depots that deliveries are made from. The depot marks the starting point for a route.

Note

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

In the Routing workspace

  1. Open the Routing workspace.

  2. In the menu on the left, go to SettingsDepots.
  3. Click Create a depot.
  4. Enter the depot's information and click Create.
In the API
Send a request to the depots-batch resource. The request must contain information about the depots.

To send API requests via Postman, you can use the RouteQ API 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 depots-batch resource, fill in all of the required fields for the depots 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>/depots-batch

File

[
  {
    "number":"111",
    "name":"Depot 1",
    "address":"476 5th Avenue",
    "lat": -73.9823,
    "lon": 40.7532,
    "time_interval":"10-22"
  },
  {
    "number":"112",
    "name":"Depot 2",
    "address":"477 5th Avenue",
    "lat": -73.9824,
    "lon": 40.7533,
    "time_interval":"11:00–23:00"
  }
]

cURL

curl -H "Content-Type: application/json" -H "Authorization: OAuth <your-OAuth-token>" -X POST -d '[{"number":"111", "name":"Depot 1", "address":"476 5th Avenue", "lat": 73.9823, "lon": 40.7532, "time_interval":"10-22"}, {"number":"112", "name":"Depot 2", "address":"477 5th Avenue", "lat": 73.9824, "lon": 40.7533, "time_interval":"11:00 - 23:00"}]' https://courier.yandex.ru/api/v1/companies/<your-company-id>/depots-batch

Result:

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