Ongoing Warehouse logo

Ongoing Warehouse Developer

SetLocationNumberOfItems

This function allows you set the number of items in stock on a certain location for an article.

Tags: SetLocationNumberOfItems, Operation, SetLocationNumberOfItemsResult, SetLocationNumberOfItemsError

Request XML

POST /xxx/automation.asmx HTTP/1.1
Host: api.ongoingsystems.se
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://ongoingsystems.se/Automation/SetLocationNumberOfItems"

<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <SetLocationNumberOfItems xmlns="http://ongoingsystems.se/Automation">
            <UserName>string</UserName>
            <Password>string</Password>
            <Operation>
                <InventoryNumber>string</InventoryNumber>
                <AllowIncreasingNumberOfItems>boolean</AllowIncreasingNumberOfItems>
                <Location>string</Location>
                <LocationNumberOfItems>decimal</LocationNumberOfItems>
                <ArticleDefId>int</ArticleDefId>
            </Operation>
        </SetLocationNumberOfItems>
    </soap:Body>
</soap:Envelope>
+

Request specification

SetLocationNumberOfItems
UserName str(50) Req. Your username
Password str(50) Req. Your password
Operation object Req. An element of type Operation.
Operation
InventoryNumber str(50) Optional Custom identifier for this adjustment.
AllowIncreasingNumberOfItems bool Optional Set to false to avoid increasing stock balance. The value will be true as default.
Location str(50) Req. The location to adjust stock balance on.
LocationNumberOfItems decimal Req. The value to set the stock balance of the specified article and location to.
ArticleDefId int Req. The article id of the article for which to adjust stock balance.

Response XML

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <SetLocationNumberOfItemsResponse xmlns="http://ongoingsystems.se/Automation">
            <SetLocationNumberOfItemsResult>
                <SetLocationNumberOfItemsErrors>
                    <SetLocationNumberOfItemsError>
                        <Message>string</Message>
                        <ErrorType>UnknownError or LogonError or LocationNotFound or InventoryNumberAlreadyExists or ArticleNotFound or ErrorSavingInventory or BelowZeroTransaction or ArticleIsDeleted or GoodsOwnerIsDeleted or LocationNumberOfItemsWouldBeIncreased</ErrorType>
                    </SetLocationNumberOfItemsError>
                    <SetLocationNumberOfItemsError>
                        <Message>string</Message>
                        <ErrorType>UnknownError or LogonError or LocationNotFound or InventoryNumberAlreadyExists or ArticleNotFound or ErrorSavingInventory or BelowZeroTransaction or ArticleIsDeleted or GoodsOwnerIsDeleted or LocationNumberOfItemsWouldBeIncreased</ErrorType>
                    </SetLocationNumberOfItemsError>
                </SetLocationNumberOfItemsErrors>
                <Success>boolean</Success>
            </SetLocationNumberOfItemsResult>
        </SetLocationNumberOfItemsResponse>
    </soap:Body>
</soap:Envelope>
+

Response specification

SetLocationNumberOfItemsResult
SetLocationNumberOfItemsErrors object A list of SetLocationNumberOfItemsError objects
Success bool True if successful, false otherwise.
SetLocationNumberOfItemsError
Message str(*) Message explaining the error.
ErrorType string The type of error: - UnknownError - LogonError - LocationNotFound - InventoryNumberAlreadyExists - BelowZeroTransaction - ArticleNotFound - ErrorSavingInventory - ArticleIsDeleted - LocationNumberOfItemsWouldBeIncreased - GoodsOwnerIsDeleted