pixiCanConvertBundle
The API call validate if item/bundle can be convert to bundle/item.
Since pixi version: 22.08 (22.8.0.29958) Additional notes: Using parameter @ItemKey, @ItemNrInt or @EAN we identify item if it is an item or a bundle.
We return the validated item/bundle in the field **CanConvert**:
- 0 => can not be converted from normal item to bundle or vice versa
- 1 => can be converted from normal item to bundle or vice versa
- If no item is found empty result set is returned
- Identifying an item is uniquely defined with parameters by priority ItemKey, ItemNrInt, EAN.
Request
Request body
Name | Type | Required | Description |
---|---|---|---|
EAN | string | false | Barcode Type: varchar(13) Default value: NULL Example: abcdefg Available from: 22.08 (22.8.0.29958) |
ItemKey | integer | false | Item ID Type: int Default value: NULL Example: 123 Available from: 22.08 (22.8.0.29958) |
ItemNrInt | string | false | Shop item number Type: varchar(50) Default value: NULL Example: abcdefg Available from: 22.08 (22.8.0.29958) |
Request Example
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body xmlns="">
<pixiCanConvertBundle>
<ItemKey>0</ItemKey>
<ItemNrInt>string</ItemNrInt>
<EAN>string</EAN>
</pixiCanConvertBundle>
</Body>
</Envelope>
Response
1. Return values
Name | Type | Description |
---|---|---|
EAN | string | Item barcode Type: varchar Available from: 25.06 (25.6.0.58802) |
ItemKey | integer | pixi item ID Type: int Available from: 25.06 (25.6.0.58802) |
IsBundle | boolean | Indicator if item is a bundle item Type: bit Available from: 25.06 (25.6.0.58802) |
ItemNrInt | string | Shop item number Type: varchar Available from: 25.06 (25.6.0.58802) |
CanConvert | boolean | Indicator if item/bundle can be convert to bundle/item Type: bit Available from: 25.06 (25.6.0.58802) |
Response Example
<PixiCanConvertBundlePost200TextXmlResponse>
<ItemKey>0</ItemKey>
<ItemNrInt>string</ItemNrInt>
<EAN>string</EAN>
<IsBundle>true</IsBundle>
<CanConvert>true</CanConvert>
</PixiCanConvertBundlePost200TextXmlResponse>
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:pixiCanConvertBundle>
<EAN xsi:type="xsd:string">abcdefg</EAN>
<ItemKey xsi:type="xsd:integer">123</ItemKey>
<ItemNrInt xsi:type="xsd:string">abcdefg</ItemNrInt>
</ns1:pixiCanConvertBundle>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
PHP Example
<?php
getPixiSoapClientResponse('pixiCanConvertBundle', [
'EAN' => 'abcdefg', // string
'ItemKey' => '123', // integer
'ItemNrInt' => 'abcdefg', // 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);
}