{
  "$result_object_key":  [
    {
      "consent_type":  "opt_in",
      "content_types":  [
        "email",
        "sms_message"
      ],
      "default_translation":  {
        "description":  "Subscription to receive newsletters",
        "locale":  "en",
        "name":  "Newsletter Subscription"
      },
      "id":  "sub_12345",
      "state":  "live",
      "translations":  [
        {
          "description":  "Subscription to receive newsletters",
          "locale":  "en",
          "name":  "Newsletter Subscription"
        }
      ],
      "type":  "subscription"
    }
  ]
}
{
  "$result_object_key":  [
    {
      "consent_type":  "Describes the type of consent",
      "content_types":  "The message types that this subscription supports - can contain 'email' or 'sms_message'",
      "default_translation":  {
        "description":  "The description of the subscription type",
        "locale":  "The locale of the subscription type",
        "name":  "The name of the subscription type"
      },
      "id":  "The unique identifier representing the subscription type",
      "state":  "The state of the subscription type",
      "translations":  {
        "description":  "The description of the subscription type",
        "locale":  "The locale of the subscription type",
        "name":  "The name of the subscription type"
      },
      "type":  "The type of the object - subscription"
    }
  ]
}

Parameters

Action
Parameters
Contact ID
string

ID This field maps to the destination API contact_id field.

Subscriptions
Map<Subscription Type,string>

This field maps to the destination API subscriptions field.

{
  "$result_object_key":  [
    {
      "consent_type":  "opt_in",
      "content_types":  [
        "email",
        "sms_message"
      ],
      "default_translation":  {
        "description":  "Subscription to receive newsletters",
        "locale":  "en",
        "name":  "Newsletter Subscription"
      },
      "id":  "sub_12345",
      "state":  "live",
      "translations":  [
        {
          "description":  "Subscription to receive newsletters",
          "locale":  "en",
          "name":  "Newsletter Subscription"
        }
      ],
      "type":  "subscription"
    }
  ]
}
{
  "$result_object_key":  [
    {
      "consent_type":  "Describes the type of consent",
      "content_types":  "The message types that this subscription supports - can contain 'email' or 'sms_message'",
      "default_translation":  {
        "description":  "The description of the subscription type",
        "locale":  "The locale of the subscription type",
        "name":  "The name of the subscription type"
      },
      "id":  "The unique identifier representing the subscription type",
      "state":  "The state of the subscription type",
      "translations":  {
        "description":  "The description of the subscription type",
        "locale":  "The locale of the subscription type",
        "name":  "The name of the subscription type"
      },
      "type":  "The type of the object - subscription"
    }
  ]
}

Result Object Field Details

You can use the result of the action’s data as inputs to downstream workflow actions.

Each fetch action requires a result object key to be specified which will nest the action’s result data inside the downstream data context in the Workflow.

Here we demonstrate how to refer to this data using the prefix $result_object_key.

[]SubscriptionType
Fetch Action Response Object
type
string
required

The type of the object - subscription

CEL
$result_object_key[*].type
Example
"subscription"
id
string
required

The unique identifier representing the subscription type

CEL
$result_object_key[*].id
Example
"sub_12345"
state
string
required

The state of the subscription type

CEL
$result_object_key[*].state
Example
"live"
default_translation
object
required

A translation object contains the localized details of a subscription type

CEL
$result_object_key[*].default_translation
Example
{
"description":  "Subscription to receive newsletters",
"locale":  "en",
"name":  "Newsletter Subscription"
}
default_translation.name
string
required

The name of the subscription type

CEL
$result_object_key[*].default_translation.name
Example
"Newsletter Subscription"
default_translation.description
string

The description of the subscription type

CEL
$result_object_key[*].default_translation.description
Example
"Subscription to receive newsletters"
default_translation.locale
string
required

The locale of the subscription type

CEL
$result_object_key[*].default_translation.locale
Example
"en"
translations
object
required

An array of translations objects with the localized version of the subscription type in each available locale within your translation settings.

CEL
$result_object_key[*].translations
Example
[
{
"description":  "Subscription to receive newsletters",
"locale":  "en",
"name":  "Newsletter Subscription"
}
]
translations.map(x, x.name)
[]string
required

Mapped array of: The name of the subscription type

CEL
$result_object_key[*].translations.map(x, x.name)
Example
[
"Newsletter Subscription"
]
translations.map(x, x.description)
[]string
required

Mapped array of: The description of the subscription type

CEL
$result_object_key[*].translations.map(x, x.description)
Example
[
"Subscription to receive newsletters"
]
translations.map(x, x.locale)
[]string
required

Mapped array of: The locale of the subscription type

CEL
$result_object_key[*].translations.map(x, x.locale)
Example
[
"en"
]

Describes the type of consent

CEL
$result_object_key[*].consent_type
Example
"opt_in"
content_types
[]string
required

The message types that this subscription supports - can contain ‘email’ or ‘sms_message’

CEL
$result_object_key[*].content_types
Example
[
"email",
"sms_message"
]