Skip to content

Get purchase invoice details

Endpoints v1

https://app.passelimerit.fi/api/v1/getpurchorder

Endpoints v2

https://app.passelimerit.fi/api/v2/getpurchorder

Query Payload

json
{ 
  "Id":  "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx" .
}

Successful Result V1

json
{
  "Header": {
    "PIHId": "5312a13d-64ad-4032-b523-d81c420d246a",
    "DepartmentCode": null,
    "DepartmentName": null,
    "ProjectCode": null,
    "CostCenterCode": null,
    "BatchInfo": "OS-3",
    "BillNo": "987654324",
    "DocumentDate": "2020-05-06T00:00:00",
    "TransactionDate": "2020-05-06T00:00:00",
    "VendorId": "cbd0cd6b-c6ce-42c5-9162-0eb4942f2dd5",
    "VendorName": "Mingi Firma AS",
    "VendorRegNo": "123456789",
    "DueDate": "2020-05-06T00:00:00",
    "Fine": 0.00,
    "CurrencyCode": "EUR",
    "CurrencyRate": 1.0000000,
    "TaxAmount": 0.00,
    "RoundingAmount": 0.00,
    "TotalAmount": 471.20,
    "ProfitAmount": 471.20,
    "TotalSum": 471.20,
    "ReferenceNo": null,
    "PriceInclVat": false,
    "VatRegNo": "EE123456789",
    "PaidAmount": 380.00,
    "FileExists": true,
    "InboundTime": "2024-06-03T09:44:46.547",
    "Operator": null,
    "Paid": false
  },
  "Lines": [
    {
      "PILId": "8b3c11dc-9356-482c-89eb-84eaa87283ad",
      "ArticleCode": "ENVOICE_SERVICE",
      "LocationCode": null,
      "Quantity": 1.000,
      "Price": 471.2000000,
      "TaxName": "Ei veronalainen",
      "TaxPct": 0.00,
      "AmountExclVat": 471.20,
      "AmountInclVat": 471.20,
      "VatAmount": 0.00,
      "AccountCode": "1531",
      "DepartmentName": null,
      "DepartmentCode": null,
      "ItemCostAmount": 0.00,
      "ProfitAmount": 471.20,
      "Description": "Rehvivahetuse ettemaks",
      "UOMName": null,
      "FixAsset": false,
      "ProjectAllocation": [],
      "CostCenterAllocation": [
        {
          "Code": "testCostCenterCode",
          "AllocPct": 100.0000000,
          "AllocAmount": 471.20
        }
      ]
    }
  ],
  "Payments": [
    {
      "PaymDate": "2024-06-03T00:00:00",
      "Amount": 380.00,
      "PaymentMethod": null,
      "PaymentId": "4d4554e7-372b-478a-9bcb-794224916b5e"
    }
  ],
  "Attachment": {
    "FileName": "file.pdf",
    "FileContent": "YmFzZTY0"
  }
}
Click to see the result parameters
Field NameTypeComment
HeaderSalesHeader object
LinesArray of Line objects
PaymentsArray of Payment objects
AllocationsProject and Cost Center allocations (if existing)

Header Object

json
{
  "Header": {
    "PIHId": "5312a13d-64ad-4032-b523-d81c420d246a",
    "DepartmentCode": null,
    "DepartmentName": null,
    "ProjectCode": null,
    "CostCenterCode": null,
    "BatchInfo": "OS-3",
    "BillNo": "987654324",
    "DocumentDate": "2020-05-06T00:00:00",
    "TransactionDate": "2020-05-06T00:00:00",
    "VendorId": "cbd0cd6b-c6ce-42c5-9162-0eb4942f2dd5",
    "VendorName": "Mingi Firma AS",
    "VendorRegNo": "123456789",
    "DueDate": "2020-05-06T00:00:00",
    "Fine": 0.00,
    "CurrencyCode": "EUR",
    "CurrencyRate": 1.0000000,
    "TaxAmount": 0.00,
    "RoundingAmount": 0.00,
    "TotalAmount": 471.20,
    "ProfitAmount": 471.20,
    "TotalSum": 471.20,
    "ReferenceNo": null,
    "PriceInclVat": false,
    "VatRegNo": "EE123456789",
    "PaidAmount": 380.00,
    "FileExists": true,
    "InboundTime": "2024-06-03T09:44:46.547",
    "Operator": null,
    "Paid": false
  },
  // ...
}
Header Object
Field NameComment
PIHId
DepartmentCode
DepartmentName
ProjectCode
ProjectName
BatchInfoGL transaction code and #
InvoiceNo
DocumentDate
TransactionDate
CustomerName
HComment
FComment
DueDate
CurrencyCode
CurrencyRate
TaxAmountVAT amount
RoundingAmount
TotalAmountAmount wo. VAT
ProfitAmountMargin amount
TotalSumTotal amount with taxes and rounding
UserName
ReferenceNo
PriceInclVat
VatRegNo
InboundTime
Operator

