Starting from December 31, push API methods will be unavailable. From October 1, they may be unstable.
To receive information about new orders, enable API notifications. How to do it
Transfer of the order and request for acceptance of the order
Submits a new order to the store and requests confirmation of order acceptance.
To cancel an order, use a request PUT v2/campaigns/{campaignId}/orders/{orderId}/status.
The request can be executed more than once
This is possible when responding to a request from the Market POST order/accept The store confirmed acceptance of the order, however, due to a technical glitch, the store's response was not recorded by the Market. Since it is not known whether the order acceptance request has reached the store or not, the Market can repeat this request. A response is expected from the store confirming the acceptance of this order.
When a new order appears, the Market sends you a request. If you do not respond to it within 10 seconds, the Market will start repeating the request. The first 3 times — Every minute after that — every 10 minutes.
If you do not respond to four repeated requests, the Market will shut down the store and your products will disappear from the showcase. To connect again, correctly respond to all real or verification Market requests for order creation. — acceptance or cancellation. After that, your products will be returned to the showcase automatically.
- Features of transferring data for orders to the Market pick-up point (DBS)
-
If the customer has chosen to deliver the order to a branded Market pick-up point, the request will be received without the parameter
outlet. Type of deliverytypecorresponds to the valuePICKUP. The address and date of delivery to the pick-up point will be shown in the elementsaddressanddates.For more information about delivery to the Market pick-up point, see in the Help of the Market for sellers.
Example
For ease of reading, the sample code is provided in an abbreviated format.
{ ... "delivery": { "type": "PICKUP", "dispatchType": "MARKET_BRANDED_OUTLET", "deliveryPartnerType": "SHOP", "deliveryServiceId": 99, "price": 1200, "serviceName": "СПСР", "liftType": "NOT_NEEDED", "liftPrice": 0, "vat": "VAT_20", "dates": { "fromDate": "15-02-2022", "toDate": "15-02-2022", "fromTime": "10:00", "toTime": "21:00" } }, ... }
Request
POST
/order/accept
Body
application/json
{
"order": {
"businessId": 0,
"id": 0,
"status": "PLACING",
"substatus": "RESERVATION_EXPIRED",
"creationDate": "23-09-2022 09:12:41",
"currency": "RUR",
"itemsTotal": 0,
"total": 0,
"deliveryTotal": 0,
"subsidyTotal": 0,
"totalWithSubsidy": 0,
"subsidies": [
{
"type": "YANDEX_CASHBACK",
"amount": 0
}
],
"buyerItemsTotal": 0,
"buyerTotal": 0,
"buyerItemsTotalBeforeDiscount": 0,
"buyerTotalBeforeDiscount": 0,
"paymentType": "PREPAID",
"paymentMethod": "SHOP_PREPAID",
"fake": false,
"shopOrderId": "string",
"items": [
{
"id": 0,
"feedId": 0,
"offerId": "string",
"feedCategoryId": "string",
"offerName": "string",
"fulfilmentShopId": 0,
"price": 0,
"buyerPrice": 0,
"buyerPriceBeforeDiscount": 0,
"priceBeforeDiscount": 0,
"count": 0,
"delivery": false,
"vat": "NO_VAT",
"shopSku": "string",
"sku": "string",
"subsidy": 0,
"subsidies": [
{
"type": "YANDEX_CASHBACK",
"amount": 0
}
],
"warehouseId": 0,
"partnerWarehouseId": "string",
"params": "string",
"promos": [
{
"type": "DIRECT_DISCOUNT",
"subsidy": 0,
"marketPromoId": "string"
}
],
"instances": [
{
"cis": "string",
"cisFull": "string",
"uin": "string",
"rnpt": "string",
"gtd": "string",
"countryCode": "RU"
}
],
"tags": [
"ULTIMA"
]
}
],
"notes": "string",
"taxSystem": "OSN",
"expiryDate": "23-09-2022",
"electronicAcceptanceCertificateCode": "string",
"tags": [
"ULTIMA"
],
"buyer": {
"type": "PERSON"
},
"delivery": {
"shopDeliveryId": "string",
"type": "DELIVERY",
"serviceName": "string",
"price": 0,
"subsidy": 0,
"deliveryPartnerType": "SHOP",
"dates": {
"fromDate": "23-09-2022",
"toDate": "23-09-2022",
"fromTime": "string",
"toTime": "string",
"realDeliveryDate": "23-09-2022"
},
"region": {
"id": 0,
"name": "string",
"type": "OTHER"
},
"vat": "NO_VAT",
"deliveryServiceId": 0,
"liftType": "NOT_NEEDED",
"liftPrice": 0,
"outlet": {
"code": "string"
},
"dispatchType": "UNKNOWN",
"shipments": [
{
"id": 0,
"status": "NEW",
"shipmentDate": "23-09-2022",
"shipmentTime": "string",
"weight": 0,
"width": 0,
"height": 0,
"depth": 0,
"boxes": [
{
"id": 0,
"weight": 0,
"width": 0,
"height": 0,
"depth": 0,
"items": [
{
"id": 0,
"count": 0
}
]
}
]
}
],
"estimated": false,
"eacType": "MERCHANT_TO_COURIER",
"address": {
"country": "string",
"postcode": "string",
"city": "string",
"district": "string",
"subway": "string",
"street": "string",
"house": "string",
"block": "string",
"entrance": "string",
"entryphone": "string",
"floor": "string",
"apartment": "string",
"lat": 0,
"lon": 0,
"notes": "string",
"outletPhones": [
"string"
],
"schedule": [
{
"fromDay": "MONDAY",
"toDay": "MONDAY",
"fromTime": "string",
"toTime": "string"
}
]
}
}
}
}
|
Name |
Description |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
order* |
Type: object
Order. |
Responses
200 OK
The store's response about accepting the order.
Body
application/json
{
"order": {
"id": "string",
"shipmentDate": "23-09-2022"
}
}
|
Name |
Description |
||||
|
order |
Type: object
|
400 Bad Request
If the store considers the request received from Yandex. Market to be incorrect, the store must return the response status 400 with a description of the reason for the error in the response body. Such responses will be analyzed for API violations and flaws on the part of the Market.
500 Internal Server Error
In case of a technical error on the store's side, it should return the response status 500. Stores with a large number of such responses may be disconnected from the Market.
No longer supported, please use an alternative and newer version.