Ongoing Warehouse logo

Ongoing Warehouse Developer

GetInventory

This function returns two things:

If you are only interested in some specific article numbers, you can use GetInventoryByQuery instead. That function allows you to apply a filter, so that you only receive that data for the articles you are interested in.

See also our article Stock balances and inventory for more information on how to interpret the stock balance numbers returned by this function.

Tags: GetInventory, GetInventoryResult, InventoryLine, Article, DangerousGoods

Request XML

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

<?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>
      <GetInventory xmlns="http://ongoingsystems.se/WSI">
         <GoodsOwnerId>int</GoodsOwnerId>
         <UserName>string</UserName>
         <Password>string</Password>
      </GetInventory>
   </soap:Body>
</soap:Envelope>
+

Request specification

GetInventory
GoodsOwnerId int Req. The id of your client
UserName str(50) Req. Your username
Password str(50) Req. Your password

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>
      <GetInventoryResponse xmlns="http://ongoingsystems.se/WSI">
         <GetInventoryResult>
            <InventoryLines>
               <InventoryLine>
                  <Article>
                     <SystemId>int</SystemId>
                     <Name>string</Name>
                     <ArticleNumber>string</ArticleNumber>
                     <ProductCode>string</ProductCode>
                     <BarCode>string</BarCode>
                     <Description>string</Description>
                     <SupplierArticleNumber>string</SupplierArticleNumber>
                     <StatisticsNumber>string</StatisticsNumber>
                     <ArticleGroupName>string</ArticleGroupName>
                     <ArticleGroupCode>string</ArticleGroupCode>
                     <MainSupplierName>string</MainSupplierName>
                     <MainSupplierNumber>string</MainSupplierNumber>
                     <ArticleCategoryName>string</ArticleCategoryName>
                     <ArticleCategoryCode>string</ArticleCategoryCode>
                     <CountryOfOriginCode>string</CountryOfOriginCode>
                     <IsStockArticle>boolean</IsStockArticle>
                     <ArticleUnitCode>string</ArticleUnitCode>
                     <VatCode>string</VatCode>
                     <VatPercent>decimal</VatPercent>
                     <Length>decimal</Length>
                     <Width>decimal</Width>
                     <Height>decimal</Height>
                     <Price>decimal</Price>
                     <CustomerPrice>decimal</CustomerPrice>
                     <PurchasePrice>decimal</PurchasePrice>
                     <Weight>decimal</Weight>
                     <NetWeight>decimal</NetWeight>
                     <Volume>decimal</Volume>
                     <QuantityPerPallet>int</QuantityPerPallet>
                     <QuantityPerPackage>int</QuantityPerPackage>
                     <DangerousGoods>
                        <UNNumber>string</UNNumber>
                        <UNIsMarineHazard>boolean</UNIsMarineHazard>
                        <UNIsDangerousGoods>boolean</UNIsDangerousGoods>
                        <UNPackageType>I or II or III or Unknown</UNPackageType>
                        <UNTunnelCodes>
                           <UNTunnelCode>A or B or C or D or E</UNTunnelCode>
                           <UNTunnelCode>A or B or C or D or E</UNTunnelCode>
                        </UNTunnelCodes>
                        <UNClassNumber>string</UNClassNumber>
                        <UNProperShippingName>
                           <Name>string</Name>
                           <LanguageCode>string</LanguageCode>
                        </UNProperShippingName>
                        <UNProperShippingName>
                           <Name>string</Name>
                           <LanguageCode>string</LanguageCode>
                        </UNProperShippingName>
                        <UNLabelNumbers>string</UNLabelNumbers>
                        <DangerousGoodsCoefficient>decimal</DangerousGoodsCoefficient>
                     </DangerousGoods>
                     <DangerousGoods>
                        <UNNumber>string</UNNumber>
                        <UNIsMarineHazard>boolean</UNIsMarineHazard>
                        <UNIsDangerousGoods>boolean</UNIsDangerousGoods>
                        <UNPackageType>I or II or III or Unknown</UNPackageType>
                        <UNTunnelCodes>
                           <UNTunnelCode>A or B or C or D or E</UNTunnelCode>
                           <UNTunnelCode>A or B or C or D or E</UNTunnelCode>
                        </UNTunnelCodes>
                        <UNClassNumber>string</UNClassNumber>
                        <UNProperShippingName>
                           <Name>string</Name>
                           <LanguageCode>string</LanguageCode>
                        </UNProperShippingName>
                        <UNProperShippingName>
                           <Name>string</Name>
                           <LanguageCode>string</LanguageCode>
                        </UNProperShippingName>
                        <UNLabelNumbers>string</UNLabelNumbers>
                        <DangerousGoodsCoefficient>decimal</DangerousGoodsCoefficient>
                     </DangerousGoods>
                     <TaricNumbers>
                        <TaricNumber>
                           <CountryCode></CountryCode>
                           <TaricNumber>string</TaricNumber>
                        </TaricNumber>
                        <TaricNumber>
                           <CountryCode></CountryCode>
                           <TaricNumber>string</TaricNumber>
                        </TaricNumber>
                     </TaricNumbers>
                     <PurchaseCurrencyCode>string</PurchaseCurrencyCode>
                     <PurchaseCurrencyName>string</PurchaseCurrencyName>
                     <ExternalNumberOfItems>decimal</ExternalNumberOfItems>
                     <BarCodePackage>string</BarCodePackage>
                     <BarCodePallet>string</BarCodePallet>
                     <SizeCode>string</SizeCode>
                     <SizeName>string</SizeName>
                  </Article>
                  <NumberOfBookedItems>int</NumberOfBookedItems>
                  <NumberOfItems>int</NumberOfItems>
                  <NumberOfLockedItems>decimal</NumberOfLockedItems>
                  <LastInDate>dateTime</LastInDate>
                  <ToReceiveNumberOfItems>decimal</ToReceiveNumberOfItems>
                  <AllocatedNumberOfItems>decimal</AllocatedNumberOfItems>
                  <LockedForSaleNumberOfItems>decimal</LockedForSaleNumberOfItems>
                  <NumberOfItemsDecimal>decimal</NumberOfItemsDecimal>
                  <NumberOfBookedItemsDecimal>decimal</NumberOfBookedItemsDecimal>
                  <PickedToBeCollectedNumberOfItems>decimal</PickedToBeCollectedNumberOfItems>
                  <ReceivedToBeFinishedNumberOfItems>decimal</ReceivedToBeFinishedNumberOfItems>
               </InventoryLine>
               <InventoryLine>
                  <Article xsi:nil="true" />
                  <NumberOfBookedItems>int</NumberOfBookedItems>
                  <NumberOfItems>int</NumberOfItems>
                  <NumberOfLockedItems>decimal</NumberOfLockedItems>
                  <LastInDate>dateTime</LastInDate>
                  <ToReceiveNumberOfItems>decimal</ToReceiveNumberOfItems>
                  <AllocatedNumberOfItems>decimal</AllocatedNumberOfItems>
                  <LockedForSaleNumberOfItems>decimal</LockedForSaleNumberOfItems>
                  <NumberOfItemsDecimal>decimal</NumberOfItemsDecimal>
                  <NumberOfBookedItemsDecimal>decimal</NumberOfBookedItemsDecimal>
                  <PickedToBeCollectedNumberOfItems>decimal</PickedToBeCollectedNumberOfItems>
                  <ReceivedToBeFinishedNumberOfItems>decimal</ReceivedToBeFinishedNumberOfItems>
               </InventoryLine>
            </InventoryLines>
            <GoodsOwnerId>int</GoodsOwnerId>
         </GetInventoryResult>
      </GetInventoryResponse>
   </soap:Body>
