Same-day delivery

The method returns a list of services available at the point, taking into account their options.
The response contains two objects:

  1. express_delivery — contains available rates and options for Express delivery.
  2. same_day_delivery — contains available intervals for Same-day delivery. The option is unavailable in Russia.
    Each object contains the field allowed that indicates whether this option is available for the specified rate.

Request

POST

b2b.taxi.yandex.net/b2b/cargo/integration/v2/delivery-methods

Service URL

Headers

Name

Description

Accept-Language

Type: string

Preferred response language. Examples: "en" — English

Example: en

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.
You don't need to specify the flat, the entrance number, or the floor.

Example: Saint Petersburg, Bol'shaya Monetnaya Street, 1f1A

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: 2

Max items: 2

Example
[
  0.1,
  0.1
]

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
{
  "express_delivery": {
    "allowed": true,
    "available_tariffs": [
      {
        "name": "cargo",
        "title": "Express",
        "text": "Express rate",
        "minimal_price": 213,
        "supported_requirements": [
          null
        ],
        "delivery_options": [
          {}
        ]
      }
    ]
  },
  "same_day_delivery": {
    "allowed": true,
    "available_intervals": [
      {
        "from": "2020-01-01T00:00:00+00:00",
        "to": "2020-01-02T00:00:00+00:00"
      }
    ]
  }
}

Name

Description

express_delivery

Type: ExpressDeliveryInfo

Information about the available "Express delivery" rates

Example
{
  "allowed": true,
  "available_tariffs": [
    {
      "name": "cargo",
      "title": "Express",
      "text": "Express rate",
      "minimal_price": 213,
      "supported_requirements": [
        {}
      ],
      "delivery_options": [
        {
          "description": "example"
        }
      ]
    }
  ]
}

same_day_delivery

Type: SameDayDeliveryInfo

Information about the available "Same-day delivery" intervals

Example
{
  "allowed": true,
  "available_intervals": [
    {
      "from": "2020-01-01T00:00:00+00:00",
      "to": "2020-01-02T00:00:00+00:00"
    }
  ]
}

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: 170 cm long, 100 cm wide, 90 cm high

title

Type: string

Localized requirement name

Example: Small body

value

One of 2 types
  • Type: string

    Example: example

  • Type: integer

The value that needs to be entered to take into account the requirement when creating an order

Example: van

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: cargo_type

options

Type: CargoRequirementChoice[]

Possible selection options

Min items: 1

Example
[
  {
    "title": "Small body",
    "text": "170 cm long, 100 cm wide, 90 cm high",
    "value": "van"
  }
]

required

Type: boolean

Mandatory requirement for creating an order

text

Type: string

Localized description of the requirement type

Example: Vehicle dimension requirement

title

Type: string

Localized requirement name

Example: Body type

type

Type: SelectType

Selection type: single or multiple

Enum: select, multi_select

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: example

required

Type: boolean

You must select a field

text

Type: string

Localized description of the requirement type

Example: example

title

Type: string

Localized name of the requirement type

Example: example

type

Type: string

Selection type: yes or no

Const: bool

Example: 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

Example
{
  "description": "example"
}

B2BTariff

Name

Description

minimal_price

Type: number

Minimum cost

name

Type: Tariff

Rate

Example: cargo

supported_requirements

Type: TariffRequirement[]

Supported delivery requirements

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"
      }
    ]
  }
]

text

Type: string

Rate description

Example: Express rate

title

Type: string

Rate name

Example: Express

delivery_options

Type: DeliveryOption[]

Example
[
  {
    "description": "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"
    }
  ]
}

ExpressDeliveryInfo

Information about the available "Express delivery" rates

Name

Description

allowed

Type: boolean

"Express delivery" is available

available_tariffs

Type: B2BTariff[]

Available "Express delivery" rates

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": [
          null
        ]
      }
    ],
    "delivery_options": [
      {
        "description": "example"
      }
    ]
  }
]
Example
{
  "allowed": true,
  "available_tariffs": [
    {
      "name": "cargo",
      "title": "Express",
      "text": "Express rate",
      "minimal_price": 213,
      "supported_requirements": [
        {}
      ],
      "delivery_options": [
        {
          "description": "example"
        }
      ]
    }
  ]
}

TimeInterval

Time interval

Name

Description

from

Type: string<date-time>

Interval start

Example: 2020-01-01T00:00:00+00:00

to

Type: string<date-time>

Interval end (date and time)

Example: 2020-01-02T00:00:00+00:00

Example
{
  "from": "2020-01-01T00:00:00+00:00",
  "to": "2020-01-02T00:00:00+00:00"
}

SameDayDeliveryInfo

Information about the available "Same-day delivery" intervals

Name

Description

allowed

Type: boolean

"Same-day delivery" is available

available_intervals

Type: TimeInterval[]

Available "Same-day delivery" intervals

Example
[
  {
    "from": "2020-01-01T00:00:00+00:00",
    "to": "2020-01-02T00:00:00+00:00"
  }
]
Example
{
  "allowed": true,
  "available_intervals": [
    {
      "from": "2020-01-01T00:00:00+00:00",
      "to": "2020-01-02T00:00:00+00:00"
    }
  ]
}

400 Bad Request

Invalid request

Body

application/json
{
  "code": "bad_request",
  "message": "bad request"
}

Name

Description

code

Type: string

Error code

Enum: bad_request, address_not_found

message

Type: string

Error description

Example: bad request

No longer supported, please use an alternative and newer version.

Next