API call returns invoices based on selected filters.

Since pixi version: LOU Official (6.3.0.4452) 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.

Request

POST https://apigateway.descartes.com/tms/pixi/pixiGetInvoice

Request body

Name Type Required Description
ShopID string false

pixi shop ID

Type: varchar(3)

Default value: NULL

Example: ABC

Available from: LOU Official - Update 46 (6.9.46.27927)

OrderNR integer false

pixi order number

Type: int

Default value: NULL

Example: 1234567890

Available from: LOU Official - Update 46 (6.9.46.27927)

RowCount integer false

Number of records to be returned

Type: int

Default value: 1000

Example: 12345

Available from: LOU Official - Update 46 (6.9.46.27927)

StartKey integer false

Return records that have "InvoiceKey" bigger than provided value

Type: int

Default value: 0

Example: 12345

Available from: LOU Official - Update 46 (6.9.46.27927)

InvDateTo string false

End of date interval based on invoice create date

Type: datetime

Default value: NULL

Example: YYYY-MM-DD hh:mm:ss

Available from: LOU Official - Update 46 (6.9.46.27927)

InvoiceNr string false

pixi invoice number

Type: varchar(20)

Default value: NULL

Example: 123abc

Available from: LOU Official (6.3.0.4452)

ShipDateTo string false

End of date interval based on invoice ship date

Type: datetime

Default value: NULL

Example: YYYY-MM-DD hh:mm:ss

Available from: 19.02 (8.4.50.37001)

AddCCPPayID boolean false

Populate also CCP Pay ID in the returned result set

Type: bit

Default value: 0

Example: 1

Available from: LOU Official - Update 46 (6.9.46.27927)

InvDateFrom string false

Beginning of date interval based on invoice create date

Type: datetime

Default value: NULL

Example: YYYY-MM-DD hh:mm:ss

Available from: LOU Official - Update 46 (6.9.46.27927)

PaymentType string false

Payment type code

Type: char

Default value: NULL

Example: A

Available from: LOU Official - Update 46 (6.9.46.27927)

ShipDateFrom string false

Beginning of date interval based on invoice ship date

Type: datetime

Default value: NULL

Example: YYYY-MM-DD hh:mm:ss

Available from: 19.02 (8.4.50.37001)

UpdateDateTo string false

End of date interval based on invoice last update date

Type: datetime

Default value: NULL

Example: YYYY-MM-DD hh:mm:ss

Available from: LOU Official - Update 46 (6.9.46.27927)

UpdateDateFrom string false

Beginning of date interval based on invoice last update date

Type: datetime

Default value: NULL

Example: YYYY-MM-DD hh:mm:ss

Available from: LOU Official - Update 46 (6.9.46.27927)

OrderNRExternal string false

Shop order number

Type: varchar(50)

Default value: NULL

Example: 123abc

Available from: LOU Official - Update 46 (6.9.46.27927)

OnlyUnpaidInvoices boolean false

Switch: Only return unpaid invoices

Type: bit

Default value: 0

Example: 1

Available from: LOU Official - Update 46 (6.9.46.27927)


Response

1. Invoice details

Name Type Description
Blz string

BLZ

Type: varchar

Available from: 25.06 (25.6.0.58802)

Note string

Invoice note

Type: varchar

Available from: 25.06 (25.6.0.58802)

Paid boolean

Paid flag

Type: bit

Available from: 25.06 (25.6.0.58802)

Total number

Invoice total

Type: money

Available from: 25.06 (25.6.0.58802)

ShopID string

Shop ID

Type: varchar

Available from: 25.06 (25.6.0.58802)

VATLow number

Sum of low VAT

Type: money

Available from: 25.06 (25.6.0.58802)

VATSum number

Total VAT

Type: money

Available from: 25.06 (25.6.0.58802)

Account string

Account

Type: varchar

Available from: 25.06 (25.6.0.58802)

CustKey integer

Customer ID

Type: int

Available from: 25.06 (25.6.0.58802)

OrderNr integer

pixi order number

Type: int

Available from: 25.06 (25.6.0.58802)

PaidSum number

Paied sum

Type: money

Available from: 25.06 (25.6.0.58802)

VATHigh number

Sum of high VAT

Type: money

Available from: 25.06 (25.6.0.58802)

BankName string

Bank name

Type: varchar

