pixiUpdateOrderline
API call that updates specific values on orderlines.
Since pixi version: LOU Official - Update 46 (6.9.46.27927) Additional notes: #####This API updates the values on orderline. Since the calculations of the actual values are done on the server it is important to provide only the values that need to be changed.
- The API responds with **1** when the update is performed. And with **0** when the update failes.
- It is only possible to update orderlines that do not have orderline staus:
- EIN
- AUS
- STO
- NLB
- RET
- When changing the prices of the orderline the **@Price** and **@FullPrice** parameters are treated as:
- In case of **B2C** order as Gross prices
- In case of **B2B** order as Net prices
---
#####Sample usages:
- Update item name, special note, DF_type or serial number
<pix:pixiUpdateOrderline>
<pix:OrderlineKey>6185</pix:OrderlineKey>
<pix:ArtName>Item name</pix:ArtName>
<pix:oItemSpecialNote>I am a special note</pix:oItemSpecialNote>
<pix:DF_Type>2</pix:DF_Type>
<pix:SerialNumber>SN0123456789</pix:SerialNumber>
</pix:pixiUpdateOrderline>
- Update orderline item quantity
<pix:pixiUpdateOrderline>
<pix:OrderlineKey>6185</pix:OrderlineKey>
<pix:Qty>10</pix:Qty>
</pix:pixiUpdateOrderline>
- Update orderline discount percent
<pix:pixiUpdateOrderline>
<pix:OrderlineKey>6185</pix:OrderlineKey>
<pix:DiscountPerc>20</pix:DiscountPerc>
</pix:pixiUpdateOrderline>
- Update orderline discount value
<pix:pixiUpdateOrderline>
<pix:OrderlineKey>6185</pix:OrderlineKey>
<pix:DiscountValue>200</pix:DiscountValue>
</pix:pixiUpdateOrderline>
- Update the orderline price _(no discount)_
<pix:pixiUpdateOrderline>
<pix:OrderlineKey>6185</pix:OrderlineKey>
<pix:Price>800</pix:Price>
<pix:FullPrice>800</pix:FullPrice>
</pix:pixiUpdateOrderline>
- Update orderline price _(discount will be automatically calculated to 20%)_
<pix:pixiUpdateOrderline>
<pix:OrderlineKey>6185</pix:OrderlineKey>
<pix:Price>800</pix:Price>
<pix:FullPrice>1000</pix:FullPrice>
</pix:pixiUpdateOrderline>
- Update bundle price _(discount will be automatically calculated to 10%)_
<pix:pixiUpdateOrderline>
<pix:BundleOrderlineKey>6190</pix:BundleOrderlineKey>
<pix:Price>29.99</pix:Price>
<pix:FullPrice>33.33</pix:FullPrice>
</pix:pixiUpdateOrderline>
Request
Request body
Name | Type | Required | Description |
---|---|---|---|
Qty | integer | false | Quantity of the ordered item Type: int Default value: NULL Example: 123 Available from: LOU Official - Update 46 (6.9.46.27927) |
Price | number | false | Item price Type: money Default value: NULL Example: 9.99 Available from: LOU Official - Update 46 (6.9.46.27927) |
ArtName | string | false | Item name displayed on the orderline Type: varchar(120) Default value: NULL Example: abcdefg Available from: LOU Official - Update 46 (6.9.46.27927) |
DF_Type | string | false | Direct fullfilement type Type: varchar(1) Default value: NULL Example: abcdefg Available from: LOU Official - Update 46 (6.9.46.27927) |
FullPrice | number | false | Full price for the orderline Type: money Default value: NULL Example: 9.99 Available from: LOU Official - Update 46 (6.9.46.27927) |
DiscountPerc | string | false | Discount percent for item Type: float Default value: NULL Example: 5.3 Available from: LOU Official - Update 46 (6.9.46.27927) |
OrderlineKey | integer | false | Orderline ID (to identify the line that will be updated) Type: int Default value: Example: 123 Available from: LOU Official - Update 46 (6.9.46.27927) |
SerialNumber | string | false | Serial number for the item Type: varchar(50) Default value: NULL Example: abcdefg Available from: LOU Official - Update 46 (6.9.46.27927) |
DiscountValue | number | false | Discount value for item Type: money Default value: NULL Example: 10.00 Available from: LOU Official - Update 46 (6.9.46.27927) |
oItemSpecialNote | string | false | Item special note Type: varchar(8000) Default value: NULL Example: abcdefg Available from: LOU Official - Update 46 (6.9.46.27927) |
BundleOrderlineKey | integer | false | BundleOrderline ID (to identify the line that will be updated) Type: int Default value: NULL Example: abcdefg Available from: 22.05 (22.5.0.27301) |
Request Example
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body xmlns="">
<pixiUpdateOrderline>
<OrderlineKey>0</OrderlineKey>
<ArtName>string</ArtName>
<Qty>0</Qty>
<Price>0</Price>
<FullPrice>0</FullPrice>
<oItemSpecialNote>string</oItemSpecialNote>
<DiscountValue>0</DiscountValue>
<DiscountPerc>string</DiscountPerc>
<DF_Type>string</DF_Type>
<SerialNumber>string</SerialNumber>
<BundleOrderlineKey>0</BundleOrderlineKey>
</pixiUpdateOrderline>
</Body>
</Envelope>
Response
1. Result if the call was successfull or not
Name | Type | Description |
---|---|---|
result | integer | Returns value 1 if the update was possible. In case the update of orderline is not allowed anymore the value is 0. Type: int Available from: 25.06 (25.6.0.58802) |
Response Example
<PixiUpdateOrderlinePost200TextXmlResponse>
<result>0</result>
</PixiUpdateOrderlinePost200TextXmlResponse>
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:pixiUpdateOrderline>
<Qty xsi:type="xsd:integer">123</Qty>
<Price xsi:type="xsd:number">9.99</Price>
<ArtName xsi:type="xsd:string">abcdefg</ArtName>
<DF_Type xsi:type="xsd:string">abcdefg</DF_Type>
<FullPrice xsi:type="xsd:number">9.99</FullPrice>
<DiscountPerc xsi:type="xsd:string">5.3</DiscountPerc>
<OrderlineKey xsi:type="xsd:integer">123</OrderlineKey>
<SerialNumber xsi:type="xsd:string">abcdefg</SerialNumber>
<DiscountValue xsi:type="xsd:number">10.00</DiscountValue>
<oItemSpecialNote xsi:type="xsd:string">abcdefg</oItemSpecialNote>
<BundleOrderlineKey xsi:type="xsd:integer">abcdefg</BundleOrderlineKey>
</ns1:pixiUpdateOrderline>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
PHP Example
<?php
getPixiSoapClientResponse('pixiUpdateOrderline', [
'Qty' => '123', // integer
'Price' => '9.99', // number
'ArtName' => 'abcdefg', // string
'DF_Type' => 'abcdefg', // string
'FullPrice' => '9.99', // number
'DiscountPerc' => '5.3', // string
'OrderlineKey' => '123', // integer
'SerialNumber' => 'abcdefg', // string
'DiscountValue' => '10.00', // number
'oItemSpecialNote' => 'abcdefg', // string
'BundleOrderlineKey' => 'abcdefg', // integer
]);
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);
}