# Get Communication Preferences v2.0Beta

The Get Communication Preferences endpoint retrieves the communication preferences and permissions for a customer profile. When a customer profile is created, we set default permissions for the profile. The list of permissions is dynamic and each brand could add or remove permissions or subscriptions over time.

# Request

GET /v2.0/customers/{profileKey}/preferences/communication

# Authorization

An OAuth 2.0 Bearer token with the Profile.Read scope is required. For more information, see Authentication.

# Path Parameters

A list of the supported path parameters is described below.

Name Required Type Description
profileKey true string The profile key for the customer. This value can be retrieved from the profileKey claim in the token returned from our SSO solution.

# Response

200
OK
Returns a Customer resource wrapped in an ApiResponse envelope.

# Response Body

The endpoint returns our ApiResponse envelope. The data property of the response will contain a CommunicationPreferences resource.

# CommunicationPreferences

A representation of customer permissions and preferences.

Name Required Type Description
profileKey true guid The unique profile key for customer.
profileBrandGroupKey true string The profile brand group that the customer profile is assigned to. The same person may have multiple, distinct profiles for different brands.
allowMarketing true boolean Indicates if the customer profile is enabled for marketing. This value is computed based on the individual permissions that are enabled for the customer profile.
permissions true CommunicationPermission[] The list of permissions for the customer.

# CommunicationPermission

Name Required Type Description
communicationType true string The permission type.
communicationName true string The permission name.
enabled true boolean If the permission is enabled for the customer or not.
displayName true string The display name for the permission.
sortOrder true number The display order or sort order to use when displaying the data.

# Sample

{
	"message": "The operation succeeded!",
	"notifications": [],
	"data": {
		"profileKey": "75b7726e-8416-4b13-a54a-b7fae6518b8f",
		"profileBrandGroupKey": "TEST-SPUR-PROFILE",
		"allowMarketing": true,
		"permissions": [
			{
				"communicationType": "MarketingPermission",
				"communicationName": "AllowMarketingEMAIL",
				"enabled": false,
				"displayName": "Email",
				"sortOrder": 1
			},
			{
				"communicationType": "MarketingPermission",
				"communicationName": "AllowMarketingSMS",
				"enabled": true,
				"displayName": "SMS",
				"sortOrder": 2
			},
			{
				"communicationType": "Subscription",
				"communicationName": "Newsletter",
				"enabled": false,
				"displayName": "Spur Steak Ranches News",
				"sortOrder": 1
			}
		]
	}
}
}

# Errors

The standard error responses apply.

401
Unauthorized
When authentication fails.
403
Forbidden
When authorisation fails.
404
Not Found
When the customer profile cannot be found.