API Docs
/
No Results Found
Currencies

Currencies

A currency entity allows you to maintain details of a currency.

Attribute

currency_id
long
Unique ID for currency generated by the server. This is used as an identifier.
currency_code
string
Currency code.
currency_name
string
Name of the currency.
currency_symbol
string
Symbol for the currency.
price_precision
integer
Precise amount upto n decimal points.
currency_format
string
Currency format.
is_base_currency
boolean
Whether it is the base currency. It can either be true or false.

Example

{ "currency_id": "16367000000000097", "currency_code": "USD", "currency_name": "USD- US Dollar", "currency_symbol": "$", "price_precision": 2, "currency_format": "1,234,567.89", "is_base_currency": false }

Create a currency

Create a currency.

Arguments

currency_code
string
(Required)
Currency code.
currency_name
string
Name of the currency.
currency_symbol
string
Symbol for the currency.
price_precision
integer
Precise amount upto n decimal points.
currency_format
string
(Required)
Currency format.

Request Example

Click to copy
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/currencies" 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/currencies") .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/currencies', 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/currencies", 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/currencies", "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/currencies \ --header 'X-com-zoho-expense-organizationid: 10234695' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "currency_code": "USD", "currency_name": "USD- US Dollar", "currency_symbol": "$", "price_precision": 2, "currency_format": "1,234,567.89" }

Response Example

{ "code": 0, "message": "The currency has been created.", "currency": { "currency_id": "16367000000000097", "currency_code": "USD", "currency_name": "USD- US Dollar", "currency_symbol": "$", "price_precision": 2, "currency_format": "1,234,567.89", "is_base_currency": false } }

Retrieve list of currencies

Details of all existing currencies.

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-expense-organizationid", "10234695"); response = invokeUrl [ url: "https://www.zohoapis.com/expense/v1/settings/currencies" 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/currencies") .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/currencies', 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/currencies", 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/currencies", "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/currencies \ --header 'X-com-zoho-expense-organizationid: 10234695'

Response Example

{ "code": 0, "message": "success", "currencies": [ { "currency_id": "16367000000000097", "currency_code": "USD", "currency_name": "USD- US Dollar", "currency_symbol": "$", "price_precision": 2, "currency_format": "1,234,567.89", "is_base_currency": false, "exchange_rate": 20.780488, "effective_date": "2009-01-27" }, {...}, {...} ] }

Update details of a currency

Update the details of an existing currency.

Arguments

currency_symbol
string
Symbol for the currency.
price_precision
integer
Precise amount upto n decimal points.
currency_format
string
(Required)
Currency format.

Request Example

Click to copy
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/currencies/16367000000000097" 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/currencies/16367000000000097") .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/currencies/16367000000000097', 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/currencies/16367000000000097", 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/currencies/16367000000000097", "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/currencies/16367000000000097 \ --header 'X-com-zoho-expense-organizationid: 10234695' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "currency_symbol": "$", "price_precision": 2, "currency_format": "1,234,567.89" }

Response Example

{ "code": 0, "message": "The currency details have been updated.", "currency": { "currency_id": "16367000000000097", "currency_code": "USD", "currency_name": "USD- US Dollar", "currency_symbol": "$", "price_precision": 2, "currency_format": "1,234,567.89" } }

Retrieve details of a currency

Details of an existing currency.

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-expense-organizationid", "10234695"); response = invokeUrl [ url: "https://www.zohoapis.com/expense/v1/settings/currencies/16367000000000097" 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/currencies/16367000000000097") .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/currencies/16367000000000097', 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/currencies/16367000000000097", 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/currencies/16367000000000097", "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/currencies/16367000000000097 \ --header 'X-com-zoho-expense-organizationid: 10234695'

Response Example

{ "code": 0, "message": "success.", "currency": { "currency_id": "16367000000000097", "currency_code": "USD", "currency_name": "USD- US Dollar", "currency_symbol": "$", "price_precision": 2, "currency_format": "1,234,567.89", "is_base_currency": false } }

Delete a currency

Delete an existing currency.

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-expense-organizationid", "10234695"); response = invokeUrl [ url: "https://www.zohoapis.com/expense/v1/settings/currencies/16367000000000097" 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/currencies/16367000000000097") .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/currencies/16367000000000097', 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/currencies/16367000000000097", 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/currencies/16367000000000097", "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/currencies/16367000000000097 \ --header 'X-com-zoho-expense-organizationid: 10234695'

Response Example

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