getAudience
get
/ccadmin/v1/audiences/{id}
Get Audience. This operation is used to get an audience from Oracle Commerce Cloud.
Request
Supported Media Types
- application/json
Path Parameters
- id
-
Type:
stringRequired:trueThe audience id.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : getAudience_response
- deleted
-
Type:
booleanIndicates if this audience is deleted. - description
-
Type:
stringThe audience description. - displayName
-
Type:
stringThe audience display name. - enabled
-
Type:
booleanIndicates if this audience is enabled. - id
-
Type:
stringThe audience id. - ruleSet
-
Type:
objectruleSetAdditional Properties Allowed:The audience rule set. - useInReports
-
Type:
booleanIndicates if this audience will be used in reporting.
Nested Schema : ruleSet
Type:
objectThe audience rule set.
- operator
-
Type:
stringThe operator applied to all of the rules in the rule set. - rules
-
Type:
arrayrulesAdditional Properties Allowed:An array of rules that make up the rule set.
Nested Schema : rules
Nested Schema : items
Type:
object- category
-
Type:
stringThe category of the property, i.e. the user profile. - operator
-
Type:
stringThe operator applied to the rule property. - property
-
Type:
stringThe property to be evaluated. - value
-
Type:
stringThe 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.
Example application/json
{
"useInReports":"false",
"deleted":"false",
"displayName":"Audience 1",
"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|
|------------------|------------------|
|54021|A non-empty audience ID is required.|
Body
Root Schema : errorModel
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - errors
-
Type:
arrayerrorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code - type
-
Type:
stringThe URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code
Examples
Sample Response Payload returned by endpoint:
{
"useInReports": "false",
"deleted": "false",
"displayName": "Audience 1",
"ruleSet": {
"rules": [{
"property": "user.gender",
"category": "profile",
"value": "male",
"operator": "eq"
}],
"operator": "all"
},
"description": "blah blah blah",
"id": "audience1",
"enabled": "true"
}