❗️ 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 |
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: Max length: |
|
stock* |
Type: number<float> Current product stock in the store. For unit products, the value is passed in pieces: Example: |
400 Bad Request
Request error. The response is expected to contain an array with an object from the error list.
ErrorItem
|
Name |
Description |
|
code* |
Type: integer Numeric error code agreed with Yango Deli. Example: |
|
description* |
Type: string Error description Example: |
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: |
404 Not Found
Request error. The response is expected to contain an array with an object from the error list.
500 Internal Server Error
Internal server errors. The response is expected to contain an array with an object from the error list.
No longer supported, please use an alternative and newer version.