Lines Object

json
{
  // ...
  "Lines": [
    {
      "PILId": "8b3c11dc-9356-482c-89eb-84eaa87283ad",
      "ArticleCode": "ENVOICE_SERVICE",
      "LocationCode": null,
      "Quantity": 1.000,
      "Price": 471.2000000,
      "TaxName": "Ei veronalainen",
      "TaxPct": 0.00,
      "AmountExclVat": 471.20,
      "AmountInclVat": 471.20,
      "VatAmount": 0.00,
      "AccountCode": "1531",
      "DepartmentName": null,
      "DepartmentCode": null,
      "ItemCostAmount": 0.00,
      "ProfitAmount": 471.20,
      "Description": "Rehvivahetuse ettemaks",
      "UOMName": null,
      "FixAsset": false,
      "ProjectAllocation": [],
      "CostCenterAllocation": [
        // ...
      ]
    }
  ],
  // ...
}
InvoiceRow Object
Field NameComment
ArticleCode
LocationCode
Quantity
Price
TaxName
TaxPct
AmountExclVat
AmountInclVat
VatAmount
AccountCode
DepartmentCode
DepartmentName
ItemCostAmount
ProfitAmount
DiscountPct
DicountAmount
Description
UOMName
FixAsset
ProjectAllocationArray(CostAllocation)
CostCenterAllocationArray(CostAllocation)

Payments Object

json
{
  // ...
  "Payments": [
    {
      "PaymDate": "2024-06-03T00:00:00",
      "Amount": 380.00,
      "PaymentMethod": null,
      "PaymentId": "4d4554e7-372b-478a-9bcb-794224916b5e"
    }
  ],
  // ...
}
Payment Object
Field NameComment
PaymDate
Amount
PaymentMethod
PaymentId

CostAllocation Object

json
{
  // ...
  "Lines": [
    {
      // ...
      "CostCenterAllocation": [
        {
          "Code": "testCostCenterCode",
          "AllocPct": 100.0000000,
          "AllocAmount": 471.20
        }
      ]
    }
  ],
  // ...
}
CostAllocation Object
Field NameComment
CodeCode of project / cost center
AllocPctAllocation percentage
AllocAmountAllocation amount

Successful Result V2

json
{
  "Header": {
    "Dimensions": [],
    "PIHId": "c28546dc-ab9a-4ecd-b9d5-1cf4a0a97348",
    "DepartmentCode": null,
    "DepartmentName": null,
    "ProjectCode": null,
    "CostCenterCode": null,
    "BatchInfo": "OS-4",
    "BillNo": "987654324",
    "DocumentDate": "2020-05-06T00:00:00",
    "TransactionDate": "2020-05-06T00:00:00",
    "VendorId": "cbd0cd6b-c6ce-42c5-9162-0eb4942f2dd5",
    "VendorName": "Mingi Firma AS",
    "VendorRegNo": "123456789",
    "DueDate": "2020-05-06T00:00:00",
    "Fine": 0.00,
    "CurrencyCode": "EUR",
    "CurrencyRate": 1.0000000,
    "TaxAmount": 0.00,
    "RoundingAmount": 0.00,
    "TotalAmount": 471.20,
    "ProfitAmount": 471.20,
    "TotalSum": 471.20,
    "ReferenceNo": null,
    "PriceInclVat": false,
    "VatRegNo": "EE123456789",
    "PaidAmount": 380.00,
    "FileExists": true,
    "InboundTime": "0001-01-01T00:00:00",
    "Operator": null,
    "Paid": false
  },
  "Lines": [
    {
      "PILId": "fe0f1268-b315-4b4e-8a9e-55acd06e6ccf",
      "ArticleCode": "ENVOICE_SERVICE",
      "LocationCode": null,
      "Quantity": 1.000,
      "Price": 471.2000000,
      "TaxName": "Ei veronalainen",
      "TaxPct": 0.00,
      "AmountExclVat": 471.20,
      "AmountInclVat": 471.20,
      "VatAmount": 0.00,
      "AccountCode": "1531",
      "DepartmentName": null,
      "DepartmentCode": null,
      "ItemCostAmount": 0.00,
      "ProfitAmount": 471.20,
      "Description": "Rehvivahetuse ettemaks",
      "UOMName": null,
      "FixAsset": false,
      "DimAllocation": [
        {
          "DimId": 1,
          "Code": "testCostCenterCode",
          "AllocPct": 100.0000000,
          "AllocAmount": 471.20
        }
      ]
    }
  ],
  "Payments": [
    {
      "PaymDate": "2024-06-03T00:00:00",
      "Amount": 380.00,
      "PaymentMethod": null,
      "PaymentId": "42235110-1b86-4f4d-9d23-686d7d0b4d0a"
    }
  ],
  "Attachment": {
    "FileName": "file.pdf",
    "FileContent": "YmFzZTY0"
  }
}
Click to see the result parameters
FieldTypecomment
HeaderHeaderObject
LinesArray of LinesObjects
PaymentsArray of PaymentObjects
AttachmentAttachment Object

