pixiRequestPartialDelivery
Enables or disables partial delivery for an order and sets the related cancel and multi-partial-delivery flags, unless the order is closed or on hold.
Changes the partial delivery settings in the header of one order.
- The overall state of the order is determined from its order lines:
CLOSED– all lines are in a final state, or the order has no order lines at all (this also applies to order numbers that do not exist).HOLD– every line is either in statusHAL, in statusMINor in a final state.OPEN– otherwise.
- Only if the state is neither
CLOSEDnorHOLD, the order header withOrderNr=@OrderNris updated:ForceToPicklistIfNotFULLis set to1if@PartialDeliveryActiveis1; if it is0orNULL, the field is set toNULL(partial delivery off). This value is always written.OHCancelAfterForcedShipOutis set to@CancelUnavailableItems; if the parameter is omitted orNULL, the current value is kept.OHMultiForceToPicklistis set to@PartialDeliveryForRemaining; if the parameter is omitted orNULL, the current value is kept.
- The number of affected rows is returned in the column
RowsUpdated(1if the order header was updated).
Notes
- No error is raised if the order is closed, on hold or does not exist; the call simply performs no update. Check
RowsUpdatedto see whether the change was applied. RowsUpdatedis read from@@ROWCOUNTafter the conditional update. If the update is skipped, the value is not explicitly set to0but taken from SQL Server's row count handling of the preceding statements; do not rely on it alone to distinguish states – query the order state separately if exact feedback is needed.- Unlike the other two flags,
@PartialDeliveryActivehas no keep-current fallback: passingNULLswitches partial delivery off. - The order state is determined with
NOLOCKreads on order lines, so concurrently changing lines may lead to a slightly outdated state check. - No explicit transaction is used.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
OrderNr
Required
|
int | – |
Internal Pixi order number ( Example: |
PartialDeliveryActive
Required
|
bit boolean |
– |
Switches partial delivery on or off ( Allowed values
Example: |
CancelUnavailableItems
|
bit boolean |
NULL |
Value for Example: |
PartialDeliveryForRemaining
|
bit boolean |
NULL |
Value for Example: |
Result set 1 · Always
Number of order header rows updated.
| Column | Type | Description |
|---|---|---|
RowsUpdated
|
int |
Value of |
Response example
<SqlRowSet1>
<row>
<RowsUpdated>1</RowsUpdated>
</row>
</SqlRowSet1>
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:pixiRequestPartialDelivery>
<OrderNr>123456</OrderNr>
<PartialDeliveryActive>1</PartialDeliveryActive>
<!-- <CancelUnavailableItems>0</CancelUnavailableItems> -->
<!-- <PartialDeliveryForRemaining>1</PartialDeliveryForRemaining> -->
</ns1:pixiRequestPartialDelivery>
</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:pixiRequestPartialDelivery>
<OrderNr>123456</OrderNr>
<PartialDeliveryActive>1</PartialDeliveryActive>
<!-- <CancelUnavailableItems>0</CancelUnavailableItems> -->
<!-- <PartialDeliveryForRemaining>1</PartialDeliveryForRemaining> -->
</ns1:pixiRequestPartialDelivery>
</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',
'PartialDeliveryActive' => '1',
// 'CancelUnavailableItems' => '0',
// 'PartialDeliveryForRemaining' => '1',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiRequestPartialDelivery', $soapArguments);
- SQL object:
- dbo.pipiRequestPartialDelivery