Taxes
A tax entity allows you to maintain details of a tax.(Not supported for US Version)
End Points
Create a tax
Retrieve list of taxes
Update details of a tax
Retrieve details of a tax
Delete a tax
Retrieve details of a tax group
Attribute
tax_id
long
Unique ID for tax generated by the server. This is used as an identifier.
tax_name
string
Name of the tax.
tax_percentage
double
Tax percentage.
tax_type
string
Type of tax. Possible values are
tax
or compound_tax
or tax_group
. is_value_added
boolean
🇨🇦
Canada
only
Whether it is a value added tax. It can either be
true
or false
. tax_authority_id
long
🇨🇦
Canada
only
Unique Id of the Tax Agency.
tax_authority_name
string
🇨🇦
Canada
only
Name of the Tax Agency.
{
"tax_id": "16367000000086009",
"tax_name": "Vat",
"tax_percentage": 7,
"tax_type": "tax",
"is_value_added": true,
"tax_authority_id": "17455000000076047",
"tax_authority_name": "Canada Revenue Agency"
}
Create a tax
Create a tax.
Arguments
tax_name
string
(Required)
Name of the tax.
tax_percentage
double
(Required)
Tax percentage.
tax_type
string
Type of tax. Possible values are
tax
or compound_tax
or tax_group
. is_value_added
boolean
🇨🇦
Canada
only
Whether it is a value added tax. It can either be
true
or false
. tax_authority_name
string
(Required)
🇨🇦
Canada
only
Name of the Tax Agency.
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("X-com-zoho-expense-organizationid", "10234695");
response = invokeUrl
[
url: "https://www.zohoapis.com/expense/v1/settings/taxes"
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/expense/v1/settings/taxes")
.post(body)
.addHeader("X-com-zoho-expense-organizationid", "10234695")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
'X-com-zoho-expense-organizationid': '10234695',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/expense/v1/settings/taxes', 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-expense-organizationid': "10234695",
'content-type': "application/json"
}
conn.request("POST", "/expense/v1/settings/taxes", 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": "/expense/v1/settings/taxes",
"headers": {
"X-com-zoho-expense-organizationid": "10234695",
"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/expense/v1/settings/taxes \
--header 'X-com-zoho-expense-organizationid: 10234695' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"tax_name": "Vat",
"tax_percentage": 7,
"tax_type": "tax",
"is_value_added": true,
"tax_authority_name": "Canada Revenue Agency"
}
{
"code": 0,
"message": "The tax has been created.",
"tax": {
"tax_id": "16367000000086009",
"tax_name": "Vat",
"tax_percentage": 7,
"tax_type": "tax",
"is_value_added": true,
"tax_authority_id": "17455000000076047",
"tax_authority_name": "Canada Revenue Agency"
}
}
Retrieve list of taxes
Details of all existing taxes.
headers_data = Map();
headers_data.put("X-com-zoho-expense-organizationid", "10234695");
response = invokeUrl
[
url: "https://www.zohoapis.com/expense/v1/settings/taxes"
type: GET
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/expense/v1/settings/taxes")
.get()
.addHeader("X-com-zoho-expense-organizationid", "10234695")
.build();
Response response = client.newCall(request).execute();
const options = {method: 'GET', headers: {'X-com-zoho-expense-organizationid': '10234695'}};
fetch('https://www.zohoapis.com/expense/v1/settings/taxes', 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-expense-organizationid': "10234695" }
conn.request("GET", "/expense/v1/settings/taxes", 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": "/expense/v1/settings/taxes",
"headers": {
"X-com-zoho-expense-organizationid": "10234695"
}
};
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/expense/v1/settings/taxes \
--header 'X-com-zoho-expense-organizationid: 10234695'
{
"code": 0,
"message": "success",
"taxes": [
{
"tax_id": "16367000000086009",
"tax_name": "Vat",
"tax_percentage": 7,
"tax_type": "tax",
"is_value_added": true,
"tax_authority_id": "17455000000076047",
"tax_authority_name": "Canada Revenue Agency"
},
{...},
{...}
]
}
Update details of a tax
Update the details of an existing tax.
Arguments
tax_name
string
Name of the tax.
tax_percentage
double
Tax percentage.
tax_type
string
Type of tax. Possible values are
tax
or compound_tax
or tax_group
. is_value_added
boolean
🇨🇦
Canada
only
Whether it is a value added tax. It can either be
true
or false
.parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("X-com-zoho-expense-organizationid", "10234695");
response = invokeUrl
[
url: "https://www.zohoapis.com/expense/v1/settings/taxes/16367000000086009"
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/expense/v1/settings/taxes/16367000000086009")
.put(body)
.addHeader("X-com-zoho-expense-organizationid", "10234695")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'PUT',
headers: {
'X-com-zoho-expense-organizationid': '10234695',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/expense/v1/settings/taxes/16367000000086009', 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-expense-organizationid': "10234695",
'content-type': "application/json"
}
conn.request("PUT", "/expense/v1/settings/taxes/16367000000086009", 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": "/expense/v1/settings/taxes/16367000000086009",
"headers": {
"X-com-zoho-expense-organizationid": "10234695",
"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/expense/v1/settings/taxes/16367000000086009 \
--header 'X-com-zoho-expense-organizationid: 10234695' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"tax_name": "Vat",
"tax_percentage": 7,
"tax_type": "tax",
"is_value_added": true
}
{
"code": 0,
"message": "The tax details has been updated.",
"tax": {
"tax_id": "16367000000086009",
"tax_name": "Vat",
"tax_percentage": 7,
"tax_type": "tax",
"is_value_added": true
}
}
Retrieve details of a tax
Details of an existing tax.
headers_data = Map();
headers_data.put("X-com-zoho-expense-organizationid", "10234695");
response = invokeUrl
[
url: "https://www.zohoapis.com/expense/v1/settings/taxes/16367000000086009"
type: GET
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/expense/v1/settings/taxes/16367000000086009")
.get()
.addHeader("X-com-zoho-expense-organizationid", "10234695")
.build();
Response response = client.newCall(request).execute();
const options = {method: 'GET', headers: {'X-com-zoho-expense-organizationid': '10234695'}};
fetch('https://www.zohoapis.com/expense/v1/settings/taxes/16367000000086009', 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-expense-organizationid': "10234695" }
conn.request("GET", "/expense/v1/settings/taxes/16367000000086009", 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": "/expense/v1/settings/taxes/16367000000086009",
"headers": {
"X-com-zoho-expense-organizationid": "10234695"
}
};
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/expense/v1/settings/taxes/16367000000086009 \
--header 'X-com-zoho-expense-organizationid: 10234695'
{
"code": 0,
"message": "success",
"tax": {
"tax_id": "16367000000086009",
"tax_name": "Vat",
"tax_percentage": 7,
"tax_type": "tax",
"is_value_added": true
}
}
Delete a tax
Delete an existing tax.
headers_data = Map();
headers_data.put("X-com-zoho-expense-organizationid", "10234695");
response = invokeUrl
[
url: "https://www.zohoapis.com/expense/v1/settings/taxes/16367000000086009"
type: DELETE
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/expense/v1/settings/taxes/16367000000086009")
.delete(null)
.addHeader("X-com-zoho-expense-organizationid", "10234695")
.build();
Response response = client.newCall(request).execute();
const options = {method: 'DELETE', headers: {'X-com-zoho-expense-organizationid': '10234695'}};
fetch('https://www.zohoapis.com/expense/v1/settings/taxes/16367000000086009', 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-expense-organizationid': "10234695" }
conn.request("DELETE", "/expense/v1/settings/taxes/16367000000086009", 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": "/expense/v1/settings/taxes/16367000000086009",
"headers": {
"X-com-zoho-expense-organizationid": "10234695"
}
};
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/expense/v1/settings/taxes/16367000000086009 \
--header 'X-com-zoho-expense-organizationid: 10234695'
{
"code": 0,
"message": "The tax has been deleted."
}
Retrieve details of a tax group
Details of an existing tax group.
headers_data = Map();
headers_data.put("X-com-zoho-expense-organizationid", "10234695");
response = invokeUrl
[
url: "https://www.zohoapis.com/expense/v1/settings/taxgroups/27927000000681015"
type: GET
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/expense/v1/settings/taxgroups/27927000000681015")
.get()
.addHeader("X-com-zoho-expense-organizationid", "10234695")
.build();
Response response = client.newCall(request).execute();
const options = {method: 'GET', headers: {'X-com-zoho-expense-organizationid': '10234695'}};
fetch('https://www.zohoapis.com/expense/v1/settings/taxgroups/27927000000681015', 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-expense-organizationid': "10234695" }
conn.request("GET", "/expense/v1/settings/taxgroups/27927000000681015", 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": "/expense/v1/settings/taxgroups/27927000000681015",
"headers": {
"X-com-zoho-expense-organizationid": "10234695"
}
};
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/expense/v1/settings/taxgroups/27927000000681015 \
--header 'X-com-zoho-expense-organizationid: 10234695'
{
"code": 0,
"message": "success",
"tax_group": {
"tax_group_id": "27927000000681015",
"tax_group_name": "Saviour group",
"tax_group_percentage": 7,
"taxes": [
{
"tax_id": "16367000000086009",
"tax_name": "Vat",
"tax_percentage": 7,
"tax_type": "tax"
}
]
}
}