Get versioned plan-fact for nodes

Returns all plan-fact updates occurring after the given previous version for the orders/depots/garages of the company.

Request

GET

https://courier.yandex.ru/api/v1/analytics/companies/{company_id}/plan-fact/versioned/nodes

Path parameters

Name

Description

company_id*

Type: integer

The ID of the company that is used in requests to the Track & Trace API.

Query parameters

Name

Description

prev_version*

Type: string

Version returned by the previous call to this method. For the initial call, use the value 0

page

Type: integer

Page number. Each page contains per_page objects sorted by node's route date in ascending order.

Default: 1

Min value: 1

per_page

Type: integer

Count of nodes per page.

Default: 200

Min value: 1

Max value: 1000

Responses

200 OK

Success.

Body

application/json
{
    "version": "string",
    "data": [
        {
            "route": {
                "id": 0,
                "number": "string",
                "date": "string"
            },
            "courier": {
                "id": 0,
                "number": "string",
                "name": "string"
            },
            "depot": {
                "id": 0,
                "number": "string",
                "name": "string",
                "timezone": "string"
            },
            "fact": {
                "type": "order",
                "number": "string",
                "customer_name": "string",
                "address": "string",
                "failed_time_window": false,
                "arrival_time": {
                    "value": 0,
                    "text": "2022-12-29T18:02:01Z"
                },
                "departure_time": {
                    "value": 0,
                    "text": "2022-12-29T18:02:01Z"
                },
                "volume_cbm": 0,
                "weight_kg": 0,
                "amount": 0,
                "transit_duration_s": 0,
                "transit_distance_m": 0,
                "service_duration_s": 0,
                "time_window": {
                    "start": {
                        "value": 0,
                        "text": "2022-12-29T18:02:01Z"
                    },
                    "end": {
                        "value": 0,
                        "text": "2022-12-29T18:02:01Z"
                    }
                },
                "sequence_pos": 0,
                "real_sequence_pos": 0,
                "status": "string",
                "node_idle_duration_s": 0,
                "transit_idle_duration_s": 0,
                "point_radius": 0,
                "refined_lat": 0,
                "refined_lon": 0,
                "comments": "string",
                "status_comments": [
                    {}
                ],
                "point": {
                    "lat": 0,
                    "lon": 0
                }
            },
            "plan": {
                "type": "order",
                "number": "string",
                "customer_name": "string",
                "address": "string",
                "failed_time_window": false,
                "arrival_time": {
                    "value": 0,
                    "text": "2022-12-29T18:02:01Z"
                },
                "departure_time": {
                    "value": 0,
                    "text": "2022-12-29T18:02:01Z"
                },
                "volume_cbm": 0,
                "weight_kg": 0,
                "amount": 0,
                "transit_duration_s": 0,
                "transit_distance_m": 0,
                "service_duration_s": 0,
                "time_window": {
                    "start": {
                        "value": 0,
                        "text": "2022-12-29T18:02:01Z"
                    },
                    "end": {
                        "value": 0,
                        "text": "2022-12-29T18:02:01Z"
                    }
                },
                "shared_service_duration_s": 0,
                "sequence_pos": 0,
                "point": {
                    "lat": 0,
                    "lon": 0
                }
            },
            "version_status": "added"
        }
    ]
}

Name

Description

data*

Type: VersionedPlanFactNode[]

version*

Type: string

VersionedPlanFactNode

Name

Description

courier*

Type: PlanFactCourierBase

depot*

Type: PlanFactDepotBase

fact*

Type: PlanFactNodeFact

plan*

Type: PlanFactNodePlan

route*

Type: PlanFactRouteBase

version_status*

Type: string

Change type in version.

Enum: added, modified, deleted

PlanFactCourierBase

Name

Description

id*

Type: integer

name*

Type: string

number*

Type: string

PlanFactDepotBase

Name

Description

id*

Type: integer

name*

Type: string

number*

Type: string

timezone*

Type: string

PlanFactNodeFact

Name

Description

address*

Type: string

Max length: 1023

amount*

Type: number<float>

arrival_time*

Type: PlanFactTimePoint

Node arrival time.

comments*

Type: string

customer_name*

Type: string

Max length: 1023

departure_time*

Type: PlanFactTimePoint

Node departure time.

failed_time_window*

Type: boolean

node_idle_duration_s*

Type: integer

number*

Type: string

point*

Type: PlanFactNodeFact_point

Node position.

point_radius*

Type: number<float>

real_sequence_pos*

Type: integer

Actual sequence position of the node.

refined_lat*

Type: number<float>

refined_lon*

Type: number<float>

sequence_pos*

Type: integer

Sequence position of the node as approved by the logistician.

service_duration_s*

Type: integer

status*

Type: string

status_comments*

Type: object[]

time_window*

Type: PlanFactTimeWindow

Time window of the node.

transit_distance_m*

Type: number<float>

transit_duration_s*

Type: integer

transit_idle_duration_s*

Type: integer

type*

Type: string

Node type.

Enum: order, depot, garage

volume_cbm*

Type: number<float>

weight_kg*

Type: number<float>

PlanFactNodePlan

Name

Description

address*

Type: string

Max length: 1023

amount*

Type: number<float>

arrival_time*

Type: PlanFactTimePoint

Node arrival time.

customer_name*

Type: string

Max length: 1023

departure_time*

Type: PlanFactTimePoint

Node departure time.

failed_time_window*

Type: boolean

number*

Type: string

point*

Type: PlanFactNodeFact_point

Node position.

sequence_pos*

Type: integer

Sequence position of the node.

service_duration_s*

Type: integer

shared_service_duration_s*

Type: integer

time_window*

Type: PlanFactTimeWindow

Time window of the node.

transit_distance_m*

Type: number<float>

transit_duration_s*

Type: integer

type*

Type: string

Node type.

Enum: order, depot, garage

volume_cbm*

Type: number<float>

weight_kg*

Type: number<float>

PlanFactRouteBase

Name

Description

date*

Type: string<date>

id*

Type: integer

number*

Type: string

PlanFactTimePoint

Name

Description

text*

Type: string<date-time>

value*

Type: integer

PlanFactNodeFact_point

Node position.

Name

Description

lat

Type: number<float>

Node position latitude.

lon

Type: number<float>

Node position longitude.

PlanFactTimeWindow

Name

Description

end*

Type: PlanFactTimePoint

Time window end time.

start*

Type: PlanFactTimePoint

Time window start time.

400 Bad Request

Invalid parameters were passed.

403 Forbidden

You do not have access to this object.

422 Unprocessable Entity

Incorrect input.

500 Internal Server Error

Server error during request processing.