❗️ Product stock

Method for retrieving product stock.

Listed products have their stock updated with the value from the stock field. Depending on the value, product availability is also updated.

If the value is less than or equal to 0, the product becomes unavailable for ordering; if greater than 0, it becomes available for ordering. Products not included in the list will remain available for ordering using the last positive quantity received from the Partner. To make unlisted products unavailable for ordering, this must be agreed upon with your Yandex manager.

Request

GET

/nomenclature/{placeId}/availability

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

Responses

200 OK

List of products with current stock levels. To make unlisted products unavailable for ordering, this must be agreed upon with Yandex staff. By default, stock levels are not changed if the Partner has not provided a new value for them.

Body

application/json
{
    "items": [
        {
            "id": "some-uniq-identifier",
            "stock": 7.45
        }
    ]
}

Name

Description

items

Type: ItemInArrayAvailability[]

Product quantity in stock.

ItemInArrayAvailability

Name

Description

id*

Type: string

Unique product identifier in the Partner’s system

Example: some-uniq-identifier

Max length: 64

stock*

Type: number<float>

Current product stock in the store. For unit products, the value is passed in pieces: 1, 2, 5. For catch-weight products, the value is passed in kilograms: 0.8, 3.49, 17.25.

Example: 7.45

400 Bad Request

Request error. 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[]

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

Request error. 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.