API: E-Blaster list creation, list management and sending emails.
Jimmy Brake Oct 15, 2006

This page allows you to create a list to hold email addresses, view email list names, upload email addresses to lists, create email blasts to be sent to email lists, list email blasts.

PROCESS
Create a user using create profile, using that user create a list(create_list), upload a list of email addresses(upload_list) and then create an email to be sent to that list(create_eblast).

COMMAND
create_list: Creates a new list.

FEEDBACK

a json packet with the list_id

ATTRIBUTES.http
list_name, owner_email
required attributes: list_name

ERRORS
must have a list name

example in python:

import urllib

# create a new email list
params = urllib.urlencode({'email':'you@your.com', 'password':'yourpass', 'code':'CMPNY', 'create_list':'yes', 'owner_email':'some@enduser.com', 'list_name':'The list name' })

f = urllib.urlopen("https://store.dwalliance.com/api/manage_lists.1.html?%s" % params)
print f.read()



COMMAND
update_list: Creates a new list.

FEEDBACK
a json packet with the list_id

ATTRIBUTES.http

list_name, list_id, owner_email
required attributes: list_name, list_id

ERRORS
must have a list name, list id, owner_email must be the same as the original owner

example in python:

import urllib

# create a new email list
params = urllib.urlencode({'email':'you@your.com', 'password':'yourpass', 'code':'CMPNY', 'create_list':'yes', 'owner_email':'some@enduser.com', 'list_name':'the new list name', 'list_id':'f83125e0abdab00fa01d3f86f24b0f40' })

f = urllib.urlopen("https://store.dwalliance.com/api/manage_lists.1.html?%s" % params)
print f.read()



COMMAND
view_lists: gets a list of email lists and their owners

FEEDBACK
a json packet with the lists

ATTRIBUTES
none

ERRORS
none

example in python:

import urllib

# create a new email list
params = urllib.urlencode({'email':'you@your.com', 'password':'yourpass', 'code':'CMPNY', 'create_list':'yes', 'owner_email':'some@enduser.com', 'view_lists':1 })

f = urllib.urlopen("https://store.dwalliance.com/api/manage_lists.1.html?%s" % params)
print f.read()



COMMAND
upload_list: upload a list of email addresses and json packets

FEEDBACK

inserted, updated and invalid emails
NOTE: we check the mx records for each email before we insert or update it

ATTRIBUTES.http

list_id, owner_email
required attributes: owner_email, list_id

ATTRIBUTES.json

list_data

ERRORS

must have a list id, owner_email and list data

example in php:

/************

Upload a list of email addresses and their associated variables.

************/

require_once('JSON.php');
$json = new Services_JSON();

// create the list

$list[email][0] = 'jimmy@dwalliance.com';
$list[vars][0] = $json->encode(array("first_name"=>"jimmy","last_name"=>"brake","comment"=>"something to say"));
$list[email][1] = 'linda@dwalliance.com';
$list[vars][1] = $json->encode(array("first_name"=>"lori","last_name"=>"smith","comment"=>"nothing to say"));
$list[email][2] = 'kent@dwalliance.com';
$list[vars][2] = '';
$list[email][3] = 'lauren@dwalliance.com';
$list[vars][3] = $json->encode(array("first_name"=>"lori","last_name"=>"smith","comment"=>"nothing to say"));

$list = urlencode($json->encode($list));

$url ="&email=anadmin@foo.com";
$url .="&password=yourpass";
$url .="&code=ISRG";
$url .="&upload_list=1";
$url .="&owner_email=jimmy@isurge.com";
$url .="&list_id=f83125e0abdab00fa01d3f979798786f24b0f40";
$url .="&list_data=$list";

$return = file("https://store.dwalliance.com/api/manage_lists.1.html?$url");
echo implode($return);

exit();
?>

Example in python:

import simplejson

# create the of emails and their variables

a = ["test@isurge.com"]
json = {"first_name":"test","last_name":"user","comment":"something to say"}
json = simplejson.dumps(json)
b = [json]

a.append("test2@isurge.com")
json = {"first_name":"test2","last_name":"user2","comment":"nothing to say"}
json = simplejson.dumps(json)
b.append(json)

a.append("test3@isurge.com")
json = {"":""}
json = simplejson.dumps(json)
b.append(json)

a.append("test4@isurge.com")
json = {"first_name":"test4","last_name":"user4","comment":"lots to say"}
json = simplejson.dumps(json)
b.append(json)

# create the dictionary to hold the two arrays

d = {}
d['email'] = a
d['vars'] = b

d = simplejson.dumps(d)

import urllib
params = urllib.urlencode({'email':'youradmin@email.com', 'password':'yourpass', 'code':'ISRG', 'upload_list':1, "owner_email":"jimmy@isurge.com", "list_id":"f83125e0abdab00fa01d3f86f24b0f40", "list_data":d })
f = urllib.urlopen("http://isurge.com/api/manage_lists.1.html?%s" % params)
print f.read()

 

COMMAND
create_eblast: create and schedule an eblast

FEEDBACK
success of insertion, urls that were found and will be tracked , email_message_id

ATTRIBUTES.http
list_id, owner_email, from_name, from_email, subject, text_body, date_to_send, html_body
required attributes: list_id, owner_email, from_name, from_email, subject, text_body, date_to_send

ERRORS
will error on any of the missing variables, will error if the list_id and owner_email are incorrect

WARNINGS
will warn if date_to_send is in the past

example in php:


$text_body = "hi
hi hi
http://yahoo.com
hji";

$html_body = "hi
hi hi
google.com
soogle.com
doogle.com
hoogle.com

V_COMMENT, V_FIRST_NAME, V_LAST_NAME, V_EMAIL

hji";

$subject = "hi hi";

// create the eblast

$url ="&email=ji@ge.com";
$url .="&password=97978";
$url .="&code=COMT";
$url .="&create_eblast=1";
$url .="&text_body=".urlencode($text_body)."";
$url .="&html_body=".urlencode($html_body)."";
$url .="&subject=".urlencode($subject)."";
$url .="&owner_email=jmy@ie.com";
$url .="&date_to_send=200610011730";
$url .="&list_id=f831ab00fa01d3f86f24b0f40";
$url .="&from_email=jmy@alliance.com";
$url .="&from_name=Jim+Bre";

