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.

How to work with notifications

To go to the debugging interface, click on the name of your business in the lower-left corner of the cabinet and select DebuggingTest 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:

  1. In the cabinet in the lower left corner, click on the name of your business and go to the page Modules and APIs.

  2. 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 CommunicationSupportCreate an appealWorking through the API.

How to debug

1. Create a new order

On the page DebuggingTest orders:

  1. Choose Create in your personal account.

  2. Add the products to the shopping cart by clicking close to the right ones.

  3. 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:

  1. 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.

  2. Enter the buyer's test data (address, first and last name, phone number, etc.).

  3. 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:

  1. POST cart — request information about products (for DBS stores that have not disabled this method).

  2. POST order/accept — transfer of the order and request for acceptance of the order.

  3. POST order/status — notification of the order status change to PROCESSING and the sub-status on STARTED (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.

  1. Send a request GET v2/campaigns/{campaignId}/orders/{orderId} and save the parcel ID (id in shipments) from the response.

  2. 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.
  3. Confirm that you are ready for shipment by sending the status PROCESSING with a sub-status READY_TO_SHIP using a request PUT v2/campaigns/{campaignId}/orders/{orderId}/status.

  4. 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-status SHIPPED.

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.