Description
Creates a new invoice package for a given invoice and returns the new package ID on success. Optionally assigns invoice line items to the package (with quantity validation), sets tracking IDs, shipping and return label URLs, gross weight, package dimensions, and the shipping vendor. After the package is created, tracking IDs are propagated to the invoice record.
Access to this API call requires the Premium_API setting to be enabled in pixi. The call always returns a Status of SUCCESS or ERROR, including for validation failures.
Request Parameters
# |
Name |
Type |
Required |
Example |
Description |
1 |
InvoiceNr |
string |
0 |
INV0001 |
Invoice number. At least one of InvoiceNr or InvoiceKey must be provided. |
2 |
InvoiceKey |
integer |
0 |
123 |
Invoice ID. At least one of InvoiceNr or InvoiceKey must be provided. |
3 |
TrackingID |
string |
0 |
TRACK-001 |
Tracking ID of the shipment. Propagated to the invoice record after the package is created. |
4 |
ReturnTrackingId |
string |
0 |
RETURN-001 |
Return tracking ID of the shipment. Propagated to the invoice record after the package is created. |
5 |
ShippingLabelUrl |
string |
0 |
https://example.com/label.pdf |
URL of the shipping label. |
6 |
ReturnLabelUrl |
string |
0 |
https://example.com/return.pdf |
URL of the return label. |
7 |
ExternalShipmentId |
string |
0 |
EXT-001 |
External shipment ID provided by the shipping carrier. |
8 |
GrossWeight |
decimal |
0 |
2.500 |
Gross weight of the package. |
9 |
ShipVendorCode |
string |
0 |
DHL |
Shipping vendor code. If not provided, the shipping vendor from the invoice is used automatically. |
10 |
PackageDimensionId |
integer |
0 |
5 |
Package dimension template ID. |
11 |
Lines |
string (XML) |
0 |
Check additional information |
XML list of invoice lines and quantities to assign to this package. See Additional Notes for the required XML format and validation rules. |
12 |
ResetClientNotifiedFlag |
integer |
0 |
0 |
Set to 1 to reset the ClientNotified flag and trigger a re-export to the connected shop. Default: 0. |
13 |
Overwrite |
integer |
0 |
0 |
Set to 1 to overwrite existing tracking IDs on the invoice instead of appending them. Default: 0. |
14 |
CreateEmp |
string |
0 |
API |
Employee code used for audit logging. Defaults to API if not specified. |
Request body
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dem="https://api.pixi.eu/soap/demosandbox/">
<soapenv:Header/>
<soapenv:Body>
<dem:pixiCreateInvoicePackage>
<dem:InvoiceNr>INV0001</dem:InvoiceNr>
<dem:InvoiceKey>123</dem:InvoiceKey>
<dem:TrackingID>TRACK-001</dem:TrackingID>
<dem:ReturnTrackingId>RETURN-001</dem:ReturnTrackingId>
<dem:ShippingLabelUrl>https://example.com/label.pdf</dem:ShippingLabelUrl>
<dem:ReturnLabelUrl>https://example.com/return.pdf</dem:ReturnLabelUrl>
<dem:ExternalShipmentId>EXT-001</dem:ExternalShipmentId>
<dem:GrossWeight>2.500</dem:GrossWeight>
<dem:ShipVendorCode>DHL</dem:ShipVendorCode>
<dem:PackageDimensionId>5</dem:PackageDimensionId>
<dem:Lines>Check additional information</dem:Lines>
<dem:ResetClientNotifiedFlag>0</dem:ResetClientNotifiedFlag>
<dem:Overwrite>0</dem:Overwrite>
<dem:CreateEmp>API</dem:CreateEmp>
</dem:pixiCreateInvoicePackage>
</soapenv:Body>
</soapenv:Envelope>Response
Body 1: Operation result
# |
Name |
Type |
Description |
1 |
Status |
string |
Result of the operation: SUCCESS or ERROR. |
2 |
Message |
string |
Human-readable description of the result. On success: "Package created successfully." On error: a description of the validation failure. |
3 |
PackageId |
integer |
ID of the newly created package. NULL on error. |
Additional Notes
Lines XML format:
<Lines>
<Line>
<InvlineId>48201</InvlineId>
<Quantity>2</Quantity>
</Line>
<Line>
<InvlineId>48202</InvlineId>
<Quantity>1</Quantity>
</Line>
</Lines>
Validation rules for Lines:
- Each InvlineId must belong to the specified invoice.
- Quantity must be a positive integer.
- The requested quantity must not exceed the remaining unallocated quantity for the invoice line.
- Duplicate InvlineId entries are rejected.
ShipVendorCode:
- If provided, the code must match a valid shipping vendor configured in pixi.
- If omitted, the shipping vendor from the invoice is used automatically.
Tracking ID behaviour:
- TrackingID and ReturnTrackingId are appended to the invoice by default.
- Set Overwrite to 1 to replace the existing tracking IDs on the invoice instead.
- Set ResetClientNotifiedFlag to 1 to mark the invoice for re-export to the connected shop after the tracking update.
Premium API:
- This API call requires the Premium_API setting to be enabled in pixi.
- Contact your pixi system administrator if you receive the error: Setting "Premium_API" is not enabled.