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

How can i get XML version of invoice from Invoice Handle?

0

How can i get XML version of invoice from Invoice Handle? 

Is there any method available in API?

To access PDF from API i am using the below code.

var objInvoiceHandle = session.Invoice_FindByNumber(1);
var invoiceBytes = session.Invoice_GetPdf(objInvoiceHandle);
created Jul 31, 2014 by dapa
13% Accept Rate
Q 25 A 0 C 8

1 Answer

+1
 
Best answer

Could you explain further. From the top of my head I am thinking:

1) The SOAP API natively uses XML as the protocol for data structure, so in that sense the invoice data is avaiable as XML

2) If you are thinking about the OIO format, which is XML, it's avaiable on any booked invoice with this method: https://api.e-conomic.com/secure/api1/EconomicWebService.asmx?op=Invoice_GetOioXml

answered Jul 31, 2014 by mortenanders
selected Aug 1, 2014 by dapa
Yup thanks very much for this. this is what i exactly want. And i got before few minutes. And i think we are getting only booked invoices when we are using
session.Invoice_GetAll() method..Isn't it?

Is there any way that, i can get all the Invoices no matter they are booked or not.
Hi,

Booked invoices (Invoice) and un-booked invoices (CurrentInvoice) are two different entities - outside of the being-booked part, one 'structural' difference is that booked invoices have remainders, whereas un-booked invoices do not.

You'll therefore have to retrieve the booked and un-booked invoices separately (session.Invoice.GetAll() and session.CurrentInvoice.GetAll(), respectively) - and then merge or show them combined using whatever logic applies to your needs.


BR,
thanks...i think i am looking for this only
Visma e-conomic A/S
...