API Docs
/
No Results Found
Expenses

Expenses

An expense represents the money that you spend, with the ultimate target of generating revenue for your organization.

Possible error codes:
Error CodeMessage
1002Expense does not exists
5001Expenses that were converted to an invoice cannot be deleted
5015Enter a valid expense amount
5019Contact cannot be changed for an invoiced expense
5032You cannot make this expense non-billable as it has been already invoiced

Attribute

expense_id
string
Unique ID of the expense
transaction_id
string
Unique ID of the transaction
transaction_type
string
Type of the transaction
expense_item_id
string
ID of the expense item/component.
gst_no
string
🇮🇳 India
only
15 digit GST identification number of the vendor.
gst_treatment
string
🇮🇳 India
only
Choose whether the contact is GST registered/unregistered/consumer/overseas. Allowed values are business_gst , business_none , overseas , consumer .
destination_of_supply
string
🇮🇳 India
only
Place where the goods/services are supplied to. (If not given, organisation's home state will be taken)
destination_of_supply_state
string
🇮🇳 India
only
State to where goods/services are supplied
hsn_or_sac
string
🇮🇳 India
only
Add HSN/SAC code for your goods/services
source_of_supply
string
🇮🇳 India
only
Place from where the goods/services are supplied. (If not given, place of contact given for the contact will be taken)
paid_through_account_name
string
Enter the name of the paid through account.
vat_reg_no
string
Enter VAT registration number.
reverse_charge_tax_id
string
ID of the reverse charge tax
reverse_charge_tax_name
string
🇮🇳 India
only
Enter name of the reverse charge tax
reverse_charge_tax_percentage
double
🇮🇳 India
only
Enter percentage of the reverse charge tax
reverse_charge_tax_amount
integer
🇮🇳 India
only
Enter amount of the reverse charge tax
tax_amount
double
total expense amount
is_itemized_expense
boolean
is_pre_gst
string
🇮🇳 India
only
Applicable for transactions that fall before july 1, 2017
trip_id
string
Enter trip ID
trip_number
string
Enter trip number
reverse_charge_vat_total
double
🇮🇳 India
only
Enter total of the reverse charge vat tax.
acquisition_vat_total
double
Enter acquisition vat total.
acquisition_vat_summary
array
Show Sub-Attributes arrow
tax
object
Show Sub-Attributes arrow
tax_name
string
Name of the tax levied
tax_amount
double
total expense amount
reverse_charge_vat_summary
array
Show Sub-Attributes arrow
tax
object
Show Sub-Attributes arrow
tax_name
string
Name of the tax levied
tax_amount
double
total expense amount
account_id
string
ID of the expense account.
account_name
string
Name of the expense account in which that expense is recorded
date
string
Date of the expense
tax_id
string
Tax ID applied
tax_name
string
Name of the tax levied
tax_percentage
double
Percentage of tax charged
currency_id
string
Unique ID of the currency
currency_code
string
Code of the currency
exchange_rate
double
Foreign currency exchange rate
sub_total
double
Sub-total of the expense amount
total
double
Total value of expense
bcy_total
double
Total value of expense in Base currency
amount
double
Total expense value
is_inclusive_tax
boolean
Check if amount is inclusive of tax
reference_number
string
Reference number of the expense. Maximum length [100]
description
string
Description of the expense. Maximum length [100]
is_billable
boolean
Check if an expense is billable
is_personal
boolean
Check if the expense os personal
customer_id
string
ID of the expense account.
customer_name
string
Name of the Customer for whom expense is raised. Maximum length [100]
expense_receipt_name
string
Name of the expense receipt
expense_receipt_type
string
Type of the expense receipt
last_modified_time
string
Date of last modification to the expense
status
string
Expense status
custom_fields
array
Custom fields for an expense.
Show Sub-Attributes arrow
customfield_id
long
value
string
Value of the Custom Field
invoice_id
string
ID of the invoice associated
invoice_number
string
Serial Number of the invoice attached
project_id
string
ID of the project associated with the customer.
project_name
string
Name of the project in question
mileage_rate
double
Mileage rate for a particular mileage expense.
mileage_type
string
Milage expense type
expense_type
string
Type of the expense
start_reading
double
Start reading of odometer when creating a mileage expense where mileage_type is odometer.
end_reading
double
End reading of odometer when creating a mileage expense where mileage_type is odometer.

Example

{ "expense_id": 982000000030049, "transaction_id": " ", "transaction_type": "expense", "expense_item_id": 982000000567220, "gst_no": "22AAAAA0000A1Z5", "gst_treatment": "business_gst", "destination_of_supply": "TN", "destination_of_supply_state": "TN", "hsn_or_sac": 80540, "source_of_supply": "AP", "paid_through_account_name": "Petty Cash", "vat_reg_no": "string", "reverse_charge_tax_id": 982000000561063, "reverse_charge_tax_name": "intra", "reverse_charge_tax_percentage": 10, "reverse_charge_tax_amount": 12, "tax_amount": 11.85, "is_itemized_expense": false, "is_pre_gst": "fasle", "trip_id": "", "trip_number": "", "reverse_charge_vat_total": 1.2, "acquisition_vat_total": 0, "acquisition_vat_summary": [ { "tax": { "tax_name": "SalesTax", "tax_amount": 11.85 } } ], "reverse_charge_vat_summary": [ { "tax": { "tax_name": "SalesTax", "tax_amount": 11.85 } } ], "account_id": 982000000561057, "account_name": "Rent", "date": "2013-11-18", "tax_id": 982000000566007, "tax_name": "SalesTax", "tax_percentage": 10.5, "currency_id": 982000000567001, "currency_code": "USD", "exchange_rate": 1, "sub_total": 90, "total": 100, "bcy_total": 100, "amount": 112.5, "is_inclusive_tax": false, "reference_number": "#562SD23R4", "description": "Marketing", "is_billable": true, "is_personal": false, "customer_id": 982000000567001, "customer_name": "Bowman & Co", "expense_receipt_name": " ", "expense_receipt_type": " ", "last_modified_time": "2013-12-18T02:17:40-0800", "status": "unbilled", "custom_fields": [ { "customfield_id": "46000000012845", "value": "Normal" } ], "invoice_id": " ", "invoice_number": " ", "project_id": 982000000567226, "project_name": " ", "mileage_rate": " ", "mileage_type": "non_mileage", "expense_type": "non-mileage", "start_reading": " ", "end_reading": " " }

Create an Expense

Create billable or non-billable expense.
OAuth Scope : ZohoInvoice.expenses.CREATE

Arguments

account_id
string
ID of the expense account.
date
string
Date of the expense
amount
double
(Required)
Total expense value
tax_id
string
Tax ID applied
is_inclusive_tax
boolean
Check if amount is inclusive of tax
source_of_supply
string
🇮🇳 India
only
Place from where the goods/services are supplied. (If not given, place of contact given for the contact will be taken)
destination_of_supply
string
🇮🇳 India
only
Place where the goods/services are supplied to. (If not given, organisation's home state will be taken)
hsn_or_sac
string
🇮🇳 India
only
Add HSN/SAC code for your goods/services
gst_no
string
🇮🇳 India
only
15 digit GST identification number of the vendor.
reverse_charge_tax_id
string
ID of the reverse charge tax
custom_fields
array
Custom fields for an expense.
Show Sub-Attributes arrow
customfield_id
long
value
string
Value of the Custom Field
line_items
array
Show Sub-Attributes arrow
line_item_id
string
ID of the items in the expense
account_id
string
ID of the expense account.
description
string
Description of the expense. Maximum length [100]
amount
double
(Required)
Total expense value
tax_id
string
Tax ID applied
item_order
string
Order of the items
product_type
string
🇬🇧 United Kingdom
only
Type of the expense. This denotes whether the expense is to be treated as a goods or service purchase. Allowed Values: goods and service.
acquisition_vat_id
string
🇬🇧 United Kingdom
only
This is the ID of the tax applied in case this is an EU - goods expense and acquisition VAT needs to be reported.
reverse_charge_vat_id
string
🇬🇧 United Kingdom
only
This is the ID of the tax applied in case this is a non UK - service expense and reverse charge VAT needs to be reported.
reverse_charge_tax_id
string
ID of the reverse charge tax
tax_exemption_code
string
🇮🇳 India
only
Enter tax exemption code
tax_exemption_id
string
🇮🇳 India
only
Enter tax exemption ID
taxes
array
🇲🇽 Mexico
only
Show Sub-Attributes arrow
tax_id
string
Tax ID applied
tax_amount
double
total expense amount
is_billable
boolean
Check if an expense is billable
reference_number
string
(Required)
Reference number of the expense. Maximum length [100]
description
string
Description of the expense. Maximum length [100]
customer_id
string
ID of the expense account.
currency_id
string
Unique ID of the currency
exchange_rate
double
Foreign currency exchange rate
project_id
string
ID of the project associated with the customer.
mileage_type
string
Milage expense type
vat_treatment
string
🇬🇧 United Kingdom
only
VAT treatment for the expense. VAT treatment denotes the location of the vendor, if the vendor resides in UK then the VAT treatment is uk. If the vendor is in an EU country & VAT registered, you are resides in Northen Ireland and purchasing Goods then his VAT treatment is eu_vat_registered and if he resides outside the UK then his VAT treatment is overseas (For Pre Brexit, this can be split as eu_vat_registered, eu_vat_not_registered and non_eu).
product_type
string
🇬🇧 United Kingdom
only
Type of the expense. This denotes whether the expense is to be treated as a goods or service purchase. Allowed Values: goods and service.
acquisition_vat_id
string
🇬🇧 United Kingdom
only
This is the ID of the tax applied in case this is an EU - goods expense and acquisition VAT needs to be reported.
reverse_charge_vat_id
string
🇬🇧 United Kingdom
only
This is the ID of the tax applied in case this is a non UK - service expense and reverse charge VAT needs to be reported.
start_reading
double
Start reading of odometer when creating a mileage expense where mileage_type is odometer.
end_reading
double
End reading of odometer when creating a mileage expense where mileage_type is odometer.
distance
string
Distance travelled for a particular mileage expense where mileage_type is manual
mileage_unit
string
Unit of the distance travelled. Allowed Values: km and mile
mileage_rate
double
Mileage rate for a particular mileage expense.
employee_id
string
🇬🇧 United Kingdom
only
ID of the employee who has submitted this mileage expense.
vehicle_type
string
🇬🇧 United Kingdom
only
Vehicle type for a particular mileage expense. Allowed Values: car, van, motorcycle and bike
can_reclaim_vat_on_mileage
string
🇬🇧 United Kingdom
only
To specify if tax can be reclaimed for this mileage expense.
fuel_type
string
🇬🇧 United Kingdom
only
Fuel type for a particular mileage expense. Allowed Values: petrol, lpg and diesel
engine_capacity_range
string
🇬🇧 United Kingdom
only
Engine capacity range for a particular mileage expense. Allowed Values: less_than_1400cc, between_1400cc_and_1600cc, between_1600cc_and_2000cc and more_than_2000cc

Query Parameters

receipt
Expense receipt file to attach. Allowed Extensions: gif, png, jpeg, jpg, bmp and pdf. It should be sent in multipart/formdata.

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/expenses" type: POST headers: headers_data content-type: application/json parameters: parameters_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://www.zohoapis.com/invoice/v3/expenses") .post(body) .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://www.zohoapis.com/invoice/v3/expenses', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("POST", "/invoice/v3/expenses", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "POST", "hostname": "www.zohoapis.com", "port": null, "path": "/invoice/v3/expenses", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", "content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({field1: 'value1', field2: 'value2'})); req.end();
curl --request POST \ --url https://www.zohoapis.com/invoice/v3/expenses \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "account_id": 982000000561057, "date": "2013-11-18", "amount": 112.5, "tax_id": 982000000566007, "is_inclusive_tax": false, "source_of_supply": "AP", "destination_of_supply": "TN", "hsn_or_sac": 80540, "gst_no": "22AAAAA0000A1Z5", "reverse_charge_tax_id": 982000000561063, "custom_fields": [ { "customfield_id": "46000000012845", "value": "Normal" } ], "line_items": [ { "line_item_id": 10763000000140068, "account_id": 982000000561057, "description": "Marketing", "amount": 112.5, "tax_id": 982000000566007, "item_order": 1, "product_type": "goods", "acquisition_vat_id": " ", "reverse_charge_vat_id": " ", "reverse_charge_tax_id": 982000000561063, "tax_exemption_code": "string", "tax_exemption_id": 982000000561067 } ], "taxes": [ { "tax_id": 982000000566007, "tax_amount": 11.85 } ], "is_billable": true, "reference_number": "#562SD23R4", "description": "Marketing", "customer_id": 982000000567001, "currency_id": 982000000567001, "exchange_rate": 1, "project_id": 982000000567226, "mileage_type": "non_mileage", "vat_treatment": "overseas", "product_type": "goods", "acquisition_vat_id": " ", "reverse_charge_vat_id": " ", "start_reading": " ", "end_reading": " ", "distance": " ", "mileage_unit": " ", "mileage_rate": " ", "employee_id": " ", "vehicle_type": " ", "can_reclaim_vat_on_mileage": " ", "fuel_type": " ", "engine_capacity_range": " " }

Response Example

{ "code": 0, "message": "The expense has been recorded.", "expense": { "expense_id": 982000000030049, "transaction_id": " ", "transaction_type": "expense", "expense_item_id": 982000000567220, "gst_no": "22AAAAA0000A1Z5", "gst_treatment": "business_gst", "destination_of_supply": "TN", "destination_of_supply_state": "TN", "hsn_or_sac": 80540, "source_of_supply": "AP", "paid_through_account_name": "Petty Cash", "vat_reg_no": "string", "reverse_charge_tax_id": 982000000561063, "reverse_charge_tax_name": "intra", "reverse_charge_tax_percentage": 10, "reverse_charge_tax_amount": 12, "tax_amount": 11.85, "is_itemized_expense": false, "is_pre_gst": "fasle", "trip_id": "", "trip_number": "", "reverse_charge_vat_total": 1.2, "acquisition_vat_total": 0, "acquisition_vat_summary": [ { "tax": { "tax_name": "SalesTax", "tax_amount": 11.85 } } ], "reverse_charge_vat_summary": [ { "tax": { "tax_name": "SalesTax", "tax_amount": 11.85 } } ], "account_id": 982000000561057, "account_name": "Rent", "date": "2013-11-18", "tax_id": 982000000566007, "tax_name": "SalesTax", "tax_percentage": 10.5, "currency_id": 982000000567001, "currency_code": "USD", "exchange_rate": 1, "sub_total": 90, "total": 100, "bcy_total": 100, "amount": 112.5, "is_inclusive_tax": false, "reference_number": "#562SD23R4", "description": "Marketing", "is_billable": true, "is_personal": false, "customer_id": 982000000567001, "customer_name": "Bowman & Co", "expense_receipt_name": " ", "expense_receipt_type": " ", "last_modified_time": "2013-12-18T02:17:40-0800", "status": "unbilled", "custom_fields": [ { "customfield_id": "46000000012845", "value": "Normal" } ], "invoice_id": " ", "invoice_number": " ", "project_id": 982000000567226, "project_name": " ", "mileage_rate": " ", "mileage_type": "non_mileage", "expense_type": "non-mileage", "start_reading": " ", "end_reading": " " } }

List Expenses

List all the Expenses with pagination.
OAuth Scope : ZohoInvoice.expenses.READ

Query Parameters

description
Search expenses by description.Variants description_startswith and description_contains. Maximum length [100]
reference_number
Search expenses by reference number. Variants reference_number_startswith and reference_number_contains. Maximum length [100]
date
Search expenses by expense date. Variants date_start, date_end, date_before and date_after. Date Format [yyyy-mm-dd]
status
Search expenses by expense status. Allowed Values unbilled, invoiced, reimbursed, non-billable and billable
amount
Search expenses by amount. Variants: amount_less_than, amount_less_equals, amount_greater_than and amount_greater_than
account_name
Search expenses by expense account name. Variants account_name_startswith and account_name_contains. Maximum length [100]
customer_name
Search expenses by customer name. Variants: customer_name_startswith and customer_name_contains. Maximum length [100]
search_text
Search expenses by account name or description or customer name or vendor name. Maximum length [100]
sort_column
Sort expenses.Allowed Values date, account_name, total, bcy_total, reference_number, customer_name and created_time
filter_by
Filter expenses by expense status. Allowed Values Status.All, Status.Billable, Status.Nonbillable, Status.Reimbursed, Status.Invoiced and Status.Unbilled

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/expenses" type: GET headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/invoice/v3/expenses") .get() .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/invoice/v3/expenses', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") headers = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/invoice/v3/expenses", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "GET", "hostname": "www.zohoapis.com", "port": null, "path": "/invoice/v3/expenses", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request GET \ --url https://www.zohoapis.com/invoice/v3/expenses \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695'