$return = file("https://store.dwalliance.com/api/manage_lists.1.html?$url");
echo implode($return);

exit();
?>

Example in python:

import urllib

# text part of the message
text_body = '''hi
hi hi
http://yahoo.com
hji'''

#html part of the message
html_body = '''hi


hi hi


google.com

soogle.com

doogle.com

hoogle.com


V_COMMENT, V_FIRST_NAME, V_LAST_NAME, V_EMAIL

hji'''

# subject of the message
subject = "hi hi"

#from email address
from_email="someone@isurge.com"

#from email name
from_name="Test User"

#date to send
date_to_send="200610011730"

params = urllib.urlencode({'email':'youradmin@email.com', 'password':'yourpass', 'code':'ISRG', 'create_eblast':1, 'owner_email':'jimmy@isurge.com', 'list_id':'f83125e0abdab00fa01d3f86f24b0f40', 'text_body':text_body, 'html_body':html_body,'subject':subject, 'from_email':from_email, 'from_name':from_name, 'date_to_send':date_to_send })

f = urllib.urlopen("http://isurge.com/api/manage_lists.1.html?%s" % params)
print f.read()

 

COMMAND
list_eblast: will list all the eblasts

FEEDBACK
a list of owner_emails, email_message_ids, subjects, date_to_send, date created, list_ids

ATTRIBUTES.http
email_owner, list_id

REQUIRED
none

ERRORS
none

Example in python

import urllib

# this will list all email blasts
params = urllib.urlencode({'email':'youradmin@email.com', 'password':'yourpass', 'code':'ISRG', 'list_eblast':1 })

# this will list only the email blasts of a particular owner
#params = urllib.urlencode({'email':'youradmin@email.com', 'password':'yourpass', 'code':'ISRG', 'list_eblast':1, 'owner_email':'jimmy@isurge.com' })

# this will list only the email blasts of a specific list_id
#params = urllib.urlencode({'email':'youradmin@email.com', 'password':'yourpass', 'code':'ISRG', 'list_eblast':1, 'list_id':'f83125e0abdab00fa01d3f86f24b0f40' })

f = urllib.urlopen("https://store.dwalliance.com/api/manage_lists.1.html?%s" % params)

print f.read()

 

COMMAND

delete_eblast

 

FEEDBACK

a success message

 

ATTRIBUTES.http

owner_email, email_message_id

 

ERRORS

attempting to delete an eblast that is scheduled to be sent in the past, attempting to delete an email message that does not exist or is not owned by the owner_email

 

Example in python

import urllib

# this will delete an email blast
params = urllib.urlencode({'email':'youradmin@email.com', 'password':'yourpass', 'code':'ISRG', 'delete_eblast':1, 'owner_email':'jimmy@isurge.com', 'email_message_id':'d876fe4a73e4d97a46adfc3d843e4739' })

f = urllib.urlopen("https://store.dwalliance.com/api/manage_lists.1.html?%s" % params)

print f.read()

 

COMMAND

update_eblast

FEEDBACK
success of update, urls that were found and will be tracked , email_message_id

ATTRIBUTES.http
list_id, owner_email, from_name, from_email, subject, text_body, date_to_send, html_body
required attributes: list_id, owner_email, from_name, from_email, subject, text_body, date_to_send, email_message_id

ERRORS
will error on any of the missing variables, will error if the list_id and owner_email are incorrect

WARNINGS
will warn if date_to_send is in the past

import urllib

# text part of the message
text_body = '''hi
hi hi
http://yahoo.com
hji'''

#html part of the message
html_body = '''hi


hi hi


google.com

soogle.com

doogle.com

hoogle.com


V_COMMENT, V_FIRST_NAME, V_LAST_NAME, V_EMAIL

hji'''

# subject of the message
subject = "hi hi"

#from email address
from_email="someone@isurge.com"

#from email name
from_name="Test User"

#date to send
date_to_send="200710011730"

params = urllib.urlencode({'email':'youradmin@email.com', 'password':'yourpass', 'code':'ISRG', 'update_eblast':1, 'owner_email':'jimmy@isurge.com', 'list_id':'f83125e0abdab00fa01d3f86f24b0f40', 'email_message_id':'71dac48998b0eedd994450d16f8cd60d', 'text_body':text_body, 'html_body':html_body,'subject':subject, 'from_email':from_email, 'from_name':from_name, 'date_to_send':date_to_send })

f = urllib.urlopen("http://isurge.com/api/manage_lists.1.html?%s" % params)
print f.read()

 

COMMAND

eblast_stats

 

FEEDBACK

json packet with statistics

 

ATTRIBUTES.http

owner_email, email_message_id

 

ERRORS

invalid owner or email_message_id


This page allows you to create a list to hold email addresses, view email list names, upload email addresses to lists, create email blasts to be sent to email lists, list email blasts.

PROCESS
Create a user using create profile, using that user create a list(create_list), upload a list of email addresses(upload_list) and then create an email to be sent to that list(create_eblast).

COMMAND
create_list: Creates a new list.

FEEDBACK

a json packet with the list_id

ATTRIBUTES.http
list_name, owner_email
required attributes: list_name

ERRORS
must have a list name

example in python:

import urllib

# create a new email list
params = urllib.urlencode({'email':'you@your.com', 'password':'yourpass', 'code':'CMPNY', 'create_list':'yes', 'owner_email':'some@enduser.com', 'list_name':'The list name' })

f = urllib.urlopen("https://store.dwalliance.com/api/manage_lists.1.html?%s" % params)
print f.read()



COMMAND
update_list: Creates a new list.

FEEDBACK
a json packet with the list_id

ATTRIBUTES.http

list_name, list_id, owner_email
required attributes: list_name, list_id

ERRORS
must have a list name, list id, owner_email must be the same as the original owner

example in python:

import urllib

# create a new email list
params = urllib.urlencode({'email':'you@your.com', 'password':'yourpass', 'code':'CMPNY', 'create_list':'yes', 'owner_email':'some@enduser.com', 'list_name':'the new list name', 'list_id':'f83125e0abdab00fa01d3f86f24b0f40' })

f = urllib.urlopen("https://store.dwalliance.com/api/manage_lists.1.html?%s" % params)
print f.read()



