Preliminary evaluation without creating a claim
Request
POST
b2b.taxi.yandex.net/b2b/cargo/integration/v2/check-price
Service URL
Headers
|
Name |
Description |
|
Accept-Language |
Type: string Preferred response language. Examples: "en" — English Example: |
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": "Saint Petersburg, Bol'shaya Monetnaya Street, 1f1A"
}
],
"requirements": {
"taxi_class": "cargo",
"cargo_type": "lcv_m",
"cargo_loaders": 1,
"pro_courier": false,
"cargo_options": [
"thermobag"
],
"same_day_data": {
"delivery_interval": {
"from": "2020-01-01T00:00:00+00:00",
"to": "2020-01-02T00:00:00+00:00"
}
}
},
"skip_door_to_door": false
}
|
Name |
Description |
|
route_points |
Type: RoutePointWithAddress[] Route points. Sorted in order of visits A-B1....BN Min items: Example
|
|
items |
Type: Item[] Item parameters Min items: Example
|
|
requirements |
Type: Requirements Delivery requirements (vehicle class, options) Example
|
|
skip_door_to_door |
Type: boolean Disable door-to-door delivery (disable the "Door-to-door" option).
Default: |
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 |
|
length |
Type: number Length in meters |
|
width |
Type: number Width in meters |
Example
{
"length": 0.1,
"width": 0.2,
"height": 0.3
}
Item
|
Name |
Description |
|
quantity |
Type: integer Number of items Min value: |
|
dropoff_point |
Type: integer ID of the point (int64) to deliver the item to. |
|
pickup_point |
Type: integer ID of the point (int64) to pick up the item from. |
|
size |
Type: CargoItemSizes Unit dimensions in meters. The actual values should be added to the fields.
Example
|
|
weight |
Type: number Item weight in kilograms. |
Example
{
"size": {
"length": 0.1,
"width": 0.2,
"height": 0.3
},
"weight": 2.105,
"quantity": 1,
"pickup_point": 1,
"dropoff_point": 2
}
Point
Coordinates of points in the form of an array of two real numbers: longitude and latitude — exactly in that order.
Type: number[]
Min items: 2
Max items: 2
Example
[
0.1,
0.1
]
AddressFullname
Full address with an indication of the city, street, and house number.
You don't need to specify the flat, the entrance number, or the floor.
Type: string
Example: Saint Petersburg, Bol'shaya Monetnaya Street, 1f1A
RoutePointWithAddress
|
Name |
Description |
|
coordinates |
Type: Point Coordinates of points in the form of an array of two real numbers: longitude and latitude — exactly in that order. Min items: Max items: Example
|
|
fullname |
Type: AddressFullname Full address with an indication of the city, street, and house number. Example: |
|
id |
Type: integer Numeric point id (int64). The parameter is mandatory if there are multiple delivery points in the order |
Example
{
"id": 1,
"coordinates": [
0.1,
0.1
],
"fullname": "Saint Petersburg, Bol'shaya Monetnaya Street, 1f1A"
}
CargoType
Body type (size) for the cargo rate.\nPossible values:
- van ("Small body")
- lcv_m ("Medium body")
- lcv_l ("Large body")
- lcv_xl ("XL body")
For an exact list of possible values for a particular geo point,\nuse the method for obtaining rates tariffs
Type: string
Enum: van, lcv_m, lcv_l, lcv_xl
CargoOptions
List of additional rate options.
Possible separate options:
- auto_courier (a courier with a vehicle only)
- thermobag (a courier with a thermobag)
Example of a list of options: ["auto_courier"].
For an exact list of possible values for a particular geo point,
use the method for obtaining rates tariffs
Type: string[]
Example
[
"thermobag"
]
TimeInterval
Time interval
|
Name |
Description |
|
from |
Type: string<date-time> Interval start Example: |
|
to |
Type: string<date-time> Interval end (date and time) Example: |
Example
{
"from": "2020-01-01T00:00:00+00:00",
"to": "2020-01-02T00:00:00+00:00"
}
Requirements
Delivery requirements (vehicle class, options)
|
Name |
Description |
||
|
cargo_loaders |
Type: integer Number of loaders for the cargo rate. |
||
|
cargo_options |
Type: CargoOptions 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.\nPossible values:
Enum: |
||
|
pro_courier |
Type: boolean Enable the "Pro" option for "Express" and "Courier" rates. |
||
|
same_day_data |
Type: object
"Same-day delivery" options Example
|
||
|
taxi_class |
Type: string Delivery vehicle class. Example: |
Example
{
"taxi_class": "cargo",
"cargo_type": "lcv_m",
"cargo_loaders": 1,
"pro_courier": false,
"cargo_options": [
"thermobag"
],
"same_day_data": {
"delivery_interval": {
"from": "2020-01-01T00:00:00+00:00",
"to": "2020-01-02T00:00:00+00:00"
}
}
}
Responses
200 OK
OK
Body
application/json
{
"price": "12.50",
"currency_rules": {
"code": "RUB",
"text": "rub.",
"template": "$VALUE$ $SIGN$$CURRENCY$",
"sign": "₽"
},
"requirements": {
"taxi_class": "cargo",
"cargo_type": "lcv_m",
"cargo_loaders": 1,
"pro_courier": false,
"cargo_options": [
"thermobag"
],
"same_day_data": {
"delivery_interval": {
"from": "2020-01-01T00:00:00+00:00",
"to": "2020-01-02T00:00:00+00:00"
}
}
},
"distance_meters": 10,
"eta": 10,
"zone_id": "moscow"
}
|
Name |
Description |
|
price |
Type: Money Delivery cost in Decimal(18, 4) format Pattern: Example: |
|
requirements |
Type: Requirements Delivery requirements (vehicle class, options) Example
|
|
currency_rules |
Type: CurrencyRules Currency display rules Example
|
|
distance_meters |
Type: RouteDistance Distance in meters for the specified route, from the first to the last point Example: |
|
eta |
Type: number Estimated time of arrival in minutes |
|
zone_id |
Type: string Delivery zone ID Example: |
Money
Delivery cost in Decimal(18, 4) format
Type: string
Pattern: ^-?[0-9]{1,14}(\.[0-9]{0,4})?$
Example: 12.50
Currency
Three-digit code of the payment currency
Type: string
Min length: 3
Max length: 3
Example: RUB
CurrencyRules
Currency display rules
|
Name |
Description |
|
code |
Type: Currency Three-digit code of the payment currency Min length: Max length: Example: |
|
template |
Type: string Currency display template Example: |
|
text |
Type: string Short currency name Example: |
|
sign |
Type: string Currency symbol Example: |
Example
{
"code": "RUB",
"text": "rub.",
"template": "$VALUE$ $SIGN$$CURRENCY$",
"sign": "₽"
}
RouteDistance
Distance in meters for the specified route, from the first to the last point
Type: number
400 Bad Request
Invalid request
Body
application/json
{
"code": "bad_request",
"message": "bad request"
}
|
Name |
Description |
|
code |
Type: string Error code Enum: |
|
message |
Type: string Error description Example: |
409 Conflict
No suitable vehicles | Couldn't build the route
Body
application/json
{
"code": "estimating.requirement_unavailable",
"message": "requirement unavailable"
}
|
Name |
Description |
|
code |
Type: string Error code 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 Const: Example: |
|
message |
Type: string Error description Example: |
No longer supported, please use an alternative and newer version.