Customers
Write
pixiAddressesDisplayDuplicatesMarkUsed
Marks a stored pair of potential duplicate customers as used by setting `UsedFlag` = 1 in the duplicates list.
Flags an entry of the address duplicates list (Addresses_Duplicates) as used.
- The call checks whether at least one row exists with
CustRef1=@CustRef1andCustRef2=@CustRef2. - If no such row exists, a status row with
ReturnCode=ERRORis returned and nothing is changed. - Otherwise
UsedFlagis set to1on all rows matching this pair, and a status row withReturnCode=OKis returned.
The pair is matched in the exact order given: CustRef1/CustRef2 are not swapped, so a pair stored as (B, A) is not found when calling with (A, B).
Notes
- The existence check reads with
NOLOCK; check and update are not wrapped in a transaction. - The error text "At least one customers not existing" is misleading: it is returned when the duplicate pair is not in
Addresses_Duplicates, not after checking the customer table. - Calling the procedure again for an already flagged pair returns
OKagain (idempotent). - The status text is always in the column
ErrorMessage, also on success.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
CustRef1
Required
|
int | – |
Reference of the first customer of the duplicate pair, compared with Example: |
CustRef2
Required
|
int | – |
Reference of the second customer of the duplicate pair, compared with Example: |
Response
Result set 1 · Always; one status row (ERROR if the pair does not exist, OK after the update).
Status of the operation.
| Column | Type | Description |
|---|---|---|
ReturnCode
|
varchar(5) string |
|
ErrorMessage
|
varchar(35) string |
Status text: |
Response example
<SqlRowSet1>
<row>
<ReturnCode>OK</ReturnCode>
<ErrorMessage>Record marked as used</ErrorMessage>
</row>
</SqlRowSet1>
Error messages
| Status | Message | Cause |
|---|---|---|
| ERROR | At least one customers not existing | No row in `Addresses_Duplicates` matches `CustRef1` = `@CustRef1` and `CustRef2` = `@CustRef2`. Pass a pair exactly as stored in the duplicates list (order matters). |
Examples
POST https://apigateway.descartes.com/tms/pixi/
Content-Type: text/xml; charset=utf-8
Authorization: Basic BASE64(USERNAME:PASSWORD)
<?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/">
<SOAP-ENV:Body>
<ns1:pixiAddressesDisplayDuplicatesMarkUsed>
<CustRef1>10452</CustRef1>
<CustRef2>10987</CustRef2>
</ns1:pixiAddressesDisplayDuplicatesMarkUsed>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
curl -X POST 'https://apigateway.descartes.com/tms/pixi/' \
--user 'USERNAME:PASSWORD' \
--header 'Content-Type: text/xml; charset=utf-8' \
--data-binary @- <<'XML'
<?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/">
<SOAP-ENV:Body>
<ns1:pixiAddressesDisplayDuplicatesMarkUsed>
<CustRef1>10452</CustRef1>
<CustRef2>10987</CustRef2>
</ns1:pixiAddressesDisplayDuplicatesMarkUsed>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
XML
<?php
$soapClient = new SoapClient(null, [
'login' => 'USERNAME',
'password' => 'PASSWORD',
'location' => 'https://apigateway.descartes.com/tms/pixi/',
'uri' => 'https://apigateway.descartes.com/tms/pixi/',
]);
$arguments = [
'CustRef1' => '10452',
'CustRef2' => '10987',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiAddressesDisplayDuplicatesMarkUsed', $soapArguments);
Tables used
Addresses_Duplicates · Write
- SQL object:
- dbo.pipiAddressesDisplayDuplicatesMarkUsed
Procedure last changed on 2026-10-05
Documentation written by claude-opus-5-5 on 2026-10-30