Response Example

{ "code": 0, "message": "success", "expenses": [ { "expense_id": 982000000030049, "date": "2013-11-18", "account_name": "Rent", "description": "Marketing", "currency_id": 982000000567001, "currency_code": "USD", "bcy_total": 100, "bcy_total_without_tax": 100, "total": 100, "total_without_tax": 100, "is_billable": true, "reference_number": "#562SD23R4", "customer_id": 982000000567001, "customer_name": "Bowman & Co", "status": "unbilled", "custom_fields": [ { "customfield_id": "46000000012845", "value": "Normal" } ], "created_time": "2013-11-18T02:17:40-0800", "last_modified_time": "2013-12-18T02:17:40-0800", "expense_receipt_name": " ", "mileage_rate": " ", "mileage_unit": " ", "expense_type": "non-mileage", "start_reading": " ", "end_reading": " " }, {...}, {...} ] }

Update an Expense

Update an existing Expense.
OAuth Scope : ZohoInvoice.expenses.UPDATE

Arguments

account_id
string
ID of the expense account.
date
string
Date of the expense
amount
double
(Required)
Total expense value
tax_id
string
Tax ID applied
source_of_supply
string
🇮🇳 India
only
Place from where the goods/services are supplied. (If not given, place of contact given for the contact will be taken)
destination_of_supply
string
🇮🇳 India
only
Place where the goods/services are supplied to. (If not given, organisation's home state will be taken)
hsn_or_sac
string
🇮🇳 India
only
Add HSN/SAC code for your goods/services
gst_no
string
🇮🇳 India
only
15 digit GST identification number of the vendor.
reverse_charge_tax_id
string
ID of the reverse charge tax
line_items
array
Show Sub-Attributes arrow
line_item_id
string
ID of the items in the expense
account_id
string
ID of the expense account.
description
string
Description of the expense. Maximum length [100]
amount
double
(Required)
Total expense value
tax_id
string
Tax ID applied
item_order
string
Order of the items
product_type
string
🇬🇧 United Kingdom
only
Type of the expense. This denotes whether the expense is to be treated as a goods or service purchase. Allowed Values: goods and service.
acquisition_vat_id
string
🇬🇧 United Kingdom
only
This is the ID of the tax applied in case this is an EU - goods expense and acquisition VAT needs to be reported.
reverse_charge_vat_id
string
🇬🇧 United Kingdom
only
This is the ID of the tax applied in case this is a non UK - service expense and reverse charge VAT needs to be reported.
reverse_charge_tax_id
string
ID of the reverse charge tax
tax_exemption_code
string
🇮🇳 India
only
Enter tax exemption code
tax_exemption_id
string
🇮🇳 India
only
Enter tax exemption ID
taxes
array
🇲🇽 Mexico
only
Show Sub-Attributes arrow
tax_id
string
Tax ID applied
tax_amount
double
total expense amount
is_inclusive_tax
boolean
Check if amount is inclusive of tax
is_billable
boolean
Check if an expense is billable
reference_number
string
(Required)
Reference number of the expense. Maximum length [100]
description
string
Description of the expense. Maximum length [100]
custom_fields
array
Custom fields for an expense.
Show Sub-Attributes arrow
customfield_id
long
value
string
Value of the Custom Field
customer_id
string
ID of the expense account.
currency_id
string
Unique ID of the currency
exchange_rate
double
Foreign currency exchange rate
project_id
string
ID of the project associated with the customer.
mileage_type
string
Milage expense type
vat_treatment
string
🇬🇧 United Kingdom
only
VAT treatment for the expense. VAT treatment denotes the location of the vendor, if the vendor resides in UK then the VAT treatment is uk. If the vendor is in an EU country & VAT registered, you are resides in Northen Ireland and purchasing Goods then his VAT treatment is eu_vat_registered and if he resides outside the UK then his VAT treatment is overseas (For Pre Brexit, this can be split as eu_vat_registered, eu_vat_not_registered and non_eu).
product_type
string
🇬🇧 United Kingdom
only
Type of the expense. This denotes whether the expense is to be treated as a goods or service purchase. Allowed Values: goods and service.
acquisition_vat_id
string
🇬🇧 United Kingdom
only
This is the ID of the tax applied in case this is an EU - goods expense and acquisition VAT needs to be reported.
reverse_charge_vat_id
string
🇬🇧 United Kingdom
only
This is the ID of the tax applied in case this is a non UK - service expense and reverse charge VAT needs to be reported.
start_reading
double
Start reading of odometer when creating a mileage expense where mileage_type is odometer.
end_reading
double
End reading of odometer when creating a mileage expense where mileage_type is odometer.
distance
string
Distance travelled for a particular mileage expense where mileage_type is manual
mileage_unit
string
Unit of the distance travelled. Allowed Values: km and mile
mileage_rate
double
Mileage rate for a particular mileage expense.
employee_id
string
🇬🇧 United Kingdom
only
ID of the employee who has submitted this mileage expense.
vehicle_type
string
🇬🇧 United Kingdom
only
Vehicle type for a particular mileage expense. Allowed Values: car, van, motorcycle and bike
can_reclaim_vat_on_mileage
string
🇬🇧 United Kingdom
only
To specify if tax can be reclaimed for this mileage expense.
fuel_type
string
🇬🇧 United Kingdom
only
Fuel type for a particular mileage expense. Allowed Values: petrol, lpg and diesel
engine_capacity_range
string
🇬🇧 United Kingdom
only
Engine capacity range for a particular mileage expense. Allowed Values: less_than_1400cc, between_1400cc_and_1600cc, between_1600cc_and_2000cc and more_than_2000cc

Query Parameters

receipt
Expense receipt file to attach. Allowed Extensions: gif, png, jpeg, jpg, bmp and pdf. It should be sent in multipart/formdata.
delete_receipt
A historic receipt

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/expenses/982000000030049" type: PUT headers: headers_data content-type: application/json parameters: parameters_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://www.zohoapis.com/invoice/v3/expenses/982000000030049") .put(body) .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'PUT', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://www.zohoapis.com/invoice/v3/expenses/982000000030049', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("PUT", "/invoice/v3/expenses/982000000030049", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "PUT", "hostname": "www.zohoapis.com", "port": null, "path": "/invoice/v3/expenses/982000000030049", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", "content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({field1: 'value1', field2: 'value2'})); req.end();
curl --request PUT \ --url https://www.zohoapis.com/invoice/v3/expenses/982000000030049 \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "account_id": 982000000561057, "date": "2013-11-18", "amount": 120.5, "tax_id": 982000000566007, "source_of_supply": "AP", "destination_of_supply": "TN", "hsn_or_sac": 80540, "gst_no": "22AAAAA0000A1Z5", "reverse_charge_tax_id": 982000000561063, "line_items": [ { "line_item_id": 10763000000140068, "account_id": 982000000561057, "description": "Marketing", "amount": 112.5, "tax_id": 982000000566007, "item_order": 1, "product_type": "goods", "acquisition_vat_id": " ", "reverse_charge_vat_id": " ", "reverse_charge_tax_id": 982000000561063, "tax_exemption_code": "string", "tax_exemption_id": 982000000561067 } ], "taxes": [ { "tax_id": 982000000566007, "tax_amount": 11.85 } ], "is_inclusive_tax": false, "is_billable": true, "reference_number": "#562SD23R4", "description": "Marketing", "custom_fields": [ { "customfield_id": "46000000012845", "value": "Normal" } ], "customer_id": 982000000567001, "currency_id": 982000000567001, "exchange_rate": 1, "project_id": 982000000567226, "mileage_type": "non_mileage", "vat_treatment": "overseas", "product_type": "goods", "acquisition_vat_id": " ", "reverse_charge_vat_id": " ", "start_reading": " ", "end_reading": " ", "distance": " ", "mileage_unit": " ", "mileage_rate": " ", "employee_id": " ", "vehicle_type": " ", "can_reclaim_vat_on_mileage": " ", "fuel_type": " ", "engine_capacity_range": " " }

