更改订单的状态
如果您使用API-Key令牌,调用该方法时需要具备列表中可用权限之一
- inventory-and-order-processing — 订单处理和商品核算
- all-methods — 全面管理账户
更改订单状态。 可能的状态更改:
- 如果商店已确认并准备装运订单,则订单从状态
"status": "PROCESSING"和处理阶段"substatus": "STARTED"它需要转换为状态"status": "PROCESSING"和处理阶段"substatus": "READY_TO_SHIP". - 如果商店已确认订单,但无法履行订单(例如,产品在数据库中列出,但没有库存或没有所需的颜色),则订单状态为
"status": "PROCESSING"和处理阶段"substatus": "STARTED"它需要转换为状态"status": "CANCELLED"与取消订单的原因"substatus": "SHOP_FAILED". - 如果商店已准备装运订单,但无法完成订单(例如,最后一件商品已损坏或有缺陷),则订单状态为
"status": "PROCESSING"和处理阶段"substatus": "READY_TO_SHIP"它需要转换为状态"status": "CANCELLED"与取消订单的原因"substatus": "SHOP_FAILED".
| ⚙️ 限制: 每小时100,000次请求 |
|---|
Request
PUT
https://api.partner.market.yandex.ru/v2/campaigns/{campaignId}/orders/{orderId}/status
Path parameters
|
Name |
Description |
|
campaignId* |
Type: integer<int64> 活动ID。 您可以使用查询找到它 GET v2/campaigns 或者在市场上的卖家办公室找到 — 点击您的帐户图标→ 设置 在左边的菜单中,选择 Api和模块:
⚠️ 不要发送商店ID,这是在市场上的卖家帐户旁边的商店名称和一些报告。
Min value: |
|
orderId* |
Type: integer<int64> 的订单ID。 |
Body
application/json
{
"order": {
"status": "PLACING",
"substatus": "RESERVATION_EXPIRED",
"delivery": {
"dates": {
"realDeliveryDate": "string"
}
}
}
}
|
Name |
Description |
||||||||||
|
order* |
Type: object
秩序。 |
Responses
200 OK
如果订单状态更改成功,则返回更新后的订单信息。
Body
application/json
{
"order": {
"id": 0,
"externalOrderId": "string",
"status": "PLACING",
"substatus": "RESERVATION_EXPIRED",
"creationDate": "23-09-2022 09:12:41",
"updatedAt": "23-09-2022 09:12:41",
"currency": "RUR",
"itemsTotal": 0,
"deliveryTotal": 0,
"buyerItemsTotal": 0,
"buyerTotal": 0,
"buyerItemsTotalBeforeDiscount": 0,
"buyerTotalBeforeDiscount": 0,
"paymentType": "PREPAID",
"paymentMethod": "CASH_ON_DELIVERY",
"fake": false,
"items": [
{
"id": 0,
"offerId": "string",
"offerName": "string",
"price": 0,
"buyerPrice": 0,
"buyerPriceBeforeDiscount": 0,
"priceBeforeDiscount": 0,
"count": 0,
"vat": "NO_VAT",
"shopSku": "string",
"subsidy": 0,
"partnerWarehouseId": "string",
"promos": [
{
"type": "DIRECT_DISCOUNT",
"discount": 0,
"subsidy": 0,
"shopPromoId": "string",
"marketPromoId": "string"
}
],
"instances": [
{
"cis": "string",
"cisFull": "string",
"uin": "string",
"rnpt": "string",
"gtd": "string",
"countryCode": "RU"
}
],
"details": [
{
"itemCount": 0,
"itemStatus": "REJECTED",
"updateDate": "23-09-2022"
}
],
"subsidies": [
{
"type": "YANDEX_CASHBACK",
"amount": 0
}
],
"requiredInstanceTypes": [
"CIS"
],
"tags": [
"ULTIMA"
]
}
],
"subsidies": [
{
"type": "YANDEX_CASHBACK",
"amount": 0
}
],
"delivery": {
"id": "string",
"type": "DELIVERY",
"serviceName": "string",
"price": 0,
"deliveryPartnerType": "SHOP",
"courier": {
"fullName": "string",
"phone": "string",
"phoneExtension": "string",
"vehicleNumber": "string",
"vehicleDescription": "string"
},
"dates": {
"fromDate": "23-09-2022",
"toDate": "23-09-2022",
"fromTime": "string",
"toTime": "string",
"realDeliveryDate": "23-09-2022"
},
"region": {
"id": 0,
"name": "string",
"type": "OTHER"
},
"address": {
"country": "string",
"postcode": "string",
"city": "string",
"district": "string",
"subway": "string",
"street": "string",
"house": "string",
"estate": "string",
"block": "string",
"building": "string",
"entrance": "string",
"entryphone": "string",
"floor": "string",
"apartment": "string",
"phone": "string",
"recipient": "string",
"gps": {
"latitude": 0,
"longitude": 0
}
},
"vat": "NO_VAT",
"deliveryServiceId": 0,
"logisticPointId": 0,
"liftType": "NOT_NEEDED",
"liftPrice": 0,
"outletCode": "string",
"outletStorageLimitDate": "23-09-2022",
"dispatchType": "UNKNOWN",
"tracks": [
{
"trackCode": "string",
"deliveryServiceId": 0
}
],
"shipments": [
{
"id": 0,
"shipmentDate": "23-09-2022",
"shipmentTime": "string",
"tracks": [
{
"trackCode": "string",
"deliveryServiceId": 0
}
],
"boxes": [
{
"id": 0,
"fulfilmentId": "string"
}
]
}
],
"estimated": false,
"eacType": "MERCHANT_TO_COURIER",
"eacCode": "string"
},
"buyer": {
"id": "string",
"lastName": "string",
"firstName": "string",
"middleName": "string",
"type": "PERSON"
},
"notes": "string",
"taxSystem": "OSN",
"cancelRequested": false,
"expiryDate": "23-09-2022 09:12:41"
},
"operation": {
"id": "string",
"type": "ORDER_RECIPIENT_UPDATE"
}
}
|
Name |
Description |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
operation |
Type: object
操作的信息。 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
order |
Type: object
秩序。 |
400 Bad Request
请求包含不正确的数据。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
|
Name |
Description |
|
errors |
Type: object[] 错误列表。 Min items: |
|
status |
Type: string 响应的类型。 可能的值:
Enum: |
401 Unauthorized
请求中未指定授权数据。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
|
Name |
Description |
|
errors |
Type: object[] 错误列表。 Min items: |
|
status |
Type: string 响应的类型。 可能的值:
Enum: |
403 Forbidden
授权数据不正确或禁止访问资源。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
|
Name |
Description |
|
errors |
Type: object[] 错误列表。 Min items: |
|
status |
Type: string 响应的类型。 可能的值:
Enum: |
404 Not Found
找不到请求的资源。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
|
Name |
Description |
|
errors |
Type: object[] 错误列表。 Min items: |
|
status |
Type: string 响应的类型。 可能的值:
Enum: |
420 Method Failure
已超出资源访问限制。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
|
Name |
Description |
|
errors |
Type: object[] 错误列表。 Min items: |
|
status |
Type: string 响应的类型。 可能的值:
Enum: |
500 Internal Server Error
市场的内部错误。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
|
Name |
Description |
|
errors |
Type: object[] 错误列表。 Min items: |
|
status |
Type: string 响应的类型。 可能的值:
Enum: |
No longer supported, please use an alternative and newer version.