2.1. Initial cost estimate without creating a claim

  1. HTTP Request
  2. Header Parameters
  3. Request Body
    1. Representation
    2. Fields
  4. Responses
    1. Code 200
      1. Representation
      2. Fields
    2. Code 400
      1. Representation
      2. Fields
    3. Code 409
      1. Representation
      2. Fields
  5. Example

HTTP Request

POST b2b.taxi.yandex.net/b2b/cargo/integration/v2/check-price

Header Parameters

Accept-Language *

string

Preferred language of response

Accept-Language *

string

Preferred language of response

Request Body

{
  "items": [
    {
      "quantity": integer,
      "size": {
        "height": number,
        "length": number,
        "width": number
      },
      "weight": number
    }
  ],
  "requirements": {
    "cargo_loaders": integer,
    "cargo_options": [
      string
    ],
    "cargo_type": string,
    "pro_courier": boolean,
    "same_day_data": {
      "delivery_interval": {
        "from": string,
        "to": string
      }
    },
    "taxi_class": string
  },
  "route_points": [
    {
      "coordinates": [
        number
      ],
      "fullname": string
    }
  ],
  "skip_door_to_door": boolean
}
Copied to clipboard

Representation

Collapse all
Expand all

Fields

items[]

array

List of boxes to send

items[].quantity *

integer

Number of product units

Minimum value: 1.

items[].size

object

Linear dimensions of the item in meters.
Example: 0.45

items[].size.height *

number

items[].size.length *

number

items[].size.width *

number

items[].weight

number

Weight in kilograms.
Example: 2.105

requirements

object

Delivery requirements (vehicle class, options)

requirements.cargo_loaders

integer

Number of loaders for the cargo class.
Acceptable values: 0, 1, 2.

Use the service class get method (v2/tariffs)
to fetch an exact list of possible values for a specific geopoint

requirements.cargo_options[]

array

List of additional options in the service class.

Acceptable individual options: - auto_courier (only couriers delivering orders by car) - thermobag (courier with an insulated bag) Example of an option list: ["auto_courier"].

Use the service class get method (v1/tariffs) to fetch an exact list of possible values for a specific geo point

requirements.cargo_type

string

Body type (size) for the cargo class.
Acceptable values: - van ("Small van") - lcv_m ("Medium van") - lcv_l ("Large van").

Use the service class get method (v2/tariffs) to fetch an exact list of possible values for a specific geopoint

requirements.pro_courier

boolean

Pro option for the Express and Courier service classes

requirements.same_day_data

object

"Same day" delivery options

requirements.same_day_data.delivery_interval *

object

requirements.same_day_data.delivery_interval.from *

string

Start of the time interval (UTC)

requirements.same_day_data.delivery_interval.to *

string

End of the time interval (UTC)

requirements.taxi_class

string

Vehicle class for delivery.
Acceptable values: courier, express, cargo.

Use the service class get method (v2/tariffs)
to fetch an exact list of possible values for a specific geopoint

route_points[] *

array

Route points. Sorted in visiting order A-B1....BN

route_points[].coordinates[]

array

Array of two real numbers [longitude, latitude]. The order is important!

route_points[].fullname

string

Full name indicating the city (Moscow, Sadovnicheskaya Naberezhnaya, 82 bld. 2).
It's important to enter a locality indicating the house number but without the apartment number, entrance, or floor

skip_door_to_door

boolean

Opting out of delivery to the door. (Disable the "Door-to-door" option).

Acceptable values:

  • true (the courier will deliver the order to the outdoor entrance)

  • false (default, door-to-door delivery)

items[]

array

List of boxes to send

items[].quantity *

integer

Number of product units

Minimum value: 1.

items[].size

object

Linear dimensions of the item in meters.
Example: 0.45

items[].size.height *

number

items[].size.length *

number

items[].size.width *

number

items[].weight

number

Weight in kilograms.
Example: 2.105

requirements

object

Delivery requirements (vehicle class, options)

requirements.cargo_loaders

integer

Number of loaders for the cargo class.
Acceptable values: 0, 1, 2.

Use the service class get method (v2/tariffs)
to fetch an exact list of possible values for a specific geopoint

