Description
Creates a new delivery (goods receipt) document for a specified supplier. Supports three creation modes: empty delivery, template from supplier order, or full delivery with items via XML. On the XML mode the call imports partially — lines that cannot be matched are reported back instead of aborting the whole delivery.
Request Parameters
# |
Name |
Type |
Required |
Example |
Description |
1 |
LocID |
string |
0 |
001 |
Location ID. Defaults to 001. |
2 |
OrderNr |
integer |
0 |
1025547 |
Supplier order number (use to create the delivery from a supplier order template). Defaults to 0. |
3 |
SupplNr |
string |
0 |
MGS |
Supplier number. Mandatory when OrderNr is empty or 0. |
4 |
SuplierOrderNRExternal |
string |
0 |
PO-2025-00815 |
Supplier order number external. Max. 8000 characters. |
5 |
UserName |
string |
0 |
MaxMustermann |
User name recorded on the delivery. Defaults to API. |
6 |
Note |
string |
0 |
New delivery from supplier |
Delivery note. Stored on the delivery header, max. 8000 characters. |
7 |
ParameterXML |
string |
0 |
Check additional information |
XML with details about the delivery (items, quantities, prices). See Additional Notes. |
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:pixiCreateDelivery>
<dem:LocID>001</dem:LocID>
<dem:OrderNr>1025547</dem:OrderNr>
<dem:SupplNr>MGS</dem:SupplNr>
<dem:SuplierOrderNRExternal>PO-2025-00815</dem:SuplierOrderNRExternal>
<dem:UserName>MaxMustermann</dem:UserName>
<dem:Note>New delivery from supplier</dem:Note>
<dem:ParameterXML>See Additional Notes</dem:ParameterXML>
</dem:pixiCreateDelivery>
</soapenv:Body>
</soapenv:Envelope>Response
Body 1: Delivery header
# |
Name |
Type |
Description |
1 |
DeliveryKey |
integer |
Delivery header ID |
2 |
DeliveryNr |
integer |
Delivery number |
3 |
SupplNR |
string |
Supplier number (code) |
4 |
DeliveryNote |
string |
Delivery note. On the XML path, when at least one line failed to import, the original note text is followed by a "Failed To Import Line Items:" block — see Additional Notes. |
5 |
DeliveryNrExternal |
string |
External delivery number (obsolete - always NULL, kept for backward compatibility) |
6 |
ExternalReceiptNr |
string |
External receipt number from supplier |
7 |
PurchaseOrderNr |
string |
Purchase order numbers (external order numbers) |
Body 2: Delivery lines
Columns 1–18 describe the created delivery line. Columns 19–23 echo back the identifiers that were sent for that line, so a response row can be mapped to the request line it came from; they are populated on the XML path only (OrderNr empty or 0 with an ITEMS section) and are empty on the template and empty-delivery paths.
# |
Name |
Type |
Description |
1 |
SDelDkey |
integer |
Delivery detail ID |
2 |
SDelDHref |
integer |
Delivery header ID |
3 |
SDelDItemRef |
integer |
Item ID |
4 |
SDelDItemName |
string |
Item name |
5 |
SDelDqtyDelivered |
number |
Delivered item quantity |
6 |
SDelDqtyOrdered |
number |
Ordered item quantity |
7 |
SDelDsorderlineRef |
integer |
Connected supplier orderline ID |
8 |
SDelDsPrice |
number |
Item supplier price |
9 |
SDelDsDiscount |
number |
Discount on the supplier price |
10 |
SDelDsFinalPrice |
number |
Price after add. discount was reduced from mid. price |
11 |
SDelDcreateDate |
datetime |
Delivery line create date |
12 |
SDelDcreateEmp |
string |
User that created the delivery line |
13 |
SDelDupdateDate |
datetime |
Delivery line last update date |
14 |
SDelDupdateEmp |
string |
User that last updated the delivery line |
15 |
SDelDsAddDiscount |
number |
Additional discount on the mid. price |
16 |
SDelDsMidPrice |
number |
Price after the discount on the supplier price |
17 |
BatchNumber |
string |
Item batch number |
18 |
BestBeforeDate |
datetime |
Item best before date |
19 |
EAN |
string |
Request EAN/barcode echoed back for this line (XML path only) |
20 |
ItemNrSuppl |
string |
Request supplier item number echoed back for this line (XML path only) |
21 |
ItemNrInt |
string |
Request internal item number echoed back for this line (XML path only) |
22 |
InternalNumber |
integer |
Request purchase-order internal number echoed back for this line (XML path only) |
23 |
ExternalCode |
string |
Request external code echoed back for this line (XML path only) |
Body 3: Errors
Returned on a header-level validation failure that aborts the whole call: unknown LocID, supplier not found, no supplier defined, duplicate ExternalReceiptNr, more than one Delivery element, or an OrderNr that does not exist or is not on the required status. In these cases no delivery is created.
# |
Name |
Type |
Description |
1 |
ERROR |
string |
Error message |
Body 4: Failed lines (partial import)
Returned on the XML path (OrderNr empty or 0 with an ITEMS section), alongside the created delivery. It lists the request lines that were not imported and is always returned on that path — empty when every line imported successfully. It is not returned on the template (OrderNr) or empty-delivery paths.
# |
Name |
Type |
Description |
1 |
ERROR |
string |
Reason the line was not imported — item not found, or one of the purchase-order match errors Error01–Error07 listed in Additional Notes |
2 |
EANUPC |
string |
Item barcode |
3 |
SupplNr |
string |
Supplier number |
4 |
InternalNumber |
integer |
Internal Number on Purchase Order |
5 |
ExternalCode |
string |
External Code on Purchase Order |
6 |
SupplierOrderId |
integer |
Purchase order Id, when the line was matched to a purchase order |
7 |
DeliveryId |
integer |
Delivery Id (reserved — currently always returned as NULL) |
8 |
ItemNrSuppl |
string |
Request supplier item number for the failed line |
9 |
ItemNrInt |
string |
Request internal item number for the failed line |
10 |
Qty |
integer |
Request delivered quantity for the failed line |
Additional Notes
There are three possible scenarios for creating a delivery:
1. Create an empty delivery document
Only the delivery header will be created. To add items/delivery lines, use the pixiCreateDeliveryItem API call.
Sample request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dem="https://api.pixi.eu/soap/demosandbox/">
<soapenv:Header/>
<soapenv:Body>
<dem:pixiCreateDelivery>
<dem:LocID>001</dem:LocID>
<dem:SupplNr>MGS</dem:SupplNr>
<dem:UserName>MaxMustermann</dem:UserName>
<dem:Note>Empty delivery</dem:Note>
</dem:pixiCreateDelivery>
</soapenv:Body>
</soapenv:Envelope>2. Create a delivery using supplier order as template
The delivery will be created based on the selected supplier order number. Items and their ordered quantities will be transferred from the supplier order to the delivery. To set the delivered item quantities, use the pixiUpdateDeliveryItem API call.
Sample request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dem="https://api.pixi.eu/soap/demosandbox/">
<soapenv:Header/>
<soapenv:Body>
<dem:pixiCreateDelivery>
<dem:OrderNr>1025547</dem:OrderNr>
<dem:UserName>MaxMustermann</dem:UserName>
<dem:Note>Delivery from template using supplier order 1025547</dem:Note>
</dem:pixiCreateDelivery>
</soapenv:Body>
</soapenv:Envelope>3. Create a delivery with items via ParameterXML
Create header and lines in one call using the ParameterXML parameter. To prevent confusion, provide all parameters in the XML and leave other parameters empty.
Sample request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dem="https://api.pixi.eu/soap/demosandbox/">
<soapenv:Header/>
<soapenv:Body>
<dem:pixiCreateDelivery>
<dem:ParameterXML><![CDATA[
<CREATE_DELIVERY>
<Delivery>
<LocID>001</LocID>
<SupplNr>MGS</SupplNr>
<SupplOrderNrExt/>
<Username>MaxMustermann</Username>
<Note>New delivery with items</Note>
<ExternalReceiptNr>EXT-REC-001</ExternalReceiptNr>
<ITEMS>
<Item>
<EAN>4006381333931</EAN>
<ItemNrSuppl/>
<ItemNrInt>ART-10025</ItemNrInt>
<Ordered>10</Ordered>
<Delivered>8</Delivered>
<SupplPrice>14.95</SupplPrice>
<BatchNumber>BatchTest</BatchNumber>
<BestBeforeDate>01.01.2019</BestBeforeDate>
</Item>
<Item>
<EAN/>
<ItemNrSuppl/>
<ItemNrInt>ART-10030</ItemNrInt>
<Ordered>10</Ordered>
<Delivered>2</Delivered>
<SupplPrice>4.98</SupplPrice>
<InternalNumber>70010513</InternalNumber>
<ExternalCode>ExCode_13-333</ExternalCode>
</Item>
</ITEMS>
</Delivery>
</CREATE_DELIVERY>
]]></dem:ParameterXML>
</dem:pixiCreateDelivery>
</soapenv:Body>
</soapenv:Envelope>Partial import of XML deliveries
On the XML path (OrderNr empty or 0, with an ITEMS section) a line that cannot be imported no longer aborts the whole call. The delivery is created with the request lines that do match, and the lines that do not are reported rather than silently dropped:
A request line whose identifiers (
EAN,ItemNrSuppl,ItemNrInt) match no item for the supplier is reported in Body 4, carrying the identifiers it was sent with.A request line that hits a purchase-order match error (Error01–Error07) is reported in Body 4 and excluded from the delivery, instead of aborting the call.
When items were sent but none of them match, a header-only delivery is created so the failed-line detail has a delivery to attach to.
Each created line in Body 2 echoes back the request identifiers it came from, so a response row can be mapped to its request line.
When at least one line fails, the delivery note returned in Body 1 carries the caller's original note text followed by a
Failed To Import Line Items:block listing each failed line (barcode, item number, quantity). The note is limited to 8,000 characters; if the combined text would exceed that, only the appended block is truncated — the original note text is preserved intact, and Body 4 remains the complete, untruncated record.Header-level validation failures still abort the call and create no delivery: unknown
LocID, supplier not found, duplicateExternalReceiptNr, or more than oneDeliveryelement. The message is returned in Body 3.
This behaviour applies to the XML path only — the template (OrderNr) and empty-delivery paths are unchanged.
Line-level error codes (Body 4)
Item not found — no item matches the supplied identifiers for this supplier.
Error01 — External Code belongs to multiple Purchase orders.
Error02 — Purchase order belongs to a different supplier.
Error03 — No Purchase Order match for External Code.
Error04 — Item not found on Purchase Order (matched by External Code).
Error05 — Item not found on Purchase Order (matched by Internal Number).
Error06 — Purchase Order is not on a proper status.
Error07 — No Purchase Order match for Internal Number.
Important
When both InternalNumber and ExternalCode are sent, only InternalNumber is considered.
When ExternalCode exists on multiple Purchase Orders for the same supplier, an error is returned.
Only items that belong to the specified supplier will be added to the delivery lines.
When both OrderNr (non-zero) and ITEMS are supplied in ParameterXML, the delivery is created as a template from the supplier order (scenario 2) and the ITEMS section is ignored — items, ordered quantities and supplier prices are taken exclusively from the matching Purchase Order. To create a delivery whose lines come from the XML, leave OrderNr empty (or set it to 0) and provide the items in ITEMS. Per-item references to a Purchase Order remain available via InternalNumber / ExternalCode on each Item.
When the OrderNr parameter is used, the delivery LocID must match the supplier order's delivery location; otherwise the error "No supplier defined for delivery." is returned.
The LocID also governs per-item matching by InternalNumber / ExternalCode: Purchase Orders for other delivery locations are not considered as matches and are excluded from the FIFO matching pool, even when supplier and item match.
When OrderNr parameter is specified, item details will automatically be taken from the supplier order template. To update the delivered quantity for items, use the pixiUpdateDeliveryItem API call.
When creating delivery using ParameterXML, it is also possible to set BatchNumber and BestBeforeDate for items.
ExternalReceiptNr is optional and must be unique per supplier. If the provided value already exists for the same supplier, an error will be returned. Maximum length is 50 characters.
The call supports multiple entries for the same item in a single API call when different batch management data is provided. In this case, separate rows are created on the goods receipt document for the item, split according to the batch information received.
A special configuration activated by customer support (UsePackingUnitAtCreateDelivery) allows to automatically apply an item's packing unit when creating deliveries. It applies to the delivered quantity on the XML path only; the ordered quantity is stored unchanged, and template-based deliveries are not affected.
Example:
An item has packing unit set to 6
Delivered quantity (provided in the XML parameter for pixiCreateDelivery) is 5
Delivered quantity on the created goods receipt document is 30 (5x packaging unit)