Expense Categories
An expense category entity allows you to maintain details of an expense category.
Attribute
true
or false
.true
or false
.true
or false
.true
or false
.true
or false
.true
or false
.true
or false
.true
or false
.true
or false
.true
or false
.{
"category_id": "16367000000000418",
"category_name": "Air Travel Expense",
"gl_code": "air01",
"description": "Expenses on business travels like hotel booking charges, flight charges, etc. are recorded as travel expenses.",
"status": "active",
"attachment_file_name": "",
"flat_amount": 500,
"is_description_required": false,
"is_receipt_required": false,
"is_maximum_amount_required": false,
"receipt_required_amount": 500,
"maximum_allowed_amount": 1000,
"created_time": "2011-10-19T23:19:28-0700",
"is_custom": false,
"is_mileage": false,
"has_transaction": false,
"category_icon": "travel",
"last_modified_time": "2017-02-28T17:01:02+0530",
"can_override_settings": false,
"can_delete": true,
"category_type": "expense",
"is_enabled": true,
"parent_account_id": "16367000000106279",
"parent_account_name": "expense"
}
Create an expense category
Create a new expense category.
OAuth Scope : ZohoExpense.expensecategory.CREATE
Arguments
Headers
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("X-com-zoho-expense-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/expense/v1/expensecategories"
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/expensecategories")
.post(body)
.addHeader("X-com-zoho-expense-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-expense-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/expense/v1/expensecategories', 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",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/expense/v1/expensecategories", 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/expensecategories",
"headers": {
"X-com-zoho-expense-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/expense/v1/expensecategories \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-expense-organizationid: 10234695' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"category_name": "Air Travel Expense",
"gl_code": "air01",
"description": "Expenses on business travels like hotel booking charges, flight charges, etc. are recorded as travel expenses.",
"maximum_allowed_amount": 1000,
"receipt_required_amount": 500,
"flat_amount": 500,
"parent_account_id": "16367000000106279"
}
{
"code": 0,
"message": "The expense category has been created.",
"expense_category": {
"category_id": "16367000000000418",
"category_name": "Air Travel Expense",
"gl_code": "air01",
"description": "Expenses on business travels like hotel booking charges, flight charges, etc. are recorded as travel expenses.",
"status": "active",
"attachment_file_name": "",
"flat_amount": 500,
"is_description_required": false,
"is_receipt_required": false,
"is_maximum_amount_required": false,
"receipt_required_amount": 500,
"maximum_allowed_amount": 1000,
"created_time": "2011-10-19T23:19:28-0700",
"is_custom": false,
"is_mileage": false,
"has_transaction": false,
"category_icon": "travel",
"last_modified_time": "2017-02-28T17:01:02+0530",
"can_override_settings": false,
"can_delete": true,
"category_type": "expense",
"is_enabled": true,
"parent_account_id": "16367000000106279",
"parent_account_name": "expense"
}
}
List of expense categories
List of all active expense categories.
OAuth Scope : ZohoExpense.expensecategory.READ
Query Parameters
Headers
headers_data = Map();
headers_data.put("X-com-zoho-expense-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/expense/v1/expensecategories"
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/expensecategories")
.get()
.addHeader("X-com-zoho-expense-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
'X-com-zoho-expense-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/expense/v1/expensecategories', 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",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("GET", "/expense/v1/expensecategories", 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/expensecategories",
"headers": {
"X-com-zoho-expense-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/expense/v1/expensecategories \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-expense-organizationid: 10234695'
{
"code": 0,
"message": "success",
"expense_categories": [
{
"category_id": "16367000000000418",
"category_name": "Air Travel Expense",
"gl_code": "air01",
"description": "Expenses on business travels like hotel booking charges, flight charges, etc. are recorded as travel expenses.",
"status": "active",
"attachment_file_name": "",
"flat_amount": 500,
"is_maximum_amount_required": false,
"maximum_allowed_amount": 1000,
"is_description_required": false,
"is_receipt_required": false,
"is_mileage": false,
"is_perdiem_account": false,
"receipt_required_amount": 500,
"can_override_settings": false,
"is_custom": false,
"is_super_parent": false,
"is_enabled": true,
"category_icon": "travel",
"can_delete": true,
"category_type": "expense",
"parent_account_id": "16367000000106279",
"parent_account_name": "expense",
"depth": 0,
"is_child_present": false,
"child_count": ""
},
{...},
{...}
]
}
Update an expense category
Update the details of an existing expense category.
OAuth Scope : ZohoExpense.expensecategory.UPDATE
Arguments
Path Parameters
Headers
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("X-com-zoho-expense-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/expense/v1/expensecategories/16367000000000418"
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/expensecategories/16367000000000418")
.put(body)
.addHeader("X-com-zoho-expense-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-expense-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/expense/v1/expensecategories/16367000000000418', 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",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("PUT", "/expense/v1/expensecategories/16367000000000418", 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/expensecategories/16367000000000418",
"headers": {
"X-com-zoho-expense-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/expense/v1/expensecategories/16367000000000418 \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-expense-organizationid: 10234695' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"category_name": "Air Travel Expense",
"gl_code": "air01",
"description": "Expenses on business travels like hotel booking charges, flight charges, etc. are recorded as travel expenses.",
"maximum_allowed_amount": 1000,
"receipt_required_amount": 500,
"flat_amount": 500
}
{
"code": 0,
"message": "The details of the expense category has been updated.",
"expense_category": {
"category_id": "16367000000000418",
"category_name": "Air Travel Expense",
"gl_code": "air01",
"description": "Expenses on business travels like hotel booking charges, flight charges, etc. are recorded as travel expenses.",
"status": "active",
"attachment_file_name": "",
"flat_amount": 500,
"is_description_required": false,
"is_receipt_required": false,
"is_maximum_amount_required": false,
"receipt_required_amount": 500,
"maximum_allowed_amount": 1000,
"created_time": "2011-10-19T23:19:28-0700",
"is_custom": false,
"is_mileage": false,
"has_transaction": false,
"category_icon": "travel",
"last_modified_time": "2017-02-28T17:01:02+0530",
"can_override_settings": false,
"can_delete": true,
"category_type": "expense",
"is_enabled": true,
"parent_account_id": "16367000000106279",
"parent_account_name": "expense"
}
}
Retrieve details of an expense category
Details of an existing expense category.
OAuth Scope : ZohoExpense.expensecategory.READ
Path Parameters
Headers
headers_data = Map();
headers_data.put("X-com-zoho-expense-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/expense/v1/expensecategories/16367000000000418"
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/expensecategories/16367000000000418")
.get()
.addHeader("X-com-zoho-expense-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
'X-com-zoho-expense-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/expense/v1/expensecategories/16367000000000418', 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",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("GET", "/expense/v1/expensecategories/16367000000000418", 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/expensecategories/16367000000000418",
"headers": {
"X-com-zoho-expense-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/expense/v1/expensecategories/16367000000000418 \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-expense-organizationid: 10234695'
{
"code": 0,
"message": "success",
"expense_category": {
"category_id": "16367000000000418",
"category_name": "Air Travel Expense",
"gl_code": "air01",
"description": "Expenses on business travels like hotel booking charges, flight charges, etc. are recorded as travel expenses.",
"status": "active",
"attachment_file_name": "",
"flat_amount": 500,
"is_description_required": false,
"is_receipt_required": false,
"is_maximum_amount_required": false,
"receipt_required_amount": 500,
"maximum_allowed_amount": 1000,
"created_time": "2011-10-19T23:19:28-0700",
"is_custom": false,
"is_mileage": false,
"has_transaction": false,
"category_icon": "travel",
"last_modified_time": "2017-02-28T17:01:02+0530",
"can_override_settings": false,
"can_delete": true,
"category_type": "expense",
"is_enabled": true,
"parent_account_id": "16367000000106279",
"parent_account_name": "expense"
}
}
Delete an expense category
Delete an existing expense category.
OAuth Scope : ZohoExpense.expensecategory.DELETE
Path Parameters
Headers
headers_data = Map();
headers_data.put("X-com-zoho-expense-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/expense/v1/expensecategories/16367000000000418"
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/expensecategories/16367000000000418")
.delete(null)
.addHeader("X-com-zoho-expense-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'DELETE',
headers: {
'X-com-zoho-expense-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/expense/v1/expensecategories/16367000000000418', 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",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("DELETE", "/expense/v1/expensecategories/16367000000000418", 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/expensecategories/16367000000000418",
"headers": {
"X-com-zoho-expense-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/expense/v1/expensecategories/16367000000000418 \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-expense-organizationid: 10234695'
{
"code": 0,
"message": "The expense category has been deleted."
}
Enable an expense category
Enable an expense category.
OAuth Scope : ZohoExpense.expensecategory.CREATE
Path Parameters
Headers
headers_data = Map();
headers_data.put("X-com-zoho-expense-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/expense/v1/expensecategories/16367000000000418/show"
type: POST
headers: headers_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/expense/v1/expensecategories/16367000000000418/show")
.post(null)
.addHeader("X-com-zoho-expense-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
'X-com-zoho-expense-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/expense/v1/expensecategories/16367000000000418/show', 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",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("POST", "/expense/v1/expensecategories/16367000000000418/show", headers=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/expensecategories/16367000000000418/show",
"headers": {
"X-com-zoho-expense-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 POST \
--url https://www.zohoapis.com/expense/v1/expensecategories/16367000000000418/show \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-expense-organizationid: 10234695'
{
"code": 0,
"message": "The expense category has been marked as active."
}
Disable an expense category
Disable an expense category.
OAuth Scope : ZohoExpense.expensecategory.CREATE
Path Parameters
Headers
headers_data = Map();
headers_data.put("X-com-zoho-expense-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/expense/v1/expensecategories/16367000000000418/hide"
type: POST
headers: headers_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/expense/v1/expensecategories/16367000000000418/hide")
.post(null)
.addHeader("X-com-zoho-expense-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
'X-com-zoho-expense-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/expense/v1/expensecategories/16367000000000418/hide', 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",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("POST", "/expense/v1/expensecategories/16367000000000418/hide", headers=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/expensecategories/16367000000000418/hide",
"headers": {
"X-com-zoho-expense-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 POST \
--url https://www.zohoapis.com/expense/v1/expensecategories/16367000000000418/hide \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-expense-organizationid: 10234695'
{
"code": 0,
"message": "The expense category has been marked as inactive."
}