Appearance
Create Purchase Invoice Waiting Approval
Endpoints v1
https://app.passelimerit.fi/api/v1/sendpurchorder
NOTE
Please make sure the PDF is a valid file 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. Please use endpoint sendpurchinvoice
.
Query Payload
json
{
"Vendor": {
"Name": "VendorName"
},
"DocDate": "20200506",
"DueDate": "20200506",
"InvoiceRow": [
{
"Item": {
"Code": "1234567",
"Description": "Bag of goldflakes",
"Type": 3
},
"TaxId": "b9b25735-6a15-4d4e-8720-25b254ae3d21"
}
],
"TaxAmount": [
{
"TaxId": "b9b25735-6a15-4d4e-8720-25b254ae3d21"
}
],
"TotalAmount": 2000.00
}
Purchase Invoice
Field | Type | Comment | Required |
---|---|---|---|
Vendor | VendorObject | Required | |
ExpenseClaim | bool | If false, it indicates a normal purchase invoice. If true, the purchase invoice is handled as presented by responsible employee for expense claim. | |
DocDate | Date | Required | |
DueDate | Date | Required | |
TransactionDate | Date | ||
BillNo | Str 35 | ||
RefNo | Str 36 | ||
BankAccount | Str 50 | ||
CurrencyCode | Str 4 | ||
CurrencyRate | Decimal 18.7 | ||
DepartmentCode | Str 20 | If used then must be found in the company database. | |
ProjectCode | Str 20 | If used then must be found in the company database. | |
InvoiceRow | Array of InvoiceRowObjects | Required | |
TaxAmount | Array of TaxObjects | Required | |
RoundingAmount | Decimal 18.2 | ||
TotalAmount | Decimal 18.2 | Amount without VAT | |
Payment | Payment object | ||
Hcomment | Str 4K | Comment before invoice rows | |
Fcomment | Str 4K | Comment after invoice rows | |
Attachment | AttachmentObject | ||
PolDocType | int 1 | Poland only. 0 - nochoise 1 - purchmk 2 - purchvatrr 3 - purchwe |
Vendor Object
json
{
"Vendor": {
"Name": "VendorName",
"RegNo": "12345678",
"VatAccountable": true,
"VatRegNo": "12345678",
"CurrencyCode": "EUR",
"PaymentDeadLine": 7,
"OverDueCharge": 0,
"Address": "VendorAddress",
"City": "VendorCity",
"County": "VendorCounty",
"PostalCode": "12345",
"CountryCode": "FI",
"PhoneNo": "123456789",
"PhoneNo2": "123456789",
"HomePage": "www.vendor.com",
"Email": "",
"VatRegNo": "12345678"
},
// ...
}
Vendor Object
Field | Type | Comment | Required |
---|---|---|---|
Id | Guid | If 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. | Required, if the following fields are not used |
Name | Str 150 | Required, when a vendor is added. | |
RegNo | Str 30 | ||
VatAccountable | Bool | Allowed true or false (lowercase). | Required, when a vendor is added. |
VatRegNo | Str 30 | ||
CurrencyCode | Str 4 | ||
PaymentDeadLine | Int | If missing then taken from default settings. | |
OverDueCharge | Decimal 5.2 | If missing then taken from default settings. | |
Address | Str 100 | ||
City | Str 30 | ||
County | Str 100 | ||
PostalCode | Str 15 | ||
CountryCode | Str 2 | Required, when a vendor is added. | |
PhoneNo | Str 50 | ||
PhoneNo2 | Str 50 | ||
HomePage | Str 80 | ||
Str 80 |
Item Object
json
{
// ...
"InvoiceRow": [
{
"Item": {
"Code": "1234567",
"Description": "Bag of goldflakes",
"Type": 3,
"UOMName": "kg"
},
// ...
}
],
// ...
}
Item Object
Field | Type | Comment | Required |
---|---|---|---|
Code | Str 20 | Must be found in company database. | Required |
Description | Str 100 | Required | |
Type | Int | 1 - stock item, 2 - service, 3 - item. | Required |
UOMName | Str 64 | Name for the unit. Required for stock item | |
DefLocationCode | Str 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. |
InvoiceRow Object
json
{
// ...
"InvoiceRow": [
{
"Item": {
// ...
},
"Quantity": 2.00,
"Price": 1000.00,
"TaxId": "b9b25735-6a15-4d4e-8720-25b254ae3d21",
"LocationCode": "1"
}
],
// ...
}
InvoiceRow Object
Field | Type | Comment | Required |
---|---|---|---|
Item | ItemObject | Required | |
Quantity | Decimal 18.3 | ||
Price | Decimal 18.7 | ||
TaxId | Guid | Use gettaxes endpoint to detect the guid needed | Required |
LocationCode | Str 20 | Used for stock items and multiple stocks. If used then must be found in the company database. | |
DepartmentCode | Str 20 | If used then must be found in the company database. | |
GLAccountCode | Str 10 | General ledger Account code. If used then must be found in the company database | |
ProjectCode | Str 20 | If used then must be found in the company database | |
CostCenterCode | Str 20 | If used then must be found in the company database |
Tax Object
json
{
// ...
"TaxAmount": [
{
"TaxId": "b9b25735-6a15-4d4e-8720-25b254ae3d21",
"Amount": 400.00
}
],
// ...
}
Tax Object
Field | Type | Comment | Required |
---|---|---|---|
TaxId | Guid | Use gettaxes endpoint to detect the guid needed | Required |
Amount | Decimal 18.2 |
Payment Object
json
{
// ...
"Payment": {
"PaymentMethod": "Nordea",
"PaidAmount": "100",
"PaymDate": "20190413202154"
},
// ...
}
Payment Object
Field | Type | Comment | Required |
---|---|---|---|
PaymentMethod | Str 150 | Name of the payment method. Must be found in the company database. | |
PaidAmount | Decimal 18.2 | Amount with VAT (not more) or less if partial payment | |
PaymDate | Date | YYYYmmddHHii |
Attachment Object
json
{
// ...
"Attachment": {
"FileName": "invoice.pdf",
"FileContent": "Base64EncodedPDF"
}
}
Attachment Object
Field | Type | Comment | Required |
---|---|---|---|
FileName | Str | ||
FileContent | Str | PDF In Base64 format |
Endpoints v2
https://app.passelimerit.fi/api/v2/sendpurchorder
Query Payload
json
{
"Vendor": {
"Name": "VendorName"
},
"DocDate": "20200506",
"DueDate": "20200506",
"InvoiceRow": [
{
"Item": {
"Code": "1234567",
"Description": "Bag of goldflakes",
"Type": 3
},
"TaxId": "b9b25735-6a15-4d4e-8720-25b254ae3d21"
}
],
"TaxAmount": [
{
"TaxId": "b9b25735-6a15-4d4e-8720-25b254ae3d21"
}
],
"TotalAmount": 2000.00
}
Purchase Invoice
Field | Type | Comment | Required |
---|---|---|---|
Vendor | VendorObject | Required | |
DocDate | Date | Required | |
DueDate | Date | Required | |
BillNo | Str 35 | ||
RefNo | Str 36 | ||
CurrencyCode | Str 4 | ||
DepartmentCode | Str 20 | If used then must be found in the company database. | |
Dimensions | Array of Dimensions objects | ||
InvoiceRow | Array of InvoiceRowObjects | Required | |
TotalAmount | Decimal 18.2 | Amount without VAT | |
RoundingAmount | Decimal 18.2 | ||
TaxAmount | Array of TaxObjects | Required | |
Hcomment | Str 4K | Comment before invoice rows | |
Fcomment | Str 4K | Comment after invoice rows | |
Attachment | AttachmentObject | ||
Payment | Payment object | ||
BankAccount | Str 50 | ||
ExpenseClaim | bool | If false, it indicates a normal purchase invoice. If true, the purchase invoice is handled as presented by responsible employee for expense claim. | |
Receiver | ReceiverObject | ||
PolDocType | int 1 | Poland only. 0 - nochoise 1 - purchmk 2 - purchvatrr 3 - purchwe |
Vendor Object
json
{
"Vendor": {
"Name": "VendorName",
"RegNo": "12345678",
"VatAccountable": true,
"VatRegNo": "12345678",
"CurrencyCode": "EUR",
"PaymentDeadLine": 7,
"OverDueCharge": 0,
"Address": "VendorAddress",
"City": "VendorCity",
"County": "VendorCounty",
"PostalCode": "12345",
"CountryCode": "FI",
"PhoneNo": "123456789",
"PhoneNo2": "123456789",
"HomePage": "www.vendor.com",
"Email": "",
"VatRegNo": "12345678"
},
// ...
}
Vendor Object
Field | Type | Comment | Required |
---|---|---|---|
Id | Guid | If 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. | Required, if the following fields are not used |
Name | Str 150 | Required, when a vendor is added. | |
RegNo | Str 30 | ||
VatAccountable | Bool | Allowed true or false (lowercase). | Required, when a vendor is added. |
VatRegNo | Str 30 | ||
CurrencyCode | Str 4 | ||
PaymentDeadLine | Int | If missing then taken from default settings. | |
OverDueCharge | Decimal 5.2 | If missing then taken from default settings. | |
Address | Str 100 | ||
City | Str 30 | ||
County | Str 100 | ||
PostalCode | Str 15 | ||
CountryCode | Str 2 | Required, when a vendor is added. | |
PhoneNo | Str 50 | ||
PhoneNo2 | Str 50 | ||
HomePage | Str 80 | ||
Str 80 |
Item Object
json
{
// ...
"InvoiceRow": [
{
"Item": {
"Code": "1234567",
"Description": "Bag of goldflakes",
"Type": 3,
"UOMName": "kg"
},
// ...
}
],
// ...
}
Item Object
Field | Type | Comment | Required |
---|---|---|---|
Code | Str 20 | Must be found in company database. | Required |
Description | Str 100 | Required | |
Type | Int | 1 - stock item, 2 - service, 3 - item. | Required |
UOMName | Str 64 | Name for the unit. Required for stock item | |
DefLocationCode | Str 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. |
InvoiceRow Object
json
{
// ...
"InvoiceRow": [
{
"Item": {
// ...
},
"Quantity": 2.00,
"Price": 1000.00,
"TaxId": "b9b25735-6a15-4d4e-8720-25b254ae3d21",
"LocationCode": "1"
}
],
// ...
}
InvoiceRow Object
Field | Type | Comment | Required |
---|---|---|---|
Item | ItemObject | Required | |
Quantity | Decimal 18.3 | ||
Price | Decimal 18.7 | ||
TaxId | Guid | Use gettaxes endpoint to detect the guid needed | Required |
LocationCode | Str 20 | Used for stock items and multiple stocks. If used then must be found in the company database. | |
DepartmentCode | Str 20 | If used then must be found in the company database. | |
GLAccountCode | Str 10 | General ledger Account code. If used then must be found in the company database | |
ProjectCode | Str 20 | If used then must be found in the company database | |
CostCenterCode | Str 20 | If used then must be found in the company database | |
Dimensions | Array of Dimensions objects |
Tax Object
json
{
// ...
"TaxAmount": [
{
"TaxId": "b9b25735-6a15-4d4e-8720-25b254ae3d21",
"Amount": 400.00
}
],
// ...
}
Tax Object
Field | Type | Comment | Required |
---|---|---|---|
TaxId | Guid | Use gettaxes endpoint to detect the guid needed | Required |
Amount | Decimal 18.2 |
Payment Object
json
{
// ...
"Payment": {
"PaymentMethod": "Nordea",
"PaidAmount": "100",
"PaymDate": "20190413202154"
},
// ...
}
Payment Object
Field | Type | Comment | Required |
---|---|---|---|
PaymentMethod | Str 150 | Name of the payment method. Must be found in the company database. | |
PaidAmount | Decimal 18.2 | Amount with VAT (not more) or less if partial payment | |
PaymDate | Date | YYYYmmddHHii |
Attachment Object
json
{
// ...
"Attachment": {
"FileName": "invoice.pdf",
"FileContent": "Base64EncodedPDF"
},
// ...
}
Attachment Object
Field | Type | Comment | Required |
---|---|---|---|
FileName | Str | ||
FileContent | Str | PDF In Base64 format |
Dimensions Object
json
{
// ...
"Dimensions": [
{
"DimId": 2,
"DimValueId": "7fc5f7f0-0537-4d64-b4cc-a8647bd217ac",
"DimCode": "hfif"
}
],
// ...
}
Dimensions Object
Field | Type | Comment | Required |
---|---|---|---|
DimId | Int | ||
DimValueId | Guid | ||
DimCode | Str |
Receiver Object
json
{
// ...
"Receiver": {
"Name": "ReceiverName",
"RegNo": "12345678",
"VatAccountable": true,
"VatRegNo": "12345678",
"CurrencyCode": "EUR",
"PaymentDeadLine": 7,
"OverDueCharge": 0,
"Address": "ReceiverAddress",
"City": "ReceiverCity",
"County": "ReceiverCounty",
"PostalCode": "12345",
"CountryCode": "FI",
"PhoneNo": "123456789",
"PhoneNo2": "123456789",
"HomePage": "www.receiver.com",
"Email": ""
}
}
Receiver Object
Field | Type | Comment | Required |
---|---|---|---|
Id | Guid | If filled and receiver (vendor) is found in the database then following fields are not important. If not found, the receiver is added using the following fields. | |
Name | Str 150 | Required, when a receiver is added. | |
RegNo | Str 30 | ||
VatAccountable | Bool | Allowed "true" or "false" (lowercase). | Required, when a receiver is added. |
VatRegNo | Str 30 | ||
CurrencyCode | Str 4 | ||
PaymentDeadLine | Int | If missing then taken from default settings. | |
OverDueCharge | Decimal 5.2 | If missing then taken from default settings. | |
Address | Str 100 | ||
City | Str 30 | ||
County | Str 100 | ||
PostalCode | Str 15 | ||
CountryCode | Str 2 | Required, when a receiver is added. | |
PhoneNo | Str 50 | ||
PhoneNo2 | Str 50 | ||
HomePage | Str 80 | ||
Str 80 |
Successful Result
json
{
"VendorId": "00000000-0000-0000-0000-000000000000",
"BillId": "b68bda7c-d82e-490d-b9c5-2f124098a11b",
"BillNo": "123",
"RefNo": "1232",
"BatchInfo": null
}