Subscriptions Object REST

Skip to end of metadata
Go to start of metadata

Lite Registration and Subscription Management are premium platforms that require separate activation. For inquiries, contact your Account Manager by filling a support form. You can access the support page by clicking Support on the upper menu after logging into your Gigya Console.

Description

The Subscription Object is used to pass information regarding a user's subscription status to a specific newsletter or service. The structure of the Subscriptions Object is as follows, where the available fields are listed below: 

subscriptions.<subscriptionID>.email.<field>

Where <subscriptionID> is the name of this subscription in your site's schema.

Subscriptions Object Data Members

FieldTypeDescription
<subscriptionID>JSON objectIncludes the email object, below.

 

Email Object Data Members

FieldTypeDescription
isSubscribedBooleanThe status of the user's subscription to this service.
tagsarray of stringsAn array of tags that you can define which are associated with the subscription.
lastUpdatedSubscriptionStatestringThe time when the isSubscribed value was last changed in ISO 8601 format, e.g., "2017-07-16T19:20:30Z".

 

Response Example

"subscriptions": {
	"test2sub": {
		"email": {
			"tags": [
				"social_user",
				"pet_dog"
			],
        	"lastUpdatedSubscriptionState": "2017-05-15T11:30:05.555Z",
			"isSubscribed": true
        }
    }
}

 

Nested Subscriptions

You can create a nested set of subscriptions by using a namespace when defining the subscriptionID to categorize different groups of subscriptions.

Below is an example response of nested subscriptions:

"subscriptions": {
	"petOwnerNewsletters.canineNewsletter": {
		"email": {
			"tags": [
				"social_user",
				"pets_dog"
			],
        	"lastUpdatedSubscriptionState": "2017-05-15T11:30:05.555Z",
			"isSubscribed": false
        }
    }
	"petOwnerNewsletters.felineNewsletter": {
		"email": {
			"tags": [
				"social_user",
				"pets_cat"
			],
        	"lastUpdatedSubscriptionState": "2017-05-15T11:30:05.555Z",
			"isSubscribed": true
        }
    }
	"petOwnerNewsletters.avianNewsletter": {
		"email": {
			"tags": [
				"social_user",
				"pets_bird"
			],
        	"lastUpdatedSubscriptionState": "2017-05-15T11:30:05.555Z",
			"isSubscribed": true
        }
    }
}

 

Additional Information

accounts.setSchema

 

  • No labels