listAudiences

get

/ccadmin/v1/audiences

List Audiences. This operation is used to get the collection of audiences from Oracle Commerce Cloud.

Request

Supported Media Types
  • application/json
Query Parameters
fields
Type: string
This controls which fields are returned in the response body. The default is to include the top-level response fields and the Audience id, displayName, description, and enabled fields.
limit
Type: integer
This is the field to specify the number of records to be fetched per REST call.
offset
Type: integer
This field specifies the offset/starting index from which data to be fetched.
q
Type: string
This field specifies the query used to limit Audiences.
sort
Type: string
This field specifies the sort order of the list to be fetched.
totalResults
Type: boolean
Indicates if the total results should be included in the response.

Response

Supported Media Types
  • application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : listAudiences_response
Nested Schema : items
Type: array
The returned list of items.
Nested Schema : sort
Type: object
The sort used for the returned audiences.
Nested Schema : items
Type: object
Nested Schema : ruleSet
Type: object
The audience rule set.
Nested Schema : usage
Type: array
The array of audience consumers.
Nested Schema : rules
Type: array
The array of rules that are contained in the rule set.
Nested Schema : items
Type: object
Nested Schema : items
Type: object
Example 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
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Nested Schema : items
Type: object

Examples

Sample Response Payload returned by endpoint:

{
  "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"
    }
  ]
}