Response Example

{ "code": 0, "message": "Expense information has been updated.", "expense": { "expense_id": 982000000030049, "transaction_id": " ", "transaction_type": "expense", "expense_item_id": 982000000567220, "gst_no": "22AAAAA0000A1Z5", "gst_treatment": "business_gst", "destination_of_supply": "TN", "destination_of_supply_state": "TN", "hsn_or_sac": 80540, "source_of_supply": "AP", "paid_through_account_name": "Petty Cash", "vat_reg_no": "string", "reverse_charge_tax_id": 982000000561063, "reverse_charge_tax_name": "intra", "reverse_charge_tax_percentage": 10, "reverse_charge_tax_amount": 12, "tax_amount": 11.85, "is_itemized_expense": false, "is_pre_gst": "fasle", "trip_id": "", "trip_number": "", "reverse_charge_vat_total": 1.2, "acquisition_vat_total": 0, "acquisition_vat_summary": [ { "tax": { "tax_name": "SalesTax", "tax_amount": 11.85 } } ], "reverse_charge_vat_summary": [ { "tax": { "tax_name": "SalesTax", "tax_amount": 11.85 } } ], "account_id": 982000000561057, "account_name": "Rent", "date": "2013-11-18", "tax_id": 982000000566007, "tax_name": "SalesTax", "tax_percentage": 10.5, "currency_id": 982000000567001, "currency_code": "USD", "exchange_rate": 1, "sub_total": 90, "total": 100, "bcy_total": 100, "amount": 120.5, "is_inclusive_tax": false, "reference_number": "#562SD23R4", "description": "Marketing", "is_billable": true, "is_personal": false, "customer_id": 982000000567001, "customer_name": "Bowman & Co", "expense_receipt_name": " ", "expense_receipt_type": " ", "last_modified_time": "2013-12-18T02:17:40-0800", "status": "unbilled", "custom_fields": [ { "customfield_id": "46000000012845", "value": "Normal" } ], "invoice_id": " ", "invoice_number": " ", "project_id": 982000000567226, "project_name": " ", "mileage_rate": " ", "mileage_type": "non_mileage", "expense_type": "non-mileage", "start_reading": " ", "end_reading": " " } }

