OnlineAPI


Click here for a complete list of operations.

GetInventory_Shopping_v5

This method retrieves all the shopping items available for a given Rep# or Customer#, PriceType (wholesale, retail, etc.), Country, also this retrieves the tax rate and tax included price of the items. But, in addition to previus versions, this method now pass Warehouse Information and 'On Hand' amounts for each warehouse returned.
Optional Inputs: State, County, City, PostalCode and ShipGeoCode are optional, they can be usefull in case that the Tax Engine needs them and any Rep# or Customer# was provided.
Additional Required Inputs: LocaleID (1 being default), AutoShip (specify whether AutoShip items should be returned) and IncludeTax (specify whether PriceInclTax and TaxRate output parameters should be calculated, if IncludeTax is set to False, PriceInclTax and TaxRate will be null).
Output Messages: This method will return a status message of the transaction. Besides, the output Success will return 1 or 0 if there was success or not, respectively
INVALID_CREDENTIALS: Means that credentials are incorrect or invalid
INVALID_COUNTRY: Means that provided Country was not found in the system
INVALID_PRICETYPE: Means that provided price type was not found in the system
INVALID_REPNUMBER: Means that provided Rep# was not found in the system
INVALID_CUSTOMERNUMBER: Means that provided Customer# was not found in the system
COUNTRY_IS_REQUIRED: Occurs when Rep# and Customer# are empty, and PriceType is defined but Country is empty. Due this API method returns tax information of shopping items, always Country is requiered if Rep# or Customer# are not provided.
PRICETYPE_IS_REQUIRED: Occurs when Rep# and Customer# are empty, and Country is defiened but PriceType is empty. Due this API method returns shopping items available for a price type, always PriceType will be requiered if user doesn't define nether Rep# nor Customer#.
INVALID_PARAMETERS_PROVIDED: Occurs when Rep#, Customer#, Country and, PriceType are empty.
TRANSACTION_DISPATCHED_EXCEPTION: In case we get an error in the transaction, we will communicate that by this message.
NO_DATA_FOUND: This is not an error. Success output is set to 1. This message indicates that query was executed correctly but doesn't retrieve any shopping item.
SUCCESS: Means that API method retrieved shopping items correctly.
Other Notes: If IncludeTax is set enable, and items were retrieved successfully but TaxRate and PriceInclTax are NULL means this method was not able to calculate the tax rate with the given shipping information or price type. Deprecation Note: This API has been deprecated in favor of our REST API: ~/api/inventory/InventoryShopping.

Test

The test form is only available for requests from the local machine.

SOAP 1.1

The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.

POST /adapturedemo/webservice/OnlineAPI.asmx HTTP/1.1
Host: api.bydesign.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://www.securefreedom.com/GetInventory_Shopping_v5"

<?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_Shopping_v5 xmlns="http://www.securefreedom.com/">
      <Credentials>
        <Username>string</Username>
        <Password>string</Password>
        <Token>string</Token>
      </Credentials>
      <RepNumber>string</RepNumber>
      <CustomerNumber>string</CustomerNumber>
      <Autoship>int</Autoship>
      <PriceType>string</PriceType>
      <LocaleID>int</LocaleID>
      <Country>string</Country>
      <State>string</State>
      <County>string</County>
      <City>string</City>
      <PostalCode>string</PostalCode>
      <ShipGeoCode>string</ShipGeoCode>
      <IncludeTax>boolean</IncludeTax>
    </GetInventory_Shopping_v5>
  </soap:Body>
</soap:Envelope>
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>
    <GetInventory_Shopping_v5Response xmlns="http://www.securefreedom.com/">
      <GetInventory_Shopping_v5Result>
        <Inventory>
          <GetInventoryReturn_v5>
            <ProductID>string</ProductID>
            <Description>string</Description>
            <Explanation>string</Explanation>
            <LongExplanation>string</LongExplanation>
            <Price>double</Price>
            <PriceInclTax>double</PriceInclTax>
            <TaxRate>double</TaxRate>
            <Volume>double</Volume>
            <Volume2>double</Volume2>
            <Volume3>double</Volume3>
            <Volume4>double</Volume4>
            <OtherPrice>double</OtherPrice>
            <OtherPrice2>double</OtherPrice2>
            <OtherPrice3>double</OtherPrice3>
            <OtherPrice4>double</OtherPrice4>
            <Compare>double</Compare>
            <FeaturedItem>int</FeaturedItem>
            <SmallImage>string</SmallImage>
            <LargeImage>string</LargeImage>
            <CategoryID>int</CategoryID>
            <Category>string</Category>
            <SubCategory>string</SubCategory>
            <LocaleID>string</LocaleID>
            <OnHand>int</OnHand>
            <QtyOptions>string</QtyOptions>
            <CurrencyTypeID>int</CurrencyTypeID>
            <CurrencyType>string</CurrencyType>
            <DisplayLocale>string</DisplayLocale>
            <DisplayLocale_Net>string</DisplayLocale_Net>
            <WareHouseList xsi:nil="true" />
          </GetInventoryReturn_v5>
          <GetInventoryReturn_v5>
            <ProductID>string</ProductID>
            <Description>string</Description>
            <Explanation>string</Explanation>
            <LongExplanation>string</LongExplanation>
            <Price>double</Price>
            <PriceInclTax>double</PriceInclTax>
            <TaxRate>double</TaxRate>
            <Volume>double</Volume>
            <Volume2>double</Volume2>
            <Volume3>double</Volume3>
            <Volume4>double</Volume4>
            <OtherPrice>double</OtherPrice>
            <OtherPrice2>double</OtherPrice2>
            <OtherPrice3>double</OtherPrice3>
            <OtherPrice4>double</OtherPrice4>
            <Compare>double</Compare>
            <FeaturedItem>int</FeaturedItem>
            <SmallImage>string</SmallImage>
            <LargeImage>string</LargeImage>
            <CategoryID>int</CategoryID>
            <Category>string</Category>
            <SubCategory>string</SubCategory>
            <LocaleID>string</LocaleID>
            <OnHand>int</OnHand>
            <QtyOptions>string</QtyOptions>
            <CurrencyTypeID>int</CurrencyTypeID>
            <CurrencyType>string</CurrencyType>
            <DisplayLocale>string</DisplayLocale>
            <DisplayLocale_Net>string</DisplayLocale_Net>
            <WareHouseList xsi:nil="true" />
          </GetInventoryReturn_v5>
        </Inventory>
      </GetInventory_Shopping_v5Result>
    </GetInventory_Shopping_v5Response>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.

