APIs

 

EzzyBills is powered by the EzzyBills API. Everything that EzzyBills does is done via this API. EzzyBills supports two different API’s (SOAP and REST). See the Sample Application for more details.

 

You can use this API to integrate EzzyBills into your own custom workflows. For example if you want the invoice data extracted from the invoice and uploaded to your own ERP system then you can use the API. The API can be accessed via the following URL,
https://app.ezzydoc.com/EzzyService.svc

 

The API service calls are also documented here.

EzzyBills API documentation

To use the API you will need an EzzyBills account  and an API KEY. You can get an EzzyBills account by starting the Free Trial, and choosing to Integrate with Custom (integrate via API)

 

You can request an API KEY from support@ezzydoc.com. You then need to add this key to you client application (usually the app.config file).
For example, the following code uploads an invoice to EzzyBills and then returns the Invoice Total, Tax etc.

Sample Application

   1:   class Program
   2:      {
   3:          static void Main(string[] args)
   4:          {
   5:  
   6:  
   7:  
   8:              if (args != null && args.Count() == 2)
   9:              {
  10:  
  11:                  EzzyServiceClient client = new EzzyServiceClient();
  12:  
  13:                  string user = args[0];
  14:                  string pwd = args[1];
  15:                  int rc = client.Login(user, pwd);  // rc==1 indicates success
  16:  
  17:                  string filename = @"taxinvoice.pdf";
  18:                  byte[] fileBytes = File.ReadAllBytes(filename);
  19:  
  20:  
  21:  
  22:                  PictureFileSS pf = new PictureFileSS() { PictureName = filename, PictureStream = fileBytes };
  23:  
  24:  
  25:                  uploadStatusSS us = client.uploadInvoiceImage(pf, documenttypes.Invoice, "blah");
  26:                  Debug.Assert(us.service_status.status == servicestatus1.OK);
  27:                  Debug.Assert(us.invoice_id > 0); // you can also get back the unique id for doc
  28:  
  29:                  int invoice_id = us.invoice_id;
  30:  
  31:                  while (true)
  32:                  {
  33:  
  34:                      WorkflowStatusSS ws = client.workflowStatus(invoice_id);
  35:  
  36:                          if (ws.complete)
  37:                          {
  38:  
  39:                              if (ws.children.Count() > 0)
  40:                              {
  41:                                  //document was autoseperated. iterate to get all child docs.
  42:  
  43:                              }
  44:                              break; //workflow complete
  45:                          }
  46:                      Console.WriteLine("status=" + ws.state);
  47:                      Thread.Sleep(1000);
  48:                  }
  49:  
  50:                  //now less get the data
  51:  
  52:                  InvoiceBlocksSS ib = client.getInvoiceHeaderBlocks(invoice_id);
  53:                  InvoiceBlocksSS ib_all = client.getAllInvoiceBlocks(invoice_id);
  54:  
  55:                  Console.WriteLine("Tax= " + ib.invoiceForm.gstTotal);
  56:                  Console.WriteLine("Total= " + ib.invoiceForm.invoiceTotal);
  57:                  client.Close();
  58:              }
  59:          }
  60:      }