COMMAND
view_lists: gets a list of email lists and their owners

FEEDBACK
a json packet with the lists

ATTRIBUTES
none

ERRORS
none

example in python:

import urllib

# create a new email list
params = urllib.urlencode({'email':'you@your.com', 'password':'yourpass', 'code':'CMPNY', 'create_list':'yes', 'owner_email':'some@enduser.com', 'view_lists':1 })

f = urllib.urlopen("https://store.dwalliance.com/api/manage_lists.1.html?%s" % params)
print f.read()



COMMAND
upload_list: upload a list of email addresses and json packets

FEEDBACK

inserted, updated and invalid emails
NOTE: we check the mx records for each email before we insert or update it

ATTRIBUTES.http

list_id, owner_email
required attributes: owner_email, list_id

ATTRIBUTES.json

list_data

ERRORS

must have a list id, owner_email and list data

example in php:

/************

Upload a list of email addresses and their associated variables.

************/

require_once('JSON.php');
$json = new Services_JSON();

// create the list

$list[email][0] = 'jimmy@dwalliance.com';
$list[vars][0] = $json->encode(array("first_name"=>"jimmy","last_name"=>"brake","comment"=>"something to say"));
$list[email][1] = 'linda@dwalliance.com';
$list[vars][1] = $json->encode(array("first_name"=>"lori","last_name"=>"smith","comment"=>"nothing to say"));
$list[email][2] = 'kent@dwalliance.com';
$list[vars][2] = '';
$list[email][3] = 'lauren@dwalliance.com';
$list[vars][3] = $json->encode(array("first_name"=>"lori","last_name"=>"smith","comment"=>"nothing to say"));

$list = urlencode($json->encode($list));

$url ="&email=anadmin@foo.com";
$url .="&password=yourpass";
$url .="&code=ISRG";
$url .="&upload_list=1";
$url .="&owner_email=jimmy@isurge.com";
$url .="&list_id=f83125e0abdab00fa01d3f979798786f24b0f40";
$url .="&list_data=$list";

$return = file("https://store.dwalliance.com/api/manage_lists.1.html?$url");
echo implode($return);

exit();
?>

Example in python:

import simplejson

# create the of emails and their variables

a = ["test@isurge.com"]
json = {"first_name":"test","last_name":"user","comment":"something to say"}
json = simplejson.dumps(json)
b = [json]

a.append("test2@isurge.com")
json = {"first_name":"test2","last_name":"user2","comment":"nothing to say"}
json = simplejson.dumps(json)
b.append(json)

a.append("test3@isurge.com")
json = {"":""}
json = simplejson.dumps(json)
b.append(json)

a.append("test4@isurge.com")
json = {"first_name":"test4","last_name":"user4","comment":"lots to say"}
json = simplejson.dumps(json)
b.append(json)

# create the dictionary to hold the two arrays

d = {}
d['email'] = a
d['vars'] = b

d = simplejson.dumps(d)

import urllib
params = urllib.urlencode({'email':'youradmin@email.com', 'password':'yourpass', 'code':'ISRG', 'upload_list':1, "owner_email":"jimmy@isurge.com", "list_id":"f83125e0abdab00fa01d3f86f24b0f40", "list_data":d })
f = urllib.urlopen("http://isurge.com/api/manage_lists.1.html?%s" % params)
print f.read()

 

COMMAND
create_eblast: create and schedule an eblast

FEEDBACK
success of insertion, urls that were found and will be tracked , email_message_id

ATTRIBUTES.http
list_id, owner_email, from_name, from_email, subject, text_body, date_to_send, html_body
required attributes: list_id, owner_email, from_name, from_email, subject, text_body, date_to_send

ERRORS
will error on any of the missing variables, will error if the list_id and owner_email are incorrect

WARNINGS
will warn if date_to_send is in the past

example in php:


$text_body = "hi
hi hi
http://yahoo.com
hji";

$html_body = "hi
hi hi
google.com
soogle.com
doogle.com
hoogle.com

V_COMMENT, V_FIRST_NAME, V_LAST_NAME, V_EMAIL

hji";

$subject = "hi hi";

// create the eblast

$url ="&email=ji@ge.com";
$url .="&password=97978";
$url .="&code=COMT";
$url .="&create_eblast=1";
$url .="&text_body=".urlencode($text_body)."";
$url .="&html_body=".urlencode($html_body)."";
$url .="&subject=".urlencode($subject)."";
$url .="&owner_email=jmy@ie.com";
$url .="&date_to_send=200610011730";
$url .="&list_id=f831ab00fa01d3f86f24b0f40";
$url .="&from_email=jmy@alliance.com";
$url .="&from_name=Jim+Bre";

$return = file("https://store.dwalliance.com/api/manage_lists.1.html?$url");
echo implode($return);

exit();
?>

Example in python:

import urllib

# text part of the message
text_body = '''hi
hi hi
http://yahoo.com
hji'''

#html part of the message
html_body = '''hi


hi hi


google.com

soogle.com

doogle.com

hoogle.com


V_COMMENT, V_FIRST_NAME, V_LAST_NAME, V_EMAIL

hji'''

# subject of the message
subject = "hi hi"

#from email address
from_email="someone@isurge.com"

#from email name
from_name="Test User"

#date to send
date_to_send="200610011730"

params = urllib.urlencode({'email':'youradmin@email.com', 'password':'yourpass', 'code':'ISRG', 'create_eblast':1, 'owner_email':'jimmy@isurge.com', 'list_id':'f83125e0abdab00fa01d3f86f24b0f40', 'text_body':text_body, 'html_body':html_body,'subject':subject, 'from_email':from_email, 'from_name':from_name, 'date_to_send':date_to_send })

f = urllib.urlopen("http://isurge.com/api/manage_lists.1.html?%s" % params)
print f.read()

 

COMMAND
list_eblast: will list all the eblasts

FEEDBACK
a list of owner_emails, email_message_ids, subjects, date_to_send, date created, list_ids

ATTRIBUTES.http
email_owner, list_id

REQUIRED
none

ERRORS
none

Example in python

import urllib

# this will list all email blasts
params = urllib.urlencode({'email':'youradmin@email.com', 'password':'yourpass', 'code':'ISRG', 'list_eblast':1 })

