Create Purchase Invoice Waiting Approval

Endpoints

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

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

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

Query Payload

Please make sure that PDF is valid fail and correctly encoded into Base64. We validate these attachements. This is quite otfen that API responds with error because of attachment that is broken file.

Also, if you want to send expense document instead of invoice, please use attribute ExpenseClaim: true.

If you want to send document straight to book keeping with general ledger records and stuff. Pealse use endpoint sendpurchinvoice.

Exampe Payload1:

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
CurrencyRateDecimal 18.7
DepartmentCodeStr 20If used then must be found in the company database.
ProjectCodeStr 20If used then must be found in the company database.
InvoiceRowArray of InvoiceRowObjects
TaxAmountArray of TaxObjectsRequired
RoundingAmountDecimal 18.2
TotalAmountDecimal 18.2Amount without VAT
PaymentPayment object
HcommentString 4KComment before invoice rows
FcommentString 4KComment after invoice rows
AttachmentAttachmentObject
PolDocTypeint 1Poland only
1-purchmk
2-purchvatrr
3-purchwe
0-nochoise

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
CountyStr 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. Required for stock item
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.2Amount with VAT (not more) or less if partial payment
PaymDateDateYYYYmmddHHii

AttachmentObject

FieldTypeComment 
FileNameStr
FileContentStrPDF In Base64 format

Endpoints

Estonia: https://aktiva.merit.ee/api/v2/sendpurchorder
Finland: https://aktiva.meritaktiva.fi/api/v2/sendpurchorder
Poland: https://program.360ksiegowosc.pl/api/v2/sendpurchorder

PurchaseInvoice

FieldTypeComment 
PolDocTypeint 1Poland only
1-purchmk
2-purchvatrr
3-purchwe
0-nochoise
VendorVendorObject
DocDateDate
DueDateDate
BillNoStr 35
RefNoStr 36
CurrencyCodeStr 4
DepartmentCodeStr 20If used then must be found in the company database.
DimensionsArray of Dimensions objects
InvoiceRowArray of InvoiceRowObjects
TotalAmountDecimal 18.2Amount without VAT
RoundingAmountDecimal 18.2
TaxAmountArray of TaxObjectsRequired
HcommentString 4KComment before invoice rows
FcommentString 4KComment after invoice rows
AttachmentAttachmentObject
PaymentPayment object
BankAccountStr 50
ExpenseClaimboolIf false, it indicates a normal purchase invoice. If true, the purchase invoice is handled as presented by responsible employee for expense claim.

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
CountyStr 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. Required for stock item
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
DimensionsArray of Dimensions objects

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.2Amount with VAT (not more) or less if partial payment
PaymDateDateYYYYmmddHHii

AttachmentObject

FieldTypeComment 
FileNameStr
FileContentStrPDF In Base64 format

Dimensions

FieldTypeComment
DimIdInt
DimValueIdGuid
DimCodeStr

Successful Result

FieldType
VendorIdGuid
BillIdGuid
BillNoStr
RefNoStr