Helcim Logo Support & Tutorials

© Copyright 2006-2018 Helcim Inc.

All Rights Reserved.

Helcim Commerce API » Inventory »

Update Product Inventory

This API call let's you update the inventory of a specific product. The response is an XML of the inventory update.

Request Fields

Field Name Type Required Description
action String Yes inventoryUpdate
accountId Integer Yes The Helcim Commerce account ID.
apiToken String Yes API token used for authentication and access control. 
productId Integer Yes The product ID.
stockChange Integer Yes The amount of units the inventory is changing by (- for decrease).
note String Yes The description of the inventory change

Response Fields (XML)

Field Name Type Description
message - XML structure
response Integer 1 or 0. Whether the product inventory was updated or not.
responseMessage String Confirmation of completed inventory update


For all API requests, there are also generic API authentication and user access restriction errors.
Response Code Error Code Message Description
 0 Missing Field - Note  Note entry is blank.
0 - Missing Field - Stock Change Stock Change entry is blank.

Code Samples

Sample Inventory Update Response XML

<?xml version="1.0"?>
    <responseMessage>Product Inventory Updated</responseMessage>

HTML Form Sample HTML

<input type="hidden" name="accountId" value="YOUR-ACCOUNT-ID">
<input type="hidden" name="apiToken" value="YOUR-API-TOKEN">
<input type="hidden" name="action" value="inventoryUpdate">
<input type="hidden" name="productId" value="1701232">
<input type="hidden" name="stockChange" value="-5">
<input type="hidden" name="note" value="Subtract 5 units">