Available rates
The response returns possible additional requirements in the supported_requirements field.
Available requirement values:
- cargo_type, possible dimensions
- cargo_loaders, possible loaders
- cargo_options, possible additional options: driver courier - auto_courier, thermobag - thermobag
Each requirement has an options field that defines a list of possible values: you can select only one value for cargo_type/cargo_loaders and multiple values for cargo_options.
These requirements can be entered when creating a claim in the client_requirements.name field, where the name of the additional requirement is entered in the ''name'' field, where cargo_loaders, one of the options for cargo_type, is entered in the ''value'' field, or an options array for cargo_options.
Request
POST
b2b.taxi.yandex.net/b2b/cargo/integration/v2/tariffs
Service URL
Headers
|
Name |
Description |
|
Accept-Language |
Type: string Preferred response language. Examples: "en" — English Example: |
Body
application/json
{
"start_point": [
0.1,
0.1
],
"fullname": "Saint Petersburg, Bol'shaya Monetnaya Street, 1f1A"
}
|
Name |
Description |
|
fullname |
Type: AddressFullname Full address with an indication of the city, street, and house number. Example: |
|
start_point |
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
|
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
Responses
200 OK
OK
Body
application/json
{
"available_tariffs": [
{
"name": "cargo",
"title": "Express",
"text": "Express rate",
"minimal_price": 213,
"supported_requirements": [
{}
],
"delivery_options": [
{
"description": "example"
}
]
}
]
}
|
Name |
Description |
|
available_tariffs |
Type: B2BTariff[] Example
|
Tariff
Rate
Type: string
Example: cargo
SelectType
Selection type: single or multiple
Type: string
Enum: select, multi_select
CargoRequirementChoice
|
Name |
Description |
|
text |
Type: string Localized requirement description Example: |
|
title |
Type: string Localized requirement name Example: |
|
value |
One of 2 types
The value that needs to be entered to take into account the requirement when creating an order Example: |
Example
{
"title": "Small body",
"text": "170 cm long, 100 cm wide, 90 cm high",
"value": "van"
}
SelectRequirement
Requirement with a few options
|
Name |
Description |
|
name |
Type: string Requirement type Example: |
|
options |
Type: CargoRequirementChoice[] Possible selection options Min items: Example
|
|
required |
Type: boolean Mandatory requirement for creating an order |
|
text |
Type: string Localized description of the requirement type Example: |
|
title |
Type: string Localized requirement name Example: |
|
type |
Type: SelectType Selection type: single or multiple Enum: |
Example
{
"name": "cargo_type",
"title": "Body type",
"text": "Vehicle dimension requirement",
"type": "select",
"required": false,
"options": [
{
"title": "Small body",
"text": "170 cm long, 100 cm wide, 90 cm high",
"value": "van"
}
]
}
BoolRequirement
"Yes/no" requirement format
|
Name |
Description |
|
default |
Type: boolean Default value |
|
name |
Type: string Requirement type Example: |
|
required |
Type: boolean You must select a field |
|
text |
Type: string Localized description of the requirement type Example: |
|
title |
Type: string Localized name of the requirement type Example: |
|
type |
Type: string Selection type: yes or no Const: Example: |
Example
{
"name": "example",
"title": "example",
"text": "example",
"type": "bool",
"default": true,
"required": true
}
TariffRequirement
One of 2 types
-
Type: SelectRequirement
Requirement with a few options
Example
{ "name": "cargo_type", "title": "Body type", "text": "Vehicle dimension requirement", "type": "select", "required": false, "options": [ { "title": "Small body", "text": "170 cm long, 100 cm wide, 90 cm high", "value": "van" } ] } -
Type: BoolRequirement
"Yes/no" requirement format
Example
{ "name": "example", "title": "example", "text": "example", "type": "bool", "default": true, "required": true }
Example
{
"name": "cargo_type",
"title": "Body type",
"text": "Vehicle dimension requirement",
"type": "select",
"required": false,
"options": [
{
"title": "Small body",
"text": "170 cm long, 100 cm wide, 90 cm high",
"value": "van"
}
]
}
DeliveryOption
|
Name |
Description |
|
description |
Type: string Localized description Example: |
Example
{
"description": "example"
}
B2BTariff
|
Name |
Description |
|
minimal_price |
Type: number Minimum cost |
|
name |
Type: Tariff Rate Example: |
|
supported_requirements |
Type: TariffRequirement[] Supported delivery requirements Example
|
|
text |
Type: string Rate description Example: |
|
title |
Type: string Rate name Example: |
|
delivery_options |
Type: DeliveryOption[] Example
|
Example
{
"name": "cargo",
"title": "Express",
"text": "Express rate",
"minimal_price": 213,
"supported_requirements": [
{
"name": "cargo_type",
"title": "Body type",
"text": "Vehicle dimension requirement",
"type": "select",
"required": false,
"options": [
{}
]
}
],
"delivery_options": [
{
"description": "example"
}
]
}
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: |
No longer supported, please use an alternative and newer version.