# this will list only the email blasts of a particular owner
#params = urllib.urlencode({'email':'youradmin@email.com', 'password':'yourpass', 'code':'ISRG', 'list_eblast':1, 'owner_email':'jimmy@isurge.com' })

# this will list only the email blasts of a specific list_id
#params = urllib.urlencode({'email':'youradmin@email.com', 'password':'yourpass', 'code':'ISRG', 'list_eblast':1, 'list_id':'f83125e0abdab00fa01d3f86f24b0f40' })

f = urllib.urlopen("https://store.dwalliance.com/api/manage_lists.1.html?%s" % params)

print f.read()

 

COMMAND

delete_eblast

 

FEEDBACK

a success message

 

ATTRIBUTES.http

owner_email, email_message_id

 

ERRORS

attempting to delete an eblast that is scheduled to be sent in the past, attempting to delete an email message that does not exist or is not owned by the owner_email

 

Example in python

import urllib

# this will delete an email blast
params = urllib.urlencode({'email':'youradmin@email.com', 'password':'yourpass', 'code':'ISRG', 'delete_eblast':1, 'owner_email':'jimmy@isurge.com', 'email_message_id':'d876fe4a73e4d97a46adfc3d843e4739' })

f = urllib.urlopen("https://store.dwalliance.com/api/manage_lists.1.html?%s" % params)

print f.read()

 

COMMAND

update_eblast

FEEDBACK
success of update, urls that were found and will be tracked , email_message_id

ATTRIBUTES.http
list_id, owner_email, from_name, from_email, subject, text_body, date_to_send, html_body
required attributes: list_id, owner_email, from_name, from_email, subject, text_body, date_to_send, email_message_id

ERRORS
will error on any of the missing variables, will error if the list_id and owner_email are incorrect

WARNINGS
will warn if date_to_send is in the past

import urllib

# text part of the message
text_body = '''hi
hi hi
http://yahoo.com
hji'''

#html part of the message
html_body = '''hi


hi hi


google.com

soogle.com

doogle.com

hoogle.com


V_COMMENT, V_FIRST_NAME, V_LAST_NAME, V_EMAIL

hji'''

# subject of the message
subject = "hi hi"

#from email address
from_email="someone@isurge.com"

#from email name
from_name="Test User"

#date to send
date_to_send="200710011730"

params = urllib.urlencode({'email':'youradmin@email.com', 'password':'yourpass', 'code':'ISRG', 'update_eblast':1, 'owner_email':'jimmy@isurge.com', 'list_id':'f83125e0abdab00fa01d3f86f24b0f40', 'email_message_id':'71dac48998b0eedd994450d16f8cd60d', 'text_body':text_body, 'html_body':html_body,'subject':subject, 'from_email':from_email, 'from_name':from_name, 'date_to_send':date_to_send })

f = urllib.urlopen("http://isurge.com/api/manage_lists.1.html?%s" % params)
print f.read()

 

COMMAND

eblast_stats

 

FEEDBACK

json packet with statistics

 

ATTRIBUTES.http

owner_email, email_message_id

 

ERRORS

invalid owner or email_message_id

 

Example in Python

import urllib
import simplejson

# this will get an eblast stats
params = urllib.urlencode({'email':'youradmin@email.com', 'password':'yourpass', 'code':'ISRG', 'eblast_stats':1, 'owner_email':'linda@dwalliance.com', 'email_message_id':'795d930d1cbeb4b8710c85049c2ba045' })

f = urllib.urlopen("https://store.dwalliance.com/api/manage_lists.1.html?%s" % params)

foo = simplejson.load(f);
for key in foo:
        if key!='clicks':
                print key, foo[key]

# process the click data

clicked = foo["clicks"]
count = clicked["count"]
url = clicked["url"]

for a in range(len(count)):
        print url[a] + " " + count[a]

 

COMMAND

get_sent

 

FEEDBACK

json packet with email addresses and other info

 

ATTRIBUTES.http

owner_email, email_message_id

 

ERRORS

invalid owner or email_message_id

 

 import urllib
import simplejson

# this will get a list of users that the system attempted to send email to
params = urllib.urlencode({'email':'youradmin@email.com', 'password':'yourpass', 'code':'ISRG', 'get_sent':1, 'owner_email':'linda@dwalliance.com', 'email_message_id':'795d930d1cbeb4b8710c85049c2ba045' })

f = urllib.urlopen("https://store.dwalliance.com/api/manage_lists.1.html?%s" % params)

foo = simplejson.load(f);
for c in foo:
        print c

 

 

COMMAND

get_opened

 

FEEDBACK

json packet with email addresses and other info

 

ATTRIBUTES.http

owner_email, email_message_id

 

ERRORS

invalid owner or email_message_id

 

 import urllib
import simplejson

# this will get a list of users that the system attempted to send email to
params = urllib.urlencode({'email':'youradmin@email.com', 'password':'yourpass', 'code':'ISRG', 'get_opened':1, 'owner_email':'linda@dwalliance.com', 'email_message_id':'795d930d1cbeb4b8710c85049c2ba045' })

f = urllib.urlopen("https://store.dwalliance.com/api/manage_lists.1.html?%s" % params)

foo = simplejson.load(f);
for c in foo:
        print c

 

 

This page allows you to create a list to hold email addresses, view email list names, upload email addresses to lists, create email blasts to be sent to email lists, list email blasts.

PROCESS
Create a user using create profile, using that user create a list(create_list), upload a list of email addresses(upload_list) and then create an email to be sent to that list(create_eblast).

COMMAND
create_list: Creates a new list.

FEEDBACK

a json packet with the list_id

ATTRIBUTES.http
list_name, owner_email
required attributes: list_name

ERRORS
must have a list name

example in python:

import urllib

# create a new email list
params = urllib.urlencode({'email':'you@your.com', 'password':'yourpass', 'code':'CMPNY', 'create_list':'yes', 'owner_email':'some@enduser.com', 'list_name':'The list name' })

f = urllib.urlopen("https://store.dwalliance.com/api/manage_lists.1.html?%s" % params)
print f.read()



COMMAND
update_list: Creates a new list.

FEEDBACK
a json packet with the list_id

ATTRIBUTES.http

list_name, list_id, owner_email
required attributes: list_name, list_id

ERRORS
must have a list name, list id, owner_email must be the same as the original owner