POST /adapturedemo/webservice/OnlineAPI.asmx HTTP/1.1
Host: api.bydesign.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <GetInventory_Shopping_v5 xmlns="http://www.securefreedom.com/">
      <Credentials>
        <Username>string</Username>
        <Password>string</Password>
        <Token>string</Token>
      </Credentials>
      <RepNumber>string</RepNumber>
      <CustomerNumber>string</CustomerNumber>
      <Autoship>int</Autoship>
      <PriceType>string</PriceType>
      <LocaleID>int</LocaleID>
      <Country>string</Country>
      <State>string</State>
      <County>string</County>
      <City>string</City>
      <PostalCode>string</PostalCode>
      <ShipGeoCode>string</ShipGeoCode>
      <IncludeTax>boolean</IncludeTax>
    </GetInventory_Shopping_v5>
  </soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <GetInventory_Shopping_v5Response xmlns="http://www.securefreedom.com/">
      <GetInventory_Shopping_v5Result>
        <Inventory>
          <GetInventoryReturn_v5>
            <ProductID>string</ProductID>
            <Description>string</Description>
            <Explanation>string</Explanation>
            <LongExplanation>string</LongExplanation>
            <Price>double</Price>
            <PriceInclTax>double</PriceInclTax>
            <TaxRate>double</TaxRate>
            <Volume>double</Volume>
            <Volume2>double</Volume2>
            <Volume3>double</Volume3>
            <Volume4>double</Volume4>
            <OtherPrice>double</OtherPrice>
            <OtherPrice2>double</OtherPrice2>
            <OtherPrice3>double</OtherPrice3>
            <OtherPrice4>double</OtherPrice4>
            <Compare>double</Compare>
            <FeaturedItem>int</FeaturedItem>
            <SmallImage>string</SmallImage>
            <LargeImage>string</LargeImage>
            <CategoryID>int</CategoryID>
            <Category>string</Category>
            <SubCategory>string</SubCategory>
            <LocaleID>string</LocaleID>
            <OnHand>int</OnHand>
            <QtyOptions>string</QtyOptions>
            <CurrencyTypeID>int</CurrencyTypeID>
            <CurrencyType>string</CurrencyType>
            <DisplayLocale>string</DisplayLocale>
            <DisplayLocale_Net>string</DisplayLocale_Net>
            <WareHouseList xsi:nil="true" />
          </GetInventoryReturn_v5>
          <GetInventoryReturn_v5>
            <ProductID>string</ProductID>
            <Description>string</Description>
            <Explanation>string</Explanation>
            <LongExplanation>string</LongExplanation>
            <Price>double</Price>
            <PriceInclTax>double</PriceInclTax>
            <TaxRate>double</TaxRate>
            <Volume>double</Volume>
            <Volume2>double</Volume2>
            <Volume3>double</Volume3>
            <Volume4>double</Volume4>
            <OtherPrice>double</OtherPrice>
            <OtherPrice2>double</OtherPrice2>
            <OtherPrice3>double</OtherPrice3>
            <OtherPrice4>double</OtherPrice4>
            <Compare>double</Compare>
            <FeaturedItem>int</FeaturedItem>
            <SmallImage>string</SmallImage>
            <LargeImage>string</LargeImage>
            <CategoryID>int</CategoryID>
            <Category>string</Category>
            <SubCategory>string</SubCategory>
            <LocaleID>string</LocaleID>
            <OnHand>int</OnHand>
            <QtyOptions>string</QtyOptions>
            <CurrencyTypeID>int</CurrencyTypeID>
            <CurrencyType>string</CurrencyType>
            <DisplayLocale>string</DisplayLocale>
            <DisplayLocale_Net>string</DisplayLocale_Net>
            <WareHouseList xsi:nil="true" />
          </GetInventoryReturn_v5>
        </Inventory>
      </GetInventory_Shopping_v5Result>
    </GetInventory_Shopping_v5Response>
  </soap12:Body>
</soap12:Envelope>