UpdateItemStatus

Sets the status of a collection of Order Items

  • SellerCenter will ensure that each single Order Item can transition to the requested state.

Request example

Maximum 4000 items per request should be sent

OrderItem Data Structure

Name

Type

Mandatory

Description

Example

idsalesorder_item

int

Yes

Sales Order Item ID

73955

item_status

string, either 'shipped', 'canceled', 'faileddelivery', 'delivered', 'returned' or 'returnshippedbycustomer'

Yes

Event based on status change

shipped

package_status

string

No

The actual status of the package

shipped

cancel_reason

string

Yes, when item_status = 'canceled' (can be omitted for other statuses)

The reason for the cancelation

Cannot fulfil

return_reason

string

Yes, when item_status = 'returned' (can be omitted for other statuses)

The reason for the return

Size did not fit

faileddeliveryreason

string

Yes, when itemstatus = 'faileddelivery' (can be omitted for other statuses)

The reason for the failed delivery

Address not found

shipping_carrier

string

Yes, when item_status = 'shipped' (can be omitted for other statuses)

The shipping provider, used on 'shipped' status

DHL

tracking_code

string

Yes, when item_status = 'shipped' (can be omitted for other statuses)

The tracking number, used on 'shipped' status

123456

statuseventtime

string

No

The time when the order item status change happened, in ISO 8601 format YYYY-MM-DD hh:mm:ss

2015-07-30 18:07:36

{
    "Request": {
        "Items": [
          {
            "id_sales_order_item": "8",
            "item_status": "failed_delivery",
            "failed_delivery_reason": "Cannot find address",
            "status_event_time": "2017-02-11 14:10:55"
          },
          {
            "id_sales_order_item": "12",
            "item_status": "shipped",
            "shipping_carrier": "GDEX",
            "tracking_code": "389292777",
            "status_event_time": "2017-02-11 18:10:55"
          },
          {
            "id_sales_order_item": "22",
            "item_status": "canceled",
            "cancel_reason": "Cannot fulfill",
            "status_event_time": "2017-02-11 23:10:55"
          }       
        ]  
    }
}

Response

Seller Center will process all the items independently. So it is possible that either all the items are successfully updated, some are updated and some failed or the whole call failed with no item updated.

Success response

{
  "SuccessResponse": {
    "Head": {
      "RequestId": "",
      "RequestAction": "UpdateItemStatus",
      "ResponseType": "",
      "Timestamp": "2015-07-02T12:26:03+0200"
    },
    "Body": {}
}

Error response some failed/success Items

Only the failed items are listed inside the items element. Additional an error message is provided. The position refers to the actual request, counting each item, starting with position 0.

Possible error messages

  • E008: Status is not supposed to happen
  • E009: Old status
  • E010: Invalid sale order item
{
  "ErrorResponse": {
    "Head": {
      "RequestAction": "UpdateItemStatus",
      "ErrorType": "Sender",
      "ErrorCode": "0",
      "ErrorMessage": "Some items were not processed"
    },
    "Body": {
        "UpdateItemStatus":
        [
            {
                "ErrorCode: ; ErrorMessage: E009: Old status; Position: 0;",
                "ErrorCode: ; ErrorMessage: E008: Status is not supposed to happen; Position: 2;",
            }
        ]
    }
}

The error response is based on the example request. In this case the first item from the request, position 0, is already in the status "not_delivered" as well as the third item, position 2, cannot be canceled since it is not a valid state machine transition.

Error response

{
  "ErrorResponse": {
    "Head": {
      "RequestAction": "UpdateItemStatus",
      "ErrorType": "Sender",
      "ErrorCode": "7",
      "ErrorMessage": "E007: Login failed. Signature mismatch"
    },
    "Body": ""
}