Swift Digital Subscription API · SD API – Swift Digital Subscription API Step-by-step guide –...

14
Swift Digital Subscription API SD API Exported on 09/12/2018

Transcript of Swift Digital Subscription API · SD API – Swift Digital Subscription API Step-by-step guide –...

Page 1: Swift Digital Subscription API · SD API – Swift Digital Subscription API Step-by-step guide – 10 It will change the format into JSON. When the response will come it will look

Swift Digital Subscription APISD API

Exported on 09122018

SD API ndash Swift Digital Subscription API

ndash 2

Table of Contents

1 Step-by-step guide 3

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 3

1 Step-by-step guide

Getting Started

What is Swift Digital API

Where will it be used

How will it beneficial

Who is it for

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 4

Code Snippet

ltscript src= httpscodejquerycomjquery-1113minjsgtltscriptgtltscript type=textjavascriptgtfunction subscribeUser() frm = documentsubscribe var st = stEMAIL = frmelements[st[EMAIL]]value it stores the email id var cu = var gr = [zzzz5b7d06123abcde48] One or more mail group IDs separated by commas For more details please check to Step 6 Note st cu gr are objects where you can store data for API var my_micro_site = httpmicro site name here For more details please check to Step 7 $getJSON(my_micro_site + scriptssubscribesubscribephpcallback= st st cu cu gr gr st cu gr are query params for passing the data to the server

method skip Using method skip format json function(data) You will get the JSON response here consolelog(response from server) consolelog(data) By the help of consolelog() you can see the response )ltscriptgtltbutton onclick=subscribeUser()gtTestltbuttongt

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 5

Code Flow

Step 1 Load jQueryStandard jQuery loading process Use 15+

Step 2 Create a method that will capture subscriber actionltscript type=textjavascriptgtfunction subscribeUser()ltscriptgt

Step 3var st = Here var st is an object where you can add anything like stNAME this will store into var sr

Step 4stEMAIL = frmelements[st[EMAIL]]valueHere in stEMAIL you can assign your email address like this you can also assign other fieldsNow you have selected 5 fields first_name last_name email mobile countryfor example stFIRST_NAME = rdquoEnter First NamerdquostLAST_NAME = ldquoEnter Last NamerdquostEMAIL = ldquoEnter EmailrdquostMOBILE = ldquoEnter MobilerdquostCOUNTRY = rdquoCountryrdquo

As you can see For Example gt Go to Choose a Module Tab click on Mail HouseAfter login you will get this page after than please choose a Module name Mail House

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 6

gt After than click on Custom Fields you can find all the fields

Step 5var cu = this is an object where you can save values

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 7

Step 6var gr = [zzzz123456789012345]ORvar gr = [zzzz123456789012345 lsquozzzz12245673554322rsquo]gr is an object where you can put one or more than one mail group Id separated by commasNOTE st cu gr where you can store data for API

As you can see the example given below you can get the gr Id Please go through this linkgt Go to Mail House rarr click on any Mail Group rarr after that you can get the gr id on the url

After than choose the Current Folder name SDA flow Here you can create more than one mail group

Click on SDA flow and then you will get gr Id in the url

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 8

Step 7var my_micro_site = httpmicro site name hereIn my_micro_site you have to assign Publication URLYou will get the publication url from Administration Menu -gt Account Settings -gt Publication URLFor Example After login you will get like this gt Go to Choose a Module Tab click on Administration

gt Click on Account Settings

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 9

gt Then you will get the publication url

