pixiGetLocations
Returns master data of the stock locations, either all visible locations or one location selected by its ID.
Returns one row per stock location from the Location table. Each row holds the address data, the shipping flag, reservation and transfer settings, and a flag that tells whether the location is used as a POS location.
Filtering:
- If
LocIDis omitted,NULLor an empty string, all locations withShowLocation <> 0(visible locations) are returned. - If
LocIDis set, only the location with this ID is returned. TheShowLocationfilter is not applied in this case, so hidden locations are returned as well.
IsPosLocation is '1' if at least one record in POSheader2 references the location through PHlocID. Otherwise it is '0'.
The result has no ORDER BY, so the row order is not guaranteed.
Notes
Locationis read withNOLOCK, so uncommitted changes can appear in the result. The subquery onPOSheader2uses no locking hint.- Because
ANDbinds more strongly thanORin theWHEREclause, the visibility filterShowLocation <> 0applies only when noLocIDis passed. A query for a single hidden location therefore still returns that location. - An unknown
LocIDreturns an empty result set. No error is raised.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
LocID
|
varchar(3) string |
NULL |
ID of the location to return. Empty or Example: |
Result set 1 · Always (can be empty)
One row per matching location.
| Column | Type | Description |
|---|---|---|
LocID
|
string |
ID of the location. |
LocationKey
Nullable |
string |
Key of the location. |
LocName
Nullable |
string |
Name of the location. |
LocAddress
Nullable |
string |
Street address of the location. |
LocCity
Nullable |
string |
City. |
LocZIP
Nullable |
string |
Postal code. |
LocCountry
Nullable |
string |
Country. |
LocState
Nullable |
string |
State or region. |
LocCompany
Nullable |
string |
Company assigned to the location. |
AllowShipping
Nullable |
string |
Value of |
SpecialStock
Nullable |
string |
Special stock setting of the location. |
ResLocID
Nullable |
string |
Location ID related to reservations. |
TranLocID
Nullable |
string |
Location ID related to transfers. |
ResExpDays
Nullable |
string |
Number of days after which reservations expire. |
IsPosLocation
|
varchar(1) string |
|
Response example
<SqlRowSet1>
<row>
<LocID>001</LocID>
<LocationKey>MAIN</LocationKey>
<LocName>Zentrallager</LocName>
<LocAddress>Industriestr. 5</LocAddress>
<LocCity>München</LocCity>
<LocZIP>80331</LocZIP>
<LocCountry>DE</LocCountry>
<LocState>BY</LocState>
<LocCompany>Muster GmbH</LocCompany>
<AllowShipping>1</AllowShipping>
<SpecialStock>0</SpecialStock>
<ResLocID>001</ResLocID>
<TranLocID>002</TranLocID>
<ResExpDays>14</ResExpDays>
<IsPosLocation>0</IsPosLocation>
</row>
</SqlRowSet1>
POST https://apigateway.descartes.com/tms/pixi/
Content-Type: text/xml; charset=utf-8
Authorization: Basic BASE64(USERNAME:PASSWORD)
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://apigateway.descartes.com/tms/pixi/">
<SOAP-ENV:Body>
<ns1:pixiGetLocations>
<!-- <LocID>001</LocID> -->
</ns1:pixiGetLocations>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
curl -X POST 'https://apigateway.descartes.com/tms/pixi/' \
--user 'USERNAME:PASSWORD' \
--header 'Content-Type: text/xml; charset=utf-8' \
--data-binary @- <<'XML'
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://apigateway.descartes.com/tms/pixi/">
<SOAP-ENV:Body>
<ns1:pixiGetLocations>
<!-- <LocID>001</LocID> -->
</ns1:pixiGetLocations>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
XML
<?php
$soapClient = new SoapClient(null, [
'login' => 'USERNAME',
'password' => 'PASSWORD',
'location' => 'https://apigateway.descartes.com/tms/pixi/',
'uri' => 'https://apigateway.descartes.com/tms/pixi/',
]);
$arguments = [
// 'LocID' => '001',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiGetLocations', $soapArguments);
- SQL object:
- dbo.pipiGetLocations