pixiGetCustomerAccountBalance
API cal to retrieve customer account balance.
Since pixi version: LOU Official - Update 46 (6.9.46.27927) Additional notes:
Request
Request body
Name | Type | Required | Description |
---|---|---|---|
DateTo | string | false | Show Balance of Customer Account on this date Type: datetime Default value: NULL Example: Available from: LOU Official - Update 46 (6.9.46.27927) |
ShopId | string | false | Filter by specified shop. Type: varchar(3) Default value: NULL Example: abc Available from: 23.02 (23.2.0.35344) |
CustKey | string | true | Customer Id or Customer Number External Type: varchar(200) Default value: Example: abc Available from: LOU Official - Update 46 (6.9.46.27927) |
Request Example
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body xmlns="">
<pixiGetCustomerAccountBalance>
<CustKey>string</CustKey>
<DateTo>string</DateTo>
<ShopId>string</ShopId>
</pixiGetCustomerAccountBalance>
</Body>
</Envelope>
Response
1. Customer account balance details
Name | Type | Description |
---|---|---|
ShopId | string | Shop Id Type: varchar Available from: / (25.7.0.59144) |
CAbalance | number | Customer Account Balance Type: money Available from: / (25.7.0.59144) |
CustomerId | integer | ID of the customer record Type: int Available from: / (25.7.0.59144) |
BaseCurrency | string | Base currency Type: varchar Available from: / (25.7.0.59144) |
LastEventDate | string | Last customer account event date Type: datetime Available from: / (25.7.0.59144) |
CustomerNrExternal | string | Customer number external Type: varchar Available from: / (25.7.0.59144) |
Response Example
<PixiGetCustomerAccountBalancePost200TextXmlResponse>
<CustomerId>0</CustomerId>
<CustomerNrExternal>string</CustomerNrExternal>
<ShopId>string</ShopId>
<CAbalance>0</CAbalance>
<BaseCurrency>string</BaseCurrency>
<LastEventDate>string</LastEventDate>
</PixiGetCustomerAccountBalancePost200TextXmlResponse>
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:pixiGetCustomerAccountBalance>
<DateTo xsi:type="xsd:string"></DateTo>
<ShopId xsi:type="xsd:string">abc</ShopId>
<CustKey xsi:type="xsd:string">abc</CustKey> <!-- required -->
</ns1:pixiGetCustomerAccountBalance>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
PHP Example
<?php
getPixiSoapClientResponse('pixiGetCustomerAccountBalance', [
'DateTo' => '', // string
'ShopId' => 'abc', // string
'CustKey' => 'abc', // string (required)
]);
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);
}