pixiGetInvoiceShippingReport
Returns all invoices in a date range with the DATEV account number of the customer and the shipping address, optionally filtered by shop.
Lists invoices together with the customer's DATEV account number and the shipping address of the invoice. According to the header comment, the call was created for one specific customer ("Customer LLL").
Steps:
- An empty
ShopIDis treated likeNULL, which means all shops. - If
DateFromis not passed, it is set to the start of the day 30 days ago (00:00:00). - If
DateTois not passed, it is set to the end of the current day (23:59:59.997). - The invoices come from the view or table
PV_Rechnungen. Only invoices withRechnungsdatum >= DateFromandRechnungsdatum < DateToare returned. The upper bound is exclusive. - Each invoice is joined via its invoice number to
Invoices. From there the customer (Customers, for the DATEV account number) and the shipping address (AddressesviaShipAdrRef) are read. The country name comes fromCountries. - If
ShopIDis set, only invoices whoseInvShopIDmatches are returned.
The result has no defined sort order and no paging.
Notes
- All tables are read with
NOLOCK. The result can contain uncommitted data. DateTois compared with<. If a pure date such as2024-03-31T00:00:00is passed, invoices from that day are not included. To include them, pass the following day or a time at the end of the day.- The joins are
LEFT JOINs. Without a shop filter, invoices that have no matching entry inInvoices,Customers,AddressesorCountriesare still returned, withNULLvalues in the missing columns. With a shop filter, invoices without a matchingInvoicesrow are excluded. Firmais filled from theCareOffield of the address.PV_Rechnungenis not attached. Whether it is a view and how it selects invoices cannot be seen from the code.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
ShopID
|
varchar(3) string |
NULL |
Shop ID to filter by ( Example: |
DateFrom
|
datetime dateTime |
NULL |
Start of the period (inclusive), compared with the invoice date. If Example: |
DateTo
|
datetime dateTime |
NULL |
End of the period (exclusive), compared with the invoice date. If Example: |
Result set 1 · Always (can be empty)
One row per invoice in the period, with the customer's DATEV account number and the shipping address.
| Column | Type | Description |
|---|---|---|
Datevnummer
Nullable |
varchar(10) string |
DATEV account number of the customer ( |
Rechnungsnummer
|
string |
Invoice number from |
Vorname
Nullable |
string |
First name in the shipping address. |
Nachname
Nullable |
string |
Last name in the shipping address. |
Firma
Nullable |
string |
Company or c/o line of the shipping address ( |
Strasse
Nullable |
string |
Street of the shipping address. |
PLZ
Nullable |
string |
Postal code of the shipping address. |
Stadt
Nullable |
string |
City of the shipping address. |
Land
Nullable |
string |
Country name of the shipping address ( |
eMail
Nullable |
string |
E-mail address stored in the shipping address. |
Response example
<SqlRowSet1>
<row>
<Datevnummer>10045</Datevnummer>
<Rechnungsnummer>RE2024001234</Rechnungsnummer>
<Vorname>Anna</Vorname>
<Nachname>Müller</Nachname>
<Firma>Müller GmbH</Firma>
<Strasse>Hauptstraße 12</Strasse>
<PLZ>80331</PLZ>
<Stadt>München</Stadt>
<Land>Deutschland</Land>
<eMail>anna.mueller@example.com</eMail>
</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:pixiGetInvoiceShippingReport>
<!-- <ShopID>SHP</ShopID> -->
<!-- <DateFrom>2024-03-01T00:00:00</DateFrom> -->
<!-- <DateTo>2024-04-01T00:00:00</DateTo> -->
</ns1:pixiGetInvoiceShippingReport>
</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:pixiGetInvoiceShippingReport>
<!-- <ShopID>SHP</ShopID> -->
<!-- <DateFrom>2024-03-01T00:00:00</DateFrom> -->
<!-- <DateTo>2024-04-01T00:00:00</DateTo> -->
</ns1:pixiGetInvoiceShippingReport>
</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 = [
// 'ShopID' => 'SHP',
// 'DateFrom' => '2024-03-01T00:00:00',
// 'DateTo' => '2024-04-01T00:00:00',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiGetInvoiceShippingReport', $soapArguments);
- SQL object:
- dbo.pipiGetInvoiceShippingReport