从12月31日开始,push API方法将不可用。 从10月1日开始,它们可能不稳定。
要接收有关新订单的信息,请启用API通知。 怎么做
订单的转让和接受订单的请求
向商店提交新订单并请求确认订单接受。
要取消订单,请使用请求 PUT v2/campaigns/{campaignId}/orders/{orderId}/status.
请求可以执行多次
当响应市场的要求时,这是可能的 POST order/accept 该商店确认接受该订单,但由于技术故障,该商店的回应未被市场记录。 由于不知道订单接受请求是否已到达商店,市场可以重复此请求。 预计商店将回复确认接受此订单。
当新订单出现时,市场会向您发送请求。 如果您在10秒内没有回复,市场将开始重复请求。 前3次 — 之后的每一分钟 — 每10分钟一班。
如果您没有回应四个重复的请求,市场将关闭商店,您的产品将从展柜中消失。 要再次连接,请正确响应所有真实或验证市场请求以创建订单。 — 接受或取消。 之后,您的产品将自动返回到展示柜。
- 将订单数据传输到市场提货点的功能(DBS)
-
如果客户选择将订单交付到品牌市场提货点,则将在没有参数的情况下收到请求
outlet. 交付类型类型对应的值PICKUP. 送货地点的地址和日期将显示在元素中address和dates.有关送货到市场提货点的更多信息,请参阅 在市场对卖家的帮助.
例子:
为便于阅读,示例代码以缩写格式提供。
{ ... "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
秩序。 |
Responses
200 OK
商店关于接受订单的回应。
Body
application/json
{
"order": {
"id": "string",
"shipmentDate": "23-09-2022"
}
}
|
Name |
Description |
||||
|
order |
Type: object
|
400 Bad Request
如果商店考虑从Yandex收到的请求。 如果不正确,商店必须返回响应状态400,其中包含响应正文中错误原因的描述。 这些回应将被分析为API违规和市场上的缺陷。
500 Internal Server Error
如果商店一侧出现技术错误,它应该返回响应状态500。 具有大量此类响应的商店可能与市场脱节。
No longer supported, please use an alternative and newer version.