example in python:

import urllib

# create a new email list
params = urllib.urlencode({'email':'you@your.com', 'password':'yourpass', 'code':'CMPNY', 'create_list':'yes', 'owner_email':'some@enduser.com', 'list_name':'the new list name', 'list_id':'f83125e0abdab00fa01d3f86f24b0f40' })

f = urllib.urlopen("https://store.dwalliance.com/api/manage_lists.1.html?%s" % params)
print f.read()



COMMAND
view_lists: gets a list of email lists and their owners

FEEDBACK
a json packet with the lists

ATTRIBUTES
none

ERRORS
none

example in python:

import urllib

# create a new email list
params = urllib.urlencode({'email':'you@your.com', 'password':'yourpass', 'code':'CMPNY', 'create_list':'yes', 'owner_email':'some@enduser.com', 'view_lists':1 })

f = urllib.urlopen("https://store.dwalliance.com/api/manage_lists.1.html?%s" % params)
print f.read()



COMMAND
upload_list: upload a list of email addresses and json packets

FEEDBACK

inserted, updated and invalid emails
NOTE: we check the mx records for each email before we insert or update it

ATTRIBUTES.http

list_id, owner_email
required attributes: owner_email, list_id

ATTRIBUTES.json

list_data

ERRORS

must have a list id, owner_email and list data

example in php:

/************

Upload a list of email addresses and their associated variables.

************/

require_once('JSON.php');
$json = new Services_JSON();

// create the list

$list[email][0] = 'jimmy@dwalliance.com';
$list[vars][0] = $json->encode(array("first_name"=>"jimmy","last_name"=>"brake","comment"=>"something to say"));
$list[email][1] = 'linda@dwalliance.com';
$list[vars][1] = $json->encode(array("first_name"=>"lori","last_name"=>"smith","comment"=>"nothing to say"));
$list[email][2] = 'kent@dwalliance.com';
$list[vars][2] = '';
$list[email][3] = 'lauren@dwalliance.com';
$list[vars][3] = $json->encode(array("first_name"=>"lori","last_name"=>"smith","comment"=>"nothing to say"));

$list = urlencode($json->encode($list));

$url ="&email=anadmin@foo.com";
$url .="&password=yourpass";
$url .="&code=ISRG";
$url .="&upload_list=1";
$url .="&owner_email=jimmy@isurge.com";
$url .="&list_id=f83125e0abdab00fa01d3f979798786f24b0f40";
$url .="&list_data=$list";

$return = file("https://store.dwalliance.com/api/manage_lists.1.html?$url");
echo implode($return);

exit();
?>

Example in python:

import simplejson

# create the of emails and their variables

a = ["test@isurge.com"]
json = {"first_name":"test","last_name":"user","comment":"something to say"}
json = simplejson.dumps(json)
b = [json]

a.append("test2@isurge.com")
json = {"first_name":"test2","last_name":"user2","comment":"nothing to say"}
json = simplejson.dumps(json)
b.append(json)

a.append("test3@isurge.com")
json = {"":""}
json = simplejson.dumps(json)
b.append(json)

a.append("test4@isurge.com")
json = {"first_name":"test4","last_name":"user4","comment":"lots to say"}
json = simplejson.dumps(json)
b.append(json)

# create the dictionary to hold the two arrays

d = {}
d['email'] = a
d['vars'] = b

d = simplejson.dumps(d)

import urllib
params = urllib.urlencode({'email':'youradmin@email.com', 'password':'yourpass', 'code':'ISRG', 'upload_list':1, "owner_email":"jimmy@isurge.com", "list_id":"f83125e0abdab00fa01d3f86f24b0f40", "list_data":d })
f = urllib.urlopen("http://isurge.com/api/manage_lists.1.html?%s" % params)
print f.read()

 

COMMAND
create_eblast: create and schedule an eblast

FEEDBACK
success of insertion, urls that were found and will be tracked , email_message_id

ATTRIBUTES.http
list_id, owner_email, from_name, from_email, subject, text_body, date_to_send, html_body
required attributes: list_id, owner_email, from_name, from_email, subject, text_body, date_to_send

ERRORS
will error on any of the missing variables, will error if the list_id and owner_email are incorrect

WARNINGS
will warn if date_to_send is in the past

example in php:


$text_body = "hi
hi hi
http://yahoo.com
hji";

$html_body = "hi
hi hi
google.com
soogle.com
doogle.com
hoogle.com

V_COMMENT, V_FIRST_NAME, V_LAST_NAME, V_EMAIL

hji";

$subject = "hi hi";

// create the eblast

$url ="&email=ji@ge.com";
$url .="&password=97978";
$url .="&code=COMT";
$url .="&create_eblast=1";
$url .="&text_body=".urlencode($text_body)."";
$url .="&html_body=".urlencode($html_body)."";
$url .="&subject=".urlencode($subject)."";
$url .="&owner_email=jmy@ie.com";
$url .="&date_to_send=200610011730";
$url .="&list_id=f831ab00fa01d3f86f24b0f40";
$url .="&from_email=jmy@alliance.com";
$url .="&from_name=Jim+Bre";

$return = file("https://store.dwalliance.com/api/manage_lists.1.html?$url");
echo implode($return);

exit();
?>

Example in python:

import urllib

# text part of the message
text_body = '''hi
hi hi
http://yahoo.com
hji'''

#html part of the message
html_body = '''hi


hi hi


google.com

soogle.com

doogle.com

hoogle.com


V_COMMENT, V_FIRST_NAME, V_LAST_NAME, V_EMAIL

hji'''

# subject of the message
subject = "hi hi"

#from email address
from_email="someone@isurge.com"

#from email name
from_name="Test User"

#date to send
date_to_send="200610011730"

params = urllib.urlencode({'email':'youradmin@email.com', 'password':'yourpass', 'code':'ISRG', 'create_eblast':1, 'owner_email':'jimmy@isurge.com', 'list_id':'f83125e0abdab00fa01d3f86f24b0f40', 'text_body':text_body, 'html_body':html_body,'subject':subject, 'from_email':from_email, 'from_name':from_name, 'date_to_send':date_to_send })

f = urllib.urlopen("http://isurge.com/api/manage_lists.1.html?%s" % params)
print f.read()

 

