pixiReturnCaseUpdate
API call updates return costs for given return id.
Since pixi version: 22.08 (22.8.0.29958) Additional notes:
- Return costs are updated when return is in status Received (REC).
- At Credit creation pop up those return costs are read and used when puting the return to credited (CRE) status.
Possible output messages:
- Return Case updated successfully.
- Return cost must be less then Returned items amount + Shipping costs - Discount voucher.
- Return id 1002 is not in received status.
- Return cost must be greater than 0.
- No return found for return Id: 1003
- Return id and return costs needs to be provided.
Request
POST
https://apigateway.descartes.com/tms/pixi/pixiReturnCaseUpdate
Request body
Name | Type | Required | Description |
---|---|---|---|
ReturnId | integer | false | Filter: Return Id Type: int Default value: NULL Example: 123 Available from: 22.08 (22.8.0.29958) |
UserName | string | false | User updating return costs Type: varchar(50) Default value: API Example: abcdefg Available from: 22.08 (22.8.0.29958) |
ReturnCost | number | false | Update return costs for given return Id. Positive price. The maximum value is returned items amount + shipping costs - discount voucher. Type: money Default value: NULL Example: 9.99 Available from: 22.08 (22.8.0.29958) |
Request Example
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body xmlns="">
<pixiReturnCaseUpdate>
<ReturnId>0</ReturnId>
<ReturnCost>0</ReturnCost>
<UserName>string</UserName>
</pixiReturnCaseUpdate>
</Body>
</Envelope>
Response
1. Status output
Name | Type | Description |
---|---|---|
Status | string | Execution status (Info/Error) Type: varchar Available from: 25.06 (25.6.0.58802) |
Message | string | Description of the status Type: varchar Available from: 25.06 (25.6.0.58802) |
Response Example
<PixiReturnCaseUpdatePost200TextXmlResponse>
<Status>string</Status>
<Message>string</Message>
</PixiReturnCaseUpdatePost200TextXmlResponse>
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:pixiReturnCaseUpdate>
<ReturnId xsi:type="xsd:integer">123</ReturnId>
<UserName xsi:type="xsd:string">abcdefg</UserName>
<ReturnCost xsi:type="xsd:number">9.99</ReturnCost>
</ns1:pixiReturnCaseUpdate>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
PHP Example
<?php
getPixiSoapClientResponse('pixiReturnCaseUpdate', [
'ReturnId' => '123', // integer
'UserName' => 'abcdefg', // string
'ReturnCost' => '9.99', // number
]);
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);
}