Starting from December 31, push API methods will be unavailable. From October 1, they may be unstable.
Debugging
On Yandex. Market, you can test the store and its API on test orders before you start working with real ones. You can emulate the following processes:
- making an order on behalf of the buyer — add items to the cart, choose payment methods and delivery terms;
- cancellation of the order.
Yandex. Market does not charge for such orders. And errors in working with them do not affect the checks and are not used in calculating the quality index.
If you have API notifications enabled
Yandex.Market will send you a request. POST notification with information about events also for test orders.
To go to the debugging interface, click on the name of your business in the lower-left corner of the cabinet and select Debugging → Test orders. From the same page, you can access the debugging information by clicking on the link API log for test orders.
All test orders are received by the store with the value true
the parameter fake
.
Information about test orders and request logs are stored for 30 days.
Access to the debugging interface
To access the debugging interface:
-
In the cabinet in the lower left corner, click on the name of your business and go to the page Modules and APIs.
-
On the tab Receiving requests from Yandex.Market specify the data of the API you want to use for self-verification. These data include:
There is no "Receiving requests from the Market" tab
Write to the support service and select in the cabinet Communication → Support → Create an appeal → Working through the API.
How to debug
1. Create a new order
On the page Debugging → Test orders:
-
Choose Create in your personal account.
-
Add the products to the shopping cart by clicking
close to the right ones.
-
In the block Basket click Check availability.
To DBS stores that have not disabled the method POST cart
, you need to respond to a request for product information POST cart.
2. Send the order
In the third block:
-
Specify the shipping and payment method. Since this is a test order, select payment upon receipt.
The store has just been created
Configured delivery services may not be available. In this case, select the test service.
-
Enter the buyer's test data (address, first and last name, phone number, etc.).
-
Click Send an order.
After that, a notification about the creation of a new order and its number will appear on the page.
In the specified sequence, the store's API will receive test requests:
-
POST cart — request information about products (for DBS stores that have not disabled this method).
-
POST order/accept — transfer of the order and request for acceptance of the order.
-
POST order/status — notification of the order status change to
PROCESSING
and the sub-status onSTARTED
(can be processed).The store will receive notification of a change in the order status only if the store has accepted the order in response to the request.
3. Process the order
Check the log after each request.
If the integration is not configured correctly, you will see errors in the log that need to be fixed. To view the log, click on the name of your business in the lower-left corner of your account and open the page Query log.
-
Send a request GET v2/campaigns/{campaignId}/orders/{orderId} and save the parcel ID (
id
inshipments
) from the response. -
Send a request PUT v2/campaigns/{campaignId}/orders/{orderId}/boxes, where to transmit:
- the received ID.
- information about the distribution of goods from the order by boxes;
- if there are products that are subject to labeling, then the labeling codes for these products.
-
Confirm that you are ready for shipment by sending the status
PROCESSING
with a sub-statusREADY_TO_SHIP
using a request PUT v2/campaigns/{campaignId}/orders/{orderId}/status. -
If in the future you will ship orders to a sorting center or a pick-up point or transfer them to Market couriers from your warehouse, send a request PUT v2/campaigns/{campaignId}/orders/{orderId}/status. Send the status in it
PROCESSING
with a sub-statusSHIPPED
.
4. Cancel the order
Send a request PUT v2/campaigns/{campaignId}/orders/{orderId}/status and send the status CANCELLED
with the reason for cancellation SHOP_FAILED
. A test order can only be cancelled before it is upgraded to the status PROCESSING
with a sub-status:
-
SHIPPED
if in the future you will ship orders to a sorting center or a pick-up point or transfer them to Market couriers from your warehouse; -
READY_TO_SHIP
if your store is connected to express delivery and you will ship orders to couriers Yandex Go.
Check for errors. In the cabinet in the lower left corner, click on the name of your business and open the page Query log — and fix them.
Events for which Yandex.Market sends notifications:
- creating a new order;
- changing the order;
- changing the order status;
- creating a new chat with a customer;
- adding a new chat message;
- the beginning of the dispute;
- ending the dispute;
- creating a new product review;
- creating a new review comment;
- creating an order cancellation request;
- order cancellation;
- creating a new non-purchase or refund;
- changing the non-purchase or refund status.