====== UpdateInventoryRq (Request) ====== The UpdateInventoryRq request allows users to update quantity-on-hand information for items in the Fortune3 database. It can be used to update a single item's inventory or multiple items at the same time within 1 request. ===== Updating Inventory ===== In order to update an item's inventory you will need to provide a SKU (so the system knows which item to update), and a Qty tag for each item. The SKU must already exist in the store's product database and exactly match the string being sent in order for the update to succeed. Proceed as Follows: **Sample Code** (updating inventory for a single item): TWmY6WBft SKW8ssAmDu6xTGDl ABC123 14 ===== Multiple Updates within 1 Request ===== In order to send multiple inventory updates within the same request, simply repeat the node for every item you want to update, as the following sample code shows: TWmY6WBft SKW8ssAmDu6xTGDl ABC123 14 XYZ7 29 ===== The "Operation" Tag ===== The "Operation" XML tag allows users to adjust an item's inventory quantity instead of replacing it. By using the Operation tag, you can request the API to Increase or Decrease the Quantity-On-Hand for an item, rather than replacing the value, as the following sample code shows: TWmY6WBft SKW8ssAmDu6xTGDl ABC123 8 increase XYZ7 3 decrease Please note that if you do not send an "Operation" tag, the quantity will simply be replaced for the new quantity. ^ Tag Name ^ Sub-Tag Of ^ Description ^ Field Type ^ Is Required ^ | Item | UpdateInventoryRq | Each Item's Node | Node | True | | SKU | Item | The SKU of the item to update the inventory for. Must match existing SKU in store. | String | True | | QTY | Item | The New Qty or Adjustment Qty for the item | Integer | True | | Operation | Item | Specifies the type of operation being performed | String \\ Allowed Values: \\ "replace" \\ "increase" \\ "decrease" \\ Default: replace | False - "replace" used if not provided | Next: [[UpdateInventoryRs|Reading the Response (UpdateInventoryRs)]]