PUT products/stocklocationinventory

This call allows you to update the inventory of products by either SKU or ProductID. You can only update a maximum of 50 products at once. If a stock location is supplied that the product is not yet associated with, the product is automatically added to that stock location before the adjustment is applied - there is no need to associate the location with the product first. A stock location identified by ID needs no warehouse. For a stock location reference, the warehouse is taken from the product when the product only exists in one warehouse; otherwise supply Warehouse to say which one is meant, unless the reference is unique across the account.

Request Information

URI Parameters

None.

Body Parameters

The collection of inventory updates you want to perform

Collection of ProductStockLocationInventoryUpdateModel
NameDescriptionTypeAdditional information
ProductIDType The ID that you are using to perform this update ProductIDTypeModel Required
AdjustmentType This type of adjustment that you wish to perform. This can either be absolute or relative. InventoryAdjustmentTypeEnum Required
AdjustmentAmount The amount that you want to adjust by. integer Required
StockLocationID The stock location that you want to apply the inventory update to. Leave null for Unspecified Location StockLocationProductIDTypeModel None.
Reason This is an optional value. This is the reason that you made the adjustment. string None.

Request Formats

application/json, text/json

Sample:
[
  {
    "ProductIDType": {
      "IDType": "SKU",
      "Value": "sku1"
    },
    "AdjustmentType": "RelativeAdjustment",
    "AdjustmentAmount": -1,
    "Reason": "Damaged stock."
  },
  {
    "ProductIDType": {
      "IDType": "ID",
      "Value": "1235"
    },
    "AdjustmentType": "RelativeAdjustment",
    "AdjustmentAmount": 1,
    "Reason": "New stock has come in."
  },
  {
    "ProductIDType": {
      "IDType": "ID",
      "Value": "1236"
    },
    "AdjustmentType": "RelativeAdjustment",
    "AdjustmentAmount": 1,
    "StockLocationID": {
      "IDType": "StockLocationReference",
      "Value": "A-1"
    },
    "Reason": "Found extra item."
  },
  {
    "ProductIDType": {
      "IDType": "ID",
      "Value": "1237"
    },
    "AdjustmentType": "AbsoluteAdjustment",
    "AdjustmentAmount": 1,
    "StockLocationID": {
      "IDType": "ID",
      "Value": "245"
    },
    "Reason": "Found extra item."
  }
]

Response Information

Resource Description

This call allows you to update the inventory of products by either SKU or ProductID. You can only update a maximum of 50 products at once. If a stock location is supplied that the product is not yet associated with, the product is automatically added to that stock location before the adjustment is applied - there is no need to associate the location with the product first. A stock location identified by ID needs no warehouse. For a stock location reference, the warehouse is taken from the product when the product only exists in one warehouse; otherwise supply Warehouse to say which one is meant, unless the reference is unique across the account.

ProductStockLocationInventoryUpdateModelCollectionResponse
NameDescriptionTypeAdditional information
TotalItemsProcessed integer None.
Successful integer None.
Failed integer None.
Responses Collection of ProductInventoryUpdateModelResponse None.

Response Formats

application/json, text/json

Sample:
{
  "TotalItemsProcessed": 2,
  "Successful": 1,
  "Failed": 1,
  "Responses": [
    {
      "Adjustment": {
        "ProductIDType": {
          "IDType": "SKU",
          "Value": "sku1"
        },
        "AdjustmentType": "RelativeAdjustment",
        "AdjustmentAmount": 1
      },
      "Success": false,
      "Error": "Could not find product or you do not have permission to access it."
    },
    {
      "Adjustment": {
        "ProductIDType": {
          "IDType": "ID",
          "Value": "1234"
        },
        "AdjustmentType": "RelativeAdjustment",
        "AdjustmentAmount": 10
      },
      "NewStockLocationInventory": 11,
      "NewProductTotalInventory": 20,
      "Success": true
    }
  ]
}