pixi Developer & Integration Documentation

pixiGetInvoice

Description

API call returns invoices based on selected filters.


Request Parameters

# Name Type Required Example Description
1 InvoiceNr string 0 123abc pixi invoice number
2 ShopID string 0 ABC pixi shop ID
3 PaymentType string 0 A Payment type code
4 OrderNR integer 0 1234567890 pixi order number
5 OrderNRExternal string 0 123abc Shop order number
6 InvDateFrom string 0 YYYY-MM-DD hh:mm:ss Beginning of date interval based on invoice create date
7 InvDateTo string 0 YYYY-MM-DD hh:mm:ss End of date interval based on invoice create date
8 UpdateDateFrom string 0 YYYY-MM-DD hh:mm:ss Beginning of date interval based on invoice last update date
9 UpdateDateTo string 0 YYYY-MM-DD hh:mm:ss End of date interval based on invoice last update date
10 RowCount integer 0 12345 Number of records to be returned
11 AddCCPPayID boolean 0 1 Populate also CCP Pay ID in the returned result set
12 OnlyUnpaidInvoices boolean 0 1 Switch: Only return unpaid invoices
13 StartKey integer 0 12345 Return records that have "InvoiceKey" bigger than provided value
14 ShipDateFrom string 0 YYYY-MM-DD hh:mm:ss Beginning of date interval based on invoice ship date
15 ShipDateTo string 0 YYYY-MM-DD hh:mm:ss End of date interval based on invoice ship date

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:pixiGetInvoice>
         <dem:InvoiceNr>123abc</dem:InvoiceNr>
         <dem:ShopID>ABC</dem:ShopID>
         <dem:PaymentType>A</dem:PaymentType>
         <dem:OrderNR>1234567890</dem:OrderNR>
         <dem:OrderNRExternal>123abc</dem:OrderNRExternal>
         <dem:InvDateFrom>YYYY-MM-DD hh:mm:ss</dem:InvDateFrom>
         <dem:InvDateTo>YYYY-MM-DD hh:mm:ss</dem:InvDateTo>
         <dem:UpdateDateFrom>YYYY-MM-DD hh:mm:ss</dem:UpdateDateFrom>
         <dem:UpdateDateTo>YYYY-MM-DD hh:mm:ss</dem:UpdateDateTo>
         <dem:RowCount>12345</dem:RowCount>
         <dem:AddCCPPayID>1</dem:AddCCPPayID>
         <dem:OnlyUnpaidInvoices>1</dem:OnlyUnpaidInvoices>
         <dem:StartKey>12345</dem:StartKey>
         <dem:ShipDateFrom>YYYY-MM-DD hh:mm:ss</dem:ShipDateFrom>
         <dem:ShipDateTo>YYYY-MM-DD hh:mm:ss</dem:ShipDateTo>
      </dem:pixiGetInvoice>
   </soapenv:Body>
</soapenv:Envelope>

Response


Body 1: Invoice details

# Name Type Description
1 TotalRows integer Total rows returned (including "RowCount" filter)
2 InvoiceNr string pixi Invoice number
3 InvoiceDate string Invoice date
4 ShopID string Shop ID
5 PaymentAddressId integer Billing address ID
6 ShipmentAddressId integer Shipping address ID
7 CustKey integer Customer ID
8 Total number Invoice total
9 VATSum number Total VAT
10 VATHigh number Sum of high VAT
11 VATLow number Sum of low VAT
12 TotalNoVAT number Total without VAT
13 ShipCost number Shipping cost
14 ShipCostNoVAT number Shipping costs without VAT
15 Discount_Invoice number Discount on the invoice
16 Discount_InvLines number Sum of discount applied to separate invoice lines
17 PaymentCode string Payment code
18 PaymentText string Payment description text
19 PaymentDate string Date of payment
20 Paid boolean Paid flag
21 TotalToPay number Total to pay
22 PaidSum number Paied sum
23 CcCardType string Credit card type
24 CcCardNr string Credit card number
25 CcCardName string Credit card name
26 CcCardExp string Credit card Exp
27 Account string Account
28 Blz string BLZ
29 BankName string Bank name
30 AccountName string Account name
31 TrackingID string Parcel tracking IDs
32 ShipDate string Date of shipment
33 UpdateDate string Invoice last update date
34 ReminderLevel integer Reminder level on the invoice
35 OrderNr integer pixi order number
36 OrderNrExternal string Shop order number
37 Note string Invoice note
38 ShipVendor string Shipping vendor used
39 CcpPayID string Credit card payment ID
40 Currency string Currency code (always EUR)
41 OrderCurrency string Currency code
42 TotalToPay_OrderCurr number Invoice total
43 ReturnReason string Return reason text
44 InvoiceKey integer Invoice ID
45 RefToInvoiceNr string Reference to original invoice number
46 RefToInvoiceKey integer Reference to original invoice ID
47 ReturnCostsAmount number Amount of return costs
48 CreateEmp string User who created the invoice
49 ExchangeRate number Exchange rate of the invoice
50 ReturnTrackingId string Parcel last return tracking ID
51 ReturnTrackingIdHistory string All return tracking IDs (history) for parcel

Additional Notes

### Iterating through results
---

- Iterating can be done with the help of parameters "StartKey" and "RowCount"
- The "StartKey" parameter is not included in the result set
- "TotalRows" column shows only the number of actually returned rows and is upward limited to the "RowCount" parameter
- The condition to stop iterating through results is to check if the "TotalRows" column is smaller than "RowCount" parameter. Or there are no more rows returned.

#### Sample call
---

Assuming there is a maximum of 130 records


    EXEC pipiGetInvoice @InvDateFrom = ''2000-12-09 10:28:05'',
                            @InvDateTo = ''2021-12-09 10:28:05'',  
                            @RowCount = 50
                            @StartKey = 0
	/*Result from 1 till 50 are returned*/
    /*"TotalRows" = 50*/

    EXEC pipiGetInvoice @InvDateFrom = ''2000-12-09 10:28:05'',
                            @InvDateTo = ''2021-12-09 10:28:05'',  
                            @RowCount = 50,                        
                            @StartKey = 50                     
	/*Result from 51 till 100 are returned*/
    /*"TotalRows" = 50*/

    EXEC pipiGetInvoice @InvDateFrom = ''2000-12-09 10:28:05'',
                            @InvDateTo = ''2021-12-09 10:28:05'',  
                            @RowCount = 50,                       
                            @StartKey = 100     
	/*Result from 101 till 130 are returned*/
    /*"TotalRows" = 30*/

With the last call, the "TotalRows" value is 30. Since this is less than the "RowCount" (50). There are no more records to fetch.