pixiGetCustomersToRefund
The API call returns list of Customers which should be refunded.
Since pixi version: 18.03 (8.4.39.33732) Additional notes:
Request
Request body
Name | Type | Required | Description |
---|---|---|---|
ShopId | string | false | Limit results by Shop id. Type: varchar(3) Default value: NULL Example: ABC Available from: 18.03 (8.4.39.33732) |
AmountTo | number | false | Limit results by maximal amount to be refunded Type: money Default value: 1000000 Example: 1000.5 Available from: 18.03 (8.4.39.33732) |
AmountFrom | number | false | Limit results by minimal amount to be refunded. Type: money Default value: 0 Example: 1.1 Available from: 18.03 (8.4.39.33732) |
IsAccountMatched | boolean | false | Limit results to only matched / not matched or all accounts. Type: bit Default value: NULL Example: 1 Available from: 18.03 (8.4.39.33732) |
Request Example
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body xmlns="">
<pixiGetCustomersToRefund>
<ShopId>string</ShopId>
<AmountFrom>0</AmountFrom>
<AmountTo>0</AmountTo>
<IsAccountMatched>true</IsAccountMatched>
</pixiGetCustomersToRefund>
</Body>
</Envelope>
Response
1. List of customers which should be refunded
Name | Type | Description |
---|---|---|
ShopId | string | Shop code Type: VARCHAR(3) Available from: 25.06 (25.6.0.58802) |
CustKey | integer | Customer Id Type: INT Available from: 25.06 (25.6.0.58802) |
IsMatched | boolean | Is customer account matched Type: BIT Available from: 25.06 (25.6.0.58802) |
CurrencyId | integer | Currency Id Type: INT Available from: 25.06 (25.6.0.58802) |
OpenOrders | number | Open orders amount Type: MONEY Available from: 25.06 (25.6.0.58802) |
OpenToMatch | number | Amount which is open to match Type: MONEY Available from: 25.06 (25.6.0.58802) |
SuggestedRefund | number | Amount suggested to be refunded Type: MONEY Available from: 25.06 (25.6.0.58802) |
FinancialBalance | number | Financal balance Type: MONEY Available from: 25.06 (25.6.0.58802) |
Response Example
<PixiGetCustomersToRefundPost200TextXmlResponse>
<CustKey>0</CustKey>
<ShopId>string</ShopId>
<IsMatched>true</IsMatched>
<SuggestedRefund>0</SuggestedRefund>
<FinancialBalance>0</FinancialBalance>
<OpenOrders>0</OpenOrders>
<OpenToMatch>0</OpenToMatch>
<CurrencyId>0</CurrencyId>
</PixiGetCustomersToRefundPost200TextXmlResponse>
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:pixiGetCustomersToRefund>
<ShopId xsi:type="xsd:string">ABC</ShopId>
<AmountTo xsi:type="xsd:number">1000.5</AmountTo>
<AmountFrom xsi:type="xsd:number">1.1</AmountFrom>
<IsAccountMatched xsi:type="xsd:boolean">1</IsAccountMatched>
</ns1:pixiGetCustomersToRefund>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
PHP Example
<?php
getPixiSoapClientResponse('pixiGetCustomersToRefund', [
'ShopId' => 'ABC', // string
'AmountTo' => '1000.5', // number
'AmountFrom' => '1.1', // number
'IsAccountMatched' => '1', // boolean
]);
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);
}