Postman collection
Shipping Read

pixiGetInvoicePackage

Returns the shipping packages of an invoice (labels, tracking IDs, weight, dimensions), selected by invoice number, invoice ID or package ID.

Reads the packages stored for an invoice in pixi.InvoicePackage, together with the package dimension code, the external order number and the invoice number.

Parameter handling and checks (each failed check returns a single Status/Message row with Status = Error):

  1. An empty InvoiceNumber is treated as NULL. At least one of InvoiceNumber, InvoiceId, PackageId must be given.
  2. InvoiceNumber is resolved to an invoice ID (first match on InvoiceNr).
  3. If InvoiceId or the resolved ID is set, at least one of them must exist in Invoices.
  4. If PackageId is given, the package must exist.
  5. If InvoiceId and InvoiceNumber point to different invoices, the call fails.
  6. If both a package and an invoice are given, the package must belong to that invoice.

Selection

  • The effective invoice is InvoiceId, otherwise the invoice resolved from InvoiceNumber.
  • Returned are all packages where the package ID equals PackageId or the invoice ID equals the effective invoice. If an invoice is given, all of its packages are returned, even if PackageId is also given. If only PackageId is given, only that package is returned.
  • InvoiceNr and OrderNrExternal are the same in every row. They are taken from the invoice (given directly or via the package) that is linked to order lines: OrderNrExternal comes from the order with the highest Order_Id of the invoice lines.
  • No sort order is defined.

If no package matches, an Info row is returned.

Notes

  • All reads use NOLOCK, so uncommitted data can be returned.
  • The response shape differs: on error or when nothing is found, a Status/Message row is returned instead of package rows. Check for a Status column.
  • An invoice number that does not exist is not reported as an error when no InvoiceId is given. Without PackageId the call then returns the Info row. With PackageId it returns only that package.
  • If InvoiceId does not exist but InvoiceNumber is valid, the error is the "Two different invoices" message, not "No invoice found".
  • An invoice is ignored for InvoiceNr/OrderNrExternal if it has no invoice lines or if any of its invoice lines has no order line reference. In that case both columns are NULL, but the packages are still returned.
  • The return value is 1 on error and 0 otherwise. It is not part of the SOAP result rows.

Tables used

Invoices · Read InvoicePackage · Read Invlines · Read Orderlines · Read OrderHeader · Read PackageDimension · Read
SQL object:
dbo.pipiGetInvoicePackage
Updated at 2026-10-30