pixiMergeCustomers
API Call to merge two customers into one and delete the duplicate.
Since pixi version: LOU Official - Update 46 (6.9.46.27927) Additional notes:
Request
POST
https://apigateway.descartes.com/tms/pixi/pixiMergeCustomers
Request body
Name | Type | Required | Description |
---|---|---|---|
CustRefTo | integer | true | Merge to this customer Id. Type: int Default value: Example: 123 Available from: LOU Official - Update 46 (6.9.46.27927) |
CustRefFrom | integer | true | All documents from this customer will be merged to @CustRefTo and then this customer will be deleted. Type: int Default value: Example: 123 Available from: LOU Official - Update 46 (6.9.46.27927) |
Request Example
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body xmlns="">
<pixiMergeCustomers>
<CustRefTo>0</CustRefTo>
<CustRefFrom>0</CustRefFrom>
</pixiMergeCustomers>
</Body>
</Envelope>
Response
1. Return status
Name | Type | Description |
---|---|---|
ErrorMsg | string | Status description (error/success) message Type: VARCHAR Available from: 25.06 (25.6.0.58802) |
ReturnCode | string | Status code Type: VARCHAR Available from: 25.06 (25.6.0.58802) |
Response Example
<PixiMergeCustomersPost200TextXmlResponse>
<ReturnCode>string</ReturnCode>
<ErrorMsg>string</ErrorMsg>
</PixiMergeCustomersPost200TextXmlResponse>
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:pixiMergeCustomers>
<CustRefTo xsi:type="xsd:integer">123</CustRefTo> <!-- required -->
<CustRefFrom xsi:type="xsd:integer">123</CustRefFrom> <!-- required -->
</ns1:pixiMergeCustomers>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
PHP Example
<?php
getPixiSoapClientResponse('pixiMergeCustomers', [
'CustRefTo' => '123', // integer (required)
'CustRefFrom' => '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);
}