updateAudience
put
                    /ccadmin/v1/audiences/{id}
Update Audience. This operation is used to update an audience in Oracle Commerce Cloud.
                Request
Supported Media Types
                - application/json
Path Parameters
                - 
                    id: string
                    
                    The audience id.
Root Schema : updateAudience_request
    
      Type: 
      
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        Show Source
        object- 
            description(optional): 
            string
            The Audience description.
- 
            displayName: 
            string
            The display name for the Audience.
- 
            enabled(optional): 
            boolean
            Indicates if this audience is enabled. Defaults to true.
- 
            ruleSet: 
            object  ruleSet
            
            The rule set for the Audience.
- 
            useInReports(optional): 
            boolean
            Indicates if this audience will be used in reporting. Defaults to false.
Example:
    
    
{
    "useInReports":"false",
    "displayName":"Audience One",
    "ruleSet":{
        "rules":[
            {
                "property":"user.gender",
                "category":"profile",
                "value":"male",
                "operator":"eq"
            }
        ],
        "operator":"all"
    },
    "description":"blah blah blah",
    "enabled":"true"
}Nested Schema : ruleSet
    
      Type: 
      
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    objectThe rule set for the Audience.
    
    
    
    
        Show Source
        - 
            operator: 
            string
            The operator applied to all of the rules in the rule set.
- 
            rules: 
            array  rules
            
            The array of rules that make up the rule set.
Nested Schema : items
    
      Type: 
      
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        Show Source
        object- 
            category: 
            string
            The category of the property, i.e. the user profile.
- 
            operator: 
            string
            The operator applied to the rule property.
- 
            property: 
            string
            The property to be evaluated.
- 
            value: 
            string
            The value used to compare against the property value to determine the rule result. Values can be strings, integers, doubles, floats, JSON objects or JSON arrays depending on the operator and how the property was described in the audienceRuleProperty endpoint. When mapping this field in Integration Cloud Service(ICS), the operators which expect string values alone can be used.
Response
Supported Media Types
                - application/json
200 Response
Following model is returned when operation succeeds.
                
                
                    Root Schema : updateAudience_response
    
      Type: 
      
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        Show Source
        object- 
            deleted(optional): 
            boolean
            Indicates if this audience is deleted.
- 
            description(optional): 
            string
            The Audience description.
- 
            displayName(optional): 
            string
            The display name for the Audience.
- 
            enabled(optional): 
            boolean
            Indicates if this audience is enabled.
- 
            id(optional): 
            string
            The id of the new Audience.
- 
            repositoryId(optional): 
            string
            The repository id of the Audience.
- 
            ruleSet(optional): 
            object  ruleSet
            
            The rule set for the Audience.
- 
            stateLastModified(optional): 
            integer
            The time the Audience state (i.e. created, deleted, or enabled) was last modified.
- 
            useInReports(optional): 
            boolean
            Indicates if this audience will be used in reporting.
- 
            visitorType(optional): 
            string
            Indicates the type of visitors the audience allows. visitorType must be one of the following: "ANONYMOUS", "RECOGNIZED", "AUTHENTICATED", "ANONYMOUS_OR_RECOGNIZED", "ANONYMOUS_OR_AUTHENTICATED", "REGISTERED", or "ALL". These correspond to various combinations of the options that appear in the UI (ANONYMOUS, RECOGNIZED, and AUTHENTICATED) where "REGISTERED" means the user selected RECOGNIZED and AUTHENTICATED and "ALL" means the user selected all three options.
Nested Schema : ruleSet
    
      Type: 
      
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    objectThe rule set for the Audience.
    
    
    
    
        Show Source
        - 
            operator(optional): 
            string
            The operator applied to all of the rules in the rule set.
- 
            rules(optional): 
            array  rules
            
            An array of rules that make up the rule set.
Nested Schema : items
    
      Type: 
      
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        Show Source
        object- 
            category(optional): 
            string
            The category of the property, i.e. the user profile.
- 
            operator(optional): 
            string
            The operator applied to the rule property.
- 
            property(optional): 
            string
            The property to be evaluated.
- 
            value(optional): 
            string
            The value used to compare against the property value to determine the rule result. Values can be strings, integers, doubles, floats, JSON objects or JSON arrays depending on the operator and how the property was described in the audienceRuleProperty endpoint. When mapping this field in Integration Cloud Service(ICS), the operators which expect string values alone can be used.
Example Response (application/json)
                    {
    "useInReports":"false",
    "deleted":"false",
    "displayName":"Audience One",
    "ruleSet":{
        "rules":[
            {
                "property":"user.gender",
                "category":"profile",
                "value":"male",
                "operator":"eq"
            }
        ],
        "operator":"all"
    },
    "description":"blah blah blah",
    "id":"audience1",
    "enabled":"true"
}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|
|------------------|------------------|
|54020|The value of an enumList rule must be an array.|
|54002|A non-empty audience name is required.|
|54013|The audience rule set is missing a top level operator.|
|54024|The audience ID must be 165 characters or less.|
|54012|The JSON description of the rule set {0} is invalid.|
|54023|Audience IDs must only contain the characters A-Z, a-z, and 0-9.|
|54022|The audience ID already exists.  Audience IDs must be unique.|
|54021|A non-empty audience ID is required.|
|54017|The rule set has valid JSON but a problem was encountered while translating to SGML.|
|54016|Audience rule at index {0} is invalid.|
|54004|An error occurred accessing audiences.|
|54015|The audience rule set rules array is missing or invalid.|
|54026|The audience description is too long.|
|54003|The audience name already exists.  Audience names must be unique.|
|54014|The top level operator {0} must be either any or all.|
|54025|The audience name is too long.|
|54009|The audience repository was not initialized.|
|54019|The operator {0} for an internalAudience rule must be either includesAny, notIncludesAny or includesAll.|
|54007|An error occurred rolling back an audiences transaction.|
|54018|The rule operator {0} is not supported.  Rule operators must be one of the following: eq, ne, isOneOf, isNotOneOf, contains, containsIgnoreCase, startsWith, startsWithIgnoreCase, endsWith, endsWithIgnoreCase, includesAny, includesAll, notIncludesAny.|
|54051|Rule {0} has invalid values.  The first value for the "between" operator must be less than the second value.|
|54049|Rule {0} has an invalid double value. Double values must be in the right format and between the max and min double values.|
|54047|Rule {0} has an invalid float value. Float values must be in the right format and between the max and min float values.|
|54050|Rule {0} has an invalid integer value. Integer values must be whole numbers between the max and min integer values.|
                
                
                    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