Add New Currencies
Purpose
To add new currencies to your organization.
Request URL
https://www.zohoapis.com/crm/v2/org/currencies
Request Method
POST
Scope
scope=ZohoCRM.settings.currencies.{operation_type}
Possible operation types |
---|
CREATE - Create currencies |
Request JSON
Attribute | Data Type | Mandatory | Description |
---|---|---|---|
decimal_separator | String | Yes | 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_separator | String | Yes | The thousand separator separates groups of thousands in a currency. It can be a Period, Comma, or Space, depending on the currency. |
decimal_places | Integer | Yes | Represents the number of decimal places allowed for the currency. It can be 0, 2, or 3. |
prefix_symbol | Boolean | No | Represents the position of the ISO code in the currency. true: Display ISO code before the currency value. false: Display ISO code after the currency value. |
name | String | Yes | Represents the name of the currency. |
iso_code | String | Yes | Represents the ISO code of the currency. |
symbol | String | Yes | Represents the symbol of the currency. |
exchange_rate | String | Yes | Represents the rate at which the currency has to be exchanged for home currency. |
is_active | Boolean | No | Represents the status of the currency. true: The currency is active. false: The currency is inactive. |
Possible Errors
HTTP Status | Error Code | Message | Reason |
---|---|---|---|
404 | INVALID_URL_PATTERN | Please check if the URL trying to access is a correct one. | The request URL has syntactical errors. |
400 | ACTIVE_STATE_LIMIT_EXCEEDED | Allowed active currency limit 10 reached. Please deactivate any one of the existing active currencies to create this currency | You already have ten active currencies. |
400 | INVALID_DATA | Currency name is invalid | You have specified an invalid currency name. Go to setup> Company Details> Under Currencies tab> Click Add> The Currency picklist will have valid currency names and ISO codes. |
400 | INVALID_DATA | ISO code is invalid | You have specified an invalid ISO code. Go to setup> Company Details> Under Currencies tab> Click Add> The Currency picklist will have valid currency names and ISO codes. |
400 | INVALID_DATA | Currency symbol is invalid. | You have specified an invalid currency symbol. |
400 | DUPLICATE_DATA | Duplicate value given for \"Isocode\" parameter. | The currency specified in the input JSON is already present. Even if the status of the currency is inactive, it will still be present in the list. |
403 | FEATURE_NOT_SUPPORTED | The multi-currency feature is not available except the Enterprise and higher editions. | The multi-currency feature is only available in Enterprise and Ultimate editions. |
Sample Request
Copiedcurl "https://www.zohoapis.com/crm/v2/org/currencies"
-X POST
-d input.json
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
Sample Input
Copied{
"currencies": [
{
"format": {
"decimal_separator": "Period",
"thousand_separator": "Comma",
"decimal_places": "2"
},
"prefix_symbol": true,
"name": "Saudi Riyal",
"iso_code": "SAR",
"symbol": "SR",
"exchange_rate": "1.0000000",
"is_active": true
}
]
}
Sample Response
Copied{
"currencies": [
{
"code": "SUCCESS",
"details": {
"id": "4150868000000780026"
},
"message": "The currency created successfully.",
"status": "success"
}
]
}