pixiCanMergeOrders
Api call returns a status if order can be merge with an order or not
Since pixi version: LOU Official (6.3.0.4452) Additional notes:
Request
Request body
Name | Type | Required | Description |
---|---|---|---|
Reason | string | false | Reason Type: varchar(128) Default value: NULL Example: Available from: LOU Official (6.3.0.4452) |
CanMerge | integer | false | Can Merge Type: int Default value: NULL Example: Available from: LOU Official (6.3.0.4452) |
SourceOrderNr | integer | true | Source OrderNr Type: int Default value: Example: 123 Available from: LOU Official (6.3.0.4452) |
TargetOrderNr | integer | true | Target OrderNr 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="">
<pixiCanMergeOrders>
<TargetOrderNr>0</TargetOrderNr>
<SourceOrderNr>0</SourceOrderNr>
<CanMerge>0</CanMerge>
<Reason>string</Reason>
</pixiCanMergeOrders>
</Body>
</Envelope>
Response
1. Result set
Name | Type | Description |
---|---|---|
Reason | string | Code + textual description of the result. Code may be used to automatically translate the return of the function. Possible values are: 200 OK 401 Both orders must exist 402 Orders must belong to the same customer 403 All involved orderlines must have status ANG 404 Payment types on both orders must match and not be a creditcard type 405 None of the orderlines in either orders can be on picklists Type: varchar Available from: / (25.7.0.59144) |
CanMerge | integer | 0 = operation is not possible, 1 = operation is possible Type: int Available from: / (25.7.0.59144) |
Response Example
<PixiCanMergeOrdersPost200TextXmlResponse>
<CanMerge>0</CanMerge>
<Reason>string</Reason>
</PixiCanMergeOrdersPost200TextXmlResponse>
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:pixiCanMergeOrders>
<Reason xsi:type="xsd:string"></Reason>
<CanMerge xsi:type="xsd:integer"></CanMerge>
<SourceOrderNr xsi:type="xsd:integer">123</SourceOrderNr> <!-- required -->
<TargetOrderNr xsi:type="xsd:integer">123</TargetOrderNr> <!-- required -->
</ns1:pixiCanMergeOrders>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
PHP Example
<?php
getPixiSoapClientResponse('pixiCanMergeOrders', [
'Reason' => '', // string
'CanMerge' => '', // integer
'SourceOrderNr' => '123', // integer (required)
'TargetOrderNr' => '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);
}