Available from: 25.06 (25.6.0.58802)

CcCardNr string

Credit card number

Type: varchar

Available from: 25.06 (25.6.0.58802)

CcpPayID string

Credit card payment ID

Type: varchar

Available from: 25.06 (25.6.0.58802)

Currency string

Currency code (always EUR)

Type: varchar

Available from: 25.06 (25.6.0.58802)

ShipCost number

Shipping cost

Type: money

Available from: 25.06 (25.6.0.58802)

ShipDate string

Date of shipment

Type: datetime

Available from: 25.06 (25.6.0.58802)

CcCardExp string

Credit card Exp

Type: varchar

Available from: 25.06 (25.6.0.58802)

CreateEmp string

User who created the invoice

Type: varchar

Available from: 25.06 (25.6.0.58802)

InvoiceNr string

pixi Invoice number

Type: varchar

Available from: 25.06 (25.6.0.58802)

TotalRows integer

Total rows returned (including "RowCount" filter)

Type: int

Available from: 25.06 (25.6.0.58802)

CcCardName string

Credit card name

Type: varchar

Available from: 25.06 (25.6.0.58802)

CcCardType string

Credit card type

Type: varchar

Available from: 25.06 (25.6.0.58802)

InvoiceKey integer

Invoice ID

Type: int

Available from: 25.06 (25.6.0.58802)

ShipVendor string

Shipping vendor used

Type: varchar

Available from: 25.06 (25.6.0.58802)

TotalNoVAT number

Total without VAT

Type: money

Available from: 25.06 (25.6.0.58802)

TotalToPay number

Total to pay

Type: money

Available from: 25.06 (25.6.0.58802)

TrackingID string

Parcel tracking IDs

Type: varchar

Available from: 25.06 (25.6.0.58802)

UpdateDate string

Invoice last update date

Type: datetime

Available from: 25.06 (25.6.0.58802)

AccountName string

Account name

Type: varchar

Available from: 25.06 (25.6.0.58802)

InvoiceDate string

Invoice date

Type: datetime

Available from: 25.06 (25.6.0.58802)

PaymentCode string

Payment code

Type: varchar

Available from: 25.06 (25.6.0.58802)

PaymentDate string

Date of payment

Type: smalldatetime

Available from: 25.06 (25.6.0.58802)

PaymentText string

Payment description text

Type: varchar

Available from: 25.06 (25.6.0.58802)

ExchangeRate number

Exchange rate of the invoice

Type: decimal

Available from: 25.06 (25.6.0.58802)

ReturnReason string

Return reason text

Type: varchar

Available from: 25.06 (25.6.0.58802)

OrderCurrency string

Currency code

Type: varchar

Available from: 25.06 (25.6.0.58802)

ReminderLevel integer

Reminder level on the invoice

Type: int

Available from: 25.06 (25.6.0.58802)

ShipCostNoVAT number

Shipping costs without VAT

Type: numeric

Available from: 25.06 (25.6.0.58802)

RefToInvoiceNr string

Reference to original invoice number

Type: varchar

Available from: 25.06 (25.6.0.58802)

OrderNrExternal string

Shop order number

Type: varchar

Available from: 25.06 (25.6.0.58802)

RefToInvoiceKey integer

Reference to original invoice ID

Type: int

Available from: 25.06 (25.6.0.58802)

Discount_Invoice number

Discount on the invoice (Net value in case of B2B Invoice)

Type: money

Available from: 25.06 (25.6.0.58802)

PaymentAddressId integer

Billing address ID

Type: int

Available from: 25.06 (25.6.0.58802)

ReturnTrackingId string

Parcel last return tracking ID

Type: varchar

Available from: 25.06 (25.6.0.58802)

Discount_InvLines number

Sum of discount applied to separate invoice lines

Type: money

Available from: 25.06 (25.6.0.58802)

ReturnCostsAmount number

Amount of return costs

Type: money

Available from: 25.06 (25.6.0.58802)

ShipmentAddressId integer

Shipping address ID

Type: int

Available from: 25.06 (25.6.0.58802)

TotalToPay_OrderCurr number

Invoice total

Type: money

Available from: 25.06 (25.6.0.58802)

ReturnTrackingIdHistory string

All return tracking IDs (history) for parcel

Type: varchar

Available from: 25.06 (25.6.0.58802)