Starting from December 31, push API methods will be unavailable. From October 1, they may be unstable.
Request method
Requests from Yandex.Market are transmitted over HTTPS in the following format:
<method_type> https://<host>/<path_to_market_api>/<resource>
where:
-
<method_type>― depends on the resource. -
<host>― the store's domain name. -
<path_to_market_api>― the path to Yandex Market API on your server; -
<resource>― the name of the resource that the action is being performed on.
With each request, the Market transmits authorization token through URL-parameter or HTTP header.
If an error occurs, the store must stop processing the request and return an error message. The list of errors and their descriptions are given in the section Error messages.
URL-address
Stores are recommended to specify the base URL For example: https://shop.ru/market/api. For such an example, request POST order/accept will come to URL https://shop.ru/market/api/order/accept.
It is recommended that online stores specify various URL for different stores, and in such a way that by URL it was possible to determine which store the call was going to, for example:
-
https://shop-network.ru/market/api/Moscow; -
https://shop-network.ru/market/api/Ekaterinburg; -
https://shop-network.ru/market/api/St-Petersburg.
This distinction helps to correctly implement the API logic within the store network.
Timeout
When contacting the store, the Market uses timeouts to connect and receive a response. If the store does not have time to respond to the request within the specified timeout, the Market will credit the store with an erroneous response. The connection timeout is 1 second, and the response timeout depends on the resource and is indicated on the corresponding resource page.