</soap:Envelope>
+

Response specification

GetInventoryResult
InventoryLines object Containing elements of InventoryLine
GoodsOwnerId int System id of the goods owner
InventoryLine
Article object Defines the article
NumberOfBookedItems int Number of items booked. Deprecated, use NumberOfBookedItemsDecimal
NumberOfItems int Number of items in stock. Deprecated, use NumberOfItemsDecimal
NumberOfLockedItems dec Number of items in stock but locked.
LastInDate datetime Last inbound date of the article.
ToReceiveNumberOfItems dec Number of items in purchase orders but not yet received.
AllocatedNumberOfItems dec Number of items allocated to orders.
LockedForSaleNumberOfItems dec Number of items in stock which are locked for sale.
NumberOfBookedItemsDecimal dec Number of items booked
NumberOfItemsDecimal dec Number of items in stock
PickedToBeCollectedNumberOfItems dec Number of items which have been picked and which are on orders whose statuses are strictly below "Collected" (< 500). This field is generally only used by ERP integrations when running the daily stock comparison.
ReceivedToBeFinishedNumberOfItems dec Number of items which have been received and which are on inorders whose statuses are strictly below "Received" (< 500). This field is generally only used by ERP integrations when running the daily stock comparison.
Article
SystemId int System id of the article
Name str(200) Article name
ArticleNumber str(100) Article number
ProductCode str(200) Product code
BarCode str(100) Barcode/EAN
Description str(3000) Description
SupplierArticleNumber str(200) Article number from the supplier
StatisticsNumber str(100) Statistical number/harmonization code
ArticleGroupName str(100) Article group name
ArticleGroupCode str(100) Article group code
MainSupplierName str(200) Supplier name
MainSupplierNumber str(200) Supplier number
ArticleCategoryName str(200) Article category name
ArticleCategoryCode str(50) Article category code
CountryOfOriginCode str(2) The two-letter ISO 3166-1 alpha-2 code of the country.
IsStockArticle bool False if the article is fictional (freight cost etc)
ArticleUnitCode str(50) Unit code
VatCode str(50) VAT code
VatPercent dec VAT percent
Length dec Length in m
Width dec Width in m
Height dec Height in m
Price dec Stock valuation price
CustomerPrice dec Customer price
PurchasePrice dec Purchase price
Weight dec Weight in kg
NetWeight dec Net weight in kg
Volume dec Volume in m3
QuantityPerPallet int Number of units that fit on a pallet
QuantityPerPackage int Number of units that fit in a package/box
DangerousGoods object[] Elements of DangerousGoods, defines ADR properties
PurchaseCurrencyCode string Currency code for purchase price
PurchaseCurrencyName string Currency name for purchase price
ExternalNumberOfItems dec Only used when an integration is made by Ongoing itself. The number of items which the external system believes is available for this article
TaricNumbers object[] Taric numbers by country
BarCodePackage string Barcode for package
BarCodePallet string Barcode for pallet
SizeCode str(50) The code of the article's size (e.g "42" when dealing with shoes, or "XS" when dealing with clothes)
SizeName str(100) The name of the article's size (e.g "Extra Small" when dealing with clothes)
DangerousGoods
UNNumber str(10) UNNumber of ADR specification
UNIsMarineHazard bool True if ADR is classed as a marine hazard
UNIsDangerousGoods bool True if ADR is classed as dangerous goods
UNPackageType enum Package type
 - I
 - II
 - III
 - Unknown
UNTunnelCodes object Tunnel codes of ADR
> UNTunnelCode enum[] Elements of tunnel codes
 - A
 - B
 - C
 - D
 - E
UNClassNumber str(50) Class number of ADR
UNProperShippingName object[] Elements of UNProperShippingName
> Name str(500) Shipping name
> LanguageCode str(50) Language of the shipping name, in ISO 639-1. E.g. SV, DE or EN.
UNLabelNumbers str(50) Label numbers of ADR
DangerousGoodsCoefficient dec ADR Coefficient