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
- audienceMembership
-
Type:
array
audienceMembershipAdditional Properties Allowed: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.
-
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:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - errors
-
Type:
array
errorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code - type
-
Type:
string
The URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code
Examples
Sample Response Payload returned by endpoint:
{"audienceMembership": [ "audience123", "audience345" ]}