pixiCancelOrder
API call is used to cancel complete order (all orderlines are put in status "STO")
Since pixi version: LOU Official (6.3.0.4452) Additional notes:
Only status STO (Canceled) or NLB (items not avaliable) are possible tu use.
The API call will assign that status to all orderlines of the order , excluding:
- orderlines that are in status AUS, STO, NLB, RET
- orderlines that are currently assigned to a ship out box
- orderlines that are already present on an invoice
In case all of the orderlines of the order have status STO, also the order status will change to CLOSED.
The Api call will exit with return value 0 when it was successfull. And with return value 1 in case of error.
Request
POST
https://apigateway.descartes.com/tms/pixi/pixiCancelOrder
Request body
Name | Type | Required | Description |
---|---|---|---|
Status | string | false | Orderline status Type: varchar(3) Default value: STO Example: NLB Available from: LOU Official - Update 46 (6.9.46.27927) |
OrderNr | integer | true | Filter: pixi* order number Type: int Default value: Example: 123 Available from: LOU Official (6.3.0.4452) |
Request Example
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body xmlns="">
<pixiCancelOrder>
<OrderNr>0</OrderNr>
<Status>string</Status>
</pixiCancelOrder>
</Body>
</Envelope>
Response
1. Result
Name | Type | Description |
---|---|---|
SuccessfulMessage | string | Success message Type: varchar (60) Available from: 25.06 (25.6.0.58802) |
Response Example
<PixiCancelOrderPost200TextXmlResponse>
<SuccessfulMessage>string</SuccessfulMessage>
</PixiCancelOrderPost200TextXmlResponse>
2. Result
Name | Type | Description |
---|---|---|
ErrorMessage | string | Error message Type: varchar (60) Available from: 25.06 (25.6.0.58802) |
Response Example
<PixiCancelOrderPost200TextXmlResponse>
<SuccessfulMessage>string</SuccessfulMessage>
</PixiCancelOrderPost200TextXmlResponse>
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:pixiCancelOrder>
<Status xsi:type="xsd:string">NLB</Status>
<OrderNr xsi:type="xsd:integer">123</OrderNr> <!-- required -->
</ns1:pixiCancelOrder>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
PHP Example
<?php
getPixiSoapClientResponse('pixiCancelOrder', [
'Status' => 'NLB', // string
'OrderNr' => '123', // integer (required)
]);
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);
}