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:
stringRequired:trueThis parameter is a comma delimited ordered list of candidate Audience IDs the current user might be a member of.- match
Type:stringThis 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
- audienceMembership
-
Type:
arrayaudienceMembershipAdditional Properties Allowed:The subset of Audiences from the filter parameter which the user belongs to.
Nested Schema : audienceMembership
Type:
arrayThe subset of Audiences from the filter parameter which the user belongs to.
-
Type:
string
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- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - errors
-
Type:
arrayerrorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code - type
-
Type:
stringThe URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code
Examples
Sample Response Payload returned by endpoint:
{"audienceMembership": [
"audience123",
"audience345"
]}