Skip to main content

Update invoice status and post purchase invoice purchaseinvoicepostingdata.nv

Resource: purchaseinvoicepostingdata.nv

HTTP-method: POST

The resource can be used for rejecting, verifying, or approving a purchase invoice as well as for posting. When importing, you can also edit posting lines.

When using this resource, Netvisor user rights of the owner of the used api user keys are checked. This user needs rights to post/verify/approve purchase invoices.

The purchase invoice that you want to verify, accept, or reject must be in state 'open'. The row data are the same as in importing purchase invoice (purchaseinvoice.nv), the row data that is imported replaces the row data on the purchase invoice in Netvisor. Sums in row data must match the purchase invoice amount, otherwise import will end up to error.

A purchase invoice can be posted without changing invoice status when element IsReadyForAccounting is given with value 1 and leaving out the Status element Depending on the status of the purchase invoice, either this pre-posts or posts the invoice, such as in the Netvisor user interface.

Level

Element

Type and length

Occurs

Description

Example

root

Root

Aggr.

1

1

PurchaseInvoicePostingData

Aggr.

1

2

PurchaseInvoiceNetvisorKey

Numeric

1

Netvisor ID of purchase invoice

31646

2

Status

String

1

Purchase invoice status, in that order they can be given:
reject (hylätty)
contentsupervisorrejected (hylätty asiatarkastuksessa)
approved (asiatarkastettu)
contentsupervisorchecked (asiatarkastettu pääasiatarkastajana)
acceptrrejected (hylätty hyväksynnässä)
accepted (hyväksytty)

Invoice status cannot be update to a previous state

approved

2

EventDate

Date

0...1

Event date

2019-01-15

Attr.

format

String

1

Event date format, always ansi

ansi

2

IsReadyForAccounting

Numeric

1

If value 1 is given Netvisor will generate voucher automatically. If value is not given posting will be done manually in Netvisor.

1

2

Comment

String, max 3000

0...1

Purchase invoice comment, shown in the purchase invoice handling history

Example comment

3

PurchaseInvoicePostingLine

Aggr.

0...n

4

purchaseinvoicelinenetvisorkey

Numeric

0...1

Purchase invoice row NetvisorID

12345

4

ProductCode

String

0...1

Product code

123

4

ProductName

String

1

Product name
Can be left out by giving but it will overwrite the possible existing text in Netvisor.

Example product

4

OrderedAmount

Numeric

0...1

Number of ordered products

4

DeliveredAmount

Numeric

1

Number of delivered products

4

UnitName

String

0...1

Unit of measure

kpl

4

UnitPrice

Numeric

1

Unit price

4

DiscountPercentage

Numeric

0...1

Discount percentage

4

VatPercent

Numeric

1

VAT percent

24

Attr.

vatcode

String

1

VAT code. VAT-classes ja -codes are listed here.

KOMY

4

LineSum

Numeric

1

Will be rounded to two decimals

A

type

String

1

Only gross (brutto)

gross

4

Description

String

0...1

Description

4

Sort

Numeric

0...1

Row running number

1

4

AccountingSuggestion

Numeric

0...1

Accounting suggestion
If not given, default accounts in Netvisor will be used

4

Dimension

Aggr.

0...n

5

DimensionName

String, max 200

1

Dimension header

5

DimensionItem

String, max 200

1

Dimension name

Did this answer your question?