dimanche 21 mai 2017

How to create an invoice with C# in Zoho Books ?

Dear reader,

If yo have reached this far, it means this topic interests you. I will now share the work I have done to get this purpose:


1) I created a new project in Visual Studio called " REST API";
2-) I have used the documentation of the dotnet-Wrapper provided by Zoho

Today at 21/05/2017 17:35, I am stuck at one problem, I am unable to call function :

InvoicesAPI.create() does not work based in this wrapper. I have sent a mail to technical support and currently awaiting reply fro support. I will update as I get an answer from them.

Today at 24/05/2017 08:22, after getting excellent support from Jeff at codementor.io, I could progress somehow. Jeff together with another amazing codementor Ivan, helped me get up to speed usin gMicrosoft Visual tudio and C# , which is a whole new world for me.

Anyway, finally, I could compile the dotnet-wrapper Zoho provided, which did not work for my envronment. The reason is that I have european Zoho Books, which has different URLs.

AFter changing this,


creating an invoice in Zoho Books from C#

How to create a sales invoice in Zoho Books using C# without experience in these languages ? (1   ) ? 

The challenge ( what) 

For various reasons, I end-up faced to this challenge of a need to create an invoice in Zoho Books right from a C# using Zoho API. 

I have to say that I am startinf from scratch as besides my IT background, I have no experience in API, neither in C# and neither in Zoho Books as an accounting solution. 

Where to start ? 

 A. Getting the big picture of what needs to be done ? 

The starting point is this:
      a. We have a basic data to invoice :
              1. Invoice amount ;
              2 . Invoice value    ;
              3. Invoice date;

Based on these, an sales invoice is to be created from  a C# enviornment.

 

B. What is neeed ? 

   after a little googling, I have identified what would be needed:
            1. Easiest would be ot use C# editor, a free of charge would be Microsoft windows Visual Studio;
            2. This on a machine which supports it, minmium 20 Gig of hard drive. For this purpose, I took a virtual machine on OVH.COM. Efficient and erasy to setup compared to Microsoft Azure, and the alike ;

            3. Some reading about the Zoho API triggering via C#. Youtube is a fantastic tool fo rthis ;


C. Action plan  ( How ?)

      Not being knowledgeable about these things. I hve the following plan:
       a. Learn how to consume any "API" call towards Zoho => For this my friend Mokrane that I thank guided me to install a tool called: POSTMAN ;
       b. Once, this is done, learn how to make a call to API from C# using the invoice data;

      c. If all this is achieved, then that's it. My challenge is over.



21/05/2017 : Where I am now ?
          B.1-2 : Virtual machine is installed + Microsoft Visual studio is installed;
          B.3 :    I have collected info from these interesting articles :
                      https://www.zoho.com/books/api/v3/invoices/#create-an-invoice

                      Sample code:
                      https://forums.zoho.com/topic/zoho-api-c-sample-code

                     Using Zoho library has some issues , which I hope to :

                    https://forums.zoho.com/topic/zoho-api-c-sample-code

                    Finally, here is a library found built by Zoho team itself:
                    https://github.com/zoho/books-dotnet-wrappers


AFter doing all these readings, I have decided to use the Zoho Wrappers. The reason is that they can provide support in case of issues as I am only allowed a few hours to reach a result for this.