pixiBinUpdate
The API call updates data for one single Bin or multiple Bins.
Since pixi version: 22.06 (22.6.0.28129) 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).
Request
Request body
Name | Type | Required | Description |
---|---|---|---|
BinsXML | string | true | XML with details about the Bin Type: varchar(-1) Default value: Example: Check additional information Available from: 22.06 (22.6.0.28129) |
UpdateEmp | string | false | User who requested the change. Type: varchar(50) Default value: API Example: API Available from: 22.06 (22.6.0.28129) |
Request Example
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body xmlns="">
<pixiBinUpdate>
<BinsXML>string</BinsXML>
<UpdateEmp>string</UpdateEmp>
</pixiBinUpdate>
</Body>
</Envelope>
Response
1. Result
Name | Type | Description |
---|---|---|
Row | integer | Row number of resultset Type: INT Available from: 25.06 (25.6.0.58802) |
LocId | string | Location Id from table Location Type: VARCHAR Available from: 25.06 (25.6.0.58802) |
BinKey | integer | Id from table InvBin Type: INT Available from: 25.06 (25.6.0.58802) |
SortNr | integer | Bin Sort Number Type: INT Available from: 25.06 (25.6.0.58802) |
Status | string | Response status (UPDATED/ERROR) Type: VARCHAR Available from: 25.06 (25.6.0.58802) |
BinName | string | Bin Name Type: VARCHAR Available from: 25.06 (25.6.0.58802) |
Message | string | Response detail message Type: VARCHAR Available from: 25.06 (25.6.0.58802) |
BinGroup | string | Bin Group Type: VARCHAR Available from: 25.06 (25.6.0.58802) |
MaxItems | integer | Maximum number of items in one Bin Type: INT Available from: 25.06 (25.6.0.58802) |
TransportBin | boolean | Boolean indicating if bin is a transport bin Type: BIT Available from: 25.06 (25.6.0.58802) |
Response Example
<PixiBinUpdatePost200TextXmlResponse>
<Row>0</Row>
<BinKey>0</BinKey>
<BinName>string</BinName>
<LocId>string</LocId>
<BinGroup>string</BinGroup>
<SortNr>0</SortNr>
<MaxItems>0</MaxItems>
<Status>string</Status>
<Message>string</Message>
<TransportBin>true</TransportBin>
</PixiBinUpdatePost200TextXmlResponse>
2. Status output
Name | Type | Description |
---|---|---|
Status | string | Execution status (INFO/ERROR) Type: varchar Available from: 25.06 (25.6.0.58802) |
Message | string | Description of the status Type: varchar Available from: 25.06 (25.6.0.58802) |
Response Example
<PixiBinUpdatePost200TextXmlResponse>
<Row>0</Row>
<BinKey>0</BinKey>
<BinName>string</BinName>
<LocId>string</LocId>
<BinGroup>string</BinGroup>
<SortNr>0</SortNr>
<MaxItems>0</MaxItems>
<Status>string</Status>
<Message>string</Message>
<TransportBin>true</TransportBin>
</PixiBinUpdatePost200TextXmlResponse>
HTTP Example
POST https://apigateway.descartes.com/tms/pixi/
Content-Type: text/xml; charset=utf-8
# echo -n '{{username}}:{{password}}' | base64 | pbcopy
Authorization: Basic {{token}}
<?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/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:pixiBinUpdate>
<BinsXML xsi:type="xsd:string">Check additional information</BinsXML> <!-- required -->
<UpdateEmp xsi:type="xsd:string">API</UpdateEmp>
</ns1:pixiBinUpdate>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
PHP Example
<?php
getPixiSoapClientResponse('pixiBinUpdate', [
'BinsXML' => 'Check additional information', // string (required)
'UpdateEmp' => 'API', // string
]);
function getPixiSoapClientResponse(string $method, array $arguments = [])
{
$soapArguments = [];
foreach ($arguments as $key => $value) {
$soapArguments[] = new SoapVar($value, null, '', '', $key);
}
$soapClient = new SoapClient(null, [
'login' => '...',
'password' => '...',
'uri' => 'https://apigateway.descartes.com/tms/pixi/',
'location' => 'https://apigateway.descartes.com/tms/pixi/',
]);
return $soapClient->__call($method, $soapArguments);
}