Update Currencies
Purpose
To update the details of a currency.
Endpoints
- PUT /org/currencies/actions/enable
- PUT /org/currencies
- PUT /org/currencies/{currency_ID}
Request Details
Request URL
To update home currency:
{api-domain}/crm/{version}/org/currencies/actions/enable
To update currencies other than home currency:
{api-domain}/crm/{version}/org/currencies
To update a specific currency:
{api-domain}/crm/{version}/org/currencies/{currency_ID}
Header
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Scope
ZohoCRM.settings.currencies.{operation_type}
Possible operation types
UPDATE - Update currencies data
Sample Request
Copiedcurl "https://www.zohoapis.com/crm/v8/org/currencies/actions/enable"
-X PUT
-d input.json
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
In the request, "@input.json" contains the sample input data.
Note
- Using {api-domain}/crm/{version}/org/currencies/actions/enable you can update only the values of the base currency but not make another currency as the base currency.
- You cannot update the name and ISO code of the currencies.
Request JSON Keys
- idstring, mandatory
Specify the unique ID of the currency. Refer to the Get Currencies API to get the currency ID.
- exchange_ratestring, optional
Represents the rate at which the currency has to be exchanged with home currency. Accepts positive decimal numbers up to nine digits and nine decimal places. Example: 123456789.123456789.
- prefix_symbolBoolean, optional
Represents the position of the ISO code in the currency.
Possible Values:
- true - Display ISO code before the currency value. This is the default value.
- false - Display ISO code after the currency value.
- symbolstring, optional
Represents the symbol of the currency.
- is_activeBoolean, optional
Represents the status of the currency.
Possible Values:- true - The currency is active. This is the default value.
- false - The currency is inactive.
- formatJSON object, optional
Represents the format of the base currency with details like decimal_separator, thousand_separator, and decimal_places.
Keys in the "format" JSON Object
- decimal_separatorstring, optional
The decimal separator separates the integer part of the currency from its fractional part. It can be a Period or Comma, depending on the currency.
- thousand_separatorstring, optional
The thousand separator separates groups of thousands in a currency. It can be a Period, Comma, or Space, depending on the currency.
- decimal_placesinteger, optional
Represents the number of decimal places allowed for the currency. It can be 0, 2, and 3.
Sample Input to update base currency
Copied{
"base_currency": {
"symbol": "Af",
"format": {
"decimal_separator": "Period",
"thousand_separator": "Comma",
"decimal_places": "3"
},
"prefix_symbol": true,
"id": "111113000000038990",
"exchange_rate": "1.0000000"
}
}
Sample Input to update a currency
Copied{
"currencies": [
{
"id": "3652397000007472080",
"symbol": "$",
"is_active": false,
"exchange_rate": "85"
}
]
}
Possible Errors
- INVALID_DATAHTTP 400
You have specified an invalid currency ID.
Resolution: Use the Get Currencies API to get the right currency ID. - INVALID_DATAHTTP 400
The currency symbol is invalid.
Resolution: You have specified an invalid currency symbol. - FEATURE_NOT_SUPPORTEDHTTP 403
The multi-currency feature is not available except in the Enterprise and higher editions.
Resolution: Upgrade your edition or contact your system administrator. - FEATURE_NOT_ENABLEDHTTP 403
The multi-currency feature is not enabled.
Resolution: You can update currencies only after enabling the multi-currency feature. Refer to the Enable Multi-Currency API. - NOT_ALLOWEDHTTP 400
Thousand separator and decimal separator should not be equal.
Resolution: Specify different separators for thousands and decimals. - NOT_ALLOWEDHTTP 400
You are trying to change the base currency.
Resolution: You can update the values of base currency, but not change the base currency itself. - MANDATORY_NOT_FOUNDHTTP 400
You have not specified the "id" key in the input.
Resolution: Specify the unique ID of the currency in the input. Refer to Get Currencies API to get the unique ID of a currency. - INVALID_REQUEST_METHODHTTP 400
The request method is incorrect.
Resolution: Use the HTTP PUT method to make this API call. Any other request method will result in this error. - AUTHORIZATION_FAILEDHTTP 400
You do not have sufficient permission to update currencies.
Resolution: Contact your system administrator. - OAUTH_SCOPE_MISMATCHHTTP 401
The access token you have used to make this API call does not have the required scope.
Resolution: Generate a new access token with the scopes mentioned in the Scope section. - NO_PERMISSIONHTTP 403
You do not have permission to update currencies.
Resolution: Contact your system administrator. - INVALID_URL_PATTERNHTTP 404
The request URL is incorrect.
Resolution: Specify a valid request URL. Refer to the Request URL section for the right URL. - INTERNAL_ERRORHTTP 500
Unexpected and unhandled exception in the server.
Resolution: Contact the support team at support@zohocrm.com.
Sample Response
Copied{
"base_currency": {
"code": "SUCCESS",
"details": {
"id": "4150868000000780002"
},
"message": "The currency updated successfully",
"status": "success"
}
}