pixi Developer & Integration Documentation

pixiAddOrderLine

Description

API call adds an orderline to an existing pixi order


Request Parameters

# Name Type Required Example Description
1 PixiOrderNr integer 1 123 pixi Order number
2 ItemKey integer 0 123 Item Id
3 ItemNrInt string 0 abcdefg Shop item number
4 Quantity integer 0 123 Orderline quantity
5 ShipCost number 0 9.99 The total shipping costs of the whole order
6 LocationID string 0 002 Location code
7 GiftMessage string 0 abcdefg Gift Message
8 DiscountPercent number 0 9.99 Discount on orderline in percent
9 VoucherID string 0 abcdefg ID of the voucher
10 Discount number 0 9.99 Voucher amount
11 AddressRemarks string 0 abcdefg Address remarks
12 Verfahren string 0 abcdefg Shipping details - Verfahen
13 Product string 0 abcdefg Shipping details - Product
14 Extras string 0 abcdefg Shipping details - Extras
15 Employee string 0 abcdefg Employee that created the orderline
16 Date string 0 YYYY-MM-DD hh:mm:ss Create date
17 Status string 0 STO Manually define orderline status. Allowed statuses are: NEW,ANG,HAL,BES,STO,NLB,MIN,RET,FUT (Default = NULL). When using parameter @UsePaymentStatus set to 1, then @Status has to be NULL or NEW.
18 UsePaymentStatus boolean 0 0 or 1 When 1, then orderline status is automatically set based on orders payment type, when 0 then you can manually define it by @Status parameter.
19 ItemNrExternal string 0 abcdefg Item number external (Imported from Shop)
20 FullPrice number 0 9.99 Item selling price without any discount
21 FullPriceDiscountValue number 0 9.99 Discount per orderline as amount
22 DiscountedPrice number 0 9.99 Item selling price including discount
23 ItemName string 0 abcdefg Item name
24 ItemSpecialNote string 0 abcdefg Item special note
25 OrderNrExternal string 0 abcdefg External order number
26 DF_Type string 0 1 Direct fullfilement type
27 SerialNumber string 0 abcdefg Item serial number

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:pixiAddOrderLine>
         <dem:PixiOrderNr>123</dem:PixiOrderNr>
         <dem:ItemKey>123</dem:ItemKey>
         <dem:ItemNrInt>abcdefg</dem:ItemNrInt>
         <dem:Quantity>123</dem:Quantity>
         <dem:ShipCost>9.99</dem:ShipCost>
         <dem:LocationID>002</dem:LocationID>
         <dem:GiftMessage>abcdefg</dem:GiftMessage>
         <dem:DiscountPercent>9.99</dem:DiscountPercent>
         <dem:VoucherID>abcdefg</dem:VoucherID>
         <dem:Discount>9.99</dem:Discount>
         <dem:AddressRemarks>abcdefg</dem:AddressRemarks>
         <dem:Verfahren>abcdefg</dem:Verfahren>
         <dem:Product>abcdefg</dem:Product>
         <dem:Extras>abcdefg</dem:Extras>
         <dem:Employee>abcdefg</dem:Employee>
         <dem:Date>YYYY-MM-DD hh:mm:ss</dem:Date>
         <dem:Status>STO</dem:Status>
         <dem:UsePaymentStatus>0 or 1</dem:UsePaymentStatus>
         <dem:ItemNrExternal>abcdefg</dem:ItemNrExternal>
         <dem:FullPrice>9.99</dem:FullPrice>
         <dem:FullPriceDiscountValue>9.99</dem:FullPriceDiscountValue>
         <dem:DiscountedPrice>9.99</dem:DiscountedPrice>
         <dem:ItemName>abcdefg</dem:ItemName>
         <dem:ItemSpecialNote>abcdefg</dem:ItemSpecialNote>
         <dem:OrderNrExternal>abcdefg</dem:OrderNrExternal>
         <dem:DF_Type>1</dem:DF_Type>
         <dem:SerialNumber>abcdefg</dem:SerialNumber>
      </dem:pixiAddOrderLine>
   </soapenv:Body>
</soapenv:Envelope>

Response


Body 1: Return status for adding new orderline

# Name Type Description
1 CanAdd boolean Status if an orderline can be added or not
2 OrderNr integer Order number of the order where the orderline was added
3 ErrorMessage string Error message, when something unexpected happened
4 OrderlineId integer ID of the Orderline record
5 OrderNrExternal string External order number

Additional Notes

Handling of price and discount parameters


VoucherID and Discount: Only one VoucherId is allowed to be assigned to one order. 

When Discount is provided, it is mandatory to provide also a VoucherId. 

If VoucherId already exists for the order. It is possible to change the Discount(Voucher amount) for it.


For B2B orders the Price parameter is automatically treated as "Net price" and for B2C orders the Price parameter is treated as "Gross price".


Parameter DiscountPerc is calculated from FullPrice and FullPriceDiscountValue. 

The parameter is ignored when also FullPriceDiscountValue is provided. 

DiscountPerc can also be calculated from FullPrice and DiscountedPrice when FullPriceDiscountValue is not provided.