pixiOrderSetGdprPollingExportFlag
Sets or clears the GDPR polling export flag (`ExportGdprDataForPolling`) of an order identified by order number or external order number.
Updates the column ExportGdprDataForPolling of one order in OrderHeader.
OrderNr=0and an emptyOrderNrExternalare treated as not supplied.- The order is looked up by
OrderNrfirst. If no order is found that way, it is looked up byOrderNrExternal. If both are given andOrderNrmatches,OrderNrExternalis ignored. - Validation, in this order:
- neither
OrderNrnorOrderNrExternalsupplied → error, - no order found → error,
ExportGdprDataForPollingis NULL → error.
- neither
- If the order already has the requested flag value, nothing is changed and a
Warningrow is returned. - Otherwise the flag is updated,
UpdateEmpis set toUser(defaultAPI user), and aSuccessrow is returned.
The call always returns exactly one row with Status and Message.
Notes
- Runs in its own transaction, or in a savepoint if a transaction is already open. With
XACT_ABORT ON, unexpected errors roll back the change and are logged vialog.InsertError(not attached); the error text is truncated to 80 characters inMessage. - The lookups and the existence check read
OrderHeaderwithNOLOCK; the update usesROWLOCK. - If several orders share the same
OrderNrExternal, only one of them (the first row read) is updated. ExportGdprDataForPollinghas no default value; omitting it makes SQL Server reject the call before the procedure runs. Only an explicit NULL produces the status row "Mandatory parameter ExportGdprDataForPolling is missing".- Validation errors are returned as a normal row with
Status=Error, not as a SQL error.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
OrderNr
|
int | NULL |
Pixi order number. Example: |
OrderNrExternal
|
varchar(50) string |
NULL |
External order number (e.g. shop order number). Empty string is treated as NULL. Used if no order is found via Example: |
ExportGdprDataForPolling
Required
|
bit boolean |
– |
New value of the GDPR polling export flag. Allowed values
Example: |
User
|
varchar(50) string |
NULL |
User name written to Example: |
Result set 1 · Always
One status row describing the outcome.
| Column | Type | Description |
|---|---|---|
Status
|
varchar(10) string |
|
Message
|
varchar(100) string |
Result or error message. |
Response example
<SqlRowSet1>
<row>
<Status>Success</Status>
<Message>GDPR Polling Export Flag successfully updated</Message>
</row>
</SqlRowSet1>
| Status | Message | Cause |
|---|---|---|
| Error | Mandatory parameter OrderNr/OrderNrExternal is missing | Neither `OrderNr` (non-zero) nor a non-empty `OrderNrExternal` was supplied. |
| Error | Order can not be found | No order matches the given `OrderNr` or `OrderNrExternal`. |
| Error | Mandatory parameter ExportGdprDataForPolling is missing | `ExportGdprDataForPolling` was passed as NULL. |
| Warning | GDPR Polling Export Flag is already set to {TRUE|FALSE} | The order already has the requested flag value; nothing was changed. |
| Error | Unexpected error: "{error message}" | An unexpected SQL error occurred; the transaction is rolled back and the error is logged. The text is truncated to 80 characters. |
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:pixiOrderSetGdprPollingExportFlag>
<!-- <OrderNr>123456</OrderNr> -->
<!-- <OrderNrExternal>SHOP-100045</OrderNrExternal> -->
<ExportGdprDataForPolling>1</ExportGdprDataForPolling>
<!-- <User>ShopSync</User> -->
</ns1:pixiOrderSetGdprPollingExportFlag>
</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:pixiOrderSetGdprPollingExportFlag>
<!-- <OrderNr>123456</OrderNr> -->
<!-- <OrderNrExternal>SHOP-100045</OrderNrExternal> -->
<ExportGdprDataForPolling>1</ExportGdprDataForPolling>
<!-- <User>ShopSync</User> -->
</ns1:pixiOrderSetGdprPollingExportFlag>
</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 = [
// 'OrderNr' => '123456',
// 'OrderNrExternal' => 'SHOP-100045',
'ExportGdprDataForPolling' => '1',
// 'User' => 'ShopSync',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiOrderSetGdprPollingExportFlag', $soapArguments);
- SQL object:
- dbo.pipiOrderSetGdprPollingExportFlag