Skip to content

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
FieldTypeCommentRequired
VendorVendorObjectRequired
ExpenseClaimboolIf false, it indicates a normal purchase invoice. If true, the purchase invoice is handled as presented by responsible employee for expense claim.
DocDateDateRequired
DueDateDateRequired
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 InvoiceRowObjectsRequired
TaxAmountArray of TaxObjectsRequired
RoundingAmountDecimal 18.2
TotalAmountDecimal 18.2Amount without VAT
PaymentPayment object
HcommentStr 4KComment before invoice rows
FcommentStr 4KComment after invoice rows
AttachmentAttachmentObject
PolDocTypeint 1Poland 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
FieldTypeCommentRequired
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.Required, if the following fields are not used
NameStr 150Required, when a vendor is added.
RegNoStr 30
VatAccountableBoolAllowed true or false (lowercase).Required, when a vendor is added.
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 a vendor is added.
PhoneNoStr 50
PhoneNo2Str 50
HomePageStr 80
EmailStr 80

Item Object

json
{
  // ...
  "InvoiceRow": [
    {
      "Item": {
        "Code": "1234567",
        "Description": "Bag of goldflakes",
        "Type": 3,
        "UOMName": "kg"
      },
      // ...
    }
  ],
  // ...
}
Item Object
FieldTypeCommentRequired
CodeStr 20Must be found in company database.Required
DescriptionStr 100Required
TypeInt1 - stock item,
2 - service,
3 - item.
Required
UOMNameStr 64Name for the unit. Required for stock item
DefLocationCodeStr 20If 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
FieldTypeCommentRequired
ItemItemObjectRequired
QuantityDecimal 18.3
PriceDecimal 18.7
TaxIdGuidUse gettaxes endpoint to detect the guid neededRequired
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

Tax Object

json
{
  // ...
  "TaxAmount": [
    {
      "TaxId": "b9b25735-6a15-4d4e-8720-25b254ae3d21",
      "Amount": 400.00
    }
  ],
  // ...
}
Tax Object
FieldTypeCommentRequired
TaxIdGuidUse gettaxes endpoint to detect the guid neededRequired
AmountDecimal 18.2

Payment Object

json
{
  // ...
  "Payment": {
    "PaymentMethod": "Nordea",
    "PaidAmount": "100",
    "PaymDate": "20190413202154"
  },
  // ...
}
Payment Object
FieldTypeCommentRequired
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

Attachment Object

json
{
  // ...
  "Attachment": {
    "FileName": "invoice.pdf",
    "FileContent": "Base64EncodedPDF"
  }
}
Attachment Object
FieldTypeCommentRequired
FileNameStr
FileContentStrPDF 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
FieldTypeCommentRequired
VendorVendorObjectRequired
DocDateDateRequired
DueDateDateRequired
BillNoStr 35
RefNoStr 36
CurrencyCodeStr 4
DepartmentCodeStr 20If used then must be found in the company database.
DimensionsArray of Dimensions objects
InvoiceRowArray of InvoiceRowObjectsRequired
TotalAmountDecimal 18.2Amount without VAT
RoundingAmountDecimal 18.2
TaxAmountArray of TaxObjectsRequired
HcommentStr 4KComment before invoice rows
FcommentStr 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.
ReceiverReceiverObject
PolDocTypeint 1Poland 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
FieldTypeCommentRequired
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.Required, if the following fields are not used
NameStr 150Required, when a vendor is added.
RegNoStr 30
VatAccountableBoolAllowed true or false (lowercase).Required, when a vendor is added.
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 a vendor is added.
PhoneNoStr 50
PhoneNo2Str 50
HomePageStr 80
EmailStr 80

Item Object

json
{
  // ...
  "InvoiceRow": [
    {
      "Item": {
        "Code": "1234567",
        "Description": "Bag of goldflakes",
        "Type": 3,
        "UOMName": "kg"
      },
      // ...
    }
  ],
  // ...
}
Item Object
FieldTypeCommentRequired
CodeStr 20Must be found in company database.Required
DescriptionStr 100Required
TypeInt1 - stock item,
2 - service,
3 - item.
Required
UOMNameStr 64Name for the unit. Required for stock item
DefLocationCodeStr 20If 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
FieldTypeCommentRequired
ItemItemObjectRequired
QuantityDecimal 18.3
PriceDecimal 18.7
TaxIdGuidUse gettaxes endpoint to detect the guid neededRequired
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

Tax Object

json
{
  // ...
  "TaxAmount": [
    {
      "TaxId": "b9b25735-6a15-4d4e-8720-25b254ae3d21",
      "Amount": 400.00
    }
  ],
  // ...
}
Tax Object
FieldTypeCommentRequired
TaxIdGuidUse gettaxes endpoint to detect the guid neededRequired
AmountDecimal 18.2

Payment Object

json
{
  // ...
  "Payment": {
    "PaymentMethod": "Nordea",
    "PaidAmount": "100",
    "PaymDate": "20190413202154"
  },
  // ...
}
Payment Object
FieldTypeCommentRequired
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

Attachment Object

json
{
  // ...
  "Attachment": {
    "FileName": "invoice.pdf",
    "FileContent": "Base64EncodedPDF"
  },
  // ...
}
Attachment Object
FieldTypeCommentRequired
FileNameStr
FileContentStrPDF In Base64 format

Dimensions Object

json
{
  // ...
  "Dimensions": [
    {
    "DimId": 2,
    "DimValueId": "7fc5f7f0-0537-4d64-b4cc-a8647bd217ac",
    "DimCode": "hfif"
    }
  ],
  // ...
}
Dimensions Object
FieldTypeCommentRequired
DimIdInt
DimValueIdGuid
DimCodeStr

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
FieldTypeCommentRequired
IdGuidIf 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.
NameStr 150Required, when a receiver is added.
RegNoStr 30
VatAccountableBoolAllowed "true" or "false" (lowercase).Required, when a receiver is added.
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 a receiver is added.
PhoneNoStr 50
PhoneNo2Str 50
HomePageStr 80
EmailStr 80

Successful Result

json
{
  "VendorId": "00000000-0000-0000-0000-000000000000",
  "BillId": "b68bda7c-d82e-490d-b9c5-2f124098a11b",
  "BillNo": "123",
  "RefNo": "1232",
  "BatchInfo": null
}