The below example logs into EzzyBills with a given username and password and gets the invoice headers for a given invoice. Note: this api example requires the cURL extension for PHP to be enabled.
The php settings used for this example can be downloaded here.
The below example is a shell script that authenticates with EzzyBills then calls getInvoiceDetails for a given invoiceid. To use this example, save this code as a shell script (.sh) and replace the APIKEY, USERNAME, PASSWORD and INVOICE_ID with the appropriate values.
curl -c cookies.txt “https://app.ezzydoc.com/EzzyService.svc/Rest/Login?APIKey=[INSERT API KEY]&user=[INSERT USERNAME]&pwd=[INSERT PASSWORD]”
curl -b cookies.txt “https://app.ezzydoc.com/EzzyService.svc/Rest/getInvoiceDetails?APIKey=[INSERT API KEY]&invoiceid=[INSERT INVOICE_ID]”
note: -c is to save authentication cookie from login request to “cookies.txt”
-b is to load authentication cookie from file “cookies.txt”
you can run this shell script with:
chmod +x curltest.sh (this is to allow the shell script to be executed)
./curltest.sh (run the shell script)