updateCurrency
put
/ccadmin/v1/currencies/{id}
Update Currency. Endpoint for updating Currency which doesn't has a PriceListGroup.
Request
Supported Media Types
- application/json
Path Parameters
- id
-
Type:
string
Required:true
Currency ID corresponding to the currency to be updated.
Header Parameters
- X-CCAsset-Language
-
Type:
string
The asset language of the request. E.g., en,de,fr_CA.
Body Parameter
Root Schema : updateCurrency_request
{
"symbol":"POINTS"
}
- currencyCode
-
Type:
string
Non ISO 4217 Standard currency code and must be unique. Space is not allowed. - displayName
-
Type:
string
Readable name of the Currency. - fractionalDigits
-
Type:
integer
Number of digits to the right of the decimal point. Must greater than or equal to zero. - symbol
-
Type:
string
The currency symbol. Space is not allowed.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : updateCurrency_response
- currencyCode
-
Type:
string
currency code of Currency - currencyType
-
Type:
string
Type of Currency. - deleted
-
Type:
boolean
Indicates whether Currency is deleted - displayName
-
Type:
string
Readable name of the Currency - fractionalDigits
-
Type:
integer
fractionalDigits of Currency - numericCode
-
Type:
string
Numeric currency code of Currency - repositoryId
-
Type:
string
repositoryId of Currency - symbol
-
Type:
string
The currency symbol of Currency
Example application/json
{
"currencyType":"loyaltyPoints",
"symbol":"POINTS",
"deleted":false,
"displayName":"PTS",
"repositoryId":"points",
"fractionalDigits":2,
"currencyCode":"PTS",
"numericCode":null
}
Default Response
The error response.
The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud:
|Error Code|Description|
|------------------|------------------|
|80210|You can not update the currency {0} as Price List Group exists for it.|
|80011|The requested currency could not be found.|
|80203|The request to update the currency could not be performed.|
|80206|Format for {0} is incorrect. Please check the API documentation for more details.|
|80010|The request for currency was not valid.|
Body
Root Schema : errorModel
Type:
object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - errors
-
Type:
array
errorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code - type
-
Type:
string
The URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code
Examples
Sample Request:
{"symbol": "POINTS"}
Sample Response Payload returned by endpoint:
{ "currencyType": "loyaltyPoints", "symbol": "POINTS", "deleted": false, "displayName": "PTS", "repositoryId": "points", "fractionalDigits": 2, "currencyCode": "PTS", "numericCode": null }