pixiReadAddresses
Returns address records from the Addresses table, either a single address by key or a list filtered by creation and/or update date with key-based paging.
Reads addresses (customer and other address records) from the Addresses table. All branches return the same 66 columns.
Preparation
- If
RowCountis set to a value other than 0, the number of returned rows is limited to that value (SET ROWCOUNT). - If
AddrKeyis omitted, it is treated as0.
Filter mode – the first matching rule wins:
CreateAndUpdateDateFromorCreateAndUpdateDateToset: returns addresses withAddrKey>AddrKeywhere (CreateDate>= From orUpdateDate>= From) and (CreateDate< To orUpdateDate< To). Each bound is optional.CreateDateFromorCreateDateToset: returns addresses withAddrKey>AddrKeyandCreateDatein the range[From, To).UpdateDateFromorUpdateDateToset: returns addresses withAddrKey>AddrKeyandUpdateDatein the range[From, To).RowCountpassed (any value, including0): returns all addresses withAddrKey>AddrKey.- Otherwise: returns the single address whose
AddrKeyequals the passed value.
In modes 1–4 the result is sorted by AddrKey ascending, and AddrKey acts as an exclusive lower bound. This allows paging: pass the last AddrKey received as AddrKey of the next call together with RowCount.
The lower date bounds are inclusive and the upper date bounds are exclusive.
Notes
- The table is read
WITH (NOLOCK). Uncommitted changes may be returned, and rows can be missed or duplicated while data is being changed. - The date filter groups are not combined: only the group with the highest priority is applied (combined date > create date > update date), and the others are ignored.
- In combined mode the From and To conditions are evaluated independently. For example, an address created before the To bound and updated after the From bound is returned even if neither date lies inside the window. A row whose
UpdateDateis NULL can only match throughCreateDate. - If
AddrKeyis passed together with a date filter orRowCount, it is not an exact match but an exclusive lower bound. RowCount = 0switches to mode 4 without a row limit and therefore returns all addresses aboveAddrKey.- Calling without any parameter returns the address with
AddrKey = 0, which usually returns no row. - The result contains sensitive payment data such as card number, card verification code (
CCCVC), IBAN and bank account data. Restrict access and logging accordingly. - The column types of
Addressesare not visible in the code. The column meanings in this documentation are derived from the column names.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
AddrKey
|
int | NULL |
Address key. Without date filter and Example: |
CreateDateFrom
|
datetime dateTime |
NULL |
Inclusive lower bound for Example: |
CreateDateTo
|
datetime dateTime |
NULL |
Exclusive upper bound for Example: |
UpdateDateFrom
|
datetime dateTime |
NULL |
Inclusive lower bound for Example: |
UpdateDateTo
|
datetime dateTime |
NULL |
Exclusive upper bound for Example: |
CreateAndUpdateDateFrom
|
datetime dateTime |
NULL |
Inclusive lower bound that matches if Example: |
CreateAndUpdateDateTo
|
datetime dateTime |
NULL |
Exclusive upper bound that matches if Example: |
RowCount
|
int | NULL |
Maximum number of rows to return. 0 or NULL means no limit. If passed (even as 0) without date filters, all addresses with a key greater than Example: |
Result set 1 · Always; it may be empty. Contents depend on the filter mode chosen by the parameters.
Address records from Addresses. They are sorted by AddrKey ascending in list modes.
| Column | Type | Description |
|---|---|---|
AddrKey
|
int |
Internal primary key of the address. |
AddrNr
Nullable |
string |
Address or customer number. |
AddrType
Nullable |
string |
Address type. |
CustomerNrExternal
Nullable |
string |
External customer number, e.g. from the shop. |
AddrShopID
Nullable |
string |
Shop the address belongs to. |
SearchKey
Nullable |
string |
Search key (match code). |
Anrede
Nullable |
string |
Salutation. |
Name
Nullable |
string |
Name or company name. |
Name2
Nullable |
string |
Additional name line. |
FirstName
Nullable |
string |
First name. |
LastName
Nullable |
string |
Last name. |
CareOf
Nullable |
string |
Care-of (c/o) line. |
Address
Nullable |
string |
Address line (street and house number). |
Street
Nullable |
string |
Street. |
HouseNr
Nullable |
string |
House number. |
City
Nullable |
string |
City. |
State
Nullable |
string |
State or region. |
ZIP
Nullable |
string |
Postal code. |
Country
Nullable |
string |
Country. |
ZIPMB
Nullable |
string |
Postal code of the PO box. |
Mailbox
Nullable |
string |
PO box. |
Contact
Nullable |
string |
Contact person. |
CAnrede
Nullable |
string |
Salutation of the contact person. |
Ansprache
Nullable |
string |
Letter salutation. |
Phone
Nullable |
string |
Phone number. |
Phone2
Nullable |
string |
Second phone number. |
Fax
Nullable |
string |
Fax number. |
Fax2
Nullable |
string |
Second fax number. |
eMail
Nullable |
string |
E-mail address. |
eMail2
Nullable |
string |
Second e-mail address. |
UsStId
Nullable |
string |
VAT identification number. |
CompanyType
Nullable |
string |
Company type. |
CompanySince
Nullable |
string |
Company existing since. |
BirthDate
Nullable |
dateTime |
Date of birth. |
Note
Nullable |
string |
Note. |
CreateDate
Nullable |
dateTime |
Creation timestamp. |
CreateEmp
Nullable |
string |
Employee who created the record. |
UpdateDate
Nullable |
dateTime |
Timestamp of last change. |
UpdateEmp
Nullable |
string |
Employee who last changed the record. |
active
Nullable |
string |
Active flag. |
ACardType
Nullable |
string |
Credit card type. |
ACardName
Nullable |
string |
Card holder name. |
ACardNr
Nullable |
string |
Credit card number. |
ACardExp
Nullable |
string |
Card expiry date. |
AAccount
Nullable |
string |
Bank account number. |
ABLZ
Nullable |
string |
Bank code. |
ABankName
Nullable |
string |
Bank name. |
AAccName
Nullable |
string |
Account holder. |
APayment
Nullable |
string |
Default payment method. |
AIssueNr
Nullable |
string |
Card issue number. |
AdrCustRef
Nullable |
string |
Customer reference. |
rowguid
Nullable |
string |
Row GUID of the record. |
ASlocked
Nullable |
string |
Locked flag of the address. |
AWaitDays
Nullable |
int |
Waiting days. |
AShipImmed
Nullable |
string |
Ship-immediately flag. |
AGosF1
Nullable |
string |
Additional field 1; its meaning is not visible in the code. |
AGosF2
Nullable |
string |
Additional field 2; its meaning is not visible in the code. |
AHisNote
Nullable |
string |
History note. |
AReplFlag
Nullable |
string |
Replication flag. |
CCCVC
Nullable |
string |
Card verification code. |
AddrNoChargeVAT
Nullable |
string |
Flag that no VAT is charged for this address. |
BIC
Nullable |
string |
BIC of the bank. |
IBAN
Nullable |
string |
IBAN. |
PersonContact_Id
Nullable |
int |
Reference to a person contact record. |
Billing_Id
Nullable |
int |
Reference to a billing record. |
Response example
<SqlRowSet1>
<row>
<AddrKey>10251</AddrKey>
<AddrNr>K10251</AddrNr>
<AddrType>C</AddrType>
<CustomerNrExternal>SHOP-4711</CustomerNrExternal>
<AddrShopID>SHOP1</AddrShopID>
<Anrede>Herr</Anrede>
<Name>Max Mustermann</Name>
<FirstName>Max</FirstName>
<LastName>Mustermann</LastName>
<Street>Hauptstraße</Street>
<HouseNr>12</HouseNr>
<City>Berlin</City>
<ZIP>10115</ZIP>
<Country>DE</Country>
<eMail>max@example.com</eMail>
<CreateDate>2024-03-01T09:15:00</CreateDate>
<CreateEmp>API</CreateEmp>
<UpdateDate>2024-03-01T10:02:00</UpdateDate>
<UpdateEmp>API</UpdateEmp>
<active>1</active>
</row>
<row>
<AddrKey>10252</AddrKey>
<AddrNr>K10252</AddrNr>
<AddrType>C</AddrType>
<AddrShopID>SHOP1</AddrShopID>
<Anrede>Frau</Anrede>
<Name>Erika Musterfrau</Name>
<FirstName>Erika</FirstName>
<LastName>Musterfrau</LastName>
<Street>Ringweg</Street>
<HouseNr>3a</HouseNr>
<City>Hamburg</City>
<ZIP>20095</ZIP>
<Country>DE</Country>
<eMail>erika@example.com</eMail>
<CreateDate>2024-03-01T11:40:00</CreateDate>
<CreateEmp>API</CreateEmp>
<active>1</active>
</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:pixiReadAddresses>
<!-- <AddrKey>10250</AddrKey> -->
<!-- <CreateDateFrom>2024-01-01T00:00:00</CreateDateFrom> -->
<!-- <CreateDateTo>2024-02-01T00:00:00</CreateDateTo> -->
<!-- <UpdateDateFrom>2024-01-01T00:00:00</UpdateDateFrom> -->
<!-- <UpdateDateTo>2024-02-01T00:00:00</UpdateDateTo> -->
<!-- <CreateAndUpdateDateFrom>2024-03-01T00:00:00</CreateAndUpdateDateFrom> -->
<!-- <CreateAndUpdateDateTo>2024-03-02T00:00:00</CreateAndUpdateDateTo> -->
<!-- <RowCount>500</RowCount> -->
</ns1:pixiReadAddresses>
</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:pixiReadAddresses>
<!-- <AddrKey>10250</AddrKey> -->
<!-- <CreateDateFrom>2024-01-01T00:00:00</CreateDateFrom> -->
<!-- <CreateDateTo>2024-02-01T00:00:00</CreateDateTo> -->
<!-- <UpdateDateFrom>2024-01-01T00:00:00</UpdateDateFrom> -->
<!-- <UpdateDateTo>2024-02-01T00:00:00</UpdateDateTo> -->
<!-- <CreateAndUpdateDateFrom>2024-03-01T00:00:00</CreateAndUpdateDateFrom> -->
<!-- <CreateAndUpdateDateTo>2024-03-02T00:00:00</CreateAndUpdateDateTo> -->
<!-- <RowCount>500</RowCount> -->
</ns1:pixiReadAddresses>
</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' => '10250',
// 'CreateDateFrom' => '2024-01-01T00:00:00',
// 'CreateDateTo' => '2024-02-01T00:00:00',
// 'UpdateDateFrom' => '2024-01-01T00:00:00',
// 'UpdateDateTo' => '2024-02-01T00:00:00',
// 'CreateAndUpdateDateFrom' => '2024-03-01T00:00:00',
// 'CreateAndUpdateDateTo' => '2024-03-02T00:00:00',
// 'RowCount' => '500',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiReadAddresses', $soapArguments);
- SQL object:
- dbo.pipiReadAddresses