POST v1/{organizationId}/invoices/fetch
Fetch a invoice to get total, line sums and payment date calculations.
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
organizationId | string |
None. |
Body Parameters
Model of the invoice.
InvoiceCreateFetchName | Description | Type | Additional information |
---|---|---|---|
PaymentConditionNumberOfDays |
Number of days until payment deadline. If PaymentConditionNumberOfDays AND PaymentConditionType is left empty they will default to the contacts default payment conditions. |
integer |
None. |
PaymentConditionType |
Type of payment condition. Valid types are: Netto, NettoCash, CurrentMonthOut, or Paid. Note that if you use NettoCash or Paid, PaymentConditionNumberOfDays should be null. |
string |
None. |
ContactGuid |
Dinero contact guid. |
globally unique identifier |
None. |
ShowLinesInclVat |
If your user (or your system) prefers to provide the line amounts incl. VAT, then this property should be set to true. All voucher lines will be assumed to have amounts incl VAT. If your lines are excl VAT, you do not need to set this property. It will defaults to false. |
boolean |
None. |
Currency |
The currency used on the voucher. Defaults to DKK if null. Dinero will assign days date currency rate for the given currency. Currencies are given i format: DKK, EUR, USD ect... |
string |
None. |
Language |
The language to be used in the voucher. Available languages are 'da-DK' and 'en-GB'. Defaults to 'da-DK'. |
string |
None. |
ExternalReference |
Your external id This can be used for ID'ing in external apps/services e.g. a web shop. The maximum length is 128 characters |
string |
String length: inclusive between 0 and 128 |
Description |
User supplied description of the voucher e.g. 'Custom Invoice description'. Defaults to document type e.g. 'Invoice', 'Offer', 'Creditnote' using the selected language. |
string |
None. |
Comment |
User supplied comment on the voucher |
string |
None. |
Date |
The date of the creation/issuing. This should be in the format YYYY-MM-DD e.g. 2015-12-02. Defaults to today. |
string |
None. |
ProductLines |
User supplied invoice lines. Minimum one. |
Collection of InvoiceLineCreate |
Required |
Address |
Contact address (linebreaks are allowed '\n'). When null is specified the address defaults to the contacts address. |
string |
None. |
{ "PaymentConditionNumberOfDays": 8, "PaymentConditionType": "Netto", "ContactGuid": "62a501c4-f66c-4c07-8054-34ab1614d007", "ShowLinesInclVat": false, "Currency": "DKK", "Language": "en-GB", "ExternalReference": "Fx. WebshopSpecialId: 42", "Description": "Description of document type. Fx.: invoice, credit note or offer", "Comment": "Very very important comment", "Date": "2015-12-02", "ProductLines": [ { "BaseAmountValue": 20.0, "ProductGuid": "2c127213-424a-4491-9d83-37b265f8e552", "Description": "Flowers", "Comments": "Smells good", "Quantity": 5.0, "AccountNumber": 1000, "Unit": "parts", "Discount": 10.0, "LineType": "Product" }, { "BaseAmountValue": 20.0, "ProductGuid": "2c127213-424a-4491-9d83-37b265f8e552", "Description": "Flowers", "Comments": "Smells good", "Quantity": 5.0, "AccountNumber": 1000, "Unit": "parts", "Discount": 10.0, "LineType": "Product" } ], "Address": "Test Road 3 2100 Copenhagen Denmark" }
Response Information
Resource Description
Returns the invoice as json.
InvoiceFetchName | Description | Type |
---|---|---|
PaymentDate |
The invoice's payment date. This should be in the format YYYY-MM-DD e.g. 2015-12-02 |
string |
PaymentConditionNumberOfDays |
Number of days until payment deadline. |
integer |
PaymentConditionType |
Type of payment condition. Valid types are: Netto, NettoCash, CurrentMonthOut. Note that if you use NettoCash, PaymentConditionNumberOfDays should be zero. |
string |
ContactGuid |
Dinero contact guid. |
globally unique identifier |
Number |
The number of the voucher. |
integer |
ContactName |
Contact name |
string |
ShowLinesInclVat |
If true, the user prefers the invoice to be displayed with lines incl vat. |
boolean |
TotalExclVat |
Total amount without vat |
decimal number |
TotalVatableAmount |
Total amount to calculate the vat from |
decimal number |
TotalInclVat |
Total amount incl. vat |
decimal number |
TotalNonVatableAmount |
Total vat free amount |
decimal number |
TotalVat |
Total vat amount |
decimal number |
TotalLines |
Total lines. SubTotal, Vat and Total. Only lines valid for display in the current context are returned. |
Collection of TotalLine |
Currency |
The currency used on the voucher. Defaults to DKK if null. Dinero will assign days date currency rate for the given currency. Currencies are given i format: DKK, EUR, USD ect... |
string |
Language |
The language to be used in the voucher. Available languages are 'da-DK' and 'en-GB'. Defaults to 'da-DK'. |
string |
ExternalReference |
Your external id This can be used for ID'ing in external apps/services e.g. a web shop. The maximum length is 128 characters |
string |
Description |
User supplied description of the voucher e.g. 'Custom Invoice description'. Defaults to document type e.g. 'Invoice', 'Offer', 'Creditnote' using the selected language. |
string |
Comment |
User supplied comment on the voucher |
string |
Date |
The date of the creation/issuing. This should be in the format YYYY-MM-DD e.g. 2015-12-02. Defaults to today. |
string |
ProductLines |
User supplied invoice lines. Minimum one. |
Collection of InvoiceLine |
Address |
Contact address (linebreaks are allowed '\n'). When null is specified the address defaults to the contacts address. |
string |
{ "PaymentDate": "2015-12-02", "PaymentConditionNumberOfDays": 8, "PaymentConditionType": "Netto", "ContactGuid": "19957296-1591-417a-8d88-2aaff00d5cfa", "Number": 12, "ContactName": "Donald Duck", "ShowLinesInclVat": false, "TotalExclVat": 200.0, "TotalVatableAmount": 200.0, "TotalInclVat": 250.0, "TotalNonVatableAmount": 0.0, "TotalVat": 50.0, "TotalLines": [ { "Type": "SubTotal", "TotalAmount": 200.0, "Position": 0, "Label": "Subtotal" }, { "Type": "SubTotal", "TotalAmount": 200.0, "Position": 0, "Label": "Subtotal" } ], "Currency": "DKK", "Language": "en-GB", "ExternalReference": "Fx. WebshopSpecialId: 42", "Description": "Description of document type. Fx.: invoice, credit note or offer", "Comment": "Very very important comment", "Date": "2015-12-02", "ProductLines": [ { "AccountName": "Bank", "BaseAmountValue": 20.0, "BaseAmountValueInclVat": 25.0, "TotalAmount": 100.0, "TotalAmountInclVat": 125.0, "ProductGuid": "7894cefb-89f8-4a2d-9f34-8f1a2637fb4c", "Description": "Flowers", "Comments": "Smells good", "Quantity": 5.0, "AccountNumber": 1000, "Unit": "parts", "Discount": 10.0, "LineType": "Product" }, { "AccountName": "Bank", "BaseAmountValue": 20.0, "BaseAmountValueInclVat": 25.0, "TotalAmount": 100.0, "TotalAmountInclVat": 125.0, "ProductGuid": "7894cefb-89f8-4a2d-9f34-8f1a2637fb4c", "Description": "Flowers", "Comments": "Smells good", "Quantity": 5.0, "AccountNumber": 1000, "Unit": "parts", "Discount": 10.0, "LineType": "Product" } ], "Address": "Test Road 3 2100 Copenhagen Denmark" }