Description
This API call updates the details of one or multiple storage bins in the database.
It is used in scenarios where the details of the bins need to be updated. The API call validates the input data and returns error messages for invalid or unacceptable inputs. It also ensures that the bin names are unique either across the entire database or within the same location, depending on a specific setting (FilterStockOperationsWithLocation).
Request Parameters
# |
Name |
Type |
Required |
Example |
Description |
1 |
BinsXML |
string |
1 |
Check additional information |
XML with details about the Bin |
2 |
UpdateEmp |
string |
0 |
API |
User who requested the change. |
Request body
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dem="https://api.pixi.eu/soap/demosandbox/">
<soapenv:Header/>
<soapenv:Body>
<dem:pixiBinUpdate>
<dem:BinsXML>Check additional information</dem:BinsXML>
<dem:UpdateEmp>API</dem:UpdateEmp>
</dem:pixiBinUpdate>
</soapenv:Body>
</soapenv:Envelope>Response
Body 1: Result
# |
Name |
Type |
Description |
1 |
Row |
integer |
Row number of resultset |
2 |
BinKey |
integer |
Id from table InvBin |
3 |
BinName |
string |
Bin Name |
4 |
LocId |
string |
Location Id from table Location |
5 |
BinGroup |
string |
Bin Group |
6 |
SortNr |
integer |
Bin Sort Number |
7 |
MaxItems |
integer |
Maximum number of items in one Bin |
8 |
Status |
string |
Response status (UPDATED/ERROR) |
9 |
Message |
string |
Response detail message |
10 |
TransportBin |
boolean |
Boolean indicating if bin is a transport bin |
Body 2: Status output
# |
Name |
Type |
Description |
1 |
Status |
string |
Execution status (INFO/ERROR) |
2 |
Message |
string |
Description of the status |
Additional Notes
Using parameter @BinsXML we allow to update data for Bin(s).
**Important**
Input XML is parsed to values and validated:
- BinKey: mandatory field
- Name: max 50 characters, should be unique on Database or on Location (setting FilterStockOperationsWithLocation)
- LocId: LocId should exist in pixi
- Group: can be empty - default is [empty string]
- SortNr: numeric value, positive
- MaxItems: numeric value, positive
- TransportBin: bit value can be empty - default is 0 [false]
If values in XML are empty, then the old values stay on database.
If all values except BinKey are empty, then we update UpdateDate and UpdateEmp fields for that BinKey.
We do not allow update if new value will introduce duplicates on Database or on Location.
This is controlled with setting FilterStockOperationsWithLocation.
- Value = 0: Bin Names are unique on Database
- Value = 1: same Bin Names can exist in different Locations
For transport bins we do not allow duplicates on database.
**XML example:**
<Bins>
<Bin>
<BinKey>123</BinKey>
<Name>A26-16-A-2</Name>
<LocId>001</LocId>
<Group>Lager A</Group>
<SortNr>456312</SortNr>
<MaxItems>100</MaxItems>
<TransportBin>1</TransportBin>
</Bin>
<Bin>
<BinKey>124</BinKey>
<Name>A26-16-A-3</Name>
<LocId>001</LocId>
<SortNr>456312</SortNr>
<MaxItems>1</MaxItems>
<TransportBin>0</TransportBin>
</Bin>
</Bins>
**Return result**
On success we return a list of values parsed from XML with status and message per each row.
If XML cannot be parsed we return error with status message.
**Possible return error messages**
XML contains no data.
Cannot parse XML
Bin not updated. Bin key is empty.
Bin not updated. Datatype error (SortNr).
Bin not updated. SortNr should be positive.
Bin not updated. Datatype error (MaxItems).
Bin not updated. MaxItems should be positive.
Bin not updated. Name is empty.
Bin Location not updated. Bin has stock.
Bin Name not updated (Duplicated).
Bin not updated (Location does not exist).
Bin not updated (Bin does not exist).