Skip to content

Create Recurring Invoice

Endpoints

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

Minimum Query Payload

json
{ 
  "Customer": {
    "Id": "7da4cd44-9b49-4a35-8d1b-f339a68e7058"
  },
  "InvoiceRow": [
    {
      "Item": {
        "Code": "EU-maat tav"
      },
      "TaxId": "973a4395-665f-47a6-a5b6-5384dd24f8d0"
    }
  ],
  "TaxAmount": [
    {
      "TaxId": "973a4395-665f-47a6-a5b6-5384dd24f8d0"
    }
  ],
  "StartDate": "20190413",
  "NextDate": "20190414"
}
Click to see payload parameters
FieldTypeCommentRequired
CustomerCustomerObjectRequired
CodeStr
DepartmentCodeStr 20
InvoiceNoStr 35
StartDateDateRequired
EndDateDate
NextDateDateRequired
CurrencyIdInt
CurrencyCodeStr 4
CurrencyRateDec 18.7
HCommentStr 4K
FCommentStr 4K
Cycleint1 - month,
2 - quarter of a year ,
3 - year,
4 - week
Periodint2 - current period,
3 - next period,
4 - for the next period,
5 - for previous period,
6 - current period, less number of cycles
PaymentDayint
PaymentMonthint
ReferenceNoStr
PriceInclVatbool
RoundingPrecint
RoundingAmountDec 18.2
TotalAmountDec 18.2
TotalSumDec 18.2
PerLenInt
DimensionsArray of Dimensions objects
InvoiceRowArray of InvoiceRow objectsRequired
TaxAmountArray of VAT objectsRequired
PayerPayerObject

CustomerObject

json
{ 
  "Customer": {
    "Id": "7da4cd44-9b49-4a35-8d1b-f339a68e7058",
    "Name": "FirstCustomer Inc",
    "NotTDCustomer": true,
    "CountryCode": "FI"
  },
  // ...
}
Click to see CustomerObject parameters
FieldTypeCommentRequired
IdGuidIf filled and customer is found in the database then following fields are not important. If not found, the customer is added using the following fields.
NameStr 150Required, when a new customer is added.
RegNoStr 30
NotTDCustomerBool

EE True for physical persons and foreign companies.

PL True for physical persons.

Allowed "true" or "false" (lowercase).
Required, when a new customer is added.
VatRegNoStr 30
CurrencyCodeStr 30
PaymentDeadLineIntIf missing then taken from default settings.
OverDueChargeDecimal 5.2If missing then taken from default settings.
RefNoBaseStr 36
AddressStr 100
CountryCodeStr 2Required, when a new customer is added.
CountyStr 100
CityStr 30
PostalCodeStr 15
PhoneNoStr 50
PhoneNo2Str 50
HomePageStr 80
EmailStr 80
SalesInvLangStr 8Invoice language for this specific customer.(ET,EN,RU,FI,PL,SV)
ContactStr 35
GLNCodeStr 10
PartyCodeStr 20
EInvOperatorInt1 - Not exist,
2 - E-invoices to the bank through Omniva,
3 - Bank ( full extent E-invoice),
4 - Bank (limited extent E-invoice)
EInvPaymIdStr 20
BankAccountStr 50
DimensionsArray of DimensionsObjects
CustGrCodeStr 20
ShowBalanceBool
ApixEinvStr 20
GroupInvBool

InvoiceRowObject

json
{ 
  // ...
  "InvoiceRow": [
    {
      "Item": {
        // ...
      },
      "TaxId": "973a4395-665f-47a6-a5b6-5384dd24f8d0"
    }
  ],
  // ...
}
Click to see InvoiceRowObject parameters
FieldTypeCommentRequired
ItemItemObjectSometimes the volume of transactions in the sales software is very high and there is no need to duplicate all the data in accounting. In those cases, you could consider using the same item code for the items with the same VAT rate.

Items with different VAT rates must have a different item codes.

