Subscribe users via SOAP API

Learn how to create a newsletter service and subscribe a recipient use SOAP API calls.

Transcript
Hello, in this video we are going to create a hockey newsletter service, and subscribe the recipient to the service using SOAP API calls.
Let’s start by opening up our Postman environment, and create a copy of the Write POST request. After creating a copy, select the ellipses followed by renaming the request to Add service. Similar to how we added a recipient, we can add a service by providing the service details. We just need to change the key to name and the schema to service. Since this is a hockey newsletter let’s call it Hockey and provide the label, Newsletter Service.
The type needs to be set to zero, which maps to an email service. Once complete, send the request and a successful 200 response is returned. Swapping over to our Campaign instance, we can see that our new newsletter hockey service has been created. Now that we have a service, recipients can be added through subscriptions. To subscribe a user, we need to first import an XML file for the subscription API. Navigate to Data schemas, from the Explorer, and type subscription.
A list populates with subscriptions nms.
Using the namespace, and name of the data schema, we can quickly grab the SOAP XML from our browser. After copy and pasting the XML to a text document, import the text file into Postman and we’re provided a collection NmsSubscription.
Within this collection is an API POST request that allows us to submit a recipient’s details and the name of a service to subscribe users to the service.
Add your SessionToken, the name of the service and the following recipient details.
The bCreate, which is set to true, means that if the recipient doesn’t exist or the information we provide doesn’t match the recipients details, a new recipient will be made or the current details updated. Previously, we created a recipient under the name Steve James. Sending this API call, we have here, should override the last names details and subscribe Steve to the hockey subscription newsletter. Please note that it can take some time for a subscription to a user to update in Campaign. Going back to our Campaign instance, we can view either the recipient or the subscription to see if Steve is now subscribed to the hockey newsletter. For this demo I’m going to look at the service by selecting the service, followed by selecting the Subscriptions tab. We can see that Steve is now subscribed to our service. Thus, we are able to add users to services and remove them using the unsubscribe option within Postman.
You should now have an understanding of how to use SOAP APIs. We encourage you to try out integrating additional information and attributes or even explore some of the requests not covered in this course. Now that we know how the SOAP APIs work, we are ready to continue with the course and create a workflow to query, sort and send an email delivery to our subscribed users based on what subscriptions they have and when the content was last uploaded.
Thanks for watching. -

Continue to: Step 4 - Create a content digest with a workflow

recommendation-more-help
9e900eef-0452-4c55-9ea4-673b1f9853df