Gets delivery quality information

Gets information about the delivery quality.

Request

GET

https://courier.yandex.ru/api/v1/companies/{company_id}/courier-quality

Path parameters

Name

Description

company_id*

Type: integer

Company ID used in requests to the Track & Trace API.

Query parameters

Name

Description

date

Type: string<date>

The route's date in YYYY-MM-DD format.

depot_id

Type: integer

ID of the depot where the route starts.

Min value: 1

route_id

Type: integer

ID of the route.

Min value: 1

types

Type: string<list_of_types>

Comma-separated list of point types to use in report. Available types are order, depot, garage. Default order.

with_deleted_couriers

Type: boolean

Include deleted couriers in the report.

Default:

Responses

200 OK

Report on the delivery quality received.

Body

application/json
[
    {
        "type": "string",
        "courier_name": "string",
        "courier_number": "string",
        "courier_deleted": false,
        "order_number": "string",
        "order_status": "string",
        "order_address": "string",
        "depot_number": "string",
        "route_number": "string",
        "route_imei": 0,
        "route_imei_str": "string",
        "customer_name": "string",
        "air_distance": 0,
        "arrived_at": "string",
        "left_at": "string",
        "order_visited_at": "string",
        "order_confirmed_at": "string",
        "order_completed_at": "string",
        "order_amount": 0,
        "order_payment_type": "cash",
        "order_payment_status": "paid",
        "far_from_point": false,
        "no_call_before_delivery": false,
        "late_call_before_delivery": false,
        "time_interval_error": 0,
        "delivery_not_in_interval": false,
        "not_in_order": false,
        "suggested_order_number": 0,
        "order_interval": [
            {
                "end": "string",
                "start": "string"
            }
        ],
        "segment_distance_m": 0,
        "used_mark_delivered_radius": 0,
        "order_status_comments": [
            {
                "id": 0,
                "status": "string",
                "comment": "string"
            }
        ],
        "route_routing_mode": "string",
        "route_date": "string",
        "order_weight": 0,
        "order_volume": 0,
        "order_comments": "string",
        "order_shared_with_companies": [
            {
                "id": 0,
                "name": "string",
                "number": "string"
            }
        ],
        "delivery_lat": 0,
        "delivery_lon": 0,
        "lat": 0,
        "lon": 0,
        "refined_lat": 0,
        "refined_lon": 0,
        "transit_idle_duration": 0,
        "location_idle_duration": 0,
        "service_duration_s": 0,
        "shared_service_duration_s": 0,
        "phone": "string",
        "delivery_rating": 0,
        "delivery_comment": "string"
    }
]

(CourierQualityOrderItem or CourierQualityDepotItem or CourierQualityGarageItem)[]

CourierQualityOrderItem

Name

Description

air_distance

Type: number<float>

The distance between the order coordinates and the courier location in which the order status was changed to finished or partially_finished, in a straight line in meters.

arrived_at

Type: string<datetime>

The time when the courier first entered the area in the specified radius from the delivery point, in ISO 8601 format.

courier_deleted

Type: boolean

Courier status, deleted or not.

courier_name

Type: string

Name of the courier fulfilling the order.

courier_number

Type: string

ID of the courier fulfilling the order.

customer_name

Type: string

Customer's name.

Max length: 1023

delivery_comment

Type: string

Order delivery rating comment.

Max length: 3000

delivery_lat

Type: number<float>

Latitude of order delivery location.

delivery_lon

Type: number<float>

Longitude of order delivery location.

delivery_not_in_interval

Type: boolean

Indicates whether the order was completed outside of the agreed timeframe. Returns true if the order was not delivered within the specified timeframe.

delivery_rating

Type: number<int>

Order delivery rating.

Min value: 1

Max value: 5

depot_number

Type: string

The unique number of the depot that handles the order.

far_from_point

Type: boolean

Indicates that items were delivered far away from the specified point. Returns true if the distance between the actual delivery point and the one specified in the order is more than 200 meters.

lat

Type: number<float>

Latitude of order location.

late_call_before_delivery

Type: boolean

Indicates that the call to the customer was late. Returns true if the call was made less than 30 minutes before completing the order.

left_at

Type: string<datetime>

The time when the courier last left the delivery point, in ISO 8601 format.

location_idle_duration

Type: number<float>

Duration of idle events at order location.

lon

Type: number<float>

Longitude of order location.

no_call_before_delivery

Type: boolean

Indicates that the customer didn't get a call before the order was completed. Returns true if the courier didn't call before the order was completed or canceled.

not_in_order

Type: boolean

Indicates that the delivery was completed in an unexpected order. Returns true if the delivery wasn't completed in the order specified in the Track & Trace API.

order_address

Type: string

Order delivery address.

order_amount

Type: number<float>

Order price in rubles.

Min value: 0

order_comments

Type: string

Order comments.

order_completed_at

Type: string<datetime>

The time when information about the order was recorded, in ISO 8601 format.

order_confirmed_at

Type: string<datetime>

Time when delivery was agreed on and the order was switched to the confirmed status, in ISO 8601 format.

order_interval

Type: OrderInterval[]

order_number

Type: string

Order number in the delivery company database.

order_payment_status

Type: string

Payment status. Possible values:

  • paid — The order is already paid.
  • unpaid — The order is not paid yet.

Enum: paid, unpaid, null

order_payment_type

Type: string

Payment method. Possible values:

  • cash — Payment to the courier in cash.
  • card — Payment to the courier by bank card.
  • prepaid — Prepayment (paid in advance).
  • yandex_pay — Payment via Yandex Pay. Can only be set internally.

Enum: cash, card, prepaid, yandex_pay, null

order_shared_with_companies

Type: SharedWithCompany[]

