pixiGetAddressesByEmail
Returns all addresses whose e-mail address matches the given value, optionally restricted to one shop.
Searches the address table for records whose eMail equals Email.
- If
ShopIdisNULLor an empty string, addresses from all shops are returned. - Otherwise only addresses whose shop (
AddrShopID) equalsShopIdare returned.
For each address the call returns the address data, the external customer number, the linked customer key (CustKey) and the country name and ISO codes from the country table. The country data is joined with a left outer join, so addresses with an unknown country code are still returned with empty country columns.
No sort order is defined.
Notes
- Reads with
NOLOCK; uncommitted data may be returned. - The e-mail comparison is an exact equality; whether it is case-insensitive depends on the database collation. No wildcards are supported.
- An address can appear for several customers or address types (e.g. invoice and delivery addresses), so multiple rows per e-mail are normal.
- If no address matches, an empty result set is returned.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
Email
Required
|
varchar(60) string |
– |
E-mail address to search for (exact match on the address e-mail). Example: |
ShopId
|
char(3) string |
NULL |
Optional shop ID. If set, only addresses of this shop are returned; Example: |
Result set 1 · Always (may be empty)
One row per matching address.
| Column | Type | Description |
|---|---|---|
AddrKey
|
int |
Internal key of the address. |
AddrType
Nullable |
string |
Type of the address (e.g. invoice or delivery address). |
CustomerNrExternal
Nullable |
string |
External customer number, e.g. from the shop. |
Title
Nullable |
string |
Salutation (column |
Name
Nullable |
string |
Full name. |
FirstName
Nullable |
string |
First name. |
LastName
Nullable |
string |
Last name. |
Company
Nullable |
string |
Company / c/o line (column |
Address
Nullable |
string |
Address line (street and house number combined). |
Street
Nullable |
string |
Street. |
HouseNr
Nullable |
string |
House number. |
City
Nullable |
string |
City. |
ZIP
Nullable |
string |
Postal code. |
Country
Nullable |
string |
Pixi country code of the address. |
Phone
Nullable |
string |
Phone number. |
Fax
Nullable |
string |
Fax number. |
eMail
Nullable |
string |
E-mail address. |
CreateDate
Nullable |
datetime dateTime |
Creation date of the address. |
Note
Nullable |
string |
Note on the address. |
CustKey
Nullable |
int |
Key of the linked customer (column |
CountryName
Nullable |
string |
Country name from the country table; empty if the country code is unknown. |
CountryCodeISO2
Nullable |
string |
ISO 3166-1 alpha-2 country code. |
CountryCodeISO3
Nullable |
string |
ISO 3166-1 alpha-3 country code. |
Response example
<SqlRowSet1>
<row>
<AddrKey>48213</AddrKey>
<AddrType>R</AddrType>
<CustomerNrExternal>100245</CustomerNrExternal>
<Title>Herr</Title>
<Name>Max Mustermann</Name>
<FirstName>Max</FirstName>
<LastName>Mustermann</LastName>
<Company/>
<Address>Musterstraße 12</Address>
<Street>Musterstraße</Street>
<HouseNr>12</HouseNr>
<City>München</City>
<ZIP>80331</ZIP>
<Country>D</Country>
<Phone>089 123456</Phone>
<Fax/>
<eMail>max.mustermann@example.com</eMail>
<CreateDate>2023-05-14T10:22:31</CreateDate>
<Note/>
<CustKey>15032</CustKey>
<CountryName>Deutschland</CountryName>
<CountryCodeISO2>DE</CountryCodeISO2>
<CountryCodeISO3>DEU</CountryCodeISO3>
</row>
</SqlRowSet1>
POST https://apigateway.descartes.com/tms/pixi/
Content-Type: text/xml; charset=utf-8
Authorization: Basic BASE64(USERNAME:PASSWORD)
<?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/">
<SOAP-ENV:Body>
<ns1:pixiGetAddressesByEmail>
<Email>max.mustermann@example.com</Email>
<!-- <ShopId>SHP</ShopId> -->
</ns1:pixiGetAddressesByEmail>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
curl -X POST 'https://apigateway.descartes.com/tms/pixi/' \
--user 'USERNAME:PASSWORD' \
--header 'Content-Type: text/xml; charset=utf-8' \
--data-binary @- <<'XML'
<?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/">
<SOAP-ENV:Body>
<ns1:pixiGetAddressesByEmail>
<Email>max.mustermann@example.com</Email>
<!-- <ShopId>SHP</ShopId> -->
</ns1:pixiGetAddressesByEmail>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
XML
<?php
$soapClient = new SoapClient(null, [
'login' => 'USERNAME',
'password' => 'PASSWORD',
'location' => 'https://apigateway.descartes.com/tms/pixi/',
'uri' => 'https://apigateway.descartes.com/tms/pixi/',
]);
$arguments = [
'Email' => 'max.mustermann@example.com',
// 'ShopId' => 'SHP',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiGetAddressesByEmail', $soapArguments);
- SQL object:
- dbo.pipiGetAddressesByEmail