API Forum

This forum is in read-only mode.
Please refer to our API support in case you have any questions.
We can be reached at api@e-conomic.com
e-conomic API developer forum

CashbookEntry fields only available in the frontend


I have created a number of creditors and cashbook entries through the API.

The creditors have "Payment Type" = "Bank Transfer", and an account number.

When the CashBook entry is created for the creditor, however, the "Payment Type" is not "Bank Transfer". If you then log on to the frontend and reenter the creditor ID, the bank account number and payment type is automatically filled based on the information on the creditor.

The same goes for the Contra account VAT type (which should come from the contra account).

Question therefore is:

1. How can I autofill the fields based on the creditor (or contra account, or whatever related objects), or
2. How can I add the "Payment Type" and "VAT contra account" to a cashbookentry using the API?

Thanks :)

created Apr 28, 2014 by phidah
0% Accept Rate
Q 1 A 0 C 0

2 Answers



I hope this will help you:

var creditor = session.Creditor.FindByNumber(creditorNumber);

var creditorData = session.CreditorData.GetData(creditor);

payment type <=> creditorData.DefaultPaymentType

payment "Account no" <=> creditorData.DefaultPaymentCreditorId

Note that DefaultPaymentCreditorId depends on the payment type, it's:

PaymentType DefaultPaymentCreditorId
None not used
+71 FI supplier no.
+73 FI supplier no.
+04 Giro account
Bank transfer Account no.
Entry only not used

then on your cash book entry you would have to set:

  • entry.BankPaymentType with the creditorData.DefaultPaymentType
  • entry.BankPaymentCreditorId with the creditorData.DefaultPaymentCreditorId
  • entry.BankPaymentCreditorInvoiceId with the appropriate invoice reference

For the VATCountraAccount:

var contraAccount = creditorData.AutoContraAccount.

var vatAccount = contraAccount.VatAccount

finally: entry.ContraVatAccount = vatAccount

This is to push you in the right direction. I hope this will help you.

Best regards



answered Apr 29, 2014 by GuCa
Find answer in my previous post
answered Sep 9, 2014 by GuCa
reshown Jul 29, 2015 by olej
Visma e-conomic A/S