COMMAND
list_eblast: will list all the eblasts

FEEDBACK
a list of owner_emails, email_message_ids, subjects, date_to_send, date created, list_ids

ATTRIBUTES.http
email_owner, list_id

REQUIRED
none

ERRORS
none

Example in python

import urllib

# this will list all email blasts
params = urllib.urlencode({'email':'youradmin@email.com', 'password':'yourpass', 'code':'ISRG', 'list_eblast':1 })

# this will list only the email blasts of a particular owner
#params = urllib.urlencode({'email':'youradmin@email.com', 'password':'yourpass', 'code':'ISRG', 'list_eblast':1, 'owner_email':'jimmy@isurge.com' })

# this will list only the email blasts of a specific list_id
#params = urllib.urlencode({'email':'youradmin@email.com', 'password':'yourpass', 'code':'ISRG', 'list_eblast':1, 'list_id':'f83125e0abdab00fa01d3f86f24b0f40' })

f = urllib.urlopen("https://store.dwalliance.com/api/manage_lists.1.html?%s" % params)

print f.read()

 

COMMAND

delete_eblast

 

FEEDBACK

a success message

 

ATTRIBUTES.http

owner_email, email_message_id

 

ERRORS

attempting to delete an eblast that is scheduled to be sent in the past, attempting to delete an email message that does not exist or is not owned by the owner_email

 

Example in python

import urllib

# this will delete an email blast
params = urllib.urlencode({'email':'youradmin@email.com', 'password':'yourpass', 'code':'ISRG', 'delete_eblast':1, 'owner_email':'jimmy@isurge.com', 'email_message_id':'d876fe4a73e4d97a46adfc3d843e4739' })

f = urllib.urlopen("https://store.dwalliance.com/api/manage_lists.1.html?%s" % params)

print f.read()

 

COMMAND

update_eblast

FEEDBACK
success of update, urls that were found and will be tracked , email_message_id

ATTRIBUTES.http
list_id, owner_email, from_name, from_email, subject, text_body, date_to_send, html_body
required attributes: list_id, owner_email, from_name, from_email, subject, text_body, date_to_send, email_message_id

ERRORS
will error on any of the missing variables, will error if the list_id and owner_email are incorrect

WARNINGS
will warn if date_to_send is in the past

import urllib

# text part of the message
text_body = '''hi
hi hi
http://yahoo.com
hji'''

#html part of the message
html_body = '''hi


hi hi


google.com

soogle.com

doogle.com

hoogle.com


V_COMMENT, V_FIRST_NAME, V_LAST_NAME, V_EMAIL

hji'''

# subject of the message
subject = "hi hi"

#from email address
from_email="someone@isurge.com"

#from email name
from_name="Test User"

#date to send
date_to_send="200710011730"

params = urllib.urlencode({'email':'youradmin@email.com', 'password':'yourpass', 'code':'ISRG', 'update_eblast':1, 'owner_email':'jimmy@isurge.com', 'list_id':'f83125e0abdab00fa01d3f86f24b0f40', 'email_message_id':'71dac48998b0eedd994450d16f8cd60d', 'text_body':text_body, 'html_body':html_body,'subject':subject, 'from_email':from_email, 'from_name':from_name, 'date_to_send':date_to_send })

f = urllib.urlopen("http://isurge.com/api/manage_lists.1.html?%s" % params)
print f.read()

 

COMMAND

eblast_stats

 

FEEDBACK

json packet with statistics

 

ATTRIBUTES.http

owner_email, email_message_id

 

ERRORS

invalid owner or email_message_id


This page allows you to create a list to hold email addresses, view email list names, upload email addresses to lists, create email blasts to be sent to email lists, list email blasts.

PROCESS
Create a user using create profile, using that user create a list(create_list), upload a list of email addresses(upload_list) and then create an email to be sent to that list(create_eblast).

COMMAND
create_list: Creates a new list.

FEEDBACK

a json packet with the list_id

ATTRIBUTES.http
list_name, owner_email
required attributes: list_name

ERRORS
must have a list name

example in python:

import urllib

# create a new email list
params = urllib.urlencode({'email':'you@your.com', 'password':'yourpass', 'code':'CMPNY', 'create_list':'yes', 'owner_email':'some@enduser.com', 'list_name':'The list name' })

f = urllib.urlopen("https://store.dwalliance.com/api/manage_lists.1.html?%s" % params)
print f.read()



COMMAND
update_list: Creates a new list.

FEEDBACK
a json packet with the list_id

ATTRIBUTES.http

list_name, list_id, owner_email
required attributes: list_name, list_id

ERRORS
must have a list name, list id, owner_email must be the same as the original owner

example in python:

import urllib

# create a new email list
params = urllib.urlencode({'email':'you@your.com', 'password':'yourpass', 'code':'CMPNY', 'create_list':'yes', 'owner_email':'some@enduser.com', 'list_name':'the new list name', 'list_id':'f83125e0abdab00fa01d3f86f24b0f40' })

f = urllib.urlopen("https://store.dwalliance.com/api/manage_lists.1.html?%s" % params)
print f.read()



COMMAND
view_lists: gets a list of email lists and their owners

FEEDBACK
a json packet with the lists

ATTRIBUTES
none

ERRORS
none

example in python:

import urllib

# create a new email list
params = urllib.urlencode({'email':'you@your.com', 'password':'yourpass', 'code':'CMPNY', 'create_list':'yes', 'owner_email':'some@enduser.com', 'view_lists':1 })

f = urllib.urlopen("https://store.dwalliance.com/api/manage_lists.1.html?%s" % params)
print f.read()



COMMAND
upload_list: upload a list of email addresses and json packets

FEEDBACK

inserted, updated and invalid emails
NOTE: we check the mx records for each email before we insert or update it

ATTRIBUTES.http

list_id, owner_email
required attributes: owner_email, list_id

ATTRIBUTES.json

list_data

ERRORS

must have a list id, owner_email and list data

example in php:

/************

Upload a list of email addresses and their associated variables.

************/

require_once('JSON.php');
$json = new Services_JSON();

// create the list