Header Object

json
{
  "Header": {
    "Dimensions": [],
    "PIHId": "c28546dc-ab9a-4ecd-b9d5-1cf4a0a97348",
    "DepartmentCode": null,
    "DepartmentName": null,
    "ProjectCode": null,
    "CostCenterCode": null,
    "BatchInfo": "OS-4",
    "BillNo": "987654324",
    "DocumentDate": "2020-05-06T00:00:00",
    "TransactionDate": "2020-05-06T00:00:00",
    "VendorId": "cbd0cd6b-c6ce-42c5-9162-0eb4942f2dd5",
    "VendorName": "Mingi Firma AS",
    "VendorRegNo": "123456789",
    "DueDate": "2020-05-06T00:00:00",
    "Fine": 0.00,
    "CurrencyCode": "EUR",
    "CurrencyRate": 1.0000000,
    "TaxAmount": 0.00,
    "RoundingAmount": 0.00,
    "TotalAmount": 471.20,
    "ProfitAmount": 471.20,
    "TotalSum": 471.20,
    "ReferenceNo": null,
    "PriceInclVat": false,
    "VatRegNo": "EE123456789",
    "PaidAmount": 380.00,
    "FileExists": true,
    "InboundTime": "0001-01-01T00:00:00",
    "Operator": null,
    "Paid": false
  },
  // ...
}
Header Object
FieldTypeComment
DimensionsArray of DimensionObjects
PIHIdGuid
DepartmentCodeStr
DepartmentNameStr
ProjectCodeStr
CostCenterCodeStr
BatchInfoStr
BillNoStr
DocumentDateDate
TransactionDateDate
VendorIdGuid
VendorNameStr
VendorRegNoStr
DueDateDate
Fine
CurrencyCodeStr
CurrencyRateDec
TaxAmountDec
RoundingAmountDec
TotalAmount Dec
ProfitAmountDec
TotalSumDec
ReferenceNoStr
PriceInclVatBooltrue/false
VatRegNoStr
PaidAmountDec
FileExistsBool
InboundTimeDate
Operator
PaidBooltrue/false

Dimensions Object

json
{
  "Header": {
    "Dimensions": [],
    // ...
  },
  // ...
}
Dimensions Object
FieldTypeComment
DimIdInt
DimValueIdGuid
DimCodeStr

Lines Object

json
{
  // ...
  "Lines": [
    {
      "PILId": "fe0f1268-b315-4b4e-8a9e-55acd06e6ccf",
      "ArticleCode": "ENVOICE_SERVICE",
      "LocationCode": null,
      "Quantity": 1.000,
      "Price": 471.2000000,
      "TaxName": "Ei veronalainen",
      "TaxPct": 0.00,
      "AmountExclVat": 471.20,
      "AmountInclVat": 471.20,
      "VatAmount": 0.00,
      "AccountCode": "1531",
      "DepartmentName": null,
      "DepartmentCode": null,
      "ItemCostAmount": 0.00,
      "ProfitAmount": 471.20,
      "Description": "Rehvivahetuse ettemaks",
      "UOMName": null,
      "FixAsset": false,
      "DimAllocation": [
        // ...
      ]
    }
  ],
  // ...
}
InvoiceRow Object
FieldTypeComment
PILIdGuid
ArticleCodeStr
LocationCodeStr
QuantityDec
PriceDec
TaxNameStr
TaxPctDec
AmountExclVatDec
AmountInclVatDec
VatAmountDec
AccountCodeStr
DepartmentNameStr
DepartmentCodeStr
ItemCostAmountDec
ProfitAmountDec
DescriptionStr
UOMNameStr
FixAssetBooltrue/false
DimAllocationArray of DimensionsAllocationObjects

DimensionAllocation Object

json
{
  // ...
  "Lines": [
    {
      // ...
      "DimAllocation": [
        {
          "DimId": 1,
          "Code": "testCostCenterCode",
          "AllocPct": 100.0000000,
          "AllocAmount": 471.20
        }
      ]
    }
  ],
  // ...
}
DimensionAllocation Object
FieldTypeComment
DimIdInt
CodeStr
AllocPctDec
AllocAmountDec

Payments Object

json
{
  // ...
  "Payments": [
    {
      "PaymDate": "2024-06-03T00:00:00",
      "Amount": 380.00,
      "PaymentMethod": null,
      "PaymentId": "42235110-1b86-4f4d-9d23-686d7d0b4d0a"
    }
  ],
  // ...
}
Payment Object
FieldTypeComment
PaymDateDate
AmountDec
PaymentMethodStr
PaymentIdGuid

Attachment Object

json
{
  // ...
  "Attachment": {
    "FileName": "file.pdf",
    "FileContent": "YmFzZTY0"
  }
}
Attachment Object
FieldTypeComment
FilenameStr
FileContentStrFile in base64