Asynchronous import routes from a given VRP task
Adds information about routes, couriers, orders to the database. You can get information about the import process using a GET /api/v2/companies/{company_id}/routes:vrp-task-import/{id}.
Request
POST
https://courier.yandex.ru/api/v2/companies/{company_id}/routes:vrp-task-import
Path parameters
Name |
Description |
company_id* |
Type: string Company ID used in requests to the Track & Trace API. |
Query parameters
Name |
Description |
vrp_task_id* |
Type: string Task ID of a problem solved in VRP Planning. It can be MVRP or SVRP task. Result of this task will be used to import routes. |
import_mode |
Type: string Defines mode of handling routes import. Valid values are: - Default: Enum: |
initial_order_status |
Type: string Status of created orders. Possible values: Default: Enum: |
original_vrp_task_id |
Type: string Task ID of an original problem solved in VRP Planning. It is needed for reference to rented vehicles. |
Responses
200 OK
Request successfully queued.
Body
application/json
{
"id": "string",
"status": "IN_PROGRESS",
"create_time": 0,
"update_time": 0
}
Name |
Description |
create_time |
Type: number UNIX timestamp of request creation. |
id |
Type: string The ID of asynchronous request. |
status |
Type: RouteImportStatus Status of request processing. Enum: |
update_time |
Type: number UNIX timestamp of request status update. |
RouteImportStatus
Status of request processing. ERROR
: request processing error. Error description is presented in response. IN_PROGRESS
: request is being processed. SUCCESS
: request processing is completed. Result routes are presented in response.
Type |
Description |
Enum: |
400 Bad Request
Incorrect input.
401 Unauthorized
Authorization failed. Send the correct OAuth token in the authorization header.
403 Forbidden
You do not have access to this object.
422 Unprocessable Entity
Invalid parameters were passed.
Body
application/json
{
"message": "string",
"incident_id": "string"
}
Name |
Description |
incident_id* |
Type: string Unique identifier of error incident. In case of API error, this identifier can be provided to support for investigation. |
message* |
Type: string Human-readable error description. |
504 Gateway Timeout
Server error during request processing.
No longer supported, please use an alternative and newer version.