$list[email][0] = 'jimmy@dwalliance.com';
$list[vars][0] = $json->encode(array("first_name"=>"jimmy","last_name"=>"brake","comment"=>"something to say"));
$list[email][1] = 'linda@dwalliance.com';
$list[vars][1] = $json->encode(array("first_name"=>"lori","last_name"=>"smith","comment"=>"nothing to say"));
$list[email][2] = 'kent@dwalliance.com';
$list[vars][2] = '';
$list[email][3] = 'lauren@dwalliance.com';
$list[vars][3] = $json->encode(array("first_name"=>"lori","last_name"=>"smith","comment"=>"nothing to say"));

$list = urlencode($json->encode($list));

$url ="&email=anadmin@foo.com";
$url .="&password=yourpass";
$url .="&code=ISRG";
$url .="&upload_list=1";
$url .="&owner_email=jimmy@isurge.com";
$url .="&list_id=f83125e0abdab00fa01d3f979798786f24b0f40";
$url .="&list_data=$list";

$return = file("https://store.dwalliance.com/api/manage_lists.1.html?$url");
echo implode($return);

exit();
?>

Example in python:

import simplejson

# create the of emails and their variables

a = ["test@isurge.com"]
json = {"first_name":"test","last_name":"user","comment":"something to say"}
json = simplejson.dumps(json)
b = [json]

a.append("test2@isurge.com")
json = {"first_name":"test2","last_name":"user2","comment":"nothing to say"}
json = simplejson.dumps(json)
b.append(json)

a.append("test3@isurge.com")
json = {"":""}
json = simplejson.dumps(json)
b.append(json)

a.append("test4@isurge.com")
json = {"first_name":"test4","last_name":"user4","comment":"lots to say"}
json = simplejson.dumps(json)
b.append(json)

# create the dictionary to hold the two arrays

d = {}
d['email'] = a
d['vars'] = b

d = simplejson.dumps(d)

import urllib
params = urllib.urlencode({'email':'youradmin@email.com', 'password':'yourpass', 'code':'ISRG', 'upload_list':1, "owner_email":"jimmy@isurge.com", "list_id":"f83125e0abdab00fa01d3f86f24b0f40", "list_data":d })
f = urllib.urlopen("http://isurge.com/api/manage_lists.1.html?%s" % params)
print f.read()

 

COMMAND
create_eblast: create and schedule an eblast

FEEDBACK
success of insertion, urls that were found and will be tracked , email_message_id

ATTRIBUTES.http
list_id, owner_email, from_name, from_email, subject, text_body, date_to_send, html_body
required attributes: list_id, owner_email, from_name, from_email, subject, text_body, date_to_send

ERRORS
will error on any of the missing variables, will error if the list_id and owner_email are incorrect

WARNINGS
will warn if date_to_send is in the past

example in php:


$text_body = "hi
hi hi
http://yahoo.com
hji";

$html_body = "hi
hi hi
google.com
soogle.com
doogle.com
hoogle.com

V_COMMENT, V_FIRST_NAME, V_LAST_NAME, V_EMAIL

hji";

$subject = "hi hi";

// create the eblast

$url ="&email=ji@ge.com";
$url .="&password=97978";
$url .="&code=COMT";
$url .="&create_eblast=1";
$url .="&text_body=".urlencode($text_body)."";
$url .="&html_body=".urlencode($html_body)."";
$url .="&subject=".urlencode($subject)."";
$url .="&owner_email=jmy@ie.com";
$url .="&date_to_send=200610011730";
$url .="&list_id=f831ab00fa01d3f86f24b0f40";
$url .="&from_email=jmy@alliance.com";
$url .="&from_name=Jim+Bre";

$return = file("https://store.dwalliance.com/api/manage_lists.1.html?$url");
echo implode($return);

exit();
?>

Example in python:

import urllib

# text part of the message
text_body = '''hi
hi hi
http://yahoo.com
hji'''

#html part of the message
html_body = '''hi


hi hi


google.com

soogle.com

doogle.com

hoogle.com


V_COMMENT, V_FIRST_NAME, V_LAST_NAME, V_EMAIL

hji'''

# subject of the message
subject = "hi hi"

#from email address
from_email="someone@isurge.com"

#from email name
from_name="Test User"

#date to send
date_to_send="200610011730"

params = urllib.urlencode({'email':'youradmin@email.com', 'password':'yourpass', 'code':'ISRG', 'create_eblast':1, 'owner_email':'jimmy@isurge.com', 'list_id':'f83125e0abdab00fa01d3f86f24b0f40', 'text_body':text_body, 'html_body':html_body,'subject':subject, 'from_email':from_email, 'from_name':from_name, 'date_to_send':date_to_send })

f = urllib.urlopen("http://isurge.com/api/manage_lists.1.html?%s" % params)
print f.read()

 

COMMAND
list_eblast: will list all the eblasts

FEEDBACK
a list of owner_emails, email_message_ids, subjects, date_to_send, date created, list_ids

ATTRIBUTES.http
email_owner, list_id

REQUIRED
none

ERRORS
none

Example in python

import urllib

# this will list all email blasts
params = urllib.urlencode({'email':'youradmin@email.com', 'password':'yourpass', 'code':'ISRG', 'list_eblast':1 })

# this will list only the email blasts of a particular owner
#params = urllib.urlencode({'email':'youradmin@email.com', 'password':'yourpass', 'code':'ISRG', 'list_eblast':1, 'owner_email':'jimmy@isurge.com' })

# this will list only the email blasts of a specific list_id
#params = urllib.urlencode({'email':'youradmin@email.com', 'password':'yourpass', 'code':'ISRG', 'list_eblast':1, 'list_id':'f83125e0abdab00fa01d3f86f24b0f40' })

f = urllib.urlopen("https://store.dwalliance.com/api/manage_lists.1.html?%s" % params)

print f.read()

 

COMMAND

delete_eblast

 

FEEDBACK

a success message

 

ATTRIBUTES.http

owner_email, email_message_id

 

ERRORS

attempting to delete an eblast that is scheduled to be sent in the past, attempting to delete an email message that does not exist or is not owned by the owner_email

 

Example in python

import urllib

# this will delete an email blast
params = urllib.urlencode({'email':'youradmin@email.com', 'password':'yourpass', 'code':'ISRG', 'delete_eblast':1, 'owner_email':'jimmy@isurge.com', 'email_message_id':'d876fe4a73e4d97a46adfc3d843e4739' })