Get an Expense

Get the details of the Expense.
OAuth Scope : ZohoInvoice.expenses.READ

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/expenses/982000000030049" type: GET headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/invoice/v3/expenses/982000000030049") .get() .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/invoice/v3/expenses/982000000030049', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") headers = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/invoice/v3/expenses/982000000030049", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "GET", "hostname": "www.zohoapis.com", "port": null, "path": "/invoice/v3/expenses/982000000030049", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request GET \ --url https://www.zohoapis.com/invoice/v3/expenses/982000000030049 \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695'

Response Example

{ "code": 0, "message": "success", "expense": { "expense_id": 982000000030049, "transaction_id": " ", "transaction_type": "expense", "expense_item_id": 982000000567220, "gst_no": "22AAAAA0000A1Z5", "gst_treatment": "business_gst", "destination_of_supply": "TN", "destination_of_supply_state": "TN", "hsn_or_sac": 80540, "source_of_supply": "AP", "paid_through_account_name": "Petty Cash", "vat_reg_no": "string", "reverse_charge_tax_id": 982000000561063, "reverse_charge_tax_name": "intra", "reverse_charge_tax_percentage": 10, "reverse_charge_tax_amount": 12, "tax_amount": 11.85, "is_itemized_expense": false, "is_pre_gst": "fasle", "trip_id": "", "trip_number": "", "reverse_charge_vat_total": 1.2, "acquisition_vat_total": 0, "acquisition_vat_summary": [ { "tax": { "tax_name": "SalesTax", "tax_amount": 11.85 } } ], "reverse_charge_vat_summary": [ { "tax": { "tax_name": "SalesTax", "tax_amount": 11.85 } } ], "account_id": 982000000561057, "account_name": "Rent", "date": "2013-11-18", "tax_id": 982000000566007, "tax_name": "SalesTax", "tax_percentage": 10.5, "currency_id": 982000000567001, "currency_code": "USD", "exchange_rate": 1, "sub_total": 90, "total": 100, "bcy_total": 100, "amount": 112.5, "is_inclusive_tax": false, "reference_number": "#562SD23R4", "description": "Marketing", "is_billable": true, "is_personal": false, "customer_id": 982000000567001, "customer_name": "Bowman & Co", "expense_receipt_name": " ", "expense_receipt_type": " ", "last_modified_time": "2013-12-18T02:17:40-0800", "status": "unbilled", "invoice_id": " ", "invoice_number": " ", "project_id": 982000000567226, "project_name": " ", "mileage_rate": " ", "mileage_type": "non_mileage", "expense_type": "non-mileage", "start_reading": " ", "end_reading": " ", "custom_fields": [ { "customfield_id": "46000000012845", "value": "Normal" } ], "line_item": { "line_item_id": 10763000000140068, "account_id": 982000000561057, "account_name": "Rent", "description": "Marketing", "tax_amount": 11.85, "tax_id": 982000000566007, "tax_name": "SalesTax", "tax_type": "tax", "tax_percentage": 10.5, "item_total": 100, "item_order": 1, "amount": 112.5, "hsn_or_sac": 80540, "reverse_charge_tax_id": 982000000561063, "reverse_charge_tax_name": "intra", "reverse_charge_tax_percentage": 10, "reverse_charge_tax_amount": 12 } } }

