Resource: getpurchaseinvoice.nv
HTTP-method: GET
Gets detailed information for the desired purchase invoice.
Querystring parameters:
| Parameter name | Occurs | Description | Example |
| --- | --- | --- | --- |
| netvisorkey | 1 | Identifier of the invoice in Netvisor. | 123 |
| netvisorkeylist | 0...1 | Returns full details of purchase invoices in one request, max. 500 IDs.
Maximum URI length of the request is 2115 characters. | 1,2,3 |
| version | 0...1 | Returns a single invoice line’s (PurchaseInvoiceLine) Cost objects inside the invoice line element
1 = Cost objects outside invoice lines, used as default or if parameter is not given
2 = Cost objects inside invoice lines | 2 |
| include | 0...1 | - actions = Returns which actions can be performed on the purchase invoice (factual verification, approval, reject, ready for payment)
- handlinghistory = Returns the purchase invoice handling history
- previewimage = Returns purchase invoice preview image
- invoiceimage = Returns the original PDF attachment of the purchase invoice or, if it is missing, a PDF generated from the e-invoice message
- circulationlist = Returns the invoice-specific circulation list
- finvoice - Returns the purchase invoice Finvoice material. Returns the material only if the purchase invoice has been received as an e-invoice | actions |
| omitattachments | 0...1 | True = Attachments of the purchase invoice are not returned
False = Attachments of the purchase invoice are returned
If the parameter is not given or the value is empty = False | true |
Response:
| Level | Element name | Type and length | Occurs | Description | Example |
| --- | --- | --- | --- | --- | --- |
| root | Root | Aggr. | 1 | | |
| 1 | PurchaseInvoice | Aggr. | 1 | | |
| 2 | PurchaseInvoiceNetvisorKey | String | 1 | Purchase invoice Netvisor ID | 1025 |
| 2 | PurchaseInvoiceNumber | String | 1 | Invoice number | 345 |
| 2 | PurchaseInvoiceDate | Date | 1 | Invoice date | 2021-10-02 |
| Attr. | format | String | 1 | Date format, always ansi | ansi |
| 2 | PurchaseInvoiceEventDate | Date | 1 | Invoice posting date | 2021-10-02 |
| Attr. | format | String | 1 | Posting date format, always ansi | ansi |
| 2 | PurchaseInvoiceDeliveryDate | Date | 1 | Invoice delivery date | 2021-10-04 |
| Attr. | format | String | 1 | Delivery date format, always ansi | ansi |
| 2 | PurchaseInvoiceDueDate | Date | 1 | Invoice due date | 2021-10-31 |
| Attr. | format | String | 1 | Due date format, always ansi | ansi |
| 2 | PurchaseInvoiceValueDate | Date | 1 | Invoice value date | 2021-10-15 |
| Attr. | format | String | 1 | Value date format, always ansi | ansi |
| 2 | PurchaseInvoiceReferencenumber | String | 1 | Invoice reference number | 12594 |
| 2 | PurchaseInvoiceAgreementIdentifier | String | 1 | Contract identifier | 123 |
| 2 | PurchaseInvoiceVendorBankAccountNumber | String | 1 | Vendor bank account number | |
| 2 | IsPurchaseInvoiceVendorBankAccountDeleted | String | 1 | True or False. Indicates whether the bank account has been deleted. | False |
| 2 | IsPurchaseInvoiceVendorBankAccountFromSEPARegion | String | 1 | True or False. Indicates whether the bank account is from the SEPA region. | True |
| 2 | PurchaseInvoiceAmount | Numeric | 1 | Invoice amount with two decimals | 123,45 |
| 2 | PurchaseInvoicePaidAmount | Numeric | 1 | Paid amount of the invoice with two decimals | 100,00 |
| 2 | ForeignCurrencyAmount | Numeric | 1 | Invoice amount in foreign currency | 123,45 |
| 2 | ForeignCurrencyNameID | String | 1 | Currency code | EUR |
| 2 | InvoiceStatus | String | 1 | Invoice status
Open, Paid, Overdue, Allocated
Unallocated | Open |
| 2 | ApprovalStatus | String | 1 | Purchase invoice approval status:
new invoice = open
in factual verification = infactualverification
in approval = approved
approved = accepted
rejected = acceptorrejected | open |
| 2 | PurchaseInvoiceOurReference | String | 1 | Our reference | 012594 |
| 2 | PurchaseInvoiceYourReference | String | 1 | Your reference | 112594 |
| 2 | PurchaseInvoiceDescription | String | 1 | Additional invoice information | |
| 2 | VendorNetvisorKey | Numeric | 1 | Vendor NetvisorKey | 123 |
| 2 | VendorOrganizationIdentifier | String | 1 | Vendor business id | 1234567-8 |
| 2 | VendorCode | String | 1 | Vendor code | 23 |
| 2 | VendorName | String | 1 | Vendor name | Vendor Oy Ab |
| 2 | VendorAddressLine | String | 1 | Vendor address | |
| 2 | VendorPostNumber | String | 1 | Vendor postal address | |
| 2 | VendorTown | String | 1 | Vendor postal address | |
| 2 | VendorCountry | String | 1 | Vendor country code | |
| 2 | Fingerprint | String | 1 | Invoice identifier | 606F6527D9CAF4BB7B69E4D616FAA78637552960A810FD3B5CC04BFEB6757D4C |
| 2 | VoucherID | Numeric | 1 | Purchase invoice voucher NetvisorKey. Returns an empty tag if the invoice has not yet been posted and the voucher has not been created. | 1123 |
| 2 | IsAccounted | String | 1 | Indicates whether the purchase invoice is posted | True |
| 2 | PreviewImage | String | 0...n | When parameter include = previewimage is used | |
| Attr. | AttachmentNetvisorKey | Numeric | 1 | Identifier of the invoice image attachment | 123 |
| 2 | InvoiceImage | String | 0..n | Base64-encoded invoice image in PDF format when parameter include = invoiceimage is used | |
| Attr. | AttachmentNetvisorKey | Numeric | 1 | Identifier of the invoice image attachment | 123 |
| 2 | Attachments | Aggr. | 0...1 | | |
| 3 | Attachment | Aggr. | 1...n | | |
| 4 | AttachmentBase64Data | String | 1 | Base64-encoded data of the attachment | |
| 4 | FileName | String | 1 | File name of the attachment | Lasku12594.pdf |
| 4 | ContentType | String | 1 | MIME-type of the attachment | Application/pdf |
| 4 | Comment | String | 1 | Comment for the attachment | |
| 2 | InvoiceLines | Aggr. | 0...1 | | Returns purchase invoice posting rows |
| 3 | PurchaseInvoiceLine | Aggr. | 1...n | | |
| 4 | NetvisorKey | Numeric | 1 | Row NetvisorKey | |
| 4 | LineSum | Numeric | 1 | Row sum including vat | |
| 4 | LineNetSum | Numeric | 1 | Row sum excluding vat | |
| 4 | UnitPrice | Numeric | 1 | Unit price (including vat) | |
| 4 | VatPercent | Numeric | 1 | VAT percent | |
| 4 | VatCode | String | 1 | VAT code | |
| 4 | Description | String | 0...1 | Row specification | |
| 4 | Unit | String | 0...1 | Unit of measurement | |
| 4 | OrderedAmount | Numeric | 1 | Ordered quantity | |
| 4 | PurchasePrice | Numeric | 1 | Deprecated element, does not return anything | |
| 4 | DeliveredAmount | Numeric | 1 | Delivered quantity | |
| 4 | ProductCode | String | 1 | Product code | |
| 4 | DiscountPercentage | Numeric | 1 | Discount percentage | |
| 4 | ProductName | String | 1 | Item name | |
| 4 | AccountingSuggestionBookkeeping
AccountNetvisorKey | String | 0...1 | NetvisorKey of the account in the account suggestion | |
| 4 | AccountingSuggestionBookkeepingAccount | String | 0...1 | Account in the account suggestion | |
| 4 | PurchaseInvoiceLineDimensions | Aggr. | 0...1 | Levels 4 -5 -6 when version parameter is 2
Otherwise levels 3-4-5 | |
| 5 | Dimension | Aggr. | 1...n | | |
| 6 | DimensionName | String | 1 | Cost object header | Project |
| 6 | DimensionNameNetvisorKey | String | 1 | Cost object header Netvisor ID | 2 |
| 6 | DimensionDetailName | String | 1 | Cost object | Project 1 |
| 6 | DimensionDetailCode | String | 0...1 | Cost object identifier | P001 |
| 6 | DimensionDetailNetvisorKey | String | 1 | Cost object Netvisor ID | 95 |
| 2 | LinkedPurchaseOrders | Aggr. | 0...1 | If purchase orders have been linked to the purchase invoice, their numbers and IDs are returned | |
| 3 | PurchaseOrder | Aggr. | 1...n | | |
| 4 | OrderNumber | String | 1 | Purchase order number | 123 |
| 4 | NetvisorKey | String | 0...1 | Purchase order NetvisorID
Note: If the purchase order number has been entered to the purchase invoice in advance, the purchase order may not yet exist in the system | 10 |
When parameter actions is in use the following structure is added at the end of the message:
| Level | Element | Type and length | Occurs | Description | Example |
| --- | --- | --- | --- | --- | --- |
| 2 | PostingLinesAccess | Aggr. | 1 | Purchase invoice posting | |
| 3 | CanEditPostingLines | String | 1 | | True |
| 3 | CanUserPostInvoice | String | 1 | | False |
| 3 | SuggestPostingByDefault | String | 1 | | True |
| 3 | CanEditAccountingSuggestion | String | 1 | | False |
| 2 | Actions | Aggr. | 1 | What can be done to the invoice with the user's rights | |
| 3 | Action | Aggr. | 1...n | | |
| 4 | Id | String | 1 | Possible values:
approved
accepted
reject
pay | accepted |
| 4 | Type | String | 1 | The resource to be used for performing the action | purchaseinvoicepostingdata |
| 4 | Description | String | 1 | Description of the action | Accept the invoice |
| 2 | Alerts | Aggr. | 1 | If there are no alerts, only upper level tag is shown | |
| 3 | Alert | Aggr. | 1 | | |
| 4 | Heading | String | 1 | Heading | The invoice is in a locked period |
| 4 | Description | String | 1 | Specification | Approving the invoice does not update the invoice data because the invoice belongs to a locked period |
| 2 | Notifications | Aggr. | 1 | If there are no notifications, only upper level tag is shown | |
| 3 | Notification | Aggr. | 1 | | |
| 4 | Heading | String | 1 | Heading | |
| 4 | Description | String | 1 | Specification | Vendor's bank account has been deleted, update the bank account |
When parameter handlinghistory is in use the following structure is added at the end of the message:
Level | Element | Type and length | Occurs | Description | Example |
2 | HandlingHistory | Aggr. | 1 | Invoice handling history | |
3 | HandlingHistoryLine | Aggr. | 1...n | ||
4 | Type | String | 1 | Transaction | InvoiceCreated |
4 | Heading | String | 1 | Heading | Created |
4 | Description | String | 1 | Specification | Invoice created in the system |
4 | Timestamp | Date | 1 | Timestamp | 2022-01-01 09:45:49.200 |
Attr. | format | String | 1 | Date format, always ansi | ansi |
4 | UserName | String | 1 | By whom the transaction was performed | Assi factual verifier |
4 | UserEmail | String | 0...1 | Email address in the company of the previous user, if defined and the user is not "System" | |
4 | UpdatedInformationFields | Aggr. | 0...n | Updated information | |
5 | FieldName | String | 1 | Information | Posted |
5 | OldValue | String | 1 | Old value | No |
5 | NewValue | String | 1 | New value | Yes |
*If parameter netvisorkeylist is used and the response returns more than one purchase invoice, one PurchasesInvoices aggregate is added to the response; otherwise the response follows the same model:
Level | Element name | Type and length | Occurs | Description | Example |
Root | Root | Aggr. | 1 | ||
1 | PurchaseInvoices | Aggr. | 1 | ||
2 | PurchaseInvoice | Aggr. | 1..n | ||
3 | PurchaseInvoiceNetvisorKey | String | 1 | Purchase invoice Netvisor ID | 1234 |
*This article has been translated using an AI-based translation tool. The contents or wording of these instructions may differ from those in other instructions or in the software.
*
