Method name
https://invoice.zoho.com/api/expenses/create
Method type
POST
API description
Adds an expense in your Zoho Invoice account.
Parameters to be passed
authtoken, scope, XMLString, apikey
Sample Request
<Expense> <CategoryName>Marketing</CategoryName> <!-- Mandatory --> <ExpenseDate>2010-03-10</ExpenseDate> <!-- If not given current date is taken as expense date --> <ExpenseAmount>1000</ExpenseAmount> <!-- Mandatory --> <ExpenseDescription>Online Marketing related expense</ExpenseDescription> <Tax1Name>VAT</Tax1Name> <IsInclusiveTax>true</IsInclusiveTax> <!-- If not passed, default value is false --> <IsBillable>true</IsBillable> <!-- If not passed, default value is false --> <Reference>Ref-1</Reference> <CustomerID>3000000003019</CustomerID> <!-- Mandatory if IsBillable is true--> <CurrencyCode>USD</CurrencyCode> <!-- If not passed, Base currency is taken --> <ExchangeRate>10</ExchangeRate> <!-- If not passed, default value is 1 --> </Expense>
Sample Response
Amounts displayed are in Customer currency.
<Response status="1"> <Expense uri="/api/expenses/3000000010081"> <ExpenseID>3000000010081</ExpenseID> <ExpenseDate>2010-03-10</ExpenseDate> <CategoryName>Marketing</CategoryName> <ExpenseDescription>Online Marketing related expense</ExpenseDescription> <Reference>Ref-1</Reference> <Tax1Name>VAT</Tax1Name> <Tax1Percentage>16.500000</Tax1Percentage> <IsInclusiveTax>true</IsInclusiveTax> <IsBillable>true</IsBillable> <CustomerID>3000000003019</CustomerID> <CustomerName>Paul Anderson</CustomerName> <CurrencyCode>USD</CurrencyCode> <ExchangeRate>10.000000</ExchangeRate> <Tax1Amount>141.630</Tax1Amount> <SubTotal>858.370</SubTotal> <Total>1000.000</Total> <CreatedTime>2010-02-25 10:24:45 PST</CreatedTime> <LastModifiedTime>2010-02-25 10:24:45 PST</LastModifiedTime> <ExpenseStatus>0</ExpenseStatus> <!-- 0 -> unbilled, 1 -> invoiced, 2 -> reimbursed --> </Expense> </Response>
Method name
https://invoice.zoho.com/api/view/expenses/create
Method type
POST
API description
Adds an expense in your Zoho Invoice account and gets a formatted response.
Parameters to be passed
authtoken, scope, XMLString, apikey
Sample Request
<Expense> <CategoryName>Telephone Expense</CategoryName> <!-- Mandatory --> <ExpenseDate>2010-05-19</ExpenseDate> <!-- If not given current date is taken as expense date --> <ExpenseAmount>1000</ExpenseAmount> <!-- Mandatory --> <ExpenseDescription>Telephone related expense</ExpenseDescription> <Tax1Name>VAT</Tax1Name> <IsInclusiveTax>true</IsInclusiveTax> <!-- If not passed, default value is false --> <IsBillable>true</IsBillable> <!-- If not passed, default value is false --> <Reference>Ref-1276895</Reference> <CustomerID>5000000002010</CustomerID> <!-- Mandatory if IsBillable is true--> <CurrencyCode>USD</CurrencyCode> <!-- If not passed, Base currency is taken --> <ExchangeRate>10</ExchangeRate> <!-- If not passed, default value is 1 --> </Expense>
Sample Response
Amounts displayed are in Customer currency.
<Response status="1"> <Expense uri="/api/view/expenses/5000000017034"> <ExpenseID>5000000017034</ExpenseID> <ExpenseDate>19 May 2010</ExpenseDate> <CategoryName>Telephone Expense</CategoryName> <ExpenseDescription>Telephone related expense</ExpenseDescription> <Reference>Ref-1276895</Reference> <Tax1Name>VAT</Tax1Name> <Tax1Percentage>12.500000</Tax1Percentage> <IsInclusiveTax>true</IsInclusiveTax> <IsBillable>true</IsBillable> <CustomerID>5000000002010</CustomerID> <CustomerName>Paul Anderson</CustomerName> <CurrencyCode>USD</CurrencyCode> <ExchangeRate>10.000000</ExchangeRate> <Tax1Amount>$111.11</Tax1Amount> <SubTotal>$888.89</SubTotal> <Total>$1,000.00</Total> <CreatedTime>2010-05-19 23:31:48 PST</CreatedTime> <LastModifiedTime>2010-05-19 23:31:48 PST</LastModifiedTime> <ExpenseStatus>unbilled</ExpenseStatus> </Expense> </Response>
Method name
https://invoice.zoho.com/api/expenses/update
Method type
POST
API description
Updates an Expense. You can change the values of the following fields of an Expense.
- ExpenseDate
- CategoryName
- ExpenseDescription
- Tax1Name
- IsInclusiveTax
- IsBillable
- CustomerID
- Reference
- CurrencyCode
- ExchangeRate
Parameters to be passed
authtoken, scope, XMLString, apikey
Sample Request
<Expense> <ExpenseID>3000000010081</ExpenseID> <!-- Mandatory --> <ExpenseAmount>2000</ExpenseAmount> <!-- Edit Expense Amount --> <Tax1Name>GST</Tax1Name> <!--Change Tax--> </Expense>
Sample Response
Amounts displayed are in Customer currency.
<Response status="1"> <Expense uri="/api/expenses/3000000010081"> <ExpenseID>2000000004001</ExpenseID> <ExpenseDate>2010-03-10</ExpenseDate> <CategoryName>Marketing</CategoryName> <ExpenseDescription>Online Marketing related expense</ExpenseDescription> <Reference>Ref-1</Reference> <Tax1Name>GST</Tax1Name> <Tax1Percentage>10.000000</Tax1Percentage> <IsInclusiveTax>true</IsInclusiveTax> <IsBillable>true</IsBillable> <CustomerID>2000000002005</CustomerID> <CustomerName>Paul Anderson</CustomerName> <CurrencyCode>USD</CurrencyCode> <ExchangeRate>10.000000</ExchangeRate> <Tax1Amount>181.820</Tax1Amount> <SubTotal>1818.180</SubTotal> <Total>2000.000</Total> <CreatedTime>2010-03-16 10:24:45 PST</CreatedTime> <LastModifiedTime>2010-03-16 10:24:45 PST</LastModifiedTime> <ExpenseStatus>1</ExpenseStatus> <!-- 0 -> unbilled, 1 -> invoiced, 2 -> reimbursed --> </Expense> </Response>
Method name
https://invoice.zoho.com/api/view/expenses/update
Method type
POST
API description
Updates an Expense and get a formatted response. You can change the values of the following fields of an Expense.
- ExpenseDate
- CategoryName
- ExpenseDescription
- Tax1Name
- IsInclusiveTax
- IsBillable
- CustomerID
- Reference
- CurrencyCode
- ExchangeRate
Parameters to be passed
authtoken, scope, XMLString, apikey
Sample Request
<Expense> <ExpenseID>5000000017034</ExpenseID> <!-- Mandatory --> <ExpenseAmount>2000</ExpenseAmount> <!-- Edit Expense Amount --> <Tax1Name>PST</Tax1Name> <!--Change Tax--> </Expense>
Sample Response
Amounts displayed are in Customer currency.
<Response status="1"> <Expense uri="/api/view/expenses/5000000017034"> <ExpenseID>5000000017034</ExpenseID> <ExpenseDate>19 May 2010</ExpenseDate> <CategoryName>Telephone Expense</CategoryName> <ExpenseDescription>Telephone related expense</ExpenseDescription> <Reference>Ref-1276895</Reference> <Tax1Name>PST</Tax1Name> <Tax1Percentage>7.500000</Tax1Percentage> <IsInclusiveTax>true</IsInclusiveTax> <IsBillable>true</IsBillable> <CustomerID>5000000002010</CustomerID> <CustomerName>Paul Anderson</CustomerName> <CurrencyCode>USD</CurrencyCode> <ExchangeRate>10.000000</ExchangeRate> <Tax1Amount>$139.54</Tax1Amount> <SubTotal>$1,860.47</SubTotal> <Total>$2,000.00</Total> <CreatedTime>2010-05-19 23:31:48 PST</CreatedTime> <LastModifiedTime>2010-05-19 23:45:35 PST</LastModifiedTime> <ExpenseStatus>invoiced</ExpenseStatus> </Expense> </Response>
Method name
https://invoice.zoho.com/api/expenses/delete/<Expense ID>
Method type
POST
API description
Deletes an expense from your Zoho Invoice account.
Parameters to be passed
authtoken, scope, apikey
Sample Response
<Response status="1"/>
Method name
https://invoice.zoho.com/api/view/search/expenses/
Method type
GET
API description
Search for an expense by passing either "Category Name", "Expense Description" or "Customer Name".
Parameters to be passed
authtoken, scope, apikey, searchtext
Sample Response
Amounts displayed are in Customer currency.
<Response status="1"> <Expenses uri="/api/view/search/expenses/"> <Expense uri="/api/expenses/3000000010041"> <ExpenseID>3000000010041</ExpenseID> <ExpenseDate>10 Mar 2010</ExpenseDate> <CategoryName>Marketing</CategoryName> <ExpenseDescription>Online Marketing related billable expense</ExpenseDescription> <Total>858.370</Total> <CurrencyCode>USD</CurrencyCode> <IsBillable>true</IsBillable> <CustomerName>Paul Anderson</CustomerName> <ExpenseStatus>invoiced</ExpenseStatus> </Expense> </Expenses> <PageContext Page="1" Per_Page="200" Total="1" Total_Pages="1"/> </Response>
How do I customize the number of expenses displayed on a page?
Method name
https://invoice.zoho.com/api/expenses/
Method type
GET
API description
View list of expenses in your Zoho Invoice account.
Parameters to be passed
authtoken, scope, apikey
Sample Response
Amounts displayed are in Customer currency.
<Response status="1"/> <Expenses uri="/api/expenses/"> <Expense uri="/api/expenses/3000000010041"> <ExpenseID>3000000010043</ExpenseID> <ExpenseDate>2010-03-10</ExpenseDate> <CategoryName>Marketing</CategoryName> <ExpenseDescription>Online Marketing related billable expense</ExpenseDescription> <Total>700.370</Total> <CurrencyCode>USD</CurrencyCode> <IsBillable>false</IsBillable> <CustomerName/> <ExpenseStatus/> </Expense> </Expenses> <PageContext Page="1" Per_Page="200" Total="1" Total_Pages="1"/> </Response>
How do I customize the number of expenses displayed on a page?
Method name
https://invoice.zoho.com/api/view/expenses/
Method type
GET
API description
View list of expenses in your Zoho Invoice account.
Parameters to be passed
authtoken, scope, apikey
Response
<Response status="1"/> <Expenses uri="/api/view/expenses/"> <Expense uri="/api/view/expenses/3000000010041"> <ExpenseID>3000000010043</ExpenseID> <ExpenseDate>10 Mar 2010</ExpenseDate> <CategoryName>Marketing</CategoryName> <ExpenseDescription>Online Marketing related billable expense</ExpenseDescription> <CurrencyCode>USD</CurrencyCode> <Total>$700.37</Total> <CurrencyCode>USD</CurrencyCode> <IsBillable>false</IsBillable> <CustomerName/> <ExpenseStatus> </Expense> </Expenses> <PageContext Page="1" Per_Page="200" Total="1" Total_Pages="1"/> </Response>
How do I customize the number of expenses displayed on a page?
Method name
https://invoice.zoho.com/api/expenses/<Expense ID>
Method type
GET
API description
View detailed information of a particular expense.
Parameters to be passed
authtoken, scope, apikey
Sample Response
Amounts displayed are in Customer currency.
<Response status="1"> <Expense uri="/api/expenses/3000000010041"> <ExpenseID>3000000010041</ExpenseID> <ExpenseDate>2010-03-10</ExpenseDate> <CategoryName>Marketing</CategoryName> <ExpenseDescription>Online Marketing related billable expense</ExpenseDescription> <Reference>Ref-1</Reference> <Tax1Name>VAT</Tax1Name> <Tax1Percentage>16.500000</Tax1Percentage> <IsInclusiveTax>true</IsInclusiveTax> <IsBillable>false</IsBillable> <CustomerName/> <CurrencyCode>USD</CurrencyCode> <ExchangeRate>10.000000</ExchangeRate> <Tax1Amount>121.570</Tax1Amount> <SubTotal>736.800</SubTotal> <Total>858.370</Total> <CreatedTime>2010-02-25 10:24:45 PST</CreatedTime> <LastModifiedTime>2010-02-26 10:24:45 PST</LastModifiedTime> <ExpenseStatus/> </Expense> </Response>
Method name
https://invoice.zoho.com/api/view/expenses/<Expense ID>
Method type
GET
API description
View detailed information of a particular expense.
Parameters to be passed
authtoken, scope, apikey
Sample Response
Amounts displayed are in Customer currency.
<Response status="1"> <Expense uri="/api/view/expenses/3000000010041"> <ExpenseID>3000000010041</ExpenseID> <ExpenseDate>10 Mar 2010</ExpenseDate> <CategoryName>Marketing</CategoryName> <ExpenseDescription>Online Marketing related billable expense</ExpenseDescription> <Reference>Ref-1</Reference> <Tax1Name>VAT</Tax1Name> <Tax1Percentage>16.500000</Tax1Percentage> <IsInclusiveTax>true</IsInclusiveTax> <IsBillable>false</IsBillable> <CustomerName/> <CurrencyCode>USD</CurrencyCode> <ExchangeRate>10.000000</ExchangeRate> <Tax1Amount>$121.57</Tax1Amount> <SubTotal>$736.80</SubTotal> <Total>$858.37</Total> <CreatedTime>2010-02-25 10:24:45 PST</CreatedTime> <LastModifiedTime>2010-02-26 10:24:45 PST</LastModifiedTime> <ExpenseStatus/> </Expense> </Response>
Using "PageContext" tag you can customize the number of expenses 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 invoices per page (Default value is 200). |
| Total | Total invoices present. |
In Zoho Invoice, the View APIs are of two types - Formatted and Unformatted.
Formatted APIs are used to display the values in the client. The date shown will be formatted based on the date format selected in the settings page. Currency code will be appended to the Invoice Total, balance, Item Total, Price, Payment Amount shown and the amount will also be formatted based on the currency format selected in the Currency settings page.
Unformatted APIs are used for processing values in the program. The date will be shown in the default format "yyyy-MM-dd". The amounts shown will not be formatted.