requirements.cargo_options[]

array

List of additional options in the service class.

Acceptable individual options: - auto_courier (only couriers delivering orders by car) - thermobag (courier with an insulated bag) Example of an option list: ["auto_courier"].

Use the service class get method (v1/tariffs) to fetch an exact list of possible values for a specific geo point

requirements.cargo_type

string

Body type (size) for the cargo class.
Acceptable values: - van ("Small van") - lcv_m ("Medium van") - lcv_l ("Large van").

Use the service class get method (v2/tariffs) to fetch an exact list of possible values for a specific geopoint

requirements.pro_courier

boolean

Pro option for the Express and Courier service classes

requirements.same_day_data

object

"Same day" delivery options

requirements.same_day_data.delivery_interval *

object

requirements.same_day_data.delivery_interval.from *

string

Start of the time interval (UTC)

requirements.same_day_data.delivery_interval.to *

string

End of the time interval (UTC)

requirements.taxi_class

string

Vehicle class for delivery.
Acceptable values: courier, express, cargo.

Use the service class get method (v2/tariffs)
to fetch an exact list of possible values for a specific geopoint

route_points[] *

array

Route points. Sorted in visiting order A-B1....BN

route_points[].coordinates[]

array

Array of two real numbers [longitude, latitude]. The order is important!

route_points[].fullname

string

Full name indicating the city (Moscow, Sadovnicheskaya Naberezhnaya, 82 bld. 2).
It's important to enter a locality indicating the house number but without the apartment number, entrance, or floor

skip_door_to_door

boolean

Opting out of delivery to the door. (Disable the "Door-to-door" option).

Acceptable values:

  • true (the courier will deliver the order to the outdoor entrance)

  • false (default, door-to-door delivery)

Responses

Code 200

OK

{
  "currency_rules": {
    "code": string,
    "sign": string,
    "template": string,
    "text": string
  },
  "distance_meters": number,
  "eta": number,
  "price": string,
  "requirements": {
    "cargo_loaders": integer,
    "cargo_options": [
      string
    ],
    "cargo_type": string,
    "pro_courier": boolean,
    "same_day_data": {
      "delivery_interval": {
        "from": string,
        "to": string
      }
    },
    "taxi_class": string
  },
  "zone_id": string
}
Copied to clipboard

Representation

Collapse all
Expand all

Fields

currency_rules

object

Currency display rules

currency_rules.code *

string

Three-digit code of the currency used for the calculation

currency_rules.sign

string

currency_rules.template *

string

currency_rules.text *

string

distance_meters

number

The distance in meters for the route that was built on the request points, starting from the first and ending with the last point

eta

number

ETA in minutes as received from /orders/estimate

price *

string

Amount in Decimal format(18, 4)

requirements *

object

Delivery requirements (vehicle class, options)

requirements.cargo_loaders

integer

Number of loaders for the cargo class.
Acceptable values: 0, 1, 2.

Use the service class get method (v2/tariffs)
to fetch an exact list of possible values for a specific geopoint

requirements.cargo_options[]

array

List of additional options in the service class.

Acceptable individual options: - auto_courier (only couriers delivering orders by car) - thermobag (courier with an insulated bag) Example of an option list: ["auto_courier"].

Use the service class get method (v1/tariffs) to fetch an exact list of possible values for a specific geo point

requirements.cargo_type

string

Body type (size) for the cargo class.
Acceptable values: - van ("Small van") - lcv_m ("Medium van") - lcv_l ("Large van").

Use the service class get method (v2/tariffs) to fetch an exact list of possible values for a specific geopoint

requirements.pro_courier

boolean

Pro option for the Express and Courier service classes

requirements.same_day_data

object

"Same day" delivery options

requirements.same_day_data.delivery_interval *

object

requirements.same_day_data.delivery_interval.from *

string

Start of the time interval (UTC)

requirements.same_day_data.delivery_interval.to *

string

End of the time interval (UTC)

requirements.taxi_class

string

Vehicle class for delivery.
Acceptable values: courier, express, cargo.

