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

International Ledger - How to get Invoice Number via API?

0

I am using your API (mix of REST and SOAP) for a client that is using International Ledgers.

Can you tell me, how I via API can retrieve the Invoice Number after booking an invoice?

I can get the "internal" invoice number, but I haven't found a way to get the "public" invoice number that is shown on the invoice.

Kind regards,
Nill Mortensen

created Jun 29, 2016 by NillDk
100% Accept Rate
Q 1 A 1 C 5

1 Answer

0
 
Best answer
Hi Nill

Invoices aren't part of international ledger. Ledger = cashbook / kassekladde.
So you actually just have to use /invoices-experimental on REST to read invoices for any e-conomic agreement. Regardless of International Ledger or Standard Journal.

On both SOAP and REST there is only one invoice number on booked invoices. When booking via either API you'll get the booked ID/number in the response.
For drafts you can use /invoices-experimental to retrieve both the SOAP id and the temporal number of the draft.
answered Jun 29, 2016 by olej
selected Jul 5, 2016 by NillDk
Hi Ole,

Thank you for your reply.

My problem is, that none of your API endpoints seem to return the invoice number shown in our invoice pdf.

With International Ledgers comes some new number series. E.g. we have a number series for customer invoices with the prefix "INV".

When I book an invoice, it seems like you generate both an "internal number" (e.g. 100123). And a "public number" (e.g. INV12) that is shown in the invoice pdf.

I can retrieve the internal number using both your SOAP and your REST API.

With REST I can find the "internal number" using endpoint "/invoices-experimental/booked" and looking at "bookedInvoiceNumber".

However, I can't get the "public number" that is shown on the invoice pdf (e.g. INV12) with any of the calls I've looked at.
Hi Nill
Very interesting.
Are you using the default template for the invoice PDF ir is it custom?
It is a custom template that we have used for a couple of years.
Is it the wrong number that is shown on the PDF invoice?

We use the tag [InvoiceNo] in the template to show the invoice number.

I've just tried to use one of the standard templates and it gives the same result with INV12 being shown on the invoice.

BTW, I'm not sure if this is the correct forum for me to ask this question. We are using the Reviso-version - they linked to this forum form a blog post.
FYI:

I talked to Reviso API support.

According to them, this number has been omitted by mistake and will be added to the API as soon as possible.
Hi Nill
I've tried to replicate your issue in both a newly created Swedish agreement as well as my Swedish test agreement and I am not able to get the default layout of the invoice PDF to show any other than the invoice-number.
Are you sure you're not mixing up Reviso and e-conomic?
In Swedish layout of PDF the data field is called [Fakturanr] using [InvoiceNo] doesn't work at all.
You are right - I was mixing up Reviso and e-conomic.

I was trying to get the info from Reviso REST API. It wasn't there, but they have since added it to their REST API as a property named 'displayInvoiceNumber'.
Visma e-conomic A/S
...