To use our API you should have the following
- A valid Zoho Invoice username and password.
- A developer/ hosting server to integrate Zoho Invoice with any third party application
- An internet connection to invoke our API
- Get a valid API key. Click here to read on generating an API key.
You can request the API Key by registering here.
Once we receive your request, we will send the API Key to the Email ID specified during the registration process. Please note that this is a onetime process.
You can generate the authtoken in two ways.
- Browser Mode
- API Mode
Browser Mode
To generate the permanent authtoken, browse the following URL:
https://accounts.zoho.com/apiauthtoken/create?SCOPE=ZohoInvoice/invoiceapi
You will be requested to sign in if you are not signed in already.
Sample Response
#
#Tue Nov 30 13:08:11 PST 2010
AUTHTOKEN=a8b6de25b5bf481824c9c4173c56231a
RESULT=TRUE
Parameters and values
| #Comment |
Authtoken generated date. |
| AUTHTOKEN |
The permanent authtoken generated for Zoho Invoice API access. |
| RESULT |
Value is TRUE if the authtoken is generated successfully. |
API Mode
To generate the permanent authtoken, you need to send the authentication request to Zoho Accounts using the following URL format:
https://accounts.zoho.com/apiauthtoken/nb/create?SCOPE=invoiceapi&EMAIL_ID=[Zoho ID/EmailID]&PASSWORD=[Password]
Mandatory fields to be passed in the URL are �
| SCOPE |
invoiceapi |
| EMAIL_ID |
Your Zoho ID or Email ID |
| PASSWORD |
Password for the Zoho ID |
Note: The parameter names passed in the POST request are case-sensitive.
Sample Response
#
#Tue Nov 30 02:16:57 PST 2010
AUTHTOKEN=e07119171812c29b3a0dacdb79a57e3f
RESULT=TRUE
Parameters and values
| #Comment |
Authtoken generated date. |
| CAUSE |
If the parameters passed in the URL are incorrect, the user will get a warning message stating the reason, else the parameter will be empty. |
| AUTHTOKEN |
Authtoken generated for the request. |
| RESULT |
Value is TRUE if the authtoken is generated successfully, else it is FALSE. |
Important Note:
- Generating AUTHTOKEN is as simple as a single click. You need to generate your AUTHTOKEN only once and can continue to access Zoho Invoice - API service without interruption.
- The users who log in to Zoho Invoice through their gmail, GApps or yahoo accounts will not be able to access the API mode as it is not possible to generate the API Authtoken without a Zoho password.
Any of our API methods can be invoked via an HTTPS POST or HTTPS GET request. All parameters in the request should be form-urlencoded. For all the APIs you need to pass authtoken and apikey.
We use the API key to track usage of various applications and generate reports based on them.
The authtoken parameter is mandatory and is required to be passed along with the API key when initiating a request. We authenticate the user of a particular Zoho service with this Authotoken parameter.
If Zoho Invoice is able to process the request, then Zoho Invoice returns a success message wrapped in XML format depending on the method invoked. If due to some reason Zoho Invoice is unable to process the API request, then it returns an appropriate error message.
Sample Error Response
<Response status="0"> <!-- Status is 0 -> Failure, Status is 1 -> Success -->
<Code>14<Code>
<Message>Invalid Ticket Passed<Message>
</Response>
Go through the below example to see how our API works.
Say, for example, you need to view all items
Method name
https://invoice.zoho.com/api/items/
Method type
GET
API description
View list of active items in your Zoho Invoice account
Parameters to be passed
authtoken, apikey, scope
Sample Response
<Response status="1">
<Items uri="/api/items/">
<Item uri="/api/items/4000000002011">
<ItemID>4000000002011</ItemID>
<Name>Sample Item1</Name>
<Description>Sample Description</Description>
<Rate>34.00</Rate>
<Tax1Name>PST</Tax1Name>
<Tax1Percentage>8</Tax1Percentage>
<Tax2Name/>
<Tax2Percentage/>
</Item>
<Item uri="/api/items/4000000002005">
<ItemID>4000000002005</ItemID>
<Name>Sample Item</Name>
<Description>Sample Description</Description>
<Rate>25.00</Rate>
<Tax1Name>PST</Tax1Name>
<Tax1Percentage>8</Tax1Percentage>
<Tax2Name/>
<Tax2Percentage/>
</Item>
</Items>
<PageContext Page="1" Per_Page="200" Total="2" Total_Pages="1"/>
</Response>