Also, for the VAT declarations to work, goods and services may not be summed up and must have different item codes.
QuantityDecimal 18.3
PriceDecimal 18.7
DiscountPctDecimal 18.2
DiscountAmountDecimal 18.2Amount * Price * (DiscountPCt / 100). This is not rounded. Will be substracted from row amount before row roundings.
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 10If used, must be found in the company database.
DimensionsArray of DimensionsObjects
ItemCostAmountDecimal 18.2Required for credit invoices when crediting stock items.
VatDateDate StrYYYYMMDD type date. In some countries where you have to specify VatDate.
SalesAccCodeStr 10If included GLAccountCode then the SalesAccCode not used
PurchaseAccCodeStr 10
InventoryAccCodeStr 10
CostAccCodeStr 10

ItemObject

json
{ 
  // ...
  "InvoiceRow": [
    {
      "Item": {
        "Code": "EU-maat tav"
      },
      // ...
    }
  ],
  // ...
}
Click to see ItemObject parameters
FieldTypeCommentRequired
CodeStr 20Required
DescriptionStr 100Required
TypeInt1 - stock item,
2 - service,
3 - item.
Required
UOMNameStr 64Name for the unit
DefLocationCodeStr 20Required, If company has more than one (default) stock, stock code in this field is required for all stock items.)

TaxObject

json
{ 
  // ...
  "TaxAmount": [
    {
      "TaxId": "973a4395-665f-47a6-a5b6-5384dd24f8d0"
    }
  ],
  // ...
}
Click to see TaxObject parameters
FieldTypeCommentRequired
TaxIdGuidUse gettaxes endpoint to detect the guid neededRequired
AmountDecimal 18.2

DimensionsObject

json
{ 
  // ...
  "Dimensions": [
    {
      "DimId": 1,
      "DimValueId": "00000000-0000-0000-0000-000000000000",
      "DimCode": "1"
    }
  ],
  // ...
}
Click to see DimensionsObject parameters
FieldTypeCommentRequired
DimIdInt
DimValueIdGuid
DimCodeStr

PayerObject

json
{ 
  // ...
  "Payer": {
    "Id": "7da4cd44-9b49-4a35-8d1b-f339a68e7058",
  },
  // ...
}
Click to see PayerObject parameters
FieldTypeCommentRequired
IdGuidIf filled and payer (customer) is found in the database then following fields are not important. If not found, the payer is added using the following fields.
NameStr 150Required when payer is addedRequired, when a new payer is added.
RegNoStr 30
NotTDCustomerBoolRequired when payer is added. True for physical persons and foreign companies. Allowed "true" or "false" (lowercase).Required, when a new payer is added
VatRegNoStr 30
CurrencyCodeStr 30
PaymentDeadLineIntIf missing then taken from default settings.
OverDueChargeDecimal 5.2If missing then taken from default settings.
RefNoBaseStr 36
AddressStr 100
CountryCodeStr 2Required when addingRequired, when a new payer is added.
CountyStr 100
CityStr 30
PostalCodeStr 15
PhoneNoStr 50
PhoneNo2Str 50
HomePageStr 80
EmailStr 80
SalesInvLangStr 8Invoice language for this specific payer.(ET,EN,RU,FI,PL,SV)
ContactStr 35
GLNCodeStr 10
PartyCodeStr 20
EInvOperatorInt1 - Not exist,
2 - E-invoices to the bank through Omniva,
3 - Bank (full extent E-invoice),
4 - Bank (limited extent E-invoice)
EInvPaymIdStr 20
BankAccountStr 50
DimensionsArray of DimensionsObjects
CustGrCodeStr 20
ShowBalanceBool

Successful Result

json
{
  "CustomerId": "7da4cd44-9b49-4a35-8d1b-f339a68e7058",
  "InvoiceId": "44a0ebc0-b69b-4e36-ad76-2e0b9b9ef9e2",
  "InvoiceNo": null,
  "RefNo": "113",
  "NewCustomer": null
}