Postman collection
Invoices Write

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.

  1. The invoice is looked up with the condition InvoiceNr = @InvoiceNr OR InvoiceKey = @InvoiceKey.
  2. If this condition matches no invoice, or more than one invoice, the call returns a status row with ErrorNr = 404 and changes nothing. This happens if:
    • neither InvoiceNr nor InvoiceKey is passed,
    • the given number or key does not exist,
    • InvoiceNr and InvoiceKey point to two different invoices.
  3. If exactly one invoice matches, its Note is overwritten with @Note, and a status row with ErrorNr = 200 and an empty ErrorMessage is returned.
  4. If the update fails, a status row with ErrorNr = 500 is returned.

Passing both parameters is allowed if they refer to the same invoice.

Notes

  • The existing note is replaced, not appended. If Note is omitted, it defaults to NULL and the note of the invoice is cleared.
  • The existence check reads Invoices with NOLOCK; check and update are not wrapped in a transaction.
  • The 500 status row does not contain the original SQL error text.
  • ErrorNr is returned as a string ('200', '404', '500'), not as a number.
  • @Note is declared as varchar(255); longer texts may be truncated.

Tables used

Invoices · Write
SQL object:
dbo.pipiInvoiceSetInfo
Updated at 2026-10-30