getAudienceMembership

get

/ccstore/v1/audienceMembership

Get Audience Membership. Given an ordered list of audiences, return the first audience the current profile belongs to, the subset of all audiences the current profile belongs to, or an indication that the current profile belongs to none of them. If the current profile doesn't belong to any Audiences in the list, a 204 No Content will be returned. If match=first is specified and there is a match, the returned audienceMembership array will only have one element.

Request

Supported Media Types
  • application/json
Query Parameters
filter
Type: string
Required: true
This parameter is a comma delimited ordered list of candidate Audience IDs the current user might be a member of.
match
Type: string
This parameter specifies whether to return all matched Audiences or just the first match. The only acceptable values are first or all. The default is all.

Response

Supported Media Types
  • application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : getAudienceMembership_response
Nested Schema : audienceMembership
Type: array
The subset of Audiences from the filter parameter which the user belongs to.
Example application/json

{
    "audienceMembership":[
        "audience123",
        "audience345"
    ]
}
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| |------------------|------------------| |54027|The value of the match parameter must be first or all.| |54029|The filter parameter is missing or invalid. Filter must be a comma delimited list of audience IDs, e.g. filter=audience1,audience2.|
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:

{"audienceMembership": [
  "audience123",
  "audience345"
]}