pixiGetChangedItemStock
Recommended
API call returns all items, that have changed the stock quantity since the date passed as parameter.
Since pixi version: LOU Official (6.3.0.4452) Additional notes: General info:
- It will provide all item specific information as EAN, ItemNRInt (Shop item number), physical quantity, available quantity and changed stock quantity.
- Attention - this does NOT cover bundle articles. Only real stock movements. For proper stock levels to display in your shop, check the API Calls pixiShopLink.
**ExcludeBinGroups:**
- When using parameter **ExcludeBinGroups** the overall stock of the
items returned is reduced by the stock contained in excluded bin
groups.
**Pagination:**
- When retrieving large amount of data it is best to use the
combination of parameters **Rowcount** and **Start**. This way it is
possible to get predefined chunks of complete result.
- Keep in mind that the data is ordered by update date. This means if stock is changing while retrieving the data using parameters Rowcount and Start. The returned items will be pushed to the end of the list. This can lead that a single item is returned multiple times.
Request
Request body
Name | Type | Required | Description |
---|---|---|---|
LocID | string | false | Location ID Type: varchar(3) Default value: Example: 001 Available from: LOU Official (6.3.0.4452) |
Since | string | true | Function returns items with changed stock quantity later than this date Type: datetime Default value: Example: YYYY-MM-DD hh:mm:ss Available from: LOU Official (6.3.0.4452) |
Start | integer | false | Used in combination with Rowcount parameter (pagination) Type: int Default value: 0 Example: 123 Available from: LOU Official - Update 46 (6.9.46.27927) |
DateTo | string | false | This is an additional date, by which we can filter. Then the function returns only items which had changed before this date Type: datetime Default value: NULL Example: YYYY-MM-DD hh:mm:ss Available from: LOU Official - Update 46 (6.9.46.27927) |
Rowcount | integer | false | Maximum number of returned rows Type: int Default value: 1000 Example: 123 Available from: LOU Official (6.3.0.4452) |
ExcludeBinGroups | string | false | Comma separated list of bin groups to exclude Type: varchar(-1) Default value: NULL Example: Bin-A, Bin-B, Bin-C Available from: LOU Official - Update 46 (6.9.46.27927) |
IncludeOrderLineChanges | string | false | Toggle option to include items also when they are included in updated orderline. Type: smallint Default value: 0 Example: 123 Available from: AVA Official - Update 7 (8.4.7.23158) |
Request Example
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body xmlns="">
<pixiGetChangedItemStock>
<Since>string</Since>
<Rowcount>0</Rowcount>
<LocID>string</LocID>
<DateTo>string</DateTo>
<Start>0</Start>
<ExcludeBinGroups>string</ExcludeBinGroups>
<IncludeOrderLineChanges>string</IncludeOrderLineChanges>
</pixiGetChangedItemStock>
</Body>
</Envelope>
Response
1. Items with changed stock
Name | Type | Description |
---|---|---|
RowNr | integer | Row number Type: int Available from: 25.06 (25.6.0.58802) |
EANUPC | string | Item barcode Type: varchar Available from: 25.06 (25.6.0.58802) |
Enabled | boolean | Indicates if the item is enabled Type: bit Available from: 25.06 (25.6.0.58802) |
ItemKey | integer | pixi* item ID Type: int Available from: 25.06 (25.6.0.58802) |
ItemNrInt | string | Shop item number Type: varchar Available from: 25.06 (25.6.0.58802) |
BundleItem | boolean | Indicates if item is a bundle item Type: bit Available from: 25.06 (25.6.0.58802) |
UpdateDate | string | Last update date of the record. Type: datetime Available from: 25.06 (25.6.0.58802) |
ItemNrSuppl | string | Supplier item number Type: varchar Available from: 25.06 (25.6.0.58802) |
MinStockQty | integer | Minimum stock quantity for the item. Type: int Available from: 25.06 (25.6.0.58802) |
StockChange | integer | quantity of item stock change Type: int Available from: 25.06 (25.6.0.58802) |
PhysicalStock | integer | Physical item stock quantity Type: int Available from: 25.06 (25.6.0.58802) |
AvailableStock | integer | Current available stock considering settings: "Enable reservations", "Export Physical Stock for items (not bundles)" and "Export available stock - reservations are enabled" Type: int Available from: 25.06 (25.6.0.58802) |
PhysicalStockLoc | integer | Current physical item stock quantity on given location Type: int Available from: 25.06 (25.6.0.58802) |
EstimatedDelivery | string | Estimated item delivery date Type: datetime Available from: 25.06 (25.6.0.58802) |
OriginalUpdateDate | string | Date of last stock calculation Type: datetime Available from: 25.06 (25.6.0.58802) |
OpenSupplierOrderQTY | integer | Quantity of open supplier order lines Type: int Available from: 25.06 (25.6.0.58802) |
Response Example
<PixiGetChangedItemStockPost200TextXmlResponse>
<ItemKey>0</ItemKey>
<ItemNrInt>string</ItemNrInt>
<EANUPC>string</EANUPC>
<ItemNrSuppl>string</ItemNrSuppl>
<PhysicalStock>0</PhysicalStock>
<AvailableStock>0</AvailableStock>
<StockChange>0</StockChange>
<EstimatedDelivery>string</EstimatedDelivery>
<MinStockQty>0</MinStockQty>
<Enabled>true</Enabled>
<OpenSupplierOrderQTY>0</OpenSupplierOrderQTY>
<UpdateDate>string</UpdateDate>
<OriginalUpdateDate>string</OriginalUpdateDate>
<BundleItem>true</BundleItem>
<RowNr>0</RowNr>
<PhysicalStockLoc>0</PhysicalStockLoc>
</PixiGetChangedItemStockPost200TextXmlResponse>
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:pixiGetChangedItemStock>
<LocID xsi:type="xsd:string">001</LocID>
<Since xsi:type="xsd:string">YYYY-MM-DD hh:mm:ss</Since> <!-- required -->
<Start xsi:type="xsd:integer">123</Start>
<DateTo xsi:type="xsd:string">YYYY-MM-DD hh:mm:ss</DateTo>
<Rowcount xsi:type="xsd:integer">123</Rowcount>
<ExcludeBinGroups xsi:type="xsd:string">Bin-A, Bin-B, Bin-C</ExcludeBinGroups>
<IncludeOrderLineChanges xsi:type="xsd:string">123</IncludeOrderLineChanges>
</ns1:pixiGetChangedItemStock>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
PHP Example
<?php
getPixiSoapClientResponse('pixiGetChangedItemStock', [
'LocID' => '001', // string
'Since' => 'YYYY-MM-DD hh:mm:ss', // string (required)
'Start' => '123', // integer
'DateTo' => 'YYYY-MM-DD hh:mm:ss', // string
'Rowcount' => '123', // integer
'ExcludeBinGroups' => 'Bin-A, Bin-B, Bin-C', // string
'IncludeOrderLineChanges' => '123', // 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);
}