pixiWebLogin
Use this function to determine whether the given combination of email and ZIP-code belong to a customer, registered in pixi*. Can, for example, be used to program authentication procedures for web applications.
Since pixi version: LOU Official (6.3.0.4452) Additional notes:
Request
POST
https://apigateway.descartes.com/tms/pixi/pixiWebLogin
Request body
Name | Type | Required | Description |
---|---|---|---|
ZIP | string | false | [optional] ZIP code Type: varchar (10) Default value: Example: Available from: LOU Official (6.3.0.4452) |
string | false | [optional] Email address Type: varchar (60) Default value: Example: Available from: LOU Official (6.3.0.4452) |
Request Example
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body xmlns="">
<pixiWebLogin>
<Email>string</Email>
<ZIP>string</ZIP>
</pixiWebLogin>
</Body>
</Envelope>
Response
Name | Type | Description |
---|---|---|
return | integer | If the user is found, his/her User ID is returned. Otherwise, 0 is returned. Type: int Available from: LOU Official (6.3.0.4452) |
Response Example
<PixiWebLoginPost200TextXmlResponse>
<return>0</return>
</PixiWebLoginPost200TextXmlResponse>
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:pixiWebLogin>
<ZIP xsi:type="xsd:string"></ZIP>
<Email xsi:type="xsd:string"></Email>
</ns1:pixiWebLogin>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
PHP Example
<?php
getPixiSoapClientResponse('pixiWebLogin', [
'ZIP' => '', // string
'Email' => '', // string
]);
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);
}