Description
Creates a new POS (Point-of-Sale) invoice or edits an existing open one, including line items with pricing, discounts, and bin allocation. The invoice is created within an active POS session and supports optional customer assignment and comments. All input data is passed as a single XML parameter.
When POSHEADERKEY is included in the XML header, the procedure edits the existing invoice (provided it is not closed or stored). When POSHEADERKEY is omitted, a new invoice is created.
Request Parameters
# |
Name |
Type |
Required |
Example |
Description |
1 |
XML |
varchar(max) |
1 |
Check additional information |
XML structure containing the POS invoice header and one or more line items. See Additional Notes for the full XML schema. |
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:pipiCreatePOSInvoice>
<dem:XML>
<POSINVOICE>
<HEADER>
<REGISTERID>REGISTER1</REGISTERID>
<CUSTOMERNREXTERNAL>CUST001</CUSTOMERNREXTERNAL>
<COMMENT>Walk-in sale</COMMENT>
<GENERALBIN></GENERALBIN>
</HEADER>
<LINES>
<LINE>
<ITEMNRINT>ITEM123</ITEMNRINT>
<QUANTITY>2</QUANTITY>
<DISCOUNTPERCENT>0</DISCOUNTPERCENT>
<PRICE>19.99</PRICE>
<BIN>BIN-A1</BIN>
</LINE>
</LINES>
</POSINVOICE>
</dem:XML>
</dem:pipiCreatePOSInvoice>
</soapenv:Body>
</soapenv:Envelope>Response
Body 1: Result set
# |
Name |
Type |
Description |
1 |
ReturnCode |
varchar(50) |
Result of the operation. OK on success; ERROR on failure. |
2 |
Message |
varchar |
POS invoice header key (integer) on success. Descriptive error message on failure. |
Additional Notes
XML structure for the @XML parameter:
<POSINVOICE>
<HEADER>
<REGISTERID>Mandatory. POS register name/identifier.</REGISTERID>
<POSHEADERKEY>Optional. If provided, edits the existing POS invoice (must not be in CLO or STO status).</POSHEADERKEY>
<CUSTOMERNREXTERNAL>Optional. Customer external reference number.</CUSTOMERNREXTERNAL>
<COMMENT>Optional. Invoice comment text.</COMMENT>
<GENERALBIN>Optional. General bin location override for stock picking.</GENERALBIN>
</HEADER>
<LINES>
<LINE>
<ITEMNRINT>Mandatory. Item internal reference number.</ITEMNRINT>
<QUANTITY>Mandatory. Quantity (positive integer).</QUANTITY>
<DISCOUNTPERCENT>Optional. Line discount percentage (0-100). Default 0.</DISCOUNTPERCENT>
<PRICE>Mandatory. Item price (decimal).</PRICE>
<BIN>Optional. Preferred bin name for stock picking.</BIN>
</LINE>
</LINES>
</POSINVOICE>
Validation rules:
- REGISTERID must match an active POS session (EndTime IS NULL).
- If POSHEADERKEY is provided, the invoice must exist and not be in status CLO or STO.
- ITEMNRINT must exist in the Items table.
- QUANTITY must be a positive integer.
- DISCOUNTPERCENT must be between 0 and 100.
- CUSTOMERNREXTERNAL must exist in the Customers table if provided.
ReturnCode values:
OK — invoice created or updated successfully; Message contains the POS header key
ERROR — a validation or processing error occurred; Message contains the error description