listAudiences

get

/ccadmin/v1/audiences

List Audiences. This operation is used to get the collection of Audiences. By default only the displayName, description, id, and enabled properties will be returned for each Audience in the list. The fields parameter can be used to specify other properties to return. For example, to include the ID and Rule Set for each Audience in the list, you can send a GET request to /ccadminui/v1/audiences?fields=items.id,items.ruleSet.

Request

Supported Media Types
Query Parameters
  • This excludes audiences which includes cart rules from the list of audiences. Default value is false.
  • This controls which fields are returned in the response body. For example, to include the ID and Rule Set for each Audience in the list, you can send fields=items.id,items.ruleSet.
  • This is the field to specify the number of records to be fetched per REST call.
  • This field specifies the offset/starting index from which data to be fetched.
  • This field specifies the query used to limit Audiences.
  • This field specifies the sort order of the list to be fetched.
  • Indicates if the total results should be included in the response.
Header Parameters
Back to Top

Response

Supported Media Types

200 Response

Following model is returned when operation succeeds.
Body ()
Root Schema : listAudiences_response
Type: object
Show Source
Nested Schema : items
Type: array
The returned list of items.
Show Source
Nested Schema : sort
Type: array
The sort used for the returned audiences.
Show Source
Nested Schema : items
Type: object
Show Source
  • Indicates if this audience is deleted.
  • The audience description.
  • The audience display name.
  • Indicates if this audience is enabled.
  • The audience Id.
  • ruleSet
    The audience rule set.
  • usage
    The array of audience consumers.
  • Indicates if this audience will be used in reporting.
  • Indicates the type of visitors the audience allows. visitorType must be one of the following: "ANONYMOUS" (users that have not been authenticated or soft logged in), "RECOGNIZED" (users that logged in before but, have not been authenticated in the current session), "AUTHENTICATED" (logged in users), "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: object
The audience rule set.
Show Source
Nested Schema : usage
Type: array
The array of audience consumers.
Show Source
Nested Schema : rules
Type: array
The array of rules that are contained in the rule set.
Show Source
Nested Schema : items
Type: object
Show Source
  • The category of the property, i.e. the user profile.
  • The operator applied to the rule property.
  • The property to be evaluated.
  • 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.
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Example Response (application/json)
{
    "q":"displayName co \"aud\" or description co \"aud\"",
    "totalResults":2,
    "offset":0,
    "limit":40,
    "sort":[
        {
            "property":"displayName",
            "order":"asc"
        }
    ],
    "items":[
        {
            "displayName":"Audience 1",
            "usage":[
                {
                    "assetTypeDisplayName":"Audiences",
                    "count":2,
                    "assetType":"audiences"
                },
                {
                    "assetTypeDisplayName":"Experiments",
                    "count":1,
                    "assetType":"experiments"
                },
                {
                    "assetTypeDisplayName":"Slots",
                    "count":3,
                    "assetType":"slots"
                }
            ],
            "ruleSet":{
                "rules":[
                    {
                        "property":"gender",
                        "category":"profile",
                        "value":"male",
                        "operator":"eq"
                    }
                ],
                "operator":"all"
            },
            "description":"blah blah blah",
            "id":"audience1"
        },
        {
            "displayName":"Audience 2",
            "usage":[
                {
                    "assetTypeDisplayName":"Audiences",
                    "count":2,
                    "assetType":"audiences"
                },
                {
                    "assetTypeDisplayName":"Promotions",
                    "count":1,
                    "assetType":"promotions"
                },
                {
                    "assetTypeDisplayName":"Slots",
                    "count":3,
                    "assetType":"slots"
                }
            ],
            "ruleSet":{
                "rules":[
                    {
                        "property":"shippingAddress.city",
                        "category":"profile",
                        "value":"San Francisco",
                        "operator":"eq"
                    }
                ],
                "operator":"all"
            },
            "description":"blah blah blah",
            "id":"audience2"
        }
    ]
}

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| |------------------|------------------| |54004|An error occurred accessing audiences with query {0}.| |85003|Invalid attribute in query: {}| |85000|q query param is not valid SCIM filter format|
Body ()
Root Schema : errorModel
Type: object
Show Source
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top