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:
string
Required:true
The audience id.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : getAudience_response
- deleted
-
Type:
boolean
Indicates if this audience is deleted. - description
-
Type:
string
The audience description. - displayName
-
Type:
string
The audience display name. - enabled
-
Type:
boolean
Indicates if this audience is enabled. - id
-
Type:
string
The audience id. - ruleSet
-
Type:
object
ruleSetAdditional Properties Allowed:The audience rule set. - useInReports
-
Type:
boolean
Indicates if this audience will be used in reporting.
Nested Schema : ruleSet
Type:
object
The audience rule set.
- operator
-
Type:
string
The operator applied to all of the rules in the rule set. - rules
-
Type:
array
rulesAdditional Properties Allowed:An array of rules that make up the rule set.
Nested Schema : rules
Nested Schema : items
Type:
object
- category
-
Type:
string
The category of the property, i.e. the user profile. - operator
-
Type:
string
The operator applied to the rule property. - property
-
Type:
string
The property to be evaluated. - value
-
Type:
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.
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:
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 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" }