pixiUpdateOrder
API call that updates the order values
Since pixi version: AVA 17.09 (8.4.33.31482) Additional notes: To identify the order that needs to be updated one of the "filter" conditions need to be provided.
**Important:**
Only orders that have status "OPEN, HOLD" can be updated.
When all orderlines are on invoice/s the order can not be updated anymore.
**Parameter @ShipDate**
- When you send empty as string, existing value in OrderHeader will be deleted (set to NULL).
- When you send as NULL, existing value in OrderHeader will not be changed.
**Result messages:**
- Success - Order with OrderNr: 138288 was updated. Error - Parameter
- OrderNr/OrderNrExternal is mandatory parameter and needs to be
provided.
- Error - Order with OrderNr: -100 (XYZ) does not exist.
- Error - Order with OrderNr: 138288 (ABS_279300286) can not be updated
anymore.|
Request
Request body
Name | Type | Required | Description |
---|---|---|---|
OrderNr | integer | false | Filter: pixi order number Type: int Default value: NULL Example: 123 Available from: AVA 17.09 (8.4.33.31482) |
ShipDate | string | false | Preferred shipping date Type: datetime Default value: NULL Example: YYYY-MM-DD hh:mm:ss Available from: AVA 17.09 (8.4.33.31482) |
ShopNote | string | false | Note received with this order from the shop (aka ShopComment). Type: varchar(-1) Default value: NULL Example: abc Available from: 22.02 (22.2.0.64904) |
ShipCosts | number | false | Shipping costs for the order Type: money Default value: NULL Example: 9.99 Available from: AVA 17.09 (8.4.33.31482) |
VoucherID | string | false | ID of the voucher (must be provided with Voucher Amount) Type: varchar(50) Default value: NULL Example: abc Available from: 22.02 (22.2.0.64904) |
PaymentType | string | false | Payment type code Type: varchar(1) Default value: NULL Example: K Available from: 22.02 (22.2.0.64904) |
VoucherAmount | number | false | Amount covered with the associated voucher (cannot be provided without VoucherID) Type: money Default value: NULL Example: 5.00 Available from: 22.02 (22.2.0.64904) |
AddressRemarks | string | false | Details for delivery to end customer Type: varchar(255) Default value: NULL Example: abc Available from: 22.06 (22.6.0.28129) |
OrderNrExternal | string | false | Filter: Shop order number Type: varchar(50) Default value: NULL Example: abc123 Available from: AVA 17.09 (8.4.33.31482) |
Request Example
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body xmlns="">
<pixiUpdateOrder>
<OrderNr>0</OrderNr>
<OrderNrExternal>string</OrderNrExternal>
<ShipCosts>0</ShipCosts>
<ShipDate>string</ShipDate>
<ShopNote>string</ShopNote>
<VoucherID>string</VoucherID>
<VoucherAmount>0</VoucherAmount>
<PaymentType>string</PaymentType>
<AddressRemarks>string</AddressRemarks>
</pixiUpdateOrder>
</Body>
</Envelope>
Response
1. Update status response
Name | Type | Description |
---|---|---|
Status | string | Update status (Error/Success) Type: varchar Available from: 25.06 (25.6.0.58802) |
Message | string | Detail status description Type: varchar Available from: 25.06 (25.6.0.58802) |
Response Example
<PixiUpdateOrderPost400TextXmlResponse>
<Status>string</Status>
<Message>string</Message>
</PixiUpdateOrderPost400TextXmlResponse>
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:pixiUpdateOrder>
<OrderNr xsi:type="xsd:integer">123</OrderNr>
<ShipDate xsi:type="xsd:string">YYYY-MM-DD hh:mm:ss</ShipDate>
<ShopNote xsi:type="xsd:string">abc</ShopNote>
<ShipCosts xsi:type="xsd:number">9.99</ShipCosts>
<VoucherID xsi:type="xsd:string">abc</VoucherID>
<PaymentType xsi:type="xsd:string">K</PaymentType>
<VoucherAmount xsi:type="xsd:number">5.00</VoucherAmount>
<AddressRemarks xsi:type="xsd:string">abc</AddressRemarks>
<OrderNrExternal xsi:type="xsd:string">abc123</OrderNrExternal>
</ns1:pixiUpdateOrder>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
PHP Example
<?php
getPixiSoapClientResponse('pixiUpdateOrder', [
'OrderNr' => '123', // integer
'ShipDate' => 'YYYY-MM-DD hh:mm:ss', // string
'ShopNote' => 'abc', // string
'ShipCosts' => '9.99', // number
'VoucherID' => 'abc', // string
'PaymentType' => 'K', // string
'VoucherAmount' => '5.00', // number
'AddressRemarks' => 'abc', // string
'OrderNrExternal' => 'abc123', // 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);
}