pixiSetItemSupplier
API call is used to modify item data connected to supplier.
Since pixi version: LOU Official (6.3.0.4452) Additional notes: With this API call, it is possible to update the EAN, ItemNrSuppl and/or SupplPrice of a specific item for a supplier. Alternatively, it is also possible to add an additional EAN to the item, using the @AddEAN parameter. For updating an EAN of an item with multiple EANs assigned to a supplier, the ItemNrSuppl must be uniquely identifiable. Additionally, it is possible to add the same supplier multiple times with at least a different EAN. Tip: Use pixiDeleteItemSupplier with the same parameters that were used at its creation if you want to delete accidentally created suppliers.
Important: Besides the SupplNr, all other filter criteria create a selection using OR logic, thus extending rather than narrowing it.
Request
Request body
Name | Type | Required | Description |
---|---|---|---|
EAN | string | false | Filter: Item barcode. Type: varchar(13) Default value: NULL Example: Available from: LOU Official (6.3.0.4452) |
AddEAN | boolean | false | Switch: In case parameter is set to 1, parameter EAN will be used to add a new barcode to the item. Type: bit Default value: 0 Example: Available from: AVA 17.05 (8.4.29.30029) |
OnlyPU | boolean | false | Set value: OrderOnlyPackageUnits Type: bit Default value: NULL Example: Available from: 20.03 (9.0.13.47258) |
ItemKey | integer | false | Filter: pixi* item ID Type: int Default value: NULL Example: Available from: LOU Official (6.3.0.4452) |
SupplNr | string | true | Filter: Supplier number code Type: varchar(4) Default value: Example: Available from: LOU Official (6.3.0.4452) |
ItemNrInt | string | false | Filter: Shop item number Type: varchar(50) Default value: NULL Example: Available from: LOU Official (6.3.0.4452) |
SupplPrice | number | false | Value: Supplier price for the item (when the value is not provided, the default item supplier price will be used in case of adding a new barcode) Type: money Default value: NULL Example: Available from: LOU Official (6.3.0.4452) |
ItemNrSuppl | string | false | Filter: Item number supplier Type: varchar(50) Default value: NULL Example: Available from: LOU Official (6.3.0.4452) |
MinOrderQty | integer | false | Set value: MinOrderQty Type: int Default value: NULL Example: Available from: 20.03 (9.0.13.47258) |
ItemDeliveryTime | integer | false | Set value: SupplDeliveryTime Type: int Default value: NULL Example: Available from: 20.03 (9.0.13.47258) |
PreferredSupplier | string | false | Switch: In case parameter is set to 1, preferred supplier will be set for selected record. Type: smallint Default value: NULL Example: 1 Available from: AVA 17.05 (8.4.29.30029) |
Request Example
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body xmlns="">
<pixiSetItemSupplier>
<ItemKey>0</ItemKey>
<ItemNrInt>string</ItemNrInt>
<SupplNr>string</SupplNr>
<SupplPrice>0</SupplPrice>
<EAN>string</EAN>
<ItemNrSuppl>string</ItemNrSuppl>
<AddEAN>true</AddEAN>
<PreferredSupplier>string</PreferredSupplier>
<MinOrderQty>0</MinOrderQty>
<OnlyPU>true</OnlyPU>
<ItemDeliveryTime>0</ItemDeliveryTime>
</pixiSetItemSupplier>
</Body>
</Envelope>
Response
1. Return messages from the modification.
Name | Type | Description |
---|---|---|
Status | string | Status of the return message. (Error, New record inserted, Record updated, Warning) Type: varchar Available from: 25.06 (25.6.0.58802) |
Message | string | Detail description of the return message. Type: varchar Available from: 25.06 (25.6.0.58802) |
Response Example
<PixiSetItemSupplierPost200TextXmlResponse>
<Status>string</Status>
<Message>string</Message>
</PixiSetItemSupplierPost200TextXmlResponse>
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:pixiSetItemSupplier>
<EAN xsi:type="xsd:string"></EAN>
<AddEAN xsi:type="xsd:boolean"></AddEAN>
<OnlyPU xsi:type="xsd:boolean"></OnlyPU>
<ItemKey xsi:type="xsd:integer"></ItemKey>
<SupplNr xsi:type="xsd:string"></SupplNr> <!-- required -->
<ItemNrInt xsi:type="xsd:string"></ItemNrInt>
<SupplPrice xsi:type="xsd:number"></SupplPrice>
<ItemNrSuppl xsi:type="xsd:string"></ItemNrSuppl>
<MinOrderQty xsi:type="xsd:integer"></MinOrderQty>
<ItemDeliveryTime xsi:type="xsd:integer"></ItemDeliveryTime>
<PreferredSupplier xsi:type="xsd:string">1</PreferredSupplier>
</ns1:pixiSetItemSupplier>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
PHP Example
<?php
getPixiSoapClientResponse('pixiSetItemSupplier', [
'EAN' => '', // string
'AddEAN' => '', // boolean
'OnlyPU' => '', // boolean
'ItemKey' => '', // integer
'SupplNr' => '', // string (required)
'ItemNrInt' => '', // string
'SupplPrice' => '', // number
'ItemNrSuppl' => '', // string
'MinOrderQty' => '', // integer
'ItemDeliveryTime' => '', // integer
'PreferredSupplier' => '1', // 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);
}