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

Question regarding fetching invoices through the API


My question here is twofold, so I'll try to keep it simple and to the point.
It might be worth mentioning I am connecting through the Ruby gem rconomic ( https://github.com/lokalebasen/rconomic ), and that we are operating in Norway.

First challenge: Trying to access the KID number

We are creating invoices with KID numbers that our clients use to identify their payments. I can however not seem to find any trace of this number anywhere in the response nor the API documentation. Is this simply not accessable through the API? Or am I looking for the wrong term for this field?

[EDIT 1]

It turns out that the KID number is known by another name in the invoice XML files. In these files it is found under Invoice > com:PaymentMeans > com:TypeCodeID. I can't see anything like that anywhere in the API documentation, but it might give some pointers as to where I might have to look further.

Second challenge: Retrieving only invoices that are on a subscription module

Some of our clients are recieving singular invoices for one-off services. The rest are on a subscription model. This is quite well handled in the web interface of e-conomic, but is there any way I can scope based on this in the API request? Ideally I would like to handle these differently on our side, but I can't see which field might indicate which of these groups an invoice belongs to.

Please do let me know if I need to explain in more depth, and I'll keep exploring the API further in the meantime.

[EDIT 2]

I have now been in touch with a senior developer that has insight into the APIs, and it turns out that the KID number is indeed inaccessible through the current API. It is however possible to retrieve the XML format of the invoice, which enables parsing the XML and retrieving the KID number this way.

The approach in question uses the functionality described here: https://www.e-conomic.com/secure/api1/EconomicWebService.asmx?op=Invoice_GetOioXml

created Apr 9, 2014 by ken-guru
0% Accept Rate

edited Apr 11, 2014 by ken-guru
Q 1 A 0 C 0

Visma e-conomic A/S