pixiInvoiceSetInfo
Sets or replaces the note (`Note`) of a single invoice identified by invoice number or invoice key.
Updates the Note field of exactly one invoice in the Invoices table.
- The invoice is looked up with the condition
InvoiceNr = @InvoiceNr OR InvoiceKey = @InvoiceKey. - If this condition matches no invoice, or more than one invoice, the call returns a status row with
ErrorNr=404and changes nothing. This happens if:- neither
InvoiceNrnorInvoiceKeyis passed, - the given number or key does not exist,
InvoiceNrandInvoiceKeypoint to two different invoices.
- neither
- If exactly one invoice matches, its
Noteis overwritten with@Note, and a status row withErrorNr=200and an emptyErrorMessageis returned. - If the update fails, a status row with
ErrorNr=500is returned.
Passing both parameters is allowed if they refer to the same invoice.
Notes
- The existing note is replaced, not appended. If
Noteis omitted, it defaults toNULLand the note of the invoice is cleared. - The existence check reads
InvoiceswithNOLOCK; check and update are not wrapped in a transaction. - The
500status row does not contain the original SQL error text. ErrorNris returned as a string ('200','404','500'), not as a number.@Noteis declared asvarchar(255); longer texts may be truncated.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
InvoiceNr
|
varchar(20) string |
NULL |
Invoice number of the invoice to update. Either this or Example: |
InvoiceKey
|
int | NULL |
Internal key of the invoice to update. Alternative to Example: |
Note
|
varchar(255) string |
NULL |
New note text for the invoice. Replaces the existing note; Example: |
Result set 1 · Always; exactly one status row.
Status of the operation.
| Column | Type | Description |
|---|---|---|
ErrorNr
|
varchar(3) string |
Status code: |
ErrorMessage
|
varchar(75) string |
Error text; empty on success. |
Response example
<SqlRowSet1>
<row>
<ErrorNr>200</ErrorNr>
<ErrorMessage/>
</row>
</SqlRowSet1>
| Status | Message | Cause |
|---|---|---|
| 404 | Invoice does not exist or two different invoice parameters were specified. | No invoice matches `InvoiceNr`/`InvoiceKey`, neither parameter was passed, or the two parameters point to different invoices. Pass a valid number or key of a single invoice. |
| 500 | Technical problems during update of the Invoice information | The update of `Invoices` raised an SQL error (e.g. locking or constraint problems). The original error is not returned; retry or check the database. |
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:pixiInvoiceSetInfo>
<!-- <InvoiceNr>RE2024001234</InvoiceNr> -->
<!-- <InvoiceKey>58213</InvoiceKey> -->
<!-- <Note>Zahlung per Vorkasse eingegangen</Note> -->
</ns1:pixiInvoiceSetInfo>
</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:pixiInvoiceSetInfo>
<!-- <InvoiceNr>RE2024001234</InvoiceNr> -->
<!-- <InvoiceKey>58213</InvoiceKey> -->
<!-- <Note>Zahlung per Vorkasse eingegangen</Note> -->
</ns1:pixiInvoiceSetInfo>
</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 = [
// 'InvoiceNr' => 'RE2024001234',
// 'InvoiceKey' => '58213',
// 'Note' => 'Zahlung per Vorkasse eingegangen',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiInvoiceSetInfo', $soapArguments);
- SQL object:
- dbo.pipiInvoiceSetInfo