GetInvoiceHistory
Description
Using this method we want to receive the outstanding invoices of the given customer.
Note that the invoices should be returned in reversed order. The invoice history is shown on the shop in a paged manner. The first page contains the most recent invoices with the latest invoice on top of the list.
The default number of invoices on a page can be set to 20. Note that the the shop's design may define a different number so it is wise to make this parameter configurable.
SOAP API:
Action
http://shoxl.com/ShoxlService/GetInvoiceHistory
Please note: this is not a working url, but a combination of namespace and method. Do not expect the url to return a result.
Style
Document
Input (Literal)
The input of this method is the document element tns:GetInvoiceHistory having the structure defined by the following table.
Element
Type
Occurs
Description
Sequence
1..1
request
tns:GetInvoiceHistoryRequest
0..1
Complex Type: tns:GetInvoiceHistoryRequest
Description
The GetInvoiceHistoryRequest contains all the information to get the outstanding
invoices of the customer.
Component
Type
Occurs
Description
Sequence
1..1
AccountNumber
s:string
1..1
This is the (project) account number of the customer.
PageNumber
s:int
0..1
The number of the page. The page numbering is 1-based: first page has number 1.
Output (Literal)
The output of this method is the document element tns:GetInvoiceHistoryResponse having the structure defined by the following table.
Element
Type
Occurs
Description
Sequence
1..1
GetInvoiceHistoryResult
tns:GetInvoiceHistoryResult
0..1
Complex Type: tns:GetInvoiceHistoryResult
Description
The GetInvoiceHistoryResult contains all the outstanding invoices of the given
customer.
Component
Type
Occurs
Description
Sequence
1..1
ErrorCode
s:string
0..1
An error code returned by the ERP system
ErrorDescription
s:string
0..1
The error description related to the error code returned by the ERP system
Orders
tns:ArrayOfInvoiceHistoryItem
0..1
A list of InvoiceHistoryItems, the ComplexType InvoiceHistoryItems contains some invoice details like; invoice date and total outstanding. For the complete description check the InvoiceHistoryItems section in the documentation.
Request
tns:GetInvoiceHistoryRequest
1..1
The sent request by Shoxl Shop.
TotalPages
s:int
0..1
Total number of pages with results
Complex Type: tns:ArrayfInvoiceHistoryItem
Type
Occurs
Description
Sequence
1..1
InvoiceHistoryItem
tns:InvoiceHistoryItem
0..*
Complex Type: tns:InvoiceHistoryItem
A InvoiceHistoryItem contains the main information of an invoice from the ERP system.
Component
Type
Occurs
Description
Sequence
1..1
DownloadablePdfUri
s:string
0..1
A link to the Invoice document (PDF format) which will be generated by the ERP system.
InvoiceDate
s:dateTime
0..1
The invoice date.
InvoiceNumber
s:string
1..1
A unique invoice number from the ERP System
CustomerNumber
s:string
1..1
A unique customer number
TotalOutstanding
s:decimal
0..1
The total outstanding amount of the invoice.
TotalPrice
s:decimal
0..1
The total price of the invoice.
REST API:
URL: /Shoxl/v1/GetInvoiceHistory Method: POST
Changes in ShoxlRestApiSwagger_v16
A new field "context" is introduced in the request body. When configured this object contains key value pairs (e.g. divisionCode).
Request body:
GetInvoiceHistoryRequest{
parameter
value
accountNumber
string required
pageNumber
integer($int32)
context
object
}
Example:
Response body:
GetInvoiceHistoryResult{
parameter
value
errorCode
string nullable: true
errorDescription
string nullable: true
orders
[InvoiceHistoryItem]
request
GetInvoiceHistoryRequest
totalPages
integer($int32)
}
InvoiceHistoryItem{
parameter
value
customerNumber
string required
downloadablePdfUri
string nullable: true
invoiceDate
string($date-time)
invoiceNumber
string required
totalOutstanding
number($double)
nullable: true
totalPrice
number($double)
nullable: true
}