pixiCustomerKeyByEmail
This function returns pixi* Customer Key by a given customer eMail. It is possible to determine how one wishes to handle ambigous situations when there are several customers in pixi* with the same email
Since pixi version: LOU Official (6.3.0.4452) Additional notes:
Request
Request body
Name | Type | Required | Description |
---|---|---|---|
string | true | [mandatory] eMail Address of the customer Type: varchar (60) Default value: Example: Available from: LOU Official (6.3.0.4452) |
|
ShopId | string | false | [optional] ID of the shop, to which the customer belongs Type: char Default value: Example: Available from: LOU Official (6.3.0.4452) |
AllowAmbiguous | boolean | false | [optional] If this parameter is 0 (default value), in case when pixi* database contains several customers with same email, function will return NULL. If the parameter is 1, then one of these customers' Key will be returned (it is undefined, which one's) Type: bit Default value: Example: Available from: LOU Official (6.3.0.4452) |
Request Example
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body xmlns="">
<pixiCustomerKeyByEmail>
<eMail>string</eMail>
<ShopId>string</ShopId>
<AllowAmbiguous>true</AllowAmbiguous>
</pixiCustomerKeyByEmail>
</Body>
</Envelope>
Response
Name | Type | Description |
---|---|---|
return | integer | Customer Key Type: int Available from: LOU Official (6.3.0.4452) |
Response Example
<PixiCustomerKeyByEmailPost200TextXmlResponse>
<return>0</return>
</PixiCustomerKeyByEmailPost200TextXmlResponse>
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:pixiCustomerKeyByEmail>
<eMail xsi:type="xsd:string"></eMail> <!-- required -->
<ShopId xsi:type="xsd:string"></ShopId>
<AllowAmbiguous xsi:type="xsd:boolean"></AllowAmbiguous>
</ns1:pixiCustomerKeyByEmail>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
PHP Example
<?php
getPixiSoapClientResponse('pixiCustomerKeyByEmail', [
'eMail' => '', // string (required)
'ShopId' => '', // string
'AllowAmbiguous' => '', // 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);
}