Delete an Expense

Delete an existing expense.
OAuth Scope : ZohoInvoice.expenses.DELETE

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/expenses/982000000030049" type: DELETE headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/invoice/v3/expenses/982000000030049") .delete(null) .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'DELETE', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/invoice/v3/expenses/982000000030049', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") headers = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("DELETE", "/invoice/v3/expenses/982000000030049", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "DELETE", "hostname": "www.zohoapis.com", "port": null, "path": "/invoice/v3/expenses/982000000030049", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request DELETE \ --url https://www.zohoapis.com/invoice/v3/expenses/982000000030049 \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695'

Response Example

{ "code": 0, "message": "The expense has been deleted." }

List expense History & Comments

Get history and comments of an expense.
OAuth Scope : ZohoInvoice.expenses.READ

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/expenses/982000000030049/comments" type: GET headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/invoice/v3/expenses/982000000030049/comments") .get() .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/invoice/v3/expenses/982000000030049/comments', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") headers = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/invoice/v3/expenses/982000000030049/comments", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "GET", "hostname": "www.zohoapis.com", "port": null, "path": "/invoice/v3/expenses/982000000030049/comments", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request GET \ --url https://www.zohoapis.com/invoice/v3/expenses/982000000030049/comments \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695'

Response Example

{ "code": 0, "message": "success", "comments": [ { "comment_id": 982000000567272, "expense_id": 982000000030049, "description": "Marketing", "commented_by_id": 982000000554041, "commented_by": "John David", "date_description": "16 hours ago", "time": "4.22AM", "operation_type": "Added", "transaction_id": " ", "transaction_type": "expense" }, {...}, {...} ] }

