Home  Getting Started

Zoho Invoice provides an API (Application Programming Interface) using which you can integrate it with any of your existing applications such as invoice applications for mobiles, timesheet application, ticketing system. The Zoho Invoice API responds to requests in an XML format and is programming language-neutral; allowing you to develop applications in a language you are familiar with.

With the Zoho Invoice API, the possibilities are manifold and constrained just by the limits of our imagination. Here are some of the things you can do with our API

  • Create invoices/estimates from your web site
  • Invoke the API to add invoices into your current accounting system and avoid double input
  • Locate invoices from a third party application
  • Integrate it with a reporting tool like Zoho Reports and perform advanced analysis

To use our API you should have the following

  1. A valid Zoho Invoice username and password.
  2. A developer/ hosting server to integrate Zoho Invoice with any third party application
  3. An internet connection to invoke our API
  4. 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.

  1. Browser Mode
  2. 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>

There are two types of view APIs in Zoho Invoice, namely Formatted and Unformatted.

Formatted APIs:

Formatted APIs are used to display the values in the client.

Dates: The dates are displayed as per the format selected in the ">"Settings >> Organization >> Organization Profile"> page.

Currency Symbol: The currency symbol is prefixed to the Total, Price, Payment Amount fields.

Amount: The format of the numerals in the amount is based on the currency format selected in the "Settings >> Currency & Tax >> Currencies" page.

Un-formatted APIs:

Unformatted APIs are used for processing values in the program.

Dates: The dates are displayed in the default "yyyy-MM-dd" format.

Amount: The amount is displayed in no specific format to facilitate mathematical calculations.

For Example:

Let us make the following selections on the "Settings" page

  • Date format as dd MMM yyyy
  • Currency Format as 1,234,567.89

Hence the response formats are as shown in the table below

  Example Value Unformatted Formatted
Date 2010-05-01 2010-05-01 01 May 2010
Amount(USD) 1000 1000.000 $ 1,000.00

There are certain parameters that are mandatory for all API requests of Zoho Invoice. They are,

authtoken The permanent authtoken used to authenticate each API request
scope The value for this parameter has to be invoiceapi
apikey This is the key used to authenticate the API caller

Using "PageContext" tag you can customize the number of records you would like to view per page. Pass "Per_Page" parameter in the request.

    <PageContext Page="1" Per_Page="200" Total="2" Total_Pages="1"/>

For navigating to next page, pass "Page" parameter in the request

In the above example,

Page The current page you are viewing.
Total_Pages Total pages present.
Per_Page Number of records per page (Default value is 200).
Total Total records present.

Got more questions?

Submit your request to us and we will help you out.

Zoho Invoice API

Spread the Word

© 2013, ZOHO Corp. Invoice Software 4900 Hopyard Rd, Suite 310, Pleasanton, CA 94588, USA Support: +1 888-900-9646 | Sales: +1 888-204-3539,