younifyd
Menu

Get Subscriptions

Get shopper consent preferences

GET/organizations/{organizationId}/subscriptions

Use it in a workflow

  1. Add a step and choose the Salesforce Commerce Cloud connector.
  2. Pick the Get Subscriptions action (under Shopper Consents).
  3. Fill in the fields below, then reference the result from later steps as {{getSubscriptions.response.data}}.

Request

Path parameters

organizationIdstringrequired

An identifier for the organization the request is being made by

Query parameters

siteIdstringrequired

The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.

localeoneOf

A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified.

tagsarray<string>

Optional parameter of 0 or more query string values which act as a filtering criteria. Multiple values are treated with `OR` logic, and absence of a value indicates no filtering by tag is desired.

expandarray<string>

Optional parameter to expand response with additional fields. Accepts an array of field names to include in the response. Currently supports: - "consentStatus": Include consent status information in the response Future expansions may include additional fields.

Default []

Response

Returns 200 with an object. Read it in later steps with {{getSubscriptions.response.data.<field>}}.

dataarray<object>
subscriptionIdstringrequired

Identifier for the communication subscription

channelsarray<string>required
consentStatusarray<object>3 fields

Array of subscription status entries for different channels

titlestring

The localized title of the subscription for shopper displays

subtitlestring

The localized subtitle of the subscription for shopper displays, may contain HTML markup

tagsarray<string>

Default []

consentTypestring

Type of consent subscription

One ofmarketinglegalDefault "marketing"

consentRequiredboolean

Whether this subscription is mandatory for the user

Default false

defaultStatusstring

Default consent status for this subscription

One ofopt_inopt_outDefault "opt_out"

json
{
  "data": [
    {
      "subscriptionId": "weekly-newsletter",
      "channels": [
        "email",
        "sms"
      ],
      "consentStatus": [
        {
          "channel": "email",
          "contactPointValue": "john.doe@example.com",
          "status": "opt_in"
        },
        {
          "channel": "sms",
          "contactPointValue": "+1 555 123 4567",
          "status": "opt_out"
        }
      ],
      "title": "Weekly Newsletter",
      "subtitle": "Stay informed about new features. <a href=\"https://example.com/features\">Learn more</a>",
      "tags": [
        "homepage_banner",
        "user_profile"
      ],
      "consentType": "marketing",
      "consentRequired": false,
      "defaultStatus": "opt_out"
    }
  ]
}

Need more? See the Salesforce Commerce Cloud guide for connection setup and behaviour shared by every action.