Create an employee

Create an employee for an expense.
OAuth Scope : ZohoInvoice.expenses.CREATE

Arguments

name
string
(Required)
Name of the contact
email
string
(Required)
Email address of the contact

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/employees" type: POST headers: headers_data content-type: application/json parameters: parameters_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://www.zohoapis.com/invoice/v3/employees") .post(body) .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://www.zohoapis.com/invoice/v3/employees', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("POST", "/invoice/v3/employees", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "POST", "hostname": "www.zohoapis.com", "port": null, "path": "/invoice/v3/employees", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", "content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({field1: 'value1', field2: 'value2'})); req.end();
curl --request POST \ --url https://www.zohoapis.com/invoice/v3/employees \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "name": "John David", "email": "test@zylker.org" }

Response Example

{ "code": 0, "message": "success", "employee": { "employee_id": " ", "name": "John David", "email": "test@zylker.org" } }

List employees

List employees with pagination.
OAuth Scope : ZohoInvoice.expenses.READ

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/employees" type: GET headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/invoice/v3/employees") .get() .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/invoice/v3/employees', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") headers = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/invoice/v3/employees", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "GET", "hostname": "www.zohoapis.com", "port": null, "path": "/invoice/v3/employees", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request GET \ --url https://www.zohoapis.com/invoice/v3/employees \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695'

