Working with the LaaS order

With the help Yandex Market API You can receive, create, modify, and cancel orders.

Create an order

  1. For pickup: if necessary, call the method POST v1/businesses/{businessId}/logistics-points, which returns a list of Market order pickups.

    Request this information regularly to keep up-to-date data in the store's system. For example, once a day.

  2. Check the remaining stocks — method POST v2/campaigns/{campaignId}/offers/stocks.

    The response will also return the IDs of the warehouses where the goods are stored.

  3. Get the available shipping options. To do this, in the method POST v1/campaigns/{campaignId}/delivery-options provide all the items in the order and information for courier delivery or pickup.

    If necessary, also provide the IDs of the warehouses from which you want to pick up the goods. If this is not done, the Market will select the warehouses itself.

  4. Create an order using the method POST v1/campaigns/{campaignId}/orders/create. For delivery by courier, provide the full address, including the region.

    Parameter value draft:

    • true — Yandex.Market will create an order with the status RESERVED and it will wait for confirmation from the store.
    • false — Yandex.Market will create an order with the status PROCESSING with a sub-status STARTED and it will start processing it, no confirmation is required.
  5. If the order is in the status RESERVED and you are ready to confirm it, please send the status PROCESSING with a sub-status STARTED in the method PUT v2/campaigns/{campaignId}/orders/{orderId}/status. If you do not do this within an hour after creating the order, yandex.Market will cancel the order.

    The operation ID will be returned in the response.

  6. Check the operation status using the method POST v1/businesses/{businessId}/operations.

Change the order

You can change:

  • recipient's details;
  • the courier delivery date interval.
  1. To change the date interval of courier delivery: Get the available time intervals using the method POST v1/campaigns/{campaignId}/orders/update-options.

  2. Start the operation to change the order. To do this, specify the order ID and the new data in the method POST v1/campaigns/{campaignId}/orders/update.

    Transmit only the information that you want to change. If necessary, you can edit both the recipient's data and the courier delivery date interval at the same time.

  3. Check the operation status using the method POST v1/businesses/{businessId}/operations.

Cancel the order

  1. Start the order cancellation operation. To do this, send the status CANCELLED with the reason for cancellation SHOP_FAILED in the method:

    Do not transmit other statuses.

  2. Check the operation status — method POST v1/businesses/{businessId}/operations.

  3. If necessary, check the order status: use the method POST v1/businesses/{businessId}/orders with a filter orderIds.