Changing the statuses of multiple orders
The method is available for models: FBS, Express and DBS.
If you are using an API Key token, one of the accesses in the list is required to call the method
- inventory-and-order-processing — Order processing and inventory
- all-methods — Full account management
Changes the statuses of several orders.
Possible status changes:
- If the store has confirmed and prepared the order for shipment, then the order from the status
"status": "PROCESSING"
and the processing stage"substatus": "STARTED"
it needs to be converted to the status"status": "PROCESSING"
and the processing stage"substatus": "READY_TO_SHIP"
. - If the store has confirmed the order, but cannot fulfill it (for example, the product is listed in the database, but is not in stock or does not have the desired color), then the order status is
"status": "PROCESSING"
and the processing stage"substatus": "STARTED"
it needs to be converted to the status"status": "CANCELLED"
with the reason for the cancellation of the order"substatus": "SHOP_FAILED"
. - If the store has prepared an order for shipment, but cannot complete it (for example, the last item was damaged or defective), then the order status is
"status": "PROCESSING"
and the processing stage"substatus": "READY_TO_SHIP"
it needs to be converted to the status"status": "CANCELLED"
with the reason for the cancellation of the order"substatus": "SHOP_FAILED"
.
, Limit: 100,000 orders per hour |
---|
Request
POST
https://api.partner.market.yandex.ru/campaigns/{campaignId}/orders/status-update
Path parameters
Name |
Description |
campaignId* |
Type: integer<int64> The campaign ID. You can find it using a query GET campaigns or find it in the seller's office on the Market — click on the name of your business and go to the page:
, Do not send the store ID instead, which is indicated in the seller's account on the Market next to the store name and in some reports.
Min value: |
Body
application/json
{
"orders": [
{
"id": 0,
"status": "PLACING",
"substatus": "RESERVATION_EXPIRED"
}
]
}
Name |
Description |
orders* |
Type: OrderStateDTO[] The list of orders. Min items: Max items: |
OrderStateDTO
Order information.
Name |
Description |
id* |
Type: integer<int64> The order ID. |
status* |
Type: OrderStatusType Order status:
Other values may also be returned. They do not need to be processed. Enum: |
substatus |
Type: OrderSubstatusType The stage of order processing (if it has the status
Other values may also be returned. They do not need to be processed. Enum: |
OrderStatusType
Order status:
-
PLACING
— it is being processed, preparing for the reservation. -
RESERVED
— reserved, but under-booked. -
UNPAID
— issued, but not yet paid (if payment is selected at checkout). -
PROCESSING
— it is under processing. -
DELIVERY
— transferred to the delivery service. -
PICKUP
— delivered to the pick-up point. -
DELIVERED
— received by the buyer. -
CANCELLED
— cancelled. -
PENDING
— awaiting processing by the seller. -
PARTIALLY_RETURNED
— partially returned. -
RETURNED
— returned in full. -
UNKNOWN
— unknown status.
Other values may also be returned. They do not need to be processed.
Type |
Description |
Enum: |
OrderSubstatusType
The stage of order processing (if it has the status PROCESSING
) or the reason for the cancellation of the order (if it has the status CANCELLED
).
-
Order values in the status
PROCESSING
:-
STARTED
— the order has been confirmed, and it can be processed. -
READY_TO_SHIP
— the order is collected and ready for shipment.
-
-
Order values in the status
CANCELLED
:-
RESERVATION_EXPIRED
— the customer did not complete the reserved order within 10 minutes. -
USER_NOT_PAID
— the buyer has not paid for the order (for the type of paymentPREPAID
) for 30 minutes. -
USER_UNREACHABLE
— couldn't contact the buyer. To cancel with this reason, the following conditions must be met:- at least 3 calls from 8 to 21 in the buyer's time zone;
- the break between the first and third calls is at least 90 minutes;
- the connection is no shorter than 5 seconds.
If at least one of these conditions is not met (except when the number is unavailable), you will not be able to cancel the order. A response with the error code 400 will be returned.
-
USER_CHANGED_MIND
— the customer cancelled the order for personal reasons. -
USER_REFUSED_DELIVERY
— the buyer was not satisfied with the terms of delivery. -
USER_REFUSED_PRODUCT
— the product did not fit the buyer. -
SHOP_FAILED
— the store cannot complete the order. -
USER_REFUSED_QUALITY
— the buyer was not satisfied with the quality of the product. -
REPLACING_ORDER
— the buyer decided to replace the product with another one on his own initiative. -
PROCESSING_EXPIRED
— the value is no longer used. -
PICKUP_EXPIRED
— the storage period of the order in the PVZ has expired. -
TOO_MANY_DELIVERY_DATE_CHANGES
— the order has been postponed too many times. -
TOO_LONG_DELIVERY
— the order is taking too long to be delivered.
-
-
TECHNICAL_ERROR
— a technical error on the Market's side. Contact support.
Other values may also be returned. They do not need to be processed.
Type |
Description |
Enum: |
Responses
200 OK
Information about updated order statuses is returned.
Body
application/json
{
"status": "OK",
"result": {
"orders": [
{
"id": 0,
"status": "PLACING",
"substatus": "RESERVATION_EXPIRED",
"updateStatus": "OK",
"errorDetails": "string"
}
]
}
}
Name |
Description |
result |
Type: UpdateOrderStatusesDTO The list of orders whose status has been updated. |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
UpdateOrderStatusesDTO
The list of orders whose status has been updated.
Name |
Description |
orders* |
Type: UpdateOrderStatusDTO[] A list with updated orders. |
ApiResponseStatusType
The type of response. Possible values:
OK
— there are no mistakes.ERROR
— an error occurred while processing the request.
Type |
Description |
Enum: |
UpdateOrderStatusDTO
The list of orders.
Name |
Description |
errorDetails |
Type: string Error when changing the order status. It contains a description of the error and the order ID. Returned if the parameter |
id |
Type: integer<int64> The order ID. |
status |
Type: OrderStatusType Order status:
Other values may also be returned. They do not need to be processed. Enum: |
substatus |
Type: OrderSubstatusType The stage of order processing (if it has the status
Other values may also be returned. They do not need to be processed. Enum: |
updateStatus |
Type: OrderUpdateStatusType Update status. Enum: |
OrderUpdateStatusType
Has the order status changed:
-
OK
— the status has been changed. -
ERROR
— the status has not been changed. In this case, an error message will appear in the parametererrorDetails
.
Type |
Description |
Enum: |
400 Bad Request
The request contains incorrect data. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
ApiErrorDTO
The general error format.
Name |
Description |
code* |
Type: string The error code. |
message |
Type: string Description of the error. |
401 Unauthorized
The authorization data is not specified in the request. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
403 Forbidden
The authorization data is incorrect or access to the resource is prohibited. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
404 Not Found
The requested resource was not found. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
420 Method Failure
The resource access limit has been exceeded. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
500 Internal Server Error
Internal error of Yandex. Market. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
No longer supported, please use an alternative and newer version.