Skip to content

Get sales invoice details

Endpoints v1

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

Endpoints v2

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

Query Payload:

json
{ 
   "Id":  "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx",
   "AddAttachment": true/false
}
Click to see the payload parameters
fieldtypedescriptionRequired
IdGuidThe user Id, sometimes called SIHId.Required
AddAttachmentbooltrue/false (lowercase)Required

Successful Result v2

V1 Successful Result

json
{
  "Header": {
    // ...
  },
  "Lines": [
    // ...
  ],
  "Payments": [
    // ...
  ],
  "Attachment": null
}
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)

SalesHeaderObject

json
{
  "Header": {
    "Dimensions": [],
    "SIHId": "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx",
    "DepartmentCode": null,
    "DepartmentName": null,
    "ProjectCode": null,
    "ProjectName": null,
    "AccountingDoc": 0,
    "BatchInfo": "MY-1",
    "InvoiceNo": "TEST00001",
    "DocumentDate": "2024-04-29T00:00:00",
    "TransactionDate": "2024-04-29T00:00:00",
    "CustomerId": "88d0362a-5e55-4184-b9ff-ace2a4f93da4",
    "CustomerName": "Mari Maasikas",
    "CustomerRegNo": null,
    "HComment": null,
    "FComment": null,
    "DueDate": "2024-04-29T00:00:00",
    "CurrencyCode": "EUR",
    "CurrencyRate": 1.0000000,
    "TaxAmount": 0.00,
    "RoundingAmount": 5.00,
    "TotalAmount": 375.00,
    "ProfitAmount": 375.00,
    "TotalSum": 380.00,
    "UserName": "Merit API",
    "ReferenceNo": "000013",
    "PriceInclVat": false,
    "VatRegNo": null,
    "PaidAmount": 0.00,
    "EInvSent": false,
    "EmailSent": "1901-01-01T00:00:00",
    "EInvOperator": 0,
    "OfferId": "00000000-0000-0000-0000-000000000000",
    "OfferDocType": null,
    "OfferNo": null,
    "FileExists": false,
    "PerSHId": "00000000-0000-0000-0000-000000000000",
    "ContractNo": null,
    "Paid": false,
    "Contact": null,
    "YourReference": "ABC",
    "OurReference": "DEF"
  },
  // ...
}
Click to see the SalesHeaderObject parameters
Field NameComment
SIHId
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
OfferId
OfferDocType
OfferNo
FileNameStr
FileContentFile in base64
PerSHId
ContractNo
OurReferenceStr 70
YourReferenceStr 70

InvoiceRowObject

json
{
  // ...
  "Lines": [
    {
      "SILId": "c508f6ba-79b5-4272-8701-128371358063",
      "ArticleCode": "MAAKLER",
      "LocationCode": null,
      "Quantity": 1.000,
      "Price": 416.6700000,
      "TaxName": "Ei veronalainen",
      "TaxPct": 0.00,
      "AmountExclVat": 375.00,
      "AmountInclVat": 375.00,
      "VatAmount": 0.00,
      "AccountCode": "3010",
      "DepartmentCode": null,
      "DepartmentName": null,
      "ItemCostAmount": 0.00,
      "ProfitAmount": 375.00,
      "DiscountPct": 10.00,
      "DiscountAmount": 41.67,
      "Description": "Maaklerteenus",
      "UOMName": null,
      "FixAsset": false,
      "DimAllocation": []
    }
  ],
  // ...
}
Click to see the InvoiceRowObject parameters
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)

PaymentObject

json
{
  // ...
  "Payments": [
    {
      "PaymDate": "2024-04-29T00:00:00",
      "Amount": 380.00,
      "PaymentMethod": "Pangalink",
      "PaymentId": "00000000-0000-0000-0000-000000000000"
    }
  ],
  // ...
}
Click to see the PaymentObject parameters
Field NameComment
PaymDate
Amount
PaymentMethod
PaymentId

CostAllocationObject

json
{
  // ...
  "Allocations": [
    {
      "Code": "101",
      "AllocPct": 100.00,
      "AllocAmount": 375.00
    }
  ]
}
Click to see the CostAllocationObject parameters
NameTypeComment
CodeStrCode of project / cost center
AllocPctIntAllocation percentage
AllocAmountIntAllocation amount

V2 Successful Result

json
{
  "Header": {
    // ...
  },
  "Lines": [
    // ...
  ],
  "Payments": [],
  "Attachment": null
}
Click to see the result parameters
FieldTypeComment
HeaderHeader Object
LinesLines Object
PaymentsPayment Object
AttachmentAttachment object

InvoiceHeaderObject

