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: string
The audience id.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : getAudience_response
Type:
Show Source
object
-
deleted(optional):
boolean
Indicates if this audience is deleted.
-
description(optional):
string
The audience description.
-
displayName(optional):
string
The audience display name.
-
enabled(optional):
boolean
Indicates if this audience is enabled.
-
id(optional):
string
The audience id.
-
repositoryId(optional):
string
The repository id of the Audience.
-
ruleSet(optional):
object ruleSet
The audience rule set.
-
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
The type of visitors the audience allows. The value of visitorType must be one of the following: "ANONYMOUS" (users not authenticated or recognized), "RECOGNIZED" (users that logged in before and have not been authenticated yet), "AUTHENTICATED" (logged in users), "ANONYMOUS_OR_RECOGNIZED", "ANONYMOUS_OR_AUTHENTICATED", "REGISTERED" (users that have a login ), 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:
object
The audience rule set.
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",
"visitorType":"REGISTERED",
"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.|
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:
array
An 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