UpdateInventoryStatus

API call used to receive information about OMS product statuses defined by WMS Inventory State Machine.

Currently supported statuses:

  • written-off
  • seller-promise-approved

During processing of this information, Lost or Damaged transactions are generated.

Request

Request example

{
  "Request": {
    "Inventory": [
      {
        "sku": "example-sku-123",
        "status": "written-off",
        "id_sales_order_item": 123456789,
        "uid": "123-A-321"
      }
    ]  
  }
}

Request description

Parameter

Type

Mandatory

Description

sku

String

Yes

SKU of listed catalog product

status

String, either 'written-off', 'seller-promise-approved'

Yes

Status of product in OMS Inventory State Machine

idsalesorder_item

Integer

No

ID of the order item, if product is part of the order

uid

String

Yes

Unique identifier of single product in Warehouse

Technical note

id_sales_order_item field represents sales_order_item.src_id field in SellerCenter database. sku field represents catalog_product.sku field in SellerCenter database.

Response

SellerCenter will process all the items independently, making possible that either all the items are successfully updated / some are failed / the whole call fails with no item updated.

Success response

{
  "SuccessResponse": {
    "Head": {
      "RequestId": "",
      "RequestAction": "UpdateInventoryStatus",
      "ResponseType": "",
      "Timestamp": "2016-03-18T12:26:03+0200"
    },
    "Body": {}
  }
}

Error response some failed Items

Only the failed items are listed inside the Items element, along with an error message and code for each one. The position of the item inside the request collection of items is marked with "Position".

{
  "ErrorResponse": {
    "Head": {
      "RequestAction": "UpdateInventoryStatus",
      "ErrorType": "Sender",
      "ErrorCode": "0",
      "ErrorMessage": "Some elements were not processed"
    },
    "Body": {
      "UpdateInventoryStatus": [
        {
          "ErrorCode": null,
          "ErrorMessage": "SKU was not found.",
          "Position": 2
        }
      ]
    }
  }
}

In previous example, the failing item is the one sent in “position 2”, so the third item of the request.

Error response

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