Create Purchase Invoice

Endpoints

Estonia:    https://aktiva.merit.ee/api/v1/sendpurchinvoice

Finland:    https://aktiva.meritaktiva.fi/api/v1/sendpurchinvoice

Poland:     https://program.360ksiegowosc.pl/api/v1/sendpurchinvoice  

This endpoint creates document and general ledger records without any confirmation. If you need solution where book keepers are approving puchase orders and expanse claims, use different endpoint: sendpurchorder.

Query Payload

PurchaseInvoice

FieldTypeComment 
VendorVendorObject
ExpenseClaimboolIf false, it indicates a normal purchase invoice. If true, the purchase invoice is handled as presented by responsible employee for expense claim.
DocDateDate
DueDateDate
TransactionDateDate
BillNoStr 35
RefNoStr 36
BankAccountStr 50
CurrencyCodeStr 4
DepartmentCodeStr 20If used then must be found in the company database.
ProjectCodeStr 20If used then must be found in the company database.
InvoiceRowInvoiceRowObjects
TaxAmountTaxObjectsRequired
RoundingAmountDecimal 18.2
TotalAmountDecimal 18.2Amount without VAT
PaymentPayment object
HcommentString 4KComment before invoice rows
FcommentString 4KComment after invoice rows
AttachmentAttachmentObject

VendorObject

FieldTypeComment 
IdGuidIf filled and vendor is found in the database then following fields are not important. If not found, the vendor is added using the following fields.
Name Str 150Required when vendor is added
RegNoStr 30
VatAccountableBoolRequired when vendor is added. Allowed “true” or “false” (lowercase).
VatRegNoStr 30
CurrencyCodeStr 4
PaymentDeadLineIntIf missing then taken from default settings.
OverDueChargeDecimal 5.2If missing then taken from default settings.
AddressStr 100
CityStr 30
CountryStr 100
PostalCodeStr 15
CountryCodeStr 2Required when adding
PhoneNoStr 50
PhoneNo2Str 50
HomePageStr 80
EmailStr 80

ItemObject

FieldTypeComment 
CodeStr 20Required. Must be found in company database.
DescriptionStr 100Required
TypeInt1 = stock item, 2 = service, 3 = item. Required.
UOMNameStr 64Name for the unit
DefLocationCodeStr 20 If company has more than one (default) stock, stock code in this field is required if the item is a stock item and does not exist yet.

InvoiceRowObject

FieldTypeComment 
ItemItemObject
QuantityDecimal 18.3
PriceDecimal 18.7
TaxIdGuidRequired. Use gettaxes endpoint to detect the guid needed
LocationCodeStr 20Used for stock items and multiple stocks. If used then must be found in the company database.
DepartmentCodeStr 20If used then must be found in the company database.
GLAccountCodeStr 10General ledger Account code. If used then must be found in the company database
ProjectCodeStr 20If used then must be found in the company database
CostCenterCodeStr 20If used then must be found in the company database

TaxObject

FieldTypeComment 
TaxIdGuidRequired. Use gettaxes endpoint to detect the guid needed
AmountDecimal 18.2

PaymentObject

FieldTypeComment 
PaymentMethodStr 150Name of the payment method. Must be found in the company database.
PaidAmountDecimal 18.2
PaymDateDateYYYYmmddHHii

AttachmentObject

FieldTypeComment 
FileNameStr
FileContentStrPDF In Base64 format