json
{
  "Header": {
    "Dimensions": [],
    "SIHId": "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx",
    "DepartmentCode": null,
    "DepartmentName": null,
    "ProjectCode": null,
    "ProjectName": null,
    "AccountingDoc": 0,
    "BatchInfo": "MY-1",
    "InvoiceNo": "TEST00001",
    "DocumentDate": "2024-04-29T00:00:00",
    "TransactionDate": "2024-04-29T00:00:00",
    "CustomerId": "88d0362a-5e55-4184-b9ff-ace2a4f93da4",
    "CustomerName": "Mari Maasikas",
    "CustomerRegNo": null,
    "HComment": null,
    "FComment": null,
    "DueDate": "2024-04-29T00:00:00",
    "CurrencyCode": "EUR",
    "CurrencyRate": 1.0000000,
    "TaxAmount": 0.00,
    "RoundingAmount": 5.00,
    "TotalAmount": 375.00,
    "ProfitAmount": 375.00,
    "TotalSum": 380.00,
    "UserName": "Merit API",
    "ReferenceNo": "000013",
    "PriceInclVat": false,
    "VatRegNo": null,
    "PaidAmount": 0.00,
    "EInvSent": false,
    "EmailSent": "1901-01-01T00:00:00",
    "EInvOperator": 0,
    "OfferId": "00000000-0000-0000-0000-000000000000",
    "OfferDocType": null,
    "OfferNo": null,
    "FileExists": false,
    "PerSHId": "00000000-0000-0000-0000-000000000000",
    "ContractNo": null,
    "Paid": false,
    "Contact": null
  }
}
Click to see the InvoiceHeaderObject parameters
FieldTypeComment
DimensionsArray of Dmensions Objects
SIHIdGuid
DepartmentCodeStr
DepartmentNameStr
ProjectCodeStr
ProjectNameStr
AccountingDock
BatchInfoStr
InvoiceNoStr
DocumentDateDate
TransactionDateDate
CustomerIdGuid
CustomerNameStr
CustomerRegNoStr
HCommentStr
FCommentStr
DueDateDate
CurrencyCodeStr
CurrencyRateDec
TaxAmountDec
RoundingAmountDec
TotalAmountDec
ProfitAmountDec
TotalSumDec
UserNameStr
ReferenceNoStr
PriceInclVatBooltrue/false
VatRegNoStr
PaidAmountDec
EInvSentBooltrue/false
EmailSentDate
EInvOperatorInt1 – Not exist,
2 – E-invoices to the bank through Omniva,
3 – Bank ( full extent E-invoice),
4 - Bank (limited extent E-invoice)
OfferIdGuid
OfferDocTypeInt1=quote, 2=sales order, 3=prepayment invoice
OfferNoStr
FileExistsBooltrue/false
PerSHIdGuid
ContractNoStr
PaidBool
ContactStr

DimensionsObject

json
{
  "header": {
    "Dimensions": [
      {
        "DimId": "Dim1",
        "DimValueId": "00000000-0000-0000-0000-000000000000",
        "DimCode": "101"
      }
    ]
    // ...
  }
}
Click to see the DimensionsObject parameters
FieldTypeComment
DimIdStr
DimValueIdGuid
DimCodeStr

InvoiceRowObject

json
{
  // ...
  "Lines": [
    {
      "SILId": "c508f6ba-79b5-4272-8701-128371358063",
      "ArticleCode": "MAAKLER",
      "LocationCode": null,
      "Quantity": 1.000,
      "Price": 416.6700000,
      "TaxName": "Ei veronalainen",
      "TaxPct": 0.00,
      "AmountExclVat": 375.00,
      "AmountInclVat": 375.00,
      "VatAmount": 0.00,
      "AccountCode": "3010",
      "DepartmentCode": null,
      "DepartmentName": null,
      "ItemCostAmount": 0.00,
      "ProfitAmount": 375.00,
      "DiscountPct": 10.00,
      "DiscountAmount": 41.67,
      "Description": "Maaklerteenus",
      "UOMName": null,
      "FixAsset": false,
      "DimAllocation": []
    }
  ]
  // ...
}
Click to see the InvoiceRowObject parameters
FieldTypeComment
SILIdGuid
ArticleCodeStr
LocationCodeStr
QuantityDec
PriceDec
TaxNameStr
TaxPctDec
AmountExclVatDec
AmountInclVatDec
VatAmountDec
AccountCodeStr
DepartmentCodeStr
DepartmentNameStr
ItemCostAmountDec
ProfitAmountDec
DiscountPctDec
DiscountAmountDec
DescriptionStr
UOMNameStr
FixAssetBooltrue/false
DimAllocationArray of Dimensions Allocation Objects

DimensionsAllocationObject

json
{
  // ...
  "Lines": [
    {
      // ...
      "DimAllocation": [  
        {
          "DimId": "Dim1",
          "DimValueId": "00000000-0000-0000-0000-000000000000",
          "DimCode": "101"
        }
      ]
    }
  ],
  // ...
}
Click to see the DimensionsAllocationObject parameters
FieldTypeComment
DimIdStr
CodeStr
AllocPctDec
AllocAmountDec

PaymentObject

json
{
  // ...
  "Payments": [
    {
      "PaymDate": "2024-04-29T00:00:00",
      "Amount": 380.00,
      "PaymentMethod": "Pangalink",
      "PaymentId": "00000000-0000-0000-0000-000000000000"
    }
  ],
  // ...
}
Click to see the PaymentObject parameters
FieldTypeComment
PaymDateDate
AmountDec
PaymentMethodStr
PaymentIdGuid

AttachmentObject

json
{
  // ...
  "Attachment": {
    "Filename": "test.pdf",
    "FileContent": "",
  }
}
Click to see the AttachmentObject parameters
FieldTypeComment
FilenameStr
FileContentStrFile in base64