Response Example

{ "code": 0, "message": "success", "employees": [ { "employee_id": " ", "name": "John David", "email": "test@zylker.org" }, {...}, {...} ] }

Get an employee

Get the details of the employee.
OAuth Scope : ZohoInvoice.expenses.READ

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/employees/" type: GET headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/invoice/v3/employees/") .get() .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/invoice/v3/employees/', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") headers = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/invoice/v3/employees/", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "GET", "hostname": "www.zohoapis.com", "port": null, "path": "/invoice/v3/employees/", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request GET \ --url https://www.zohoapis.com/invoice/v3/employees/ \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695'

Response Example

{ "code": 0, "message": "success", "employee": { "employee_id": " ", "name": "John David", "email": "test@zylker.org" } }

Delete an employee

Delete an existing employee.
OAuth Scope : ZohoInvoice.expenses.DELETE

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/employee/" type: DELETE headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/invoice/v3/employee/") .delete(null) .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'DELETE', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/invoice/v3/employee/', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") headers = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("DELETE", "/invoice/v3/employee/", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "DELETE", "hostname": "www.zohoapis.com", "port": null, "path": "/invoice/v3/employee/", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request DELETE \ --url https://www.zohoapis.com/invoice/v3/employee/ \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695'

Response Example

{ "code": 0, "message": "Employee has been deleted." }