updateFragmentJavaScript
put
                    /ccadmin/v1/widgetDescriptors/{id}/element/{tag}/javascript
Update Fragment Java Script. Updates the fragment template  widget /{id}/element/{tag}/template
                Request
Supported Media Types
                - application/json
Path Parameters
                - 
                    id: string
                    
                    the id of the widget
- 
                    tag: string
                    
                    the id of the element to be updated
Root Schema : updateFragmentJavaScript_request
    
      Type: 
      
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        Show Source
        object- 
            code: 
            object  code
            
            the code element
Example:
    
    
{
    "code":{
        "javascript":"define(\n\n['knockout'],\n\nfunction(ko)\n{\n\n'use strict'; \n return {\n currentDate: ko.observable(new Date()),\n\n onLoad:function(widget) {\n \n}\n};\n}\n);"
    }
}Nested Schema : code
    
      Type: 
      
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    objectthe code element
    
    
    
    
        Show Source
        - 
            javascript: 
            string
            the new javascript code
Response
Supported Media Types
                - application/json
200 Response
Following model is returned when operation succeeds.
                
                
                    Root Schema : updateFragmentJavaScript_response
    
      Type: 
      
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        Show Source
        object- 
            result: 
            boolean
            the result of the update true - successful
Example Response (application/json)
                    {
    "result":true,
    "links":[
        {
            "rel":"self",
            "href":"http://localhost:9080/ccadminui/v1/widgets/superTestWidget_v1/element/super-mailing-list-element/javascript"
        }
    ]
}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|
|------------------|------------------|
|37010|The JavaScript editable flag for this widget is set to false|
|37011|The widget does not have a fragment with that name|
|37007|Could not update the fragment Javascript|
|37009|No widget with that ID was found|
                
                
                    Root Schema : errorModel
    
      Type: 
      
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        Show Source
        object- 
            devMessage(optional): 
            string
            An optional non-localized message containing technical information for developers
- 
            errorCode(optional): 
            string
            The numerical code identifying the error
- 
            errors(optional): 
            array  errors
            
            An optional list of errors if multiple errors were encountered
- 
            message(optional): 
            string
            The localized message describing the error
- 
            moreInfo(optional): 
            string
            An optional non-localized message with more information
- 
            o:errorPath(optional): 
            string
            An optional machine readable description of where the error occurred
- 
            status(optional): 
            string
            The HTTP status code
- 
            type(optional): 
            string
            The URI to the HTTP state code definition
Nested Schema : errors
    
      
      Type: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    arrayAn optional list of errors if multiple errors were encountered
    
    
    
    
    
        Show Source
        
        
    
    
    
    
    
    
Nested Schema : items
    
      Type: 
      
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        Show Source
        object- 
            devMessage(optional): 
            string
            An optional non-localized message containing technical information for developers
- 
            errorCode(optional): 
            string
            The numerical code identifying the error
- 
            message(optional): 
            string
            The localized message describing the error
- 
            moreInfo(optional): 
            string
            An optional non-localized message with more information
- 
            o:errorPath(optional): 
            string
            An optional machine readable description of where the error occurred
- 
            status(optional): 
            string
            The HTTP status code