Checkout slots

Method for retrieving slots during checkout.

Used to show the nearest available delivery time on the cart screen.

Request

POST

/places/{placeId}/delivery_times

Path parameters

Name

Description

placeId*

Type: string

Unique store identifier in Partner’s system.

Headers

Name

Description

Authorization*

Type: string

Token received in response to the /security/oauth/token request

Body

application/json
{
    "deliveryAddress": {
        "latitude": "55.756994",
        "longitude": "37.614006"
    },
    "items": [
        {
            "id": "some-uniq-identifier",
            "quantity": 0.5
        }
    ]
}

Name

Description

deliveryAddress*

Type: DeliveryAddressSlots

Delivery address information.

items

Type: OrderItem[]

List of items in the assembled order (used if delivery slots depend on order contents).

DeliveryAddressSlots

Delivery address information.

Name

Description

latitude*

Type: string

Latitude of delivery point

Example: 55.756994

longitude*

Type: string

Longitude of delivery point

Example: 37.614006

OrderItem

Name

Description

id*

Type: string

Unique product identifier in the Partner’s system

Example: some-uniq-identifier

Max length: 64

quantity*

Type: number<float>

Weight of product item.

Example: 0.5

Responses

200 OK

Slot retrieval successful.

Body

application/json
{
    "delivery_times": [
        {
            "end_time": "2022-05-18T16:05:27.000000+03:00",
            "id": 0,
            "start_time": "2022-05-18T15:35:27.000000+03:00"
        }
    ]
}

Name

Description

delivery_times*

Type: DeliveryTimeSlot[]

DeliveryTimeSlot

Name

Description

end_time*

Type: string

Slot end time in store’s local UTC time, in RFC3339 format with fractional seconds.

Example: 2022-05-18T16:05:27.000000+03:00

start_time*

Type: string

Slot start time in store’s local UTC time, in RFC3339 format with fractional seconds.

Example: 2022-05-18T15:35:27.000000+03:00

id

Type: integer

Slot ID

400 Bad Request

Request error. The response is expected to contain an array with an error list object.

Body

application/json
[
    {
        "code": 400,
        "description": "Description of error"
    }
]

ErrorItem[]

ErrorItem

Name

Description

code*

Type: integer

Numeric error code agreed with Yango Deli.

Example: 400

description*

Type: string

Error description

Example: Description of error

401 Unauthorized

Authorisation failed.

Body

application/json
{
    "reason": "Access token has been expired. You should request a new one"
}

Name

Description

reason*

Type: string

The reason why authorisation failed.

Example: Access token has been expired. You should request a new one

404 Not Found

Resource not found. The response is expected to contain an array with an object from the error list.

Body

application/json
[
    {
        "code": 400,
        "description": "Description of error"
    }
]

ErrorItem[]

500 Internal Server Error

Internal server errors. The response is expected to contain an array with an object from the error list.

Body

application/json
[
    {
        "code": 400,
        "description": "Description of error"
    }
]

ErrorItem[]

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