pixiGetAddress
Returns a single address record identified by its address key, including country details, bank data and payment type.
Reads one address from the Pixi address table by its primary key AddrKey.
- The address is filtered by
AddrKey = @AddrKey. At most one row is returned. - The country of the address (
Country) is joined with the country table via the country code. The country name and the ISO-2 and ISO-3 codes are added to the result. If no matching country exists, these columns are empty. - Besides contact data (name, company, street, ZIP, city, phone, fax, e-mail), the result contains the external customer number, the linked customer key (
CustKey), the VAT ID, the birth date, a note, bank data (account number, account owner, BLZ, bank name, BIC, IBAN) and the payment type stored at the address. - Several columns are renamed in the output, e.g.
AnredebecomesTitle,CareOfbecomesCompany,AdrCustRefbecomesCustKeyandUsStIdbecomesVatID.
Notes
- Both tables are read
WITH (NOLOCK), so uncommitted changes may be visible. - If no address with the given key exists, the result set is empty; no error message is returned.
- The result contains bank data (IBAN, BIC, account number). Handle it according to data protection requirements.
- The column data types are not visible in the procedure; the types listed here are not confirmed by the code.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
AddrKey
Required
|
int | – |
Primary key of the address to return. Example: |
Result set 1 · Always; contains one row if the address exists, otherwise no rows.
The address with country details, bank data and payment type.
| Column | Type | Description |
|---|---|---|
AddrKey
|
int |
Primary key of the address. |
AddrType
Nullable |
string |
Type of the address. |
CustomerNrExternal
Nullable |
string |
External customer number (e.g. from the shop). |
Title
Nullable |
string |
Salutation (source column |
Name
Nullable |
string |
Full name. |
FirstName
Nullable |
string |
First name. |
LastName
Nullable |
string |
Last name. |
Company
Nullable |
string |
Company / c/o line (source column |
Address
Nullable |
string |
Address line (street and house number as one field). |
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 |
Creation date of the address. |
Note
Nullable |
string |
Note on the address. |
CustKey
Nullable |
int |
Key of the linked customer (source column |
VatID
Nullable |
string |
VAT identification number (source 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. |
AccountNr
Nullable |
string |
Bank account number (source column |
AccountOwner
Nullable |
string |
Account owner (source column |
BLZ
Nullable |
string |
Bank code (source column |
BankName
Nullable |
string |
Name of the bank (source column |
BIC
Nullable |
string |
BIC of the bank. |
IBAN
Nullable |
string |
IBAN of the account. |
PaymentType
Nullable |
string |
Payment type stored at the address (source column |
BirthDate
Nullable |
dateTime |
Birth date. |
Response example
<SqlRowSet1>
<row>
<AddrKey>104527</AddrKey>
<AddrType>1</AddrType>
<CustomerNrExternal>K-20931</CustomerNrExternal>
<Title>Frau</Title>
<Name>Anna Müller</Name>
<FirstName>Anna</FirstName>
<LastName>Müller</LastName>
<Company>Müller GmbH</Company>
<Address>Hauptstraße 12</Address>
<Street>Hauptstraße</Street>
<HouseNr>12</HouseNr>
<City>München</City>
<ZIP>80331</ZIP>
<Country>D</Country>
<Phone>+49 89 123456</Phone>
<Fax/>
<eMail>anna.mueller@example.de</eMail>
<CreateDate>2023-05-14T10:22:31</CreateDate>
<Note/>
<CustKey>55210</CustKey>
<VatID>DE123456789</VatID>
<CountryName>Deutschland</CountryName>
<CountryCodeISO2>DE</CountryCodeISO2>
<CountryCodeISO3>DEU</CountryCodeISO3>
<AccountNr/>
<AccountOwner>Anna Müller</AccountOwner>
<BLZ/>
<BankName>Musterbank</BankName>
<BIC>MUSTDEMMXXX</BIC>
<IBAN>DE89370400440532013000</IBAN>
<PaymentType>RECHNUNG</PaymentType>
<BirthDate>1985-03-02T00:00:00</BirthDate>
</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:pixiGetAddress>
<AddrKey>104527</AddrKey>
</ns1:pixiGetAddress>
</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:pixiGetAddress>
<AddrKey>104527</AddrKey>
</ns1:pixiGetAddress>
</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 = [
'AddrKey' => '104527',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiGetAddress', $soapArguments);
- SQL object:
- dbo.pipiGetAddress