order_status

Type: string

The current order status. Possible values:

  • new — The order was created.
  • confirmed — The order delivery time was set (confirmed with recipient).
  • finished — The order was delivered.
  • partially_finished — The order was delivered only partially. Order status can be set to partially_finished only for companies with company.partially_finished_status_enabled flag equals true.
  • cancelled — The order was canceled.
  • postponed — The order is postponed or the courier couldn't contact the customer.

order_status_comments

Type: OrderStatusUpdateComment[]

order_visited_at

Type: string<datetime>

Date and time when the courier spent mark_delivered_service_time_coefficient * (order.service_duration_s + order.shared_service_duration_s) seconds within mark_delivered_radius meters from the delivery point. Specified in ISO 8601 format, based on data from the GPS tracker or mobile app.

order_volume

Type: number<float>

Order volume.

order_weight

Type: number<float>

Order weight.

phone

Type: string

The recipient's phone number.

refined_lat

Type: number<float>

Latitude of the real (refined by courier) delivery point.

refined_lon

Type: number<float>

Logitude of the real (refined by courier) delivery point.

route_date

Type: string<date>

The route's date in YYYY-MM-DD format.

route_imei

Type: integer

The number of the GPS tracker of the courier fulfilling the order.

route_imei_str

Type: string

String representation of numeric number of a GPS tracker. Should be used in case integer overflow of numeric number of a GPS tracker value in the programming language used. If defined in request, this takes precedence over the value of integer number of a GPS tracker field.

route_number

Type: string

Unique route number that matches the number in the delivery company's database.

route_routing_mode

Type: string

Transportation method. Possible values:

  • driving - courier drives a car.
  • truck - courier drives a truck.
  • transit - courier uses public transport and walks.
  • walking - courier walks.

segment_distance_m

Type: number<float>

Distance the courier went from their last visited location.

service_duration_s

Type: integer

Expected time the courier will need to pass the order to the recipient, including going up to the floor and receiving payment.

shared_service_duration_s

Type: integer

Service duration at the location, which can be shared with other orders at the same location. Shared service duration can include operations as parking a car, delivering documents, etc.

suggested_order_number

Type: number

The number of the order that should be delivered according to route.

time_interval_error

Type: number<float>

The amount of time the delivery window was exceeded, in seconds.

transit_idle_duration

Type: number<float>

Duration of idle events in transit from last visited location.

type

Type: string

Object type order.

used_mark_delivered_radius

Type: number<float>

The value of order.mark_delivered_radius or depot.mark_delivered_radius or company.mark_delivered_radius that was used to mark the order as visited. Returns null until the order is visited.

Min value: 0

Max value: 10000

CourierQualityDepotItem

Name

Description

arrived_at

Type: string<datetime>

The time when the courier first entered the area in the specified radius from the depot, in ISO 8601 format.

courier_deleted

Type: boolean

Courier status, deleted or not.

courier_name

Type: string

Name of the courier fulfilling the order.

courier_number

Type: string

ID of the courier fulfilling the order.

depot_number

Type: string

The unique number of the depot.

lat

Type: number<float>

Latitude of depot location.

left_at

Type: string<datetime>

The time when the courier last left the depot, in ISO 8601 format.

location_idle_duration

Type: number<float>

Duration of idle events at depot location.

lon

Type: number<float>

Longitude of depot location.

route_date

Type: string<date>

The route's date in YYYY-MM-DD format.

route_number

Type: string

Unique route number that matches the number in the delivery company's database.

segment_distance_m

Type: number<float>

Distance the courier went from their last visited location.

service_duration_s

Type: integer

Time spent dispatching goods in the depot, in seconds. This time is independent from the time required to load orders.

transit_idle_duration

Type: number<float>

Duration of idle events in transit from last visited location.

type

Type: string

Object type depot.

CourierQualityGarageItem

Name

Description

courier_deleted

Type: boolean

Courier status, deleted or not.

courier_name

Type: string

Name of the courier fulfilling the order.

courier_number

Type: string

ID of the courier fulfilling the order.

garage_number

Type: string

The unique number of the garage.

lat

Type: number<float>

Latitude of garage location.

location_idle_duration

Type: number<float>

Duration of idle events at garage location.

lon

Type: number<float>

Longitude of garage location.

route_date

Type: string<date>

The route's date in YYYY-MM-DD format.

route_number

Type: string

Unique route number that matches the number in the delivery company's database.

segment_distance_m

Type: number<float>

Distance the courier went from their last visited location.

transit_idle_duration

Type: number<float>

Duration of idle events in transit from last visited location.

type

Type: string

Object type garage.

OrderInterval

Name

Description

end

Type: string<datetime>

The end of the agreed delivery interval, in ISO 8601 format.

start

Type: string<datetime>

The start of the agreed delivery window, in ISO 8601 format.

SharedWithCompany

Name

Description

id

Type: integer

ID of the company that also receives order information.

name

Type: string

Name of the company.

number

Type: string

Number of the company.

OrderStatusUpdateComment

Name

Description

comment

Type: string

Comment for order status update event.

id

Type: integer

ID of the order status update event.

status

Type: string

The current order status. Possible values:

  • new — The order was created.
  • confirmed — The order delivery time was set (confirmed with recipient).
  • finished — The order was delivered.
  • partially_finished — The order was delivered only partially. Order status can be set to partially_finished only for companies with company.partially_finished_status_enabled flag equals true.
  • cancelled — The order was canceled.
  • postponed — The order is postponed or the courier couldn't contact the customer.

401 Unauthorized

Deprecated

Authorization error. Make sure that the request header contains the correct OAuth token.

422 Unprocessable Entity

Deprecated

Incorrect input. The operation can't be performed.