Step 8The getJSON function will send the request to the Swift Digital Suite You can process the Suites response in the callback function$getJSON(my_micro_site + scriptssubscribesubscribephpcallback=Here my_micro_site is your base urlscriptssubscribe is my sub parameter of APIsubscribephpcallback= this is your query params

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 10

It will change the format into JSONWhen the response will come it will look like this

Step 9st stcu cugr grHere st cu gr are query params for passing the data to the server

Step 10method skipusing method skip

Step 11Format is Jsonformat json

Step 12function(data) You got the success data into this dataBy the help of consolelog() you can check whats the output coming in your dataconsolelog(data)

Method Description

Method Description

skip This is the default behaviour If API call doesnt provide any value for method suite will automatically set this value If method is set to skip and email address already exists in Mail House than suite will take no action and ignore the request

createnew

If method is set to createnew than suite will create a new record (even if the email address already in Mail House) (Not Recommended at this point of time)

updateall

If method is set to updateall and email address already exists in Mail House than suite will update contacts data (first name last name title etc) and subscription (groups data)

updategroups

If method is set to updategroups and email address already exists in Mail House than suite will only update subscriptions (groups data)

updatefields

If method is set to updatefields and email address already exists in Mail House than suite will only update contacts data (first name last name title etc)

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 11

Response Codes and Messages

Code Message

000 Thank you for subscribing to our newsletter

101 Please enter your details to sign up for this e-newsletter

102 You have been previously unsubscribed from this e-newsletter Please use the update details feature to resubscribe

103 You are already subscribed to this e-newsletter

104 That doesnt appear to be a valid email

105 Unable to subscribe Please check your details and try again

106 Invalid attempt

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 12

1 httprootinfosolcom2 httprootinfosolcom

AppendixThis will require an additional parameter notify_subscription You will need to provide the email address that will receive the notification

Additional Parameters

ltscript src=httpscodejquerycomjquery-1113minjsgtltscriptgtltscript type=textjavascriptgtfunction subscribeUser() var st = stEMAIL = testgmailcom1 var cu = var gr = [zzzz123456789012345] One or more mail group IDs separated by commas var my_micro_site = httpinternalstagingswiftdigitalcomau $getJSON(my_micro_site + scriptssubscribesubscribephpcallback= st st cu cu gr gr notify_subscription notifygmailcom2 method skip format json function(data) consolelog(response from server) consolelog(data) )ltscriptgtltbutton onclick=subscribeUser()gtTestltbuttongt

How to get a double opt in email when user subscribe using this API

Parameter Description

double_opt_in

Set it to true if you want to use double-opt-in

double_opt_in_subject

This is an optional parameter Default value is ldquoPlease verify your email address to subscriberdquo However you can customize it as per your need

return_url The url that will be loaded once user confirm the subscription It can be an LP page URL or any Web URL

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 13

You will need to provide these parameters that will receive the double-opt-in email

ltscript src=httpscodejquerycomjquery-1113minjsgtltscriptgt ltscript type=textjavascriptgtfunction subscribeUser() frm = documentsubscribe var st = stFIRST_NAME = frmelements[st[FIRST_NAME]]value stLAST_NAME = frmelements[st[LAST_NAME]]value stEMAIL = frmelements[st[EMAIL]]value var cu = cucu_5796_TEST_1 = frmelements[cu[5796_TEST_1]]value

var gr = [zzzz51099b7689844611] $getJSON(httpinternalstagingswiftdigitalcomauscriptssubscribesubscribephpcallback= st st cu cu gr gr method updateall format json double_opt_in true double_opt_in_subject Click to confirm your subscription return_url httpinternalstagingswiftdigitalcomausubscriptionconfirmation function(data) consolelog(data) )ltscriptgt

How To Run on Postman

Step 1 Open Postman enter request URL httpinternalstagingswiftdigitalcomauscriptssubscribesubscribephp

then click on Paramsenter key and values after than click on Send button like given example

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 14

Related articlesbull Swift Digital Subscription API (see page 0)

After than you will get the result

  • Step-by-step guide
Page 2: Swift Digital Subscription API · SD API – Swift Digital Subscription API Step-by-step guide – 10 It will change the format into JSON. When the response will come it will look

SD API ndash Swift Digital Subscription API

ndash 2

Table of Contents

1 Step-by-step guide 3

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 3

1 Step-by-step guide

Getting Started

What is Swift Digital API

Where will it be used

How will it beneficial

Who is it for

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 4

Code Snippet

ltscript src= httpscodejquerycomjquery-1113minjsgtltscriptgtltscript type=textjavascriptgtfunction subscribeUser() frm = documentsubscribe var st = stEMAIL = frmelements[st[EMAIL]]value it stores the email id var cu = var gr = [zzzz5b7d06123abcde48] One or more mail group IDs separated by commas For more details please check to Step 6 Note st cu gr are objects where you can store data for API var my_micro_site = httpmicro site name here For more details please check to Step 7 $getJSON(my_micro_site + scriptssubscribesubscribephpcallback= st st cu cu gr gr st cu gr are query params for passing the data to the server

method skip Using method skip format json function(data) You will get the JSON response here consolelog(response from server) consolelog(data) By the help of consolelog() you can see the response )ltscriptgtltbutton onclick=subscribeUser()gtTestltbuttongt

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 5

Code Flow

Step 1 Load jQueryStandard jQuery loading process Use 15+

Step 2 Create a method that will capture subscriber actionltscript type=textjavascriptgtfunction subscribeUser()ltscriptgt

Step 3var st = Here var st is an object where you can add anything like stNAME this will store into var sr

Step 4stEMAIL = frmelements[st[EMAIL]]valueHere in stEMAIL you can assign your email address like this you can also assign other fieldsNow you have selected 5 fields first_name last_name email mobile countryfor example stFIRST_NAME = rdquoEnter First NamerdquostLAST_NAME = ldquoEnter Last NamerdquostEMAIL = ldquoEnter EmailrdquostMOBILE = ldquoEnter MobilerdquostCOUNTRY = rdquoCountryrdquo

As you can see For Example gt Go to Choose a Module Tab click on Mail HouseAfter login you will get this page after than please choose a Module name Mail House

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 6

gt After than click on Custom Fields you can find all the fields

Step 5var cu = this is an object where you can save values

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 7

Step 6var gr = [zzzz123456789012345]ORvar gr = [zzzz123456789012345 lsquozzzz12245673554322rsquo]gr is an object where you can put one or more than one mail group Id separated by commasNOTE st cu gr where you can store data for API

As you can see the example given below you can get the gr Id Please go through this linkgt Go to Mail House rarr click on any Mail Group rarr after that you can get the gr id on the url

After than choose the Current Folder name SDA flow Here you can create more than one mail group

Click on SDA flow and then you will get gr Id in the url

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 8

Step 7var my_micro_site = httpmicro site name hereIn my_micro_site you have to assign Publication URLYou will get the publication url from Administration Menu -gt Account Settings -gt Publication URLFor Example After login you will get like this gt Go to Choose a Module Tab click on Administration

gt Click on Account Settings

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 9

gt Then you will get the publication url

Step 8The getJSON function will send the request to the Swift Digital Suite You can process the Suites response in the callback function$getJSON(my_micro_site + scriptssubscribesubscribephpcallback=Here my_micro_site is your base urlscriptssubscribe is my sub parameter of APIsubscribephpcallback= this is your query params

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 10

It will change the format into JSONWhen the response will come it will look like this

Step 9st stcu cugr grHere st cu gr are query params for passing the data to the server

Step 10method skipusing method skip

Step 11Format is Jsonformat json

Step 12function(data) You got the success data into this dataBy the help of consolelog() you can check whats the output coming in your dataconsolelog(data)

Method Description

Method Description

skip This is the default behaviour If API call doesnt provide any value for method suite will automatically set this value If method is set to skip and email address already exists in Mail House than suite will take no action and ignore the request

createnew

If method is set to createnew than suite will create a new record (even if the email address already in Mail House) (Not Recommended at this point of time)

updateall

If method is set to updateall and email address already exists in Mail House than suite will update contacts data (first name last name title etc) and subscription (groups data)

updategroups

If method is set to updategroups and email address already exists in Mail House than suite will only update subscriptions (groups data)

updatefields

If method is set to updatefields and email address already exists in Mail House than suite will only update contacts data (first name last name title etc)

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 11

Response Codes and Messages

Code Message

000 Thank you for subscribing to our newsletter

101 Please enter your details to sign up for this e-newsletter

102 You have been previously unsubscribed from this e-newsletter Please use the update details feature to resubscribe

103 You are already subscribed to this e-newsletter

104 That doesnt appear to be a valid email

105 Unable to subscribe Please check your details and try again

106 Invalid attempt

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 12

1 httprootinfosolcom2 httprootinfosolcom

AppendixThis will require an additional parameter notify_subscription You will need to provide the email address that will receive the notification

Additional Parameters

ltscript src=httpscodejquerycomjquery-1113minjsgtltscriptgtltscript type=textjavascriptgtfunction subscribeUser() var st = stEMAIL = testgmailcom1 var cu = var gr = [zzzz123456789012345] One or more mail group IDs separated by commas var my_micro_site = httpinternalstagingswiftdigitalcomau $getJSON(my_micro_site + scriptssubscribesubscribephpcallback= st st cu cu gr gr notify_subscription notifygmailcom2 method skip format json function(data) consolelog(response from server) consolelog(data) )ltscriptgtltbutton onclick=subscribeUser()gtTestltbuttongt

How to get a double opt in email when user subscribe using this API

Parameter Description

double_opt_in

Set it to true if you want to use double-opt-in

double_opt_in_subject

This is an optional parameter Default value is ldquoPlease verify your email address to subscriberdquo However you can customize it as per your need

return_url The url that will be loaded once user confirm the subscription It can be an LP page URL or any Web URL

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 13

You will need to provide these parameters that will receive the double-opt-in email

ltscript src=httpscodejquerycomjquery-1113minjsgtltscriptgt ltscript type=textjavascriptgtfunction subscribeUser() frm = documentsubscribe var st = stFIRST_NAME = frmelements[st[FIRST_NAME]]value stLAST_NAME = frmelements[st[LAST_NAME]]value stEMAIL = frmelements[st[EMAIL]]value var cu = cucu_5796_TEST_1 = frmelements[cu[5796_TEST_1]]value

var gr = [zzzz51099b7689844611] $getJSON(httpinternalstagingswiftdigitalcomauscriptssubscribesubscribephpcallback= st st cu cu gr gr method updateall format json double_opt_in true double_opt_in_subject Click to confirm your subscription return_url httpinternalstagingswiftdigitalcomausubscriptionconfirmation function(data) consolelog(data) )ltscriptgt

How To Run on Postman

Step 1 Open Postman enter request URL httpinternalstagingswiftdigitalcomauscriptssubscribesubscribephp

then click on Paramsenter key and values after than click on Send button like given example

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 14

Related articlesbull Swift Digital Subscription API (see page 0)

After than you will get the result

  • Step-by-step guide
Page 3: Swift Digital Subscription API · SD API – Swift Digital Subscription API Step-by-step guide – 10 It will change the format into JSON. When the response will come it will look

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 3

1 Step-by-step guide

Getting Started

What is Swift Digital API

Where will it be used

How will it beneficial

Who is it for

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 4

Code Snippet

ltscript src= httpscodejquerycomjquery-1113minjsgtltscriptgtltscript type=textjavascriptgtfunction subscribeUser() frm = documentsubscribe var st = stEMAIL = frmelements[st[EMAIL]]value it stores the email id var cu = var gr = [zzzz5b7d06123abcde48] One or more mail group IDs separated by commas For more details please check to Step 6 Note st cu gr are objects where you can store data for API var my_micro_site = httpmicro site name here For more details please check to Step 7 $getJSON(my_micro_site + scriptssubscribesubscribephpcallback= st st cu cu gr gr st cu gr are query params for passing the data to the server

method skip Using method skip format json function(data) You will get the JSON response here consolelog(response from server) consolelog(data) By the help of consolelog() you can see the response )ltscriptgtltbutton onclick=subscribeUser()gtTestltbuttongt

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 5

Code Flow

Step 1 Load jQueryStandard jQuery loading process Use 15+

Step 2 Create a method that will capture subscriber actionltscript type=textjavascriptgtfunction subscribeUser()ltscriptgt

Step 3var st = Here var st is an object where you can add anything like stNAME this will store into var sr

Step 4stEMAIL = frmelements[st[EMAIL]]valueHere in stEMAIL you can assign your email address like this you can also assign other fieldsNow you have selected 5 fields first_name last_name email mobile countryfor example stFIRST_NAME = rdquoEnter First NamerdquostLAST_NAME = ldquoEnter Last NamerdquostEMAIL = ldquoEnter EmailrdquostMOBILE = ldquoEnter MobilerdquostCOUNTRY = rdquoCountryrdquo

As you can see For Example gt Go to Choose a Module Tab click on Mail HouseAfter login you will get this page after than please choose a Module name Mail House

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 6

gt After than click on Custom Fields you can find all the fields

Step 5var cu = this is an object where you can save values

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 7

Step 6var gr = [zzzz123456789012345]ORvar gr = [zzzz123456789012345 lsquozzzz12245673554322rsquo]gr is an object where you can put one or more than one mail group Id separated by commasNOTE st cu gr where you can store data for API

As you can see the example given below you can get the gr Id Please go through this linkgt Go to Mail House rarr click on any Mail Group rarr after that you can get the gr id on the url

After than choose the Current Folder name SDA flow Here you can create more than one mail group

Click on SDA flow and then you will get gr Id in the url

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 8

Step 7var my_micro_site = httpmicro site name hereIn my_micro_site you have to assign Publication URLYou will get the publication url from Administration Menu -gt Account Settings -gt Publication URLFor Example After login you will get like this gt Go to Choose a Module Tab click on Administration

gt Click on Account Settings

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 9

gt Then you will get the publication url

Step 8The getJSON function will send the request to the Swift Digital Suite You can process the Suites response in the callback function$getJSON(my_micro_site + scriptssubscribesubscribephpcallback=Here my_micro_site is your base urlscriptssubscribe is my sub parameter of APIsubscribephpcallback= this is your query params

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 10

It will change the format into JSONWhen the response will come it will look like this

Step 9st stcu cugr grHere st cu gr are query params for passing the data to the server

Step 10method skipusing method skip

Step 11Format is Jsonformat json

Step 12function(data) You got the success data into this dataBy the help of consolelog() you can check whats the output coming in your dataconsolelog(data)

Method Description

Method Description

skip This is the default behaviour If API call doesnt provide any value for method suite will automatically set this value If method is set to skip and email address already exists in Mail House than suite will take no action and ignore the request

createnew

If method is set to createnew than suite will create a new record (even if the email address already in Mail House) (Not Recommended at this point of time)

updateall

If method is set to updateall and email address already exists in Mail House than suite will update contacts data (first name last name title etc) and subscription (groups data)

updategroups

If method is set to updategroups and email address already exists in Mail House than suite will only update subscriptions (groups data)

updatefields

If method is set to updatefields and email address already exists in Mail House than suite will only update contacts data (first name last name title etc)

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 11

Response Codes and Messages

Code Message

000 Thank you for subscribing to our newsletter

101 Please enter your details to sign up for this e-newsletter

102 You have been previously unsubscribed from this e-newsletter Please use the update details feature to resubscribe

103 You are already subscribed to this e-newsletter

104 That doesnt appear to be a valid email

105 Unable to subscribe Please check your details and try again

106 Invalid attempt

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 12

1 httprootinfosolcom2 httprootinfosolcom

AppendixThis will require an additional parameter notify_subscription You will need to provide the email address that will receive the notification

Additional Parameters

ltscript src=httpscodejquerycomjquery-1113minjsgtltscriptgtltscript type=textjavascriptgtfunction subscribeUser() var st = stEMAIL = testgmailcom1 var cu = var gr = [zzzz123456789012345] One or more mail group IDs separated by commas var my_micro_site = httpinternalstagingswiftdigitalcomau $getJSON(my_micro_site + scriptssubscribesubscribephpcallback= st st cu cu gr gr notify_subscription notifygmailcom2 method skip format json function(data) consolelog(response from server) consolelog(data) )ltscriptgtltbutton onclick=subscribeUser()gtTestltbuttongt

How to get a double opt in email when user subscribe using this API

Parameter Description

double_opt_in

Set it to true if you want to use double-opt-in

double_opt_in_subject

This is an optional parameter Default value is ldquoPlease verify your email address to subscriberdquo However you can customize it as per your need

return_url The url that will be loaded once user confirm the subscription It can be an LP page URL or any Web URL

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 13

You will need to provide these parameters that will receive the double-opt-in email

ltscript src=httpscodejquerycomjquery-1113minjsgtltscriptgt ltscript type=textjavascriptgtfunction subscribeUser() frm = documentsubscribe var st = stFIRST_NAME = frmelements[st[FIRST_NAME]]value stLAST_NAME = frmelements[st[LAST_NAME]]value stEMAIL = frmelements[st[EMAIL]]value var cu = cucu_5796_TEST_1 = frmelements[cu[5796_TEST_1]]value

var gr = [zzzz51099b7689844611] $getJSON(httpinternalstagingswiftdigitalcomauscriptssubscribesubscribephpcallback= st st cu cu gr gr method updateall format json double_opt_in true double_opt_in_subject Click to confirm your subscription return_url httpinternalstagingswiftdigitalcomausubscriptionconfirmation function(data) consolelog(data) )ltscriptgt

How To Run on Postman

Step 1 Open Postman enter request URL httpinternalstagingswiftdigitalcomauscriptssubscribesubscribephp

then click on Paramsenter key and values after than click on Send button like given example

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 14

Related articlesbull Swift Digital Subscription API (see page 0)

After than you will get the result

  • Step-by-step guide
Page 4: Swift Digital Subscription API · SD API – Swift Digital Subscription API Step-by-step guide – 10 It will change the format into JSON. When the response will come it will look

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 4

Code Snippet

ltscript src= httpscodejquerycomjquery-1113minjsgtltscriptgtltscript type=textjavascriptgtfunction subscribeUser() frm = documentsubscribe var st = stEMAIL = frmelements[st[EMAIL]]value it stores the email id var cu = var gr = [zzzz5b7d06123abcde48] One or more mail group IDs separated by commas For more details please check to Step 6 Note st cu gr are objects where you can store data for API var my_micro_site = httpmicro site name here For more details please check to Step 7 $getJSON(my_micro_site + scriptssubscribesubscribephpcallback= st st cu cu gr gr st cu gr are query params for passing the data to the server

method skip Using method skip format json function(data) You will get the JSON response here consolelog(response from server) consolelog(data) By the help of consolelog() you can see the response )ltscriptgtltbutton onclick=subscribeUser()gtTestltbuttongt

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 5

Code Flow

Step 1 Load jQueryStandard jQuery loading process Use 15+

Step 2 Create a method that will capture subscriber actionltscript type=textjavascriptgtfunction subscribeUser()ltscriptgt

Step 3var st = Here var st is an object where you can add anything like stNAME this will store into var sr

Step 4stEMAIL = frmelements[st[EMAIL]]valueHere in stEMAIL you can assign your email address like this you can also assign other fieldsNow you have selected 5 fields first_name last_name email mobile countryfor example stFIRST_NAME = rdquoEnter First NamerdquostLAST_NAME = ldquoEnter Last NamerdquostEMAIL = ldquoEnter EmailrdquostMOBILE = ldquoEnter MobilerdquostCOUNTRY = rdquoCountryrdquo

As you can see For Example gt Go to Choose a Module Tab click on Mail HouseAfter login you will get this page after than please choose a Module name Mail House

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 6

gt After than click on Custom Fields you can find all the fields

Step 5var cu = this is an object where you can save values

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 7

Step 6var gr = [zzzz123456789012345]ORvar gr = [zzzz123456789012345 lsquozzzz12245673554322rsquo]gr is an object where you can put one or more than one mail group Id separated by commasNOTE st cu gr where you can store data for API

As you can see the example given below you can get the gr Id Please go through this linkgt Go to Mail House rarr click on any Mail Group rarr after that you can get the gr id on the url

After than choose the Current Folder name SDA flow Here you can create more than one mail group

Click on SDA flow and then you will get gr Id in the url

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 8

Step 7var my_micro_site = httpmicro site name hereIn my_micro_site you have to assign Publication URLYou will get the publication url from Administration Menu -gt Account Settings -gt Publication URLFor Example After login you will get like this gt Go to Choose a Module Tab click on Administration

gt Click on Account Settings

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 9

gt Then you will get the publication url

Step 8The getJSON function will send the request to the Swift Digital Suite You can process the Suites response in the callback function$getJSON(my_micro_site + scriptssubscribesubscribephpcallback=Here my_micro_site is your base urlscriptssubscribe is my sub parameter of APIsubscribephpcallback= this is your query params

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 10

It will change the format into JSONWhen the response will come it will look like this

Step 9st stcu cugr grHere st cu gr are query params for passing the data to the server

Step 10method skipusing method skip

Step 11Format is Jsonformat json

Step 12function(data) You got the success data into this dataBy the help of consolelog() you can check whats the output coming in your dataconsolelog(data)

Method Description

Method Description

skip This is the default behaviour If API call doesnt provide any value for method suite will automatically set this value If method is set to skip and email address already exists in Mail House than suite will take no action and ignore the request

createnew

If method is set to createnew than suite will create a new record (even if the email address already in Mail House) (Not Recommended at this point of time)

updateall

If method is set to updateall and email address already exists in Mail House than suite will update contacts data (first name last name title etc) and subscription (groups data)

updategroups

If method is set to updategroups and email address already exists in Mail House than suite will only update subscriptions (groups data)

updatefields

If method is set to updatefields and email address already exists in Mail House than suite will only update contacts data (first name last name title etc)

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 11

Response Codes and Messages

Code Message

000 Thank you for subscribing to our newsletter

101 Please enter your details to sign up for this e-newsletter

102 You have been previously unsubscribed from this e-newsletter Please use the update details feature to resubscribe

103 You are already subscribed to this e-newsletter

104 That doesnt appear to be a valid email

105 Unable to subscribe Please check your details and try again

106 Invalid attempt

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 12

1 httprootinfosolcom2 httprootinfosolcom

AppendixThis will require an additional parameter notify_subscription You will need to provide the email address that will receive the notification

Additional Parameters

ltscript src=httpscodejquerycomjquery-1113minjsgtltscriptgtltscript type=textjavascriptgtfunction subscribeUser() var st = stEMAIL = testgmailcom1 var cu = var gr = [zzzz123456789012345] One or more mail group IDs separated by commas var my_micro_site = httpinternalstagingswiftdigitalcomau $getJSON(my_micro_site + scriptssubscribesubscribephpcallback= st st cu cu gr gr notify_subscription notifygmailcom2 method skip format json function(data) consolelog(response from server) consolelog(data) )ltscriptgtltbutton onclick=subscribeUser()gtTestltbuttongt

How to get a double opt in email when user subscribe using this API

Parameter Description

double_opt_in

Set it to true if you want to use double-opt-in

double_opt_in_subject

This is an optional parameter Default value is ldquoPlease verify your email address to subscriberdquo However you can customize it as per your need

return_url The url that will be loaded once user confirm the subscription It can be an LP page URL or any Web URL

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 13

You will need to provide these parameters that will receive the double-opt-in email

ltscript src=httpscodejquerycomjquery-1113minjsgtltscriptgt ltscript type=textjavascriptgtfunction subscribeUser() frm = documentsubscribe var st = stFIRST_NAME = frmelements[st[FIRST_NAME]]value stLAST_NAME = frmelements[st[LAST_NAME]]value stEMAIL = frmelements[st[EMAIL]]value var cu = cucu_5796_TEST_1 = frmelements[cu[5796_TEST_1]]value

var gr = [zzzz51099b7689844611] $getJSON(httpinternalstagingswiftdigitalcomauscriptssubscribesubscribephpcallback= st st cu cu gr gr method updateall format json double_opt_in true double_opt_in_subject Click to confirm your subscription return_url httpinternalstagingswiftdigitalcomausubscriptionconfirmation function(data) consolelog(data) )ltscriptgt

How To Run on Postman

Step 1 Open Postman enter request URL httpinternalstagingswiftdigitalcomauscriptssubscribesubscribephp

then click on Paramsenter key and values after than click on Send button like given example

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 14

Related articlesbull Swift Digital Subscription API (see page 0)

After than you will get the result

  • Step-by-step guide
Page 5: Swift Digital Subscription API · SD API – Swift Digital Subscription API Step-by-step guide – 10 It will change the format into JSON. When the response will come it will look

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 5

Code Flow

Step 1 Load jQueryStandard jQuery loading process Use 15+

Step 2 Create a method that will capture subscriber actionltscript type=textjavascriptgtfunction subscribeUser()ltscriptgt

Step 3var st = Here var st is an object where you can add anything like stNAME this will store into var sr

Step 4stEMAIL = frmelements[st[EMAIL]]valueHere in stEMAIL you can assign your email address like this you can also assign other fieldsNow you have selected 5 fields first_name last_name email mobile countryfor example stFIRST_NAME = rdquoEnter First NamerdquostLAST_NAME = ldquoEnter Last NamerdquostEMAIL = ldquoEnter EmailrdquostMOBILE = ldquoEnter MobilerdquostCOUNTRY = rdquoCountryrdquo

As you can see For Example gt Go to Choose a Module Tab click on Mail HouseAfter login you will get this page after than please choose a Module name Mail House

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 6

gt After than click on Custom Fields you can find all the fields

Step 5var cu = this is an object where you can save values

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 7

Step 6var gr = [zzzz123456789012345]ORvar gr = [zzzz123456789012345 lsquozzzz12245673554322rsquo]gr is an object where you can put one or more than one mail group Id separated by commasNOTE st cu gr where you can store data for API

As you can see the example given below you can get the gr Id Please go through this linkgt Go to Mail House rarr click on any Mail Group rarr after that you can get the gr id on the url

After than choose the Current Folder name SDA flow Here you can create more than one mail group

Click on SDA flow and then you will get gr Id in the url

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 8

Step 7var my_micro_site = httpmicro site name hereIn my_micro_site you have to assign Publication URLYou will get the publication url from Administration Menu -gt Account Settings -gt Publication URLFor Example After login you will get like this gt Go to Choose a Module Tab click on Administration

gt Click on Account Settings

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 9

gt Then you will get the publication url

Step 8The getJSON function will send the request to the Swift Digital Suite You can process the Suites response in the callback function$getJSON(my_micro_site + scriptssubscribesubscribephpcallback=Here my_micro_site is your base urlscriptssubscribe is my sub parameter of APIsubscribephpcallback= this is your query params

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 10

It will change the format into JSONWhen the response will come it will look like this

Step 9st stcu cugr grHere st cu gr are query params for passing the data to the server

Step 10method skipusing method skip

Step 11Format is Jsonformat json

Step 12function(data) You got the success data into this dataBy the help of consolelog() you can check whats the output coming in your dataconsolelog(data)

Method Description

Method Description

skip This is the default behaviour If API call doesnt provide any value for method suite will automatically set this value If method is set to skip and email address already exists in Mail House than suite will take no action and ignore the request

createnew

If method is set to createnew than suite will create a new record (even if the email address already in Mail House) (Not Recommended at this point of time)

updateall

If method is set to updateall and email address already exists in Mail House than suite will update contacts data (first name last name title etc) and subscription (groups data)

updategroups

If method is set to updategroups and email address already exists in Mail House than suite will only update subscriptions (groups data)

updatefields

If method is set to updatefields and email address already exists in Mail House than suite will only update contacts data (first name last name title etc)

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 11

Response Codes and Messages

Code Message

000 Thank you for subscribing to our newsletter

101 Please enter your details to sign up for this e-newsletter

102 You have been previously unsubscribed from this e-newsletter Please use the update details feature to resubscribe

103 You are already subscribed to this e-newsletter

104 That doesnt appear to be a valid email

105 Unable to subscribe Please check your details and try again

106 Invalid attempt

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 12

1 httprootinfosolcom2 httprootinfosolcom

AppendixThis will require an additional parameter notify_subscription You will need to provide the email address that will receive the notification

Additional Parameters

ltscript src=httpscodejquerycomjquery-1113minjsgtltscriptgtltscript type=textjavascriptgtfunction subscribeUser() var st = stEMAIL = testgmailcom1 var cu = var gr = [zzzz123456789012345] One or more mail group IDs separated by commas var my_micro_site = httpinternalstagingswiftdigitalcomau $getJSON(my_micro_site + scriptssubscribesubscribephpcallback= st st cu cu gr gr notify_subscription notifygmailcom2 method skip format json function(data) consolelog(response from server) consolelog(data) )ltscriptgtltbutton onclick=subscribeUser()gtTestltbuttongt

How to get a double opt in email when user subscribe using this API

Parameter Description

double_opt_in

Set it to true if you want to use double-opt-in

double_opt_in_subject

This is an optional parameter Default value is ldquoPlease verify your email address to subscriberdquo However you can customize it as per your need

return_url The url that will be loaded once user confirm the subscription It can be an LP page URL or any Web URL

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 13

You will need to provide these parameters that will receive the double-opt-in email

ltscript src=httpscodejquerycomjquery-1113minjsgtltscriptgt ltscript type=textjavascriptgtfunction subscribeUser() frm = documentsubscribe var st = stFIRST_NAME = frmelements[st[FIRST_NAME]]value stLAST_NAME = frmelements[st[LAST_NAME]]value stEMAIL = frmelements[st[EMAIL]]value var cu = cucu_5796_TEST_1 = frmelements[cu[5796_TEST_1]]value

var gr = [zzzz51099b7689844611] $getJSON(httpinternalstagingswiftdigitalcomauscriptssubscribesubscribephpcallback= st st cu cu gr gr method updateall format json double_opt_in true double_opt_in_subject Click to confirm your subscription return_url httpinternalstagingswiftdigitalcomausubscriptionconfirmation function(data) consolelog(data) )ltscriptgt

How To Run on Postman

Step 1 Open Postman enter request URL httpinternalstagingswiftdigitalcomauscriptssubscribesubscribephp

then click on Paramsenter key and values after than click on Send button like given example

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 14

Related articlesbull Swift Digital Subscription API (see page 0)

After than you will get the result

  • Step-by-step guide
Page 6: Swift Digital Subscription API · SD API – Swift Digital Subscription API Step-by-step guide – 10 It will change the format into JSON. When the response will come it will look

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 6

gt After than click on Custom Fields you can find all the fields

Step 5var cu = this is an object where you can save values

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 7

Step 6var gr = [zzzz123456789012345]ORvar gr = [zzzz123456789012345 lsquozzzz12245673554322rsquo]gr is an object where you can put one or more than one mail group Id separated by commasNOTE st cu gr where you can store data for API

As you can see the example given below you can get the gr Id Please go through this linkgt Go to Mail House rarr click on any Mail Group rarr after that you can get the gr id on the url

After than choose the Current Folder name SDA flow Here you can create more than one mail group

Click on SDA flow and then you will get gr Id in the url

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 8

Step 7var my_micro_site = httpmicro site name hereIn my_micro_site you have to assign Publication URLYou will get the publication url from Administration Menu -gt Account Settings -gt Publication URLFor Example After login you will get like this gt Go to Choose a Module Tab click on Administration

gt Click on Account Settings

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 9

gt Then you will get the publication url

Step 8The getJSON function will send the request to the Swift Digital Suite You can process the Suites response in the callback function$getJSON(my_micro_site + scriptssubscribesubscribephpcallback=Here my_micro_site is your base urlscriptssubscribe is my sub parameter of APIsubscribephpcallback= this is your query params

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 10

It will change the format into JSONWhen the response will come it will look like this

Step 9st stcu cugr grHere st cu gr are query params for passing the data to the server

Step 10method skipusing method skip

Step 11Format is Jsonformat json

Step 12function(data) You got the success data into this dataBy the help of consolelog() you can check whats the output coming in your dataconsolelog(data)

Method Description

Method Description

skip This is the default behaviour If API call doesnt provide any value for method suite will automatically set this value If method is set to skip and email address already exists in Mail House than suite will take no action and ignore the request

createnew

If method is set to createnew than suite will create a new record (even if the email address already in Mail House) (Not Recommended at this point of time)

updateall

If method is set to updateall and email address already exists in Mail House than suite will update contacts data (first name last name title etc) and subscription (groups data)

updategroups

If method is set to updategroups and email address already exists in Mail House than suite will only update subscriptions (groups data)

updatefields

If method is set to updatefields and email address already exists in Mail House than suite will only update contacts data (first name last name title etc)

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 11

Response Codes and Messages

Code Message

000 Thank you for subscribing to our newsletter

101 Please enter your details to sign up for this e-newsletter

102 You have been previously unsubscribed from this e-newsletter Please use the update details feature to resubscribe

103 You are already subscribed to this e-newsletter

104 That doesnt appear to be a valid email

105 Unable to subscribe Please check your details and try again

106 Invalid attempt

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 12

1 httprootinfosolcom2 httprootinfosolcom

AppendixThis will require an additional parameter notify_subscription You will need to provide the email address that will receive the notification

Additional Parameters

ltscript src=httpscodejquerycomjquery-1113minjsgtltscriptgtltscript type=textjavascriptgtfunction subscribeUser() var st = stEMAIL = testgmailcom1 var cu = var gr = [zzzz123456789012345] One or more mail group IDs separated by commas var my_micro_site = httpinternalstagingswiftdigitalcomau $getJSON(my_micro_site + scriptssubscribesubscribephpcallback= st st cu cu gr gr notify_subscription notifygmailcom2 method skip format json function(data) consolelog(response from server) consolelog(data) )ltscriptgtltbutton onclick=subscribeUser()gtTestltbuttongt

How to get a double opt in email when user subscribe using this API

Parameter Description

double_opt_in

Set it to true if you want to use double-opt-in

double_opt_in_subject

This is an optional parameter Default value is ldquoPlease verify your email address to subscriberdquo However you can customize it as per your need

return_url The url that will be loaded once user confirm the subscription It can be an LP page URL or any Web URL

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 13

You will need to provide these parameters that will receive the double-opt-in email

ltscript src=httpscodejquerycomjquery-1113minjsgtltscriptgt ltscript type=textjavascriptgtfunction subscribeUser() frm = documentsubscribe var st = stFIRST_NAME = frmelements[st[FIRST_NAME]]value stLAST_NAME = frmelements[st[LAST_NAME]]value stEMAIL = frmelements[st[EMAIL]]value var cu = cucu_5796_TEST_1 = frmelements[cu[5796_TEST_1]]value

var gr = [zzzz51099b7689844611] $getJSON(httpinternalstagingswiftdigitalcomauscriptssubscribesubscribephpcallback= st st cu cu gr gr method updateall format json double_opt_in true double_opt_in_subject Click to confirm your subscription return_url httpinternalstagingswiftdigitalcomausubscriptionconfirmation function(data) consolelog(data) )ltscriptgt

How To Run on Postman

Step 1 Open Postman enter request URL httpinternalstagingswiftdigitalcomauscriptssubscribesubscribephp

then click on Paramsenter key and values after than click on Send button like given example

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 14

Related articlesbull Swift Digital Subscription API (see page 0)

After than you will get the result

  • Step-by-step guide
Page 7: Swift Digital Subscription API · SD API – Swift Digital Subscription API Step-by-step guide – 10 It will change the format into JSON. When the response will come it will look

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 7

Step 6var gr = [zzzz123456789012345]ORvar gr = [zzzz123456789012345 lsquozzzz12245673554322rsquo]gr is an object where you can put one or more than one mail group Id separated by commasNOTE st cu gr where you can store data for API

As you can see the example given below you can get the gr Id Please go through this linkgt Go to Mail House rarr click on any Mail Group rarr after that you can get the gr id on the url

After than choose the Current Folder name SDA flow Here you can create more than one mail group

Click on SDA flow and then you will get gr Id in the url

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 8

Step 7var my_micro_site = httpmicro site name hereIn my_micro_site you have to assign Publication URLYou will get the publication url from Administration Menu -gt Account Settings -gt Publication URLFor Example After login you will get like this gt Go to Choose a Module Tab click on Administration

gt Click on Account Settings

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 9

gt Then you will get the publication url

Step 8The getJSON function will send the request to the Swift Digital Suite You can process the Suites response in the callback function$getJSON(my_micro_site + scriptssubscribesubscribephpcallback=Here my_micro_site is your base urlscriptssubscribe is my sub parameter of APIsubscribephpcallback= this is your query params

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 10

It will change the format into JSONWhen the response will come it will look like this

Step 9st stcu cugr grHere st cu gr are query params for passing the data to the server

Step 10method skipusing method skip

Step 11Format is Jsonformat json

Step 12function(data) You got the success data into this dataBy the help of consolelog() you can check whats the output coming in your dataconsolelog(data)

Method Description

Method Description

skip This is the default behaviour If API call doesnt provide any value for method suite will automatically set this value If method is set to skip and email address already exists in Mail House than suite will take no action and ignore the request

createnew

If method is set to createnew than suite will create a new record (even if the email address already in Mail House) (Not Recommended at this point of time)

updateall

If method is set to updateall and email address already exists in Mail House than suite will update contacts data (first name last name title etc) and subscription (groups data)

updategroups

If method is set to updategroups and email address already exists in Mail House than suite will only update subscriptions (groups data)

updatefields

If method is set to updatefields and email address already exists in Mail House than suite will only update contacts data (first name last name title etc)

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 11

Response Codes and Messages

Code Message

000 Thank you for subscribing to our newsletter

101 Please enter your details to sign up for this e-newsletter

102 You have been previously unsubscribed from this e-newsletter Please use the update details feature to resubscribe

103 You are already subscribed to this e-newsletter

104 That doesnt appear to be a valid email

105 Unable to subscribe Please check your details and try again

106 Invalid attempt

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 12

1 httprootinfosolcom2 httprootinfosolcom

AppendixThis will require an additional parameter notify_subscription You will need to provide the email address that will receive the notification

Additional Parameters

ltscript src=httpscodejquerycomjquery-1113minjsgtltscriptgtltscript type=textjavascriptgtfunction subscribeUser() var st = stEMAIL = testgmailcom1 var cu = var gr = [zzzz123456789012345] One or more mail group IDs separated by commas var my_micro_site = httpinternalstagingswiftdigitalcomau $getJSON(my_micro_site + scriptssubscribesubscribephpcallback= st st cu cu gr gr notify_subscription notifygmailcom2 method skip format json function(data) consolelog(response from server) consolelog(data) )ltscriptgtltbutton onclick=subscribeUser()gtTestltbuttongt

How to get a double opt in email when user subscribe using this API

Parameter Description

double_opt_in

Set it to true if you want to use double-opt-in

double_opt_in_subject

This is an optional parameter Default value is ldquoPlease verify your email address to subscriberdquo However you can customize it as per your need

return_url The url that will be loaded once user confirm the subscription It can be an LP page URL or any Web URL

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 13

You will need to provide these parameters that will receive the double-opt-in email

ltscript src=httpscodejquerycomjquery-1113minjsgtltscriptgt ltscript type=textjavascriptgtfunction subscribeUser() frm = documentsubscribe var st = stFIRST_NAME = frmelements[st[FIRST_NAME]]value stLAST_NAME = frmelements[st[LAST_NAME]]value stEMAIL = frmelements[st[EMAIL]]value var cu = cucu_5796_TEST_1 = frmelements[cu[5796_TEST_1]]value

var gr = [zzzz51099b7689844611] $getJSON(httpinternalstagingswiftdigitalcomauscriptssubscribesubscribephpcallback= st st cu cu gr gr method updateall format json double_opt_in true double_opt_in_subject Click to confirm your subscription return_url httpinternalstagingswiftdigitalcomausubscriptionconfirmation function(data) consolelog(data) )ltscriptgt

How To Run on Postman

Step 1 Open Postman enter request URL httpinternalstagingswiftdigitalcomauscriptssubscribesubscribephp

then click on Paramsenter key and values after than click on Send button like given example

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 14

Related articlesbull Swift Digital Subscription API (see page 0)

After than you will get the result

  • Step-by-step guide
Page 8: Swift Digital Subscription API · SD API – Swift Digital Subscription API Step-by-step guide – 10 It will change the format into JSON. When the response will come it will look

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 8

Step 7var my_micro_site = httpmicro site name hereIn my_micro_site you have to assign Publication URLYou will get the publication url from Administration Menu -gt Account Settings -gt Publication URLFor Example After login you will get like this gt Go to Choose a Module Tab click on Administration

gt Click on Account Settings

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 9

gt Then you will get the publication url

Step 8The getJSON function will send the request to the Swift Digital Suite You can process the Suites response in the callback function$getJSON(my_micro_site + scriptssubscribesubscribephpcallback=Here my_micro_site is your base urlscriptssubscribe is my sub parameter of APIsubscribephpcallback= this is your query params

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 10

It will change the format into JSONWhen the response will come it will look like this

Step 9st stcu cugr grHere st cu gr are query params for passing the data to the server

Step 10method skipusing method skip

Step 11Format is Jsonformat json

Step 12function(data) You got the success data into this dataBy the help of consolelog() you can check whats the output coming in your dataconsolelog(data)

Method Description

Method Description

skip This is the default behaviour If API call doesnt provide any value for method suite will automatically set this value If method is set to skip and email address already exists in Mail House than suite will take no action and ignore the request

createnew

If method is set to createnew than suite will create a new record (even if the email address already in Mail House) (Not Recommended at this point of time)

updateall

If method is set to updateall and email address already exists in Mail House than suite will update contacts data (first name last name title etc) and subscription (groups data)

updategroups

If method is set to updategroups and email address already exists in Mail House than suite will only update subscriptions (groups data)

updatefields

If method is set to updatefields and email address already exists in Mail House than suite will only update contacts data (first name last name title etc)

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 11

Response Codes and Messages

Code Message

000 Thank you for subscribing to our newsletter

101 Please enter your details to sign up for this e-newsletter

102 You have been previously unsubscribed from this e-newsletter Please use the update details feature to resubscribe

103 You are already subscribed to this e-newsletter

104 That doesnt appear to be a valid email

105 Unable to subscribe Please check your details and try again

106 Invalid attempt

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 12

1 httprootinfosolcom2 httprootinfosolcom

AppendixThis will require an additional parameter notify_subscription You will need to provide the email address that will receive the notification

Additional Parameters

ltscript src=httpscodejquerycomjquery-1113minjsgtltscriptgtltscript type=textjavascriptgtfunction subscribeUser() var st = stEMAIL = testgmailcom1 var cu = var gr = [zzzz123456789012345] One or more mail group IDs separated by commas var my_micro_site = httpinternalstagingswiftdigitalcomau $getJSON(my_micro_site + scriptssubscribesubscribephpcallback= st st cu cu gr gr notify_subscription notifygmailcom2 method skip format json function(data) consolelog(response from server) consolelog(data) )ltscriptgtltbutton onclick=subscribeUser()gtTestltbuttongt

How to get a double opt in email when user subscribe using this API

Parameter Description

double_opt_in

Set it to true if you want to use double-opt-in

double_opt_in_subject

This is an optional parameter Default value is ldquoPlease verify your email address to subscriberdquo However you can customize it as per your need

return_url The url that will be loaded once user confirm the subscription It can be an LP page URL or any Web URL

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 13

You will need to provide these parameters that will receive the double-opt-in email

ltscript src=httpscodejquerycomjquery-1113minjsgtltscriptgt ltscript type=textjavascriptgtfunction subscribeUser() frm = documentsubscribe var st = stFIRST_NAME = frmelements[st[FIRST_NAME]]value stLAST_NAME = frmelements[st[LAST_NAME]]value stEMAIL = frmelements[st[EMAIL]]value var cu = cucu_5796_TEST_1 = frmelements[cu[5796_TEST_1]]value

var gr = [zzzz51099b7689844611] $getJSON(httpinternalstagingswiftdigitalcomauscriptssubscribesubscribephpcallback= st st cu cu gr gr method updateall format json double_opt_in true double_opt_in_subject Click to confirm your subscription return_url httpinternalstagingswiftdigitalcomausubscriptionconfirmation function(data) consolelog(data) )ltscriptgt

How To Run on Postman

Step 1 Open Postman enter request URL httpinternalstagingswiftdigitalcomauscriptssubscribesubscribephp

then click on Paramsenter key and values after than click on Send button like given example

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 14

Related articlesbull Swift Digital Subscription API (see page 0)

After than you will get the result

  • Step-by-step guide
Page 9: Swift Digital Subscription API · SD API – Swift Digital Subscription API Step-by-step guide – 10 It will change the format into JSON. When the response will come it will look

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 9

gt Then you will get the publication url

Step 8The getJSON function will send the request to the Swift Digital Suite You can process the Suites response in the callback function$getJSON(my_micro_site + scriptssubscribesubscribephpcallback=Here my_micro_site is your base urlscriptssubscribe is my sub parameter of APIsubscribephpcallback= this is your query params

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 10

It will change the format into JSONWhen the response will come it will look like this

Step 9st stcu cugr grHere st cu gr are query params for passing the data to the server

Step 10method skipusing method skip

Step 11Format is Jsonformat json

Step 12function(data) You got the success data into this dataBy the help of consolelog() you can check whats the output coming in your dataconsolelog(data)

Method Description

Method Description

skip This is the default behaviour If API call doesnt provide any value for method suite will automatically set this value If method is set to skip and email address already exists in Mail House than suite will take no action and ignore the request

createnew

If method is set to createnew than suite will create a new record (even if the email address already in Mail House) (Not Recommended at this point of time)

updateall

If method is set to updateall and email address already exists in Mail House than suite will update contacts data (first name last name title etc) and subscription (groups data)

updategroups

If method is set to updategroups and email address already exists in Mail House than suite will only update subscriptions (groups data)

updatefields

If method is set to updatefields and email address already exists in Mail House than suite will only update contacts data (first name last name title etc)

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 11

Response Codes and Messages

Code Message

000 Thank you for subscribing to our newsletter

101 Please enter your details to sign up for this e-newsletter

102 You have been previously unsubscribed from this e-newsletter Please use the update details feature to resubscribe

103 You are already subscribed to this e-newsletter

104 That doesnt appear to be a valid email

105 Unable to subscribe Please check your details and try again

106 Invalid attempt

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 12

1 httprootinfosolcom2 httprootinfosolcom

AppendixThis will require an additional parameter notify_subscription You will need to provide the email address that will receive the notification

Additional Parameters

ltscript src=httpscodejquerycomjquery-1113minjsgtltscriptgtltscript type=textjavascriptgtfunction subscribeUser() var st = stEMAIL = testgmailcom1 var cu = var gr = [zzzz123456789012345] One or more mail group IDs separated by commas var my_micro_site = httpinternalstagingswiftdigitalcomau $getJSON(my_micro_site + scriptssubscribesubscribephpcallback= st st cu cu gr gr notify_subscription notifygmailcom2 method skip format json function(data) consolelog(response from server) consolelog(data) )ltscriptgtltbutton onclick=subscribeUser()gtTestltbuttongt

How to get a double opt in email when user subscribe using this API

Parameter Description

double_opt_in

Set it to true if you want to use double-opt-in

double_opt_in_subject

This is an optional parameter Default value is ldquoPlease verify your email address to subscriberdquo However you can customize it as per your need

return_url The url that will be loaded once user confirm the subscription It can be an LP page URL or any Web URL

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 13

You will need to provide these parameters that will receive the double-opt-in email

ltscript src=httpscodejquerycomjquery-1113minjsgtltscriptgt ltscript type=textjavascriptgtfunction subscribeUser() frm = documentsubscribe var st = stFIRST_NAME = frmelements[st[FIRST_NAME]]value stLAST_NAME = frmelements[st[LAST_NAME]]value stEMAIL = frmelements[st[EMAIL]]value var cu = cucu_5796_TEST_1 = frmelements[cu[5796_TEST_1]]value

var gr = [zzzz51099b7689844611] $getJSON(httpinternalstagingswiftdigitalcomauscriptssubscribesubscribephpcallback= st st cu cu gr gr method updateall format json double_opt_in true double_opt_in_subject Click to confirm your subscription return_url httpinternalstagingswiftdigitalcomausubscriptionconfirmation function(data) consolelog(data) )ltscriptgt

How To Run on Postman

Step 1 Open Postman enter request URL httpinternalstagingswiftdigitalcomauscriptssubscribesubscribephp

then click on Paramsenter key and values after than click on Send button like given example

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 14

Related articlesbull Swift Digital Subscription API (see page 0)

After than you will get the result

  • Step-by-step guide
Page 10: Swift Digital Subscription API · SD API – Swift Digital Subscription API Step-by-step guide – 10 It will change the format into JSON. When the response will come it will look

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 10

It will change the format into JSONWhen the response will come it will look like this

Step 9st stcu cugr grHere st cu gr are query params for passing the data to the server

Step 10method skipusing method skip

Step 11Format is Jsonformat json

Step 12function(data) You got the success data into this dataBy the help of consolelog() you can check whats the output coming in your dataconsolelog(data)

Method Description

Method Description

skip This is the default behaviour If API call doesnt provide any value for method suite will automatically set this value If method is set to skip and email address already exists in Mail House than suite will take no action and ignore the request

createnew

If method is set to createnew than suite will create a new record (even if the email address already in Mail House) (Not Recommended at this point of time)

updateall

If method is set to updateall and email address already exists in Mail House than suite will update contacts data (first name last name title etc) and subscription (groups data)

updategroups

If method is set to updategroups and email address already exists in Mail House than suite will only update subscriptions (groups data)

updatefields

If method is set to updatefields and email address already exists in Mail House than suite will only update contacts data (first name last name title etc)

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 11

Response Codes and Messages

Code Message

000 Thank you for subscribing to our newsletter

101 Please enter your details to sign up for this e-newsletter

102 You have been previously unsubscribed from this e-newsletter Please use the update details feature to resubscribe

103 You are already subscribed to this e-newsletter

104 That doesnt appear to be a valid email

105 Unable to subscribe Please check your details and try again

106 Invalid attempt

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 12

1 httprootinfosolcom2 httprootinfosolcom

AppendixThis will require an additional parameter notify_subscription You will need to provide the email address that will receive the notification

Additional Parameters

ltscript src=httpscodejquerycomjquery-1113minjsgtltscriptgtltscript type=textjavascriptgtfunction subscribeUser() var st = stEMAIL = testgmailcom1 var cu = var gr = [zzzz123456789012345] One or more mail group IDs separated by commas var my_micro_site = httpinternalstagingswiftdigitalcomau $getJSON(my_micro_site + scriptssubscribesubscribephpcallback= st st cu cu gr gr notify_subscription notifygmailcom2 method skip format json function(data) consolelog(response from server) consolelog(data) )ltscriptgtltbutton onclick=subscribeUser()gtTestltbuttongt

How to get a double opt in email when user subscribe using this API

Parameter Description

double_opt_in

Set it to true if you want to use double-opt-in

double_opt_in_subject

This is an optional parameter Default value is ldquoPlease verify your email address to subscriberdquo However you can customize it as per your need

return_url The url that will be loaded once user confirm the subscription It can be an LP page URL or any Web URL

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 13

You will need to provide these parameters that will receive the double-opt-in email

ltscript src=httpscodejquerycomjquery-1113minjsgtltscriptgt ltscript type=textjavascriptgtfunction subscribeUser() frm = documentsubscribe var st = stFIRST_NAME = frmelements[st[FIRST_NAME]]value stLAST_NAME = frmelements[st[LAST_NAME]]value stEMAIL = frmelements[st[EMAIL]]value var cu = cucu_5796_TEST_1 = frmelements[cu[5796_TEST_1]]value

var gr = [zzzz51099b7689844611] $getJSON(httpinternalstagingswiftdigitalcomauscriptssubscribesubscribephpcallback= st st cu cu gr gr method updateall format json double_opt_in true double_opt_in_subject Click to confirm your subscription return_url httpinternalstagingswiftdigitalcomausubscriptionconfirmation function(data) consolelog(data) )ltscriptgt

How To Run on Postman

Step 1 Open Postman enter request URL httpinternalstagingswiftdigitalcomauscriptssubscribesubscribephp

then click on Paramsenter key and values after than click on Send button like given example

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 14

Related articlesbull Swift Digital Subscription API (see page 0)

After than you will get the result

  • Step-by-step guide
Page 11: Swift Digital Subscription API · SD API – Swift Digital Subscription API Step-by-step guide – 10 It will change the format into JSON. When the response will come it will look

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 11

Response Codes and Messages

Code Message

000 Thank you for subscribing to our newsletter

101 Please enter your details to sign up for this e-newsletter

102 You have been previously unsubscribed from this e-newsletter Please use the update details feature to resubscribe

103 You are already subscribed to this e-newsletter

104 That doesnt appear to be a valid email

105 Unable to subscribe Please check your details and try again

106 Invalid attempt

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 12

1 httprootinfosolcom2 httprootinfosolcom

AppendixThis will require an additional parameter notify_subscription You will need to provide the email address that will receive the notification

Additional Parameters

ltscript src=httpscodejquerycomjquery-1113minjsgtltscriptgtltscript type=textjavascriptgtfunction subscribeUser() var st = stEMAIL = testgmailcom1 var cu = var gr = [zzzz123456789012345] One or more mail group IDs separated by commas var my_micro_site = httpinternalstagingswiftdigitalcomau $getJSON(my_micro_site + scriptssubscribesubscribephpcallback= st st cu cu gr gr notify_subscription notifygmailcom2 method skip format json function(data) consolelog(response from server) consolelog(data) )ltscriptgtltbutton onclick=subscribeUser()gtTestltbuttongt

How to get a double opt in email when user subscribe using this API

Parameter Description

double_opt_in

Set it to true if you want to use double-opt-in

double_opt_in_subject

This is an optional parameter Default value is ldquoPlease verify your email address to subscriberdquo However you can customize it as per your need

return_url The url that will be loaded once user confirm the subscription It can be an LP page URL or any Web URL

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 13

You will need to provide these parameters that will receive the double-opt-in email

ltscript src=httpscodejquerycomjquery-1113minjsgtltscriptgt ltscript type=textjavascriptgtfunction subscribeUser() frm = documentsubscribe var st = stFIRST_NAME = frmelements[st[FIRST_NAME]]value stLAST_NAME = frmelements[st[LAST_NAME]]value stEMAIL = frmelements[st[EMAIL]]value var cu = cucu_5796_TEST_1 = frmelements[cu[5796_TEST_1]]value

var gr = [zzzz51099b7689844611] $getJSON(httpinternalstagingswiftdigitalcomauscriptssubscribesubscribephpcallback= st st cu cu gr gr method updateall format json double_opt_in true double_opt_in_subject Click to confirm your subscription return_url httpinternalstagingswiftdigitalcomausubscriptionconfirmation function(data) consolelog(data) )ltscriptgt

How To Run on Postman

Step 1 Open Postman enter request URL httpinternalstagingswiftdigitalcomauscriptssubscribesubscribephp

then click on Paramsenter key and values after than click on Send button like given example

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 14

Related articlesbull Swift Digital Subscription API (see page 0)

After than you will get the result

  • Step-by-step guide
Page 12: Swift Digital Subscription API · SD API – Swift Digital Subscription API Step-by-step guide – 10 It will change the format into JSON. When the response will come it will look

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 12

1 httprootinfosolcom2 httprootinfosolcom

AppendixThis will require an additional parameter notify_subscription You will need to provide the email address that will receive the notification

Additional Parameters

ltscript src=httpscodejquerycomjquery-1113minjsgtltscriptgtltscript type=textjavascriptgtfunction subscribeUser() var st = stEMAIL = testgmailcom1 var cu = var gr = [zzzz123456789012345] One or more mail group IDs separated by commas var my_micro_site = httpinternalstagingswiftdigitalcomau $getJSON(my_micro_site + scriptssubscribesubscribephpcallback= st st cu cu gr gr notify_subscription notifygmailcom2 method skip format json function(data) consolelog(response from server) consolelog(data) )ltscriptgtltbutton onclick=subscribeUser()gtTestltbuttongt

How to get a double opt in email when user subscribe using this API

Parameter Description

double_opt_in

Set it to true if you want to use double-opt-in

double_opt_in_subject

This is an optional parameter Default value is ldquoPlease verify your email address to subscriberdquo However you can customize it as per your need

return_url The url that will be loaded once user confirm the subscription It can be an LP page URL or any Web URL

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 13

You will need to provide these parameters that will receive the double-opt-in email

ltscript src=httpscodejquerycomjquery-1113minjsgtltscriptgt ltscript type=textjavascriptgtfunction subscribeUser() frm = documentsubscribe var st = stFIRST_NAME = frmelements[st[FIRST_NAME]]value stLAST_NAME = frmelements[st[LAST_NAME]]value stEMAIL = frmelements[st[EMAIL]]value var cu = cucu_5796_TEST_1 = frmelements[cu[5796_TEST_1]]value

var gr = [zzzz51099b7689844611] $getJSON(httpinternalstagingswiftdigitalcomauscriptssubscribesubscribephpcallback= st st cu cu gr gr method updateall format json double_opt_in true double_opt_in_subject Click to confirm your subscription return_url httpinternalstagingswiftdigitalcomausubscriptionconfirmation function(data) consolelog(data) )ltscriptgt

How To Run on Postman

Step 1 Open Postman enter request URL httpinternalstagingswiftdigitalcomauscriptssubscribesubscribephp

then click on Paramsenter key and values after than click on Send button like given example

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 14

Related articlesbull Swift Digital Subscription API (see page 0)

After than you will get the result

  • Step-by-step guide
Page 13: Swift Digital Subscription API · SD API – Swift Digital Subscription API Step-by-step guide – 10 It will change the format into JSON. When the response will come it will look

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 13

You will need to provide these parameters that will receive the double-opt-in email

ltscript src=httpscodejquerycomjquery-1113minjsgtltscriptgt ltscript type=textjavascriptgtfunction subscribeUser() frm = documentsubscribe var st = stFIRST_NAME = frmelements[st[FIRST_NAME]]value stLAST_NAME = frmelements[st[LAST_NAME]]value stEMAIL = frmelements[st[EMAIL]]value var cu = cucu_5796_TEST_1 = frmelements[cu[5796_TEST_1]]value

var gr = [zzzz51099b7689844611] $getJSON(httpinternalstagingswiftdigitalcomauscriptssubscribesubscribephpcallback= st st cu cu gr gr method updateall format json double_opt_in true double_opt_in_subject Click to confirm your subscription return_url httpinternalstagingswiftdigitalcomausubscriptionconfirmation function(data) consolelog(data) )ltscriptgt

How To Run on Postman

Step 1 Open Postman enter request URL httpinternalstagingswiftdigitalcomauscriptssubscribesubscribephp

then click on Paramsenter key and values after than click on Send button like given example

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 14

Related articlesbull Swift Digital Subscription API (see page 0)

After than you will get the result

  • Step-by-step guide
Page 14: Swift Digital Subscription API · SD API – Swift Digital Subscription API Step-by-step guide – 10 It will change the format into JSON. When the response will come it will look

SD API ndash Swift Digital Subscription API

Step-by-step guide ndash 14

Related articlesbull Swift Digital Subscription API (see page 0)

After than you will get the result

  • Step-by-step guide