Get delivery options (for Russia)
- Return methods for each delivery option.
- Each option contains the price, the time interval for picking up the parcel at point A, and the time interval for delivery to point B.
- After reviewing the delivery options, you can select the best one and create an order using the selected option.
- Delivery options are available only in Russia.
Request
POST
b2b.taxi.yandex.net/b2b/cargo/integration/v2/offers/calculate
Service URL
Headers
Name |
Description |
Accept-Language* |
Type: string Preferred response language. Examples: "en" — English |
Body
application/json
{
"items": [
{
"size": {
"length": 0.1,
"width": 0.2,
"height": 0.3
},
"weight": 2.105,
"quantity": 1,
"pickup_point": 1,
"dropoff_point": 2
}
],
"route_points": [
{
"id": 1,
"coordinates": [
0.1,
0.1
],
"fullname": "One Central Building 5, Trade Center Second, Dubai"
}
],
"requirements": {
"taxi_classes": [
"cargo"
],
"cargo_type": "lcv_m",
"cargo_loaders": 1,
"pro_courier": false,
"cargo_options": [
"thermobag"
],
"skip_door_to_door": false,
"due": "2020-01-01T00:00:00+00:00"
}
}
Name |
Description |
route_points* |
Type: RoutePointWithAddress[] Route points. Sorted in order of visits A-B1....BN Min items: |
items |
Type: Item[] Item parameters Min items: |
requirements |
Type: OfferRequirements Delivery requirements |
RoutePointWithAddress
Name |
Description |
coordinates |
Type: number[] Coordinates of points in the form of an array of two real numbers: longitude and latitude — exactly in that order. Example: Max items: Min items: |
fullname |
Type: string Full address with an indication of the city, street, and house number. Example: |
id |
Type: integer<int64> Numeric point id (int64). The parameter is mandatory if there are multiple delivery points in the order Example: |
Item
Name |
Description |
quantity* |
Type: integer<int64> Number of items Example: Min value: |
dropoff_point |
Type: integer<int64> ID of the point (int64) to deliver the item to. Example: |
pickup_point |
Type: integer<int64> ID of the point (int64) to pick up the item from. Example: |
size |
Type: CargoItemSizes Unit dimensions in meters. The actual values should be added to the fields. If the dimensions aren't added, the order is placed, taking into account If the actual characteristics of the unit exceed the allowed dimensions, Courier: up to 0.80 m × 0.50 m × 0.50 м
|
weight |
Type: number Item weight in kilograms. Example: |
OfferRequirements
Delivery requirements
Name |
Description |
cargo_loaders |
Type: integer<int64> Number of loaders for the cargo rate. For an exact list of possible values for a particular geo point, Example: |
cargo_options |
Type: string[] List of additional rate options. Possible separate options:
Example of a list of options: ["auto_courier"]. For an exact list of possible values for a particular geo point, Example: |
cargo_type |
Type: CargoType Body type (size) for the cargo rate. For an exact list of possible values for a particular geo point, Example: Enum: |
due |
Type: string<date-time> Estimated time of arrival of the courier (you can postpone the estimated time of delivery by 30-60 minutes from the current ) — default value. Example: |
pro_courier |
Type: boolean Enable the "Pro" option for "Express" and "Courier" rates. |
skip_door_to_door |
Type: boolean Disable door-to-door delivery (disable the "Door-to-door" option). Possible values:
|
taxi_classes |
Type: string[] Delivery vehicle class. For an exact list of possible values for a particular geo point, For an exact list of possible values for a particular geo point, Example: Min items: |
CargoItemSizes
Unit dimensions in meters. The actual values should be added to the fields.
If the dimensions aren't added, the order is placed, taking into account
the maximum dimensions allowed for the selected rate.
If the actual characteristics of the unit exceed the allowed dimensions,
the courier has the right to refuse to fulfill the order on site.
In this case, the minimum fee will be withheld.
Courier: up to 0.80 m × 0.50 m × 0.50 м
Express: up to 1.00 m × 0.60 m × 0.50 m
Cargo:
- Small body: up to 1.70 m × 0.96 m × 0.90 m
- Medium body: up to 2.60 m × 1.30 m × 1.50 m
- Large body: up to 3.80 m × 1.80 m × 1.80 m
Name |
Description |
height* |
Type: number Height in meters Example: |
length* |
Type: number Length in meters Example: |
width* |
Type: number Width in meters Example: |
CargoType
Body type (size) for the cargo rate.
Possible values:
- van ("Small body")
- lcv_m ("Medium body")
- lcv_l ("Large body").
For an exact list of possible values for a particular geo point,
use the method for obtaining rates tariffs
Type |
Description |
Example: Enum: |
Responses
200 OK
OK
Body
application/json
{
"offers": [
{
"price": {
"total_price": "673.0",
"total_price_with_vat": "807.6",
"base_price": "611.8",
"surge_ratio": 1.1,
"currency": "AED"
},
"taxi_class": "express",
"pickup_interval": {
"from": "2023-07-17T08:02:26.607358+00:00",
"to": "2023-07-17T08:42:26.607358+00:00"
},
"delivery_interval": {
"from": "2023-07-17T08:02:26.607358+00:00",
"to": "2023-07-17T09:15:43.607358+00:00"
},
"description": "express_30min_longer",
"payload": "5e2TPP5f7Yqyv19yRZ+QVas4JK+lhwa17ncxA3VCGI8hvnFS+CIySbmfHQlR6vhC2S4XsW+M7TbEV0EQl1/1Z0PO3QQX8KbGb6rtKay",
"offer_ttl": "2020-01-02T00:00:00+00:00"
}
]
}
Name |
Description |
offers* |
Type: CalculatedOffer[] An array of delivery offers |
CalculatedOffer
Delivery options
Name |
Description |
delivery_interval* |
Type: DeliveryTimeInterval Delivery time interval (for point B) |
payload* |
Type: string payload of the delivery offer. To order delivery using the selected offer, pass the payload in the method claims/create. Example: |
pickup_interval* |
Type: PickupTimeInterval Pick-up time interval (for point A) |
price* |
Type: CalculatedOfferPrice Delivery cost |
taxi_class* |
Type: string Rate Example: |
description |
Type: string Delivery option description. Example: express_30min_longer (Express with a 30-minute delay) Example: |
offer_ttl |
Type: string<date-time> Time until which the offer can be used to create a claim. If Example: |
DeliveryTimeInterval
Delivery time interval (for point B)
Name |
Description |
from* |
Type: string<date-time> Interval start (UTC) Example: |
to* |
Type: string<date-time> Interval end (date and time) Example: |
PickupTimeInterval
Pick-up time interval (for point A)
Name |
Description |
from* |
Type: string<date-time> Interval start (UTC) Example: |
to* |
Type: string<date-time> Interval end (date and time) Example: |
CalculatedOfferPrice
Delivery cost
Name |
Description |
currency* |
Type: string Three-digit code of the payment currency Example: Min length: Max length: |
surge_ratio* |
Type: number Order cost growth factor (depending on the system load) Example: |
total_price* |
Type: string Price including order cost growth factor (without VAT) Example: Pattern: |
total_price_with_vat* |
Type: string Price including order cost growth factor (including VAT) Example: Pattern: |
base_price |
Type: string Базовая цена доставки Example: Pattern: |
400 Bad Request
Invalid request
Body
application/json
{
"code": "bad_request",
"message": "bad request"
}
Name |
Description |
code* |
Type: string Error code Example: Enum: |
message* |
Type: string Error description Example: |
409 Conflict
Couldn't calculate offers
Body
application/json
{
"code": "estimating.requirement_unavailable",
"message": "requirement unavailable"
}
Name |
Description |
code* |
Type: string Error code Example: Enum: |
message* |
Type: string Error description Example: |
429 Too Many Requests
Too many requests
Body
application/json
{
"code": "too_many_requests",
"message": "Too many requests"
}
Name |
Description |
code* |
Type: string Error code Example: Enum: |
message* |
Type: string Error description Example: |