Use the service class get method (v2/tariffs)
to fetch an exact list of possible values for a specific geopoint

zone_id

string

currency_rules

object

Currency display rules

currency_rules.code *

string

Three-digit code of the currency used for the calculation

currency_rules.sign

string

currency_rules.template *

string

currency_rules.text *

string

distance_meters

number

The distance in meters for the route that was built on the request points, starting from the first and ending with the last point

eta

number

ETA in minutes as received from /orders/estimate

price *

string

Amount in Decimal format(18, 4)

requirements *

object

Delivery requirements (vehicle class, options)

requirements.cargo_loaders

integer

Number of loaders for the cargo class.
Acceptable values: 0, 1, 2.

Use the service class get method (v2/tariffs)
to fetch an exact list of possible values for a specific geopoint

requirements.cargo_options[]

array

List of additional options in the service class.

Acceptable individual options: - auto_courier (only couriers delivering orders by car) - thermobag (courier with an insulated bag) Example of an option list: ["auto_courier"].

Use the service class get method (v1/tariffs) to fetch an exact list of possible values for a specific geo point

requirements.cargo_type

string

Body type (size) for the cargo class.
Acceptable values: - van ("Small van") - lcv_m ("Medium van") - lcv_l ("Large van").

Use the service class get method (v2/tariffs) to fetch an exact list of possible values for a specific geopoint

requirements.pro_courier

boolean

Pro option for the Express and Courier service classes

requirements.same_day_data

object

"Same day" delivery options

requirements.same_day_data.delivery_interval *

object

requirements.same_day_data.delivery_interval.from *

string

Start of the time interval (UTC)

requirements.same_day_data.delivery_interval.to *

string

End of the time interval (UTC)

requirements.taxi_class

string

Vehicle class for delivery.
Acceptable values: courier, express, cargo.

Use the service class get method (v2/tariffs)
to fetch an exact list of possible values for a specific geopoint

zone_id

string

Code 400

Invalid claim

{
  "code": string,
  "message": string
}
Copied to clipboard

Representation

Collapse all
Expand all

Fields

code *

string

Error code

message *

string

Error description

code *

string

Error code

message *

string

Error description

Code 409

No suitable cars | Could not build route

{
  "code": string,
  "message": string
}
Copied to clipboard

Representation

Collapse all
Expand all

Fields

code *

string

Error code

message *

string

Error description

code *

string

Error code

message *

string

Error description

Example

Request:

curl -X POST "b2b.taxi.yandex.net/b2b/cargo/integration/v2/check-price" \
-H "Accept-Language: {string}" \
-d '{
  "items": [
    {
      "quantity": 1,
      "size": {
        "height": 0.05,
        "length": 0.15,
        "width": 0.1
      },
      "weight": 2.105
    }
  ],
  "requirements": {
    "cargo_loaders": 1,
    "cargo_options": "thermobag",
    "cargo_type": "lcv_m",
    "pro_courier": false,
    "same_day_data": {
      "delivery_interval": {
        "from": "2020-01-01T00:00:00+00:00",
        "to": "2020-01-02T00:00:00+00:00"
      }
    },
    "taxi_class": "cargo"
  },
  "route_points": [
    {
      "coordinates": [
        0.1,
        0.1
      ],
      "fullname": "St. Petersburg, Bolshaya Monetnaya Ulitsa, 1 bld. 1A"
    }
  ],
  "skip_door_to_door": false
}'
Copied to clipboard

Responses:

{
  "currency_rules": {
    "code": "RUB",
    "sign": "₽",
    "template": "$VALUE$ $SIGN$$CURRENCY$",
    "text": "rub."
  },
  "distance_meters": 10,
  "eta": 10,
  "price": "12.50",
  "requirements": {
    "cargo_loaders": 1,
    "cargo_options": "thermobag",
    "cargo_type": "lcv_m",
    "pro_courier": false,
    "same_day_data": {
      "delivery_interval": {
        "from": "2020-01-01T00:00:00+00:00",
        "to": "2020-01-02T00:00:00+00:00"
      }
    },
    "taxi_class": "cargo"
  },
  "zone_id": "moscow"
}
Copied to clipboard