Adding depots

Before getting started, the company should set up a list of depots that deliveries are made from. A depot indicates the starting point for any 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 interface
  1. In the menu on the left, select Settings → Depots.
  2. Click Create a depot.
  3. Enter the depot details and click Create.
In the API

Send a request to the depots-batch resource. The request must provide depot 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 the depots-batch resource, fill out the required fields when sending a request to the depots 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>/depots-batch
Copied to clipboard

File

[
  {
    "number":"111",
    "name":"Depot 1",
    "address":"ul. Lva Tolstogo, 16",
    "lat": 55.7447,
    "lon": 37.6728,
    "time_interval":"10-22"
  }, 
  {
    "number":"112",
    "name":"Depot 2",
    "address":"ul. Lva Tolstogo, 17",
    "lat": 55.7448,
    "lon": 37.6729,
    "time_interval":"11:00 - 23:00"
  }
]
Copied to clipboard

Result:

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

Contact support