GetLocationsByQuery

This function is used to get warehouse locations. You can specify a filter so that, for instance, only locations in a certain aisle are returned. A possible use of this function is to display a map of the warehouse in your own system.

For more information about how locations work in Ongoing WMS, see our manual.

Tags: GetLocationsByQuery, Query, GetLocationsByQueryResult, Location_GetLocations, Aisle_GetLocations, Zone_GetLocations, LocationType_GetLocations

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/Automation/GetLocationsByQuery"

<?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>
    <GetLocationsByQuery xmlns="http://ongoingsystems.se/Automation">
      <UserName>string</UserName>
      <Password>string</Password>
      <Query>
        <AisleName>string</AisleName>
        <AisleId>int</AisleId>
        <LocationTypeId>int</LocationTypeId>
        <OnlyFreeLocations>boolean</OnlyFreeLocations>
        <LocationId>int</LocationId>
        <LocationName>string</LocationName>
        <LocationIds>
          <int>int</int>
          <int>int</int>
        </LocationIds>
        <MaxLocationsToGet>int</MaxLocationsToGet>
        <LocationIdFrom>int</LocationIdFrom>
        <WarehouseId>int</WarehouseId>
        <ZoneId>int</ZoneId>
        <ZoneName>string</ZoneName>
      </Query>
    </GetLocationsByQuery>
  </soap:Body>
</soap:Envelope>

Request specification

GetLocationsByQuery
UserName str(50) Req. Your username
Password str(50) Req. Your password
Query Query Req. Specifies the query/search criteria
Query
AisleName str(300) Only return locations belonging to the aisle with this name.
AisleId int Only return locations belonging to the aisle with this ID.
LocationTypeId int Only return locations of this location type.
OnlyFreeLocations bool If true, only return locations which are free (i.e. locations which have no items in them).
LocationId int Only return the location which has this internal system ID.
LocationName str(500) Only return the location which has this name.
LocationIds int[] Only return the locations which have these internal system IDs.
MaxLocationsToGet int Maximum number of locations to return.
LocationIdFrom int Only return locations whose ID is greater than this value.
WarehouseId int Only return which are in this warehouse.
ZoneId int Filter for a particular zone ID.
ZoneName str(300) Filter for a particular zone name.

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>
    <GetLocationsByQueryResponse xmlns="http://ongoingsystems.se/Automation">
      <GetLocationsByQueryResult>
        <Locations>
          <Location_GetLocations>
            <LocationId>int</LocationId>
            <LocationName>string</LocationName>
            <PositionX>int</PositionX>
            <PositionY>int</PositionY>
            <Aisle>
              <AisleId>int</AisleId>
              <AisleName>string</AisleName>
              <Zone>
                <ZoneId>int</ZoneId>
                <ZoneName>string</ZoneName>
                <WarehouseId>int</WarehouseId>
              </Zone>
            </Aisle>
            <LocationType>
              <Name>string</Name>
              <Id>int</Id>
              <Code>string</Code>
            </LocationType>
            <IsLocked>boolean</IsLocked>
            <IsLockedForSale>boolean</IsLockedForSale>
          </Location_GetLocations>
          <Location_GetLocations>
            <LocationId>int</LocationId>
            <LocationName>string</LocationName>
            <PositionX>int</PositionX>
            <PositionY>int</PositionY>
            <Aisle>
              <AisleId>int</AisleId>
              <AisleName>string</AisleName>
              <Zone>
                <ZoneId>int</ZoneId>
                <ZoneName>string</ZoneName>
                <WarehouseId>int</WarehouseId>
              </Zone>
            </Aisle>
            <LocationType>
              <Name>string</Name>
              <Id>int</Id>
              <Code>string</Code>
            </LocationType>
            <IsLocked>boolean</IsLocked>
            <IsLockedForSale>boolean</IsLockedForSale>
          </Location_GetLocations>
        </Locations>
        <Success>boolean</Success>
        <Message>string</Message>
      </GetLocationsByQueryResult>
    </GetLocationsByQueryResponse>
  </soap:Body>
</soap:Envelope>

Response specification

GetLocationsByQueryResult
Locations object[] A list of Location_GetLocations.
Location_GetLocations
LocationId int Internal system ID of the location.
LocationName str(50) The name of the location.
PositionX int The location's X position within its aisle.
PositionY int The location's Y position within its aisle.
Aisle object An object of type Aisle_GetLocations, containing information about the aisle which the location is in.
LocationType object An object of type LocationType_GetLocations, containing information about the location type. This value may be null.
IsLocked bool Whether or not the location has been locked.
IsLockedForSale bool Whether or not the location has been "locked for sale" (meaning that the items in the location should not be sold).
Aisle_GetLocations
AisleId int Internal system ID of the aisle.
AisleName str(300) The name of the aisle.
Zone object An object of type Zone_GetLocations, containing information about the zone which the aisle is in.
Zone_GetLocations
ZoneId int Internal system ID of the zone.
ZoneName str(300) The name of the zone.
WarehouseId int The ID of the warehouse which the zone is in.
LocationType_GetLocations
Name str(50) The name of the location type.
Id int The ID of the location type.
Code str(50) The code of the location type.