Whereas the Subscriber resource lets you list and change a subscriber's complete list of topic or category subscriptions, the Subscriptions resource lets you manage subscriptions at a granular level (i.e., one subscriber and topic/category pairing). You might use this resource, for example, to create a custom form or workflow for subscribers to sign up for new subscriptions or remove existing subscriptions.
One convenient thing about this resource is you can use the Add Subscriptions method to add a subscription for a subscriber that doesn't already exist in the system, effectively creating that subscriber record at the same time.
Method | Description | Required Permissions |
---|---|---|
Add a Subscription |
This method allows you to add topic subscriptions to a subscriber, creating the subscriber if they do not already exist. This is a lightweight version of our full Subscriber API set, and is meant to add subscriptions quickly to a subscriber, removing the complexity of adding the subscriber and reading in their subscriptions ahead of time. For example, you may want to capture email addresses on your website without transferring the subscriber to the GovDelivery servers to complete the full subscription flow. This call allows you to capture the subscriber's email address (or phone number) in any manner you choose. Then at a later time, you would asynchronously pass that email address and a collection of Subscription Topics to GovDelivery. Customers have implemented this methodology very successfully by using a queue in Drupal. |
|
Delete a Subscription |
The Delete Subscriptions method allows you to delete topic subscriptions for an existing subscriber. This is convenient because you can delete the description as long as you have the subscriber's email or wireless information, without having to look up or encode their subscriber ID. This method will not remove a subscriber; only their subscriptions. If you want to remove a subscriber profile, see the Delete Subscriber topic. |
|
<email> | The subscriber's email address. |
<phone> | The subscriber's phone number. |
<country-code> | The subscriber's country code. You can leave this blank to use the default country code set for your account, although we highly recommend setting the code (1 for United States, 44 for United Kingdom). To check the country code for your account, contact support@granicus.com |
<send-notification> | This field requires a value of either True or False and the type="boolean" attribute. Set this field to true send an email notification to the subscriber that their record has been updated. |
<topics> | This field must include the type="array" attribute. You will enter any topic for which you want the subscriber to be subscribed in each nested <topic> field. |
<code> | Enter the code of the topic for which the subscriber will receive updates. This field must be nested in a <topic> field, under the <topics> field. |
Was this page helpful? Can't find what you need? Let us know