This GET method allows you to retrieve a list of invoices from your administration. You can also retreive the details of a single invoice using the InvoiceNumber request parameter.
Notes:
- Maximum 100 invoices will be returned per request. If “IncludeInvoiceLinesInResponse” is set to true a maximum of 50 invoices will be returned. If “IncludeBase64PDF” is set to true a maximum of 20 invoices will be returned.
- You can retrieve more invoices by doing multiple requests and using the offset parameter
- The returned invoices will be sorted by invoice number (descending)
- Note that using the parameter “IncludeBase64PDF” can cause significant delay, especially if we need to generate the PDFs during the request.
- Request
- Response
Parameters
InvoiceNumber
Integer
Details
Optional parameter. Use this to retreive the details of a single invoice.
Limit
Integer
Details
Define an optional limit for the retrieve. Defaults to 100 which is also the maximum. When the parameter "IncludeInvoiceLinesInResponse" is set to true the maximum is 50. When the parameter "IncludeBase64PDF" is set to true the maximum is 15.
Offset
Integer
Details
Define an optional offset for the retrieve.
InlcudeInvoiceLinesInResponse
Boolean (true|false)
Details
If set to true (defaults to false) the response will include invoicelines. Please note if this parameter is set to true we will return maximum 50 results!
IncludeBase64PDF
Boolean (true|false)
Details
If set to true (defaults to false) the response will include a base 64 string which represents the actual PDF invoice. Please note if this parameter is set to true we will return maximum 20 results!
DateFrom
Date String (dd-MM-yyyy)
Details
The invoice from date filter in format dd-MM-yyyy. (http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html). Default to no from date filter.
DateTill
String
Details
The invoice till date filter in format dd-MM-yyyy. (http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html). Default to no from date filter.
CURL Example
1 |
curl -X GET -H "Content-Type: application/json" -H "ApiKey: b7d343Bnhd436f3ec3bd3504582" -H "Username: john@doe.nl" "https://rest-api.silvasoft.nl/rest/listsalesinvoices/" |
Parameters
CustomerNumber
Integer
More info
The customernumber of the relation associated with this invoice.
CustomerName
String
More info
The customer name of the relation associated with this invoice.
InvoiceNumber
Integer
More info
The invoice number
InvoiceNotes
String
More info
Notes added to the invoice
InvoiceDate
String Date (dd-MM-yyyy)
More info
The invoice date in format dd-MM-yyyy. (http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html) Defaults to current date.
InvoiceReference
String
More info
If the invoice is created with the Invoicing module, this will return the (optional) invoice reference
InvoiceTotalExclTax
Float
More info
The total invoice amount excluding taxes
InvoiceTotalInclTax
Float
More info
The total invoice amount including taxes
InvoiceTaxAmount
Float
More info
The total VAT amount
InvoiceOutstandingAmount
Float
More info
The outstanding amount for this invoice (amount still to be payed)
InvoiceDueDate
String Date (dd-MM-yyyy)
More info
The invoice due date in format dd-MM-yyyy. (http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html) Defaults to current date.
PackingSlipNotes
String
More info
Packing slip notes
ProjectName
String
More info
If the invoice is associated with a project, the project name will be returned
ProjectNumber
String
More info
If the invoice is associated with a project, the project number will be returned
InvoiceType
String
More info
This will either return BOOKKEEPING or INVOICING. If BOOKKEEPING is returned then the invoice is created as a bookkeeping sale transaction. If INVOICING is returned then the invoice is created from the invoicing module of the software.
DiscountPc
Float
More info
The discount % as configured for the invoice
InvoiceIsSent
Boolean (true|false)
More info
Whether the invoice has been sent. This will return true if the invoice has been sent per e-mail, or if you have marked the invoice as 'sent' in Silvasoft.
OGM_Belgium
String
More info
A string containing the structured remittance information (OGM). This is only applicable for Belgian Silvasoft customers.
PeriodicInvoiceTemplate
Boolean (true|false)
More info
Will always be false at the moment because this endpoint will not return periodic/recurring invoices. You can ignore this and other Periodic_.... parameters in the response.
InvoicePDFBase64
String
More info
Only available if "IncludeBase64PDF" is set to True in the request. This will return a base 64 string representing the PDF invoice. We will return the last generated/sent PDF. But if the invoice has been changed after the PDF has been created we will generate a new PDF and include it in the response. If we cannot generate a PDF (for example due to template errors) then this field will be empty.
Invoice_Contact
Array
More info
This contains a JSON array of contacts associated with the invoice. At the moment this will return the main contact of the invoice and the packing slip contact
Invoice_Contact > ContactType
String
More info
Invoice|PackingSlip
Invoice_Contact > FirstName
String
More info
Invoice_Contact > Phone
String
More info
Invoice_Contact > Email
String
More info
Invoice_Contact > Sex
String
More info
Contact sex (Man|Vrouw)
Invoice_Contact > LastName
String
More info
Invoice_Contact > ContactNotes
String
More info
Invoice_Contact > DefaultContact
Boolean (true|false)
More info
Invoice_Address
String
More info
A JSON array of order addresses. This will mostly contain 2 addresses which are the invoice (billing) address and the packing slip (shipping) address.
Invoice_Address > Address_CountryCode
String
More info
ISO 3166 (A2) country code of the order address
Invoice_Address > Address_PostalCode
String
More info
Postal / zip code
Invoice_Address > Address_Street
String
More info
Invoice_Address > Address_Unit
String
More info
Invoice_Address > Address_City
String
More info
Invoice_Address > Address_UnitAppendix
String
More info
Appendix (e.g. appartment/suite/floor) for the address unit
Invoice_Address > AddressType
String
More info
Will either return 'BillingAddress' or 'ShippingAddress'. The 'ShippingAddress' is the address selected as packing slip address.
Invoice_InvoiceLine
String
More info
A JSON array of invoicelines. Will only be present if in the request "IncludeInvoiceLinesInResponse" is set to true.
Invoice_InvoiceLine > Description
String
More info
Invoice line description
Invoice_InvoiceLine > UnitPriceExclTax
String
More info
Price per ordered unit
Invoice_InvoiceLine > DiscountPc
String
More info
The discount percentages that has been applied to this invoiceline
Invoice_InvoiceLine > TextLineCategory
String
More info
In this is a 'TextLine' and the textline is associated to a category this will return the text category
Invoice_InvoiceLine > Quantity
String
More info
Quantity of units of the product for this invoice line
Invoice_InvoiceLine > ProductNumber
String
More info
The productnumber of the product associated with the invoice line
Invoice_InvoiceLine > SubTotalInclTaxExclDiscount
String
More info
The invoiceline total, including tax, excluding discounts
Invoice_InvoiceLine > SubTotalInclTax
String
More info
The invoiceline total, including tax and discounts on invoice level and line level
Invoice_InvoiceLine > SubTotalExclTax
String
More info
The invoiceline total, excluding tax, including discounts on invoice level and line level
Invoice_InvoiceLine > ProductEAN
String
More info
The product EAN code of the product associated with the invoice line.
Invoice_InvoiceLine > LedgerAccountNumber
String
More info
If the invoiceline is associated with a specific ledger account this field will show the ledger account number
Invoice_InvoiceLine > TaxPc
String
More info
Numeric representation of the tax % applied for this invoice line
Invoice_InvoiceLine > TaxCode
String
More info
The tax code applied to this invoice line
Invoice_InvoiceLine > CostCenter
String
More info
The Cost Center for the invoiceline (Dutch: Kostenplaats)
Invoice_InvoiceLine > IsTextLine
String
More info
Whether the invoice line is a textline or not
Invoice_InvoiceLine > DeliveryDate
String Date (dd-MM-yyyy)
More info
Delivery date as specified on the invoice line
Invoice_InvoiceLine > Warehouse
String
More info
If the invoice line is associated to a warehouse this will show the warehouse name
Invoice_InvoiceLine > Shelf
String
More info
If the invoice line is associated to a (warehouse) shelf this will show the shelf name
Invoice_InvoiceLine > Batch
String
More info
If the invoice line is associated to a batch this will show the batch name / number
Response JSON Example
The response order can vary from the parameter order above
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
[ { "InvoiceReference":"", "InvoiceOutstandingAmount":42.35, "InvoiceNotes":"BOOKKEEPING INVOICE EXAMPLE", "ProjectName":"Example project", "ProjectNumber":"1", "InvoiceTotalInclTax":42.35, "InvoiceType":"BOOKKEEPING", "PackingSlipNotes":"", "CustomerNumber":1, "InvoiceTaxAmount":7.35, "InvoiceDueDate":"", "CustomerName":"Demo company", "InvoiceNumber":2, "InvoiceDate":"03-08-2017", "InvoiceTotalExclTax":35, "OGM_Belgium": "+++443/1414/00040+++", "PeriodicInvoiceTemplate": false, "InvoicePDFBase64": "EXAMPLEJVBERi0xLjQKJaqrrK0KMSAwIG9iago8PAovQ3JlYXRvciAoQXBhY2hlIEZPUCBWZXJJVBERi0xLjQKJaqrrK0KMSAwIG9iago8PAovQ3JlYXRvciAoQXBhY2hlIEZPUCBWZXJJVBERi0xLjQKJaqrrK0KMSAwIG9iago8PAovQ3JlYXRvciAoQXBhY2hlIEZPUCBWZXJJVBERi0xLjQKJaqrrK0KMSAwIG9iago8PAovQ3JlYXRvciAoQXBhY2hlIEZPUCBWZXJ=" "Invoice_Contact":[ { "ContactType":"Invoice", "Email":"example@gmail.com", "ContactNotes":null, "FamilyName":"Janssens", "FirstName":"Hendrik", "Phone":null, "Sex":"Man", "LastName":"Janssens", "DefaultContact":true }, { "ContactType":"PackingSlip", "Email":"example@gmail.com", "ContactNotes":null, "FamilyName":"Janssens", "FirstName":"Hendrik", "Phone":null, "Sex":"Man", "LastName":"Janssens", "DefaultContact":true } ], "Invoice_InvoiceLine":[ { "Description":"Example line. <br/> Can contain HTML.", "UnitPriceExclTax":4.50, "DiscountPc":25, "TextLineCategory":null, "Quantity":4, "ProductNumber":"3", "SubTotalExclTax":144.95, "SubTotalInclTaxExclDiscount":195.75, "SubTotalInclTax":172.06, "ProductEAN":1231231235, "LedgerAccountNumber":null, "TaxPc":21, "TaxCode":"21.0% - hoog", "CostCenter":null, "PurchaseClassification":0, "IsTextLine":false, "UseArticlePrice":false, "DeliveryDate":"15-02-2022", "Warehouse":"Berlin", "Shelf":"10A", "Batch":"Serie ABC-123" }, { "Description":"Another example", "UnitPriceExclTax":2.95, "DiscountPc":0, "TextLineCategory":null, "Quantity":6, "ProductNumber":"5", "SubTotalInclTax":17.70, "ProductEAN":1231231234, "LedgerAccountNumber":null, "TaxPc":21, "TaxCode":"21.0% - hoog", "CostCenter":null, "PurchaseClassification":0, "IsTextLine":false, "UseArticlePrice":false, "Warehouse":"Amsterdam", "Shelf":"216", "Batch":"" } ], "Invoice_Address":[ { "Address_CountryCode":"BE", "Address_Unit":"55", "Address_City":"Antwerpen", "Address_UnitAppendix":"", "AddressType":"InvoiceAddress", "Address_PostalCode":"2018", "Address_Street":"Voorbeeldstraat" } ] }, { "InvoiceReference":"Invoice reference example", "InvoiceOutstandingAmount":4774.72, "InvoiceNotes":"<div>INVOICE EXAMPLE 1</div>n", "ProjectName":"", "ProjectNumber":"", "InvoiceTotalInclTax":4774.72, "InvoiceType":"INVOICING", "PackingSlipNotes":"", "CustomerNumber":1, "InvoiceTaxAmount":828.67, "InvoiceDueDate":"", "CustomerName":"Demo company", "InvoiceNumber":1, "InvoiceDate":"03-08-2017", "InvoiceTotalExclTax":3946.05, "Invoice_Contact":[ { "ContactType":"Invoice", "Email":"example@gmail.com", "ContactNotes":null, "FamilyName":"Janssens", "FirstName":"Hendrik", "Phone":null, "Sex":"Man", "LastName":"Janssens", "DefaultContact":true }, { "ContactType":"PackingSlip", "Email":"example@gmail.com", "ContactNotes":null, "FamilyName":"Janssens", "FirstName":"Hendrik", "Phone":null, "Sex":"Man", "LastName":"Janssens", "DefaultContact":true } ], "Invoice_Address":[ { "Address_CountryCode":"BE", "Address_Unit":"55", "Address_City":"Antwerpen", "Address_UnitAppendix":"", "AddressType":"InvoiceAddress", "Address_PostalCode":"2018", "Address_Street":"Voorbeeldstraat" } ] } ] |