pixiSetItemBuyingInfoXML
API call procedure which updates item buying info through XML passed in the parameter
Since pixi version: LOU Official (6.3.0.4452) Additional notes: Sample XML structure:
<BuyingInfo>
<Item>
<ItemKey></ItemKey>
<MinStockQty></MinStockQty>
<MinOrderQty></MinOrderQty>
<Location></Location>
<OrderUnit></OrderUnit>
<VPE></VPE>
<SupplierCode></SupplierCode>
<TargetStock></TargetStock>
<SafetyStock></SafetyStock>
</Item>
</BuyingInfo>
**XML node information:**
**ItemKey**
- Item ID
**MinStockQty**
- Reorder level quantity per location
- If **Location** is not provided the value is set for all locations
**MinOrderQty**
- Value will only be set when also **SupplierCode** value is provided
**Location**
- Location ID *(sample:"001")*
**OrderUnit** and **VPE**
- Set the Packing unit for item
- Keep in mind that **VPE** is only supported because of backwards compatibility.
- **OrderUnit** should be used instead
- In case both values are provided **OrderUnit** will be used and written to the database
**SupplierCode**
- Supplier code to identify the item supplier *(sample: "MGS")*
**TargetStock**
- can not be negative value
- negative value of target stock will be set to 0
**SafetyStock**
- Item safety stock
Request
Request body
Name | Type | Required | Description |
---|---|---|---|
BuyingXML | string | false | XML with tags for items. Type: varchar(-1) Default value: NULL Example: See Additional Information Available from: LOU Official (6.3.0.4452) |
Request Example
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body xmlns="">
<pixiSetItemBuyingInfoXML>
<BuyingXML>string</BuyingXML>
</pixiSetItemBuyingInfoXML>
</Body>
</Envelope>
Response
1. Return values
Name | Type | Description |
---|---|---|
EAN | string | Item barcode Type: varchar (13) 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 (50) Available from: 25.06 (25.6.0.58802) |
MinOrderQty | string | Minimum order quantity for the item Type: varchar (10) Available from: 25.06 (25.6.0.58802) |
MinStockQty | string | Minimum stock quantity for the item Type: varchar (10) Available from: 25.06 (25.6.0.58802) |
PackingUnit | string | Packing unit for item Type: varchar (10) Available from: 25.06 (25.6.0.58802) |
SafetyStock | string | Item safety stock quantity Type: varchar (10) Available from: 25.06 (25.6.0.58802) |
TargetStock | string | Item target stock quantity Type: varchar (10) Available from: 25.06 (25.6.0.58802) |
SupplierCode | string | Supplier code to identify the item supplier Type: varchar (4) Available from: 25.06 (25.6.0.58802) |
Response Example
<PixiSetItemBuyingInfoXMLPost200TextXmlResponse>
<ItemKey>0</ItemKey>
<ItemNrInt>string</ItemNrInt>
<EAN>string</EAN>
<MinStockQty>string</MinStockQty>
<MinOrderQty>string</MinOrderQty>
<SupplierCode>string</SupplierCode>
<TargetStock>string</TargetStock>
<SafetyStock>string</SafetyStock>
<PackingUnit>string</PackingUnit>
</PixiSetItemBuyingInfoXMLPost200TextXmlResponse>
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:pixiSetItemBuyingInfoXML>
<BuyingXML xsi:type="xsd:string">See Additional Information</BuyingXML>
</ns1:pixiSetItemBuyingInfoXML>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
PHP Example
<?php
getPixiSoapClientResponse('pixiSetItemBuyingInfoXML', [
'BuyingXML' => 'See Additional Information', // 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);
}