f = urllib.urlopen("https://store.dwalliance.com/api/manage_lists.1.html?%s" % params)

print f.read()

 

COMMAND

update_eblast

FEEDBACK
success of update, urls that were found and will be tracked , email_message_id

ATTRIBUTES.http
list_id, owner_email, from_name, from_email, subject, text_body, date_to_send, html_body
required attributes: list_id, owner_email, from_name, from_email, subject, text_body, date_to_send, email_message_id

ERRORS
will error on any of the missing variables, will error if the list_id and owner_email are incorrect

WARNINGS
will warn if date_to_send is in the past

import urllib

# text part of the message
text_body = '''hi
hi hi
http://yahoo.com
hji'''

#html part of the message
html_body = '''hi


hi hi


google.com

soogle.com

doogle.com

hoogle.com


V_COMMENT, V_FIRST_NAME, V_LAST_NAME, V_EMAIL

hji'''

# subject of the message
subject = "hi hi"

#from email address
from_email="someone@isurge.com"

#from email name
from_name="Test User"

#date to send
date_to_send="200710011730"

params = urllib.urlencode({'email':'youradmin@email.com', 'password':'yourpass', 'code':'ISRG', 'update_eblast':1, 'owner_email':'jimmy@isurge.com', 'list_id':'f83125e0abdab00fa01d3f86f24b0f40', 'email_message_id':'71dac48998b0eedd994450d16f8cd60d', 'text_body':text_body, 'html_body':html_body,'subject':subject, 'from_email':from_email, 'from_name':from_name, 'date_to_send':date_to_send })

f = urllib.urlopen("http://isurge.com/api/manage_lists.1.html?%s" % params)
print f.read()

 

COMMAND

eblast_stats

 

FEEDBACK

json packet with statistics

 

ATTRIBUTES.http

owner_email, email_message_id

 

ERRORS

invalid owner or email_message_id

 

Example in Python

import urllib
import simplejson

# this will get an eblast stats
params = urllib.urlencode({'email':'youradmin@email.com', 'password':'yourpass', 'code':'ISRG', 'eblast_stats':1, 'owner_email':'linda@dwalliance.com', 'email_message_id':'795d930d1cbeb4b8710c85049c2ba045' })

f = urllib.urlopen("https://store.dwalliance.com/api/manage_lists.1.html?%s" % params)

foo = simplejson.load(f);
for key in foo:
        if key!='clicks':
                print key, foo[key]

# process the click data

clicked = foo["clicks"]
count = clicked["count"]
url = clicked["url"]

for a in range(len(count)):
        print url[a] + " " + count[a]

 

COMMAND

get_sent

 

FEEDBACK

json packet with email addresses and other info

 

ATTRIBUTES.http

owner_email, email_message_id

 

ERRORS

invalid owner or email_message_id

 

 import urllib
import simplejson

# this will get a list of users that the system attempted to send email to
params = urllib.urlencode({'email':'youradmin@email.com', 'password':'yourpass', 'code':'ISRG', 'get_sent':1, 'owner_email':'linda@dwalliance.com', 'email_message_id':'795d930d1cbeb4b8710c85049c2ba045' })

f = urllib.urlopen("https://store.dwalliance.com/api/manage_lists.1.html?%s" % params)

foo = simplejson.load(f);
for c in foo:
        print c

 

 

COMMAND

get_opened

 

FEEDBACK

json packet with email addresses and other info

 

ATTRIBUTES.http

owner_email, email_message_id

 

ERRORS

invalid owner or email_message_id

 

 import urllib
import simplejson

# this will get a list of users that the system attempted to send email to
params = urllib.urlencode({'email':'youradmin@email.com', 'password':'yourpass', 'code':'ISRG', 'get_opened':1, 'owner_email':'linda@dwalliance.com', 'email_message_id':'795d930d1cbeb4b8710c85049c2ba045' })

f = urllib.urlopen("https://store.dwalliance.com/api/manage_lists.1.html?%s" % params)

foo = simplejson.load(f);
for c in foo:
        print c


 

 

 

COMMAND

get_bounced

 

FEEDBACK

json packet with email addresses and other info

 

ATTRIBUTES.http

owner_email, email_message_id

 

ERRORS

invalid owner or email_message_id

 

 import urllib
import simplejson

# this will get a list of users that the system attempted to send email to
params = urllib.urlencode({'email':'youradmin@email.com', 'password':'yourpass', 'code':'ISRG', 'get_bounced':1, 'owner_email':'linda@dwalliance.com', 'email_message_id':'795d930d1cbeb4b8710c85049c2ba045' })

f = urllib.urlopen("https://store.dwalliance.com/api/manage_lists.1.html?%s" % params)

foo = simplejson.load(f);
for c in foo:
        print c


COMMAND

get_unsubscribed

 

FEEDBACK

json packet with email addresses and other info

 

ATTRIBUTES.http

owner_email, email_message_id

 

ERRORS

invalid owner or email_message_id

 

 import urllib
import simplejson

# this will get a list of users that the system attempted to send email to
params = urllib.urlencode({'email':'youradmin@email.com', 'password':'yourpass', 'code':'ISRG', 'get_unsubscribed':1, 'owner_email':'linda@dwalliance.com', 'email_message_id':'795d930d1cbeb4b8710c85049c2ba045' })

f = urllib.urlopen("https://store.dwalliance.com/api/manage_lists.1.html?%s" % params)

foo = simplejson.load(f);
for c in foo:
        print c



COMMAND

get_clicked

 

FEEDBACK

json packet with email addresses and other info

 

ATTRIBUTES.http

owner_email, email_message_id

 

ERRORS

invalid owner or email_message_id

Example in Python 

 import urllib
import simplejson

# this will get a list of users that have clicked a link in an html email

params = urllib.urlencode({'email':'youradmin@email.com', 'password':'yourpass', 'code':'ISRG', 'get_clicked':1, 'owner_email':'linda@dwalliance.com', 'email_message_id':'795d930d1cbeb4b8710c85049c2ba045' })

f = urllib.urlopen("https://store.dwalliance.com/api/manage_lists.1.html?%s" % params)

foo = simplejson.load(f);
for c in foo:
        print c


 



Page 1 of 1

create discussion Create Discussion

Privacy Policy