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: string
This parameter is a comma delimited ordered list of candidate Audience IDs the current user might be a member of.
-
match(optional): 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.
Root Schema : getAudienceMembership_response
Type:
Show Source
object
-
audienceMembership(optional):
array audienceMembership
The subset of Audiences from the filter parameter which the user belongs to.
Nested Schema : audienceMembership
Type:
array
The subset of Audiences from the filter parameter which the user belongs to.
Show Source
Example Response (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.|
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