Team Methods

Use Cases

Team

Get team.

GET https://api.bananatag.com/teams
Query Parameters
Parameter Type Default Description
type string Option to filter results by account type. Available values are 'admin', 'manager' or 'user'.
rtn string json The format of the response "json", "text" or "html"
Response Parameters
Parameter Type Description
memberID string A member id hash.
firstname string Member first name.
lastname string Member last name.
email string Member email address.
accountType string Member account type.
groupID string Member groupID if they are a part of a group.
groupName string Member group name if they are a part of a group.
Examples
                                        
import java.util.HashMap;
import java.util.concurrent.TimeUnit;
import org.json.simple.JSONObject;

// create BtagAPI class object using your AuthID and Access Key
BtagAPI btag = new BtagAPI("AuthID", "Access Key");
HashMap<String, Object> params = new HashMap<String, Object>();
JSONObject result = new JSONObject();

do {
    result = btag.request("teams", params);
    System.out.println(result);
    TimeUnit.SECONDS.sleep(1);
} while (!result.isEmpty());
                                        
                                    
                                        
var BtagAPI = require('bananatag-api.js');

// create BtagAPI object using your AuthID and Access Key
var btag = new BTagAPI('AuthID', 'Access Key');

// make request to get data
btag.request('teams', {}, function (err, results) {
    console.log(results);
}
                                        
                                    
                                        
use Bananatag\Api;

// Create Api class instance
$btag = new Api('AuthID', 'Access Key');

// make request to get data
$results = $btag->request('teams', []);

// print data
print_r($results);
                                        
                                    
                                         
# import BTagAPI class
from btapi.btapi import BTagAPI

# create BTagAPI object using your AuthID and Access Key
btag = BTagAPI('AuthID', 'Access Key')

# make request to get data
data = btag.request('teams')

print data
                                         
                                     

Get Team Tags

Returns all team tags.

GET https://api.bananatag.com/teams/tags
Query Parameters
Parameter Type Default Description
start string Return tags sent to contact after this date.
end string Return tags sent to contact before this date.
isClicked boolean false Only return clicked tags.
isUnclicked boolean false Only return unclicked tags.
isOpened boolean> false Only return opened tags.
isUnopened boolean false Only return unopened tags.
rtn string json The format of the response "json", "text" or "html"
Response Parameters
Parameter Type Description
tagID string A tag id hash.
subject string The tag subject.
dateSent timestamp The date the tag was sent.
recipients array An array of recipient objects.
recipient . name string The recipient name.
recipient . email string The recipient email.
stats object A data object containing tag stats
stats . totalOpens integer The total number of opens for tags sent to this contact.
stats . uniqueOpens integer The total number of unique opens for tags sent to this contact.
stats . totalClicks integer The total number of clicks for tags sent to this contact.
stats . uniqueClicks integer The total number of unique clicks for tags sent to this contact.
stats . desktopOpens integer The total number of desktop opens for tags sent to this contact.
stats . mobileOpens integer The total number of mobile opens for tags sent to this contact.
stats . desktopClicks integer The total number of desktop clicks for tags sent to this contact.
stats . mobileClicks integer The total number of mobile clicks for tags sent to this contact.
Examples
                                        
import java.util.HashMap;
import java.util.concurrent.TimeUnit;
import org.json.simple.JSONObject;

// create BtagAPI class object using your AuthID and Access Key
BtagAPI btag = new BtagAPI("AuthID", "Access Key");
HashMap<String, Object> params = new HashMap<String, Object>();
JSONObject result = new JSONObject();

// build parameters to map
params.put("start", "2013-10-30");
params.put("end", "2013-11-30");

do {
    result = btag.request("teams/tags", params);
    System.out.println(result);
    TimeUnit.SECONDS.sleep(1);
} while (!result.isEmpty());
                                        
                                    
                                        
var BtagAPI = require('bananatag-api.js');

// create BtagAPI object using your AuthID and Access Key
var btag = new BTagAPI('AuthID', 'Access Key');

// make request to get tag data
btag.request('teams/tags', {start : '2013-10-30', end : '2013-11-30'}, function (user) {
    console.log(user);
}
                                        
                                    
                                        
use Bananatag\Api;

// Create Api class instance
$btag = new Api('AuthID', 'Access Key');

// make request to get tag data
$results = $btag->request('teams/tags', [start => '2013-10-30', end => '2013-11-30']);

// print user data
print_r($results);
                                        
                                    
                                         
# import BTagAPI class
from btapi.btapi import BTagAPI

# create BTagAPI object using your AuthID and Access Key
btag = BTagAPI('AuthID', 'Access Key')

# make request to get tag data
data = btag.request('teams/tags', {start : '2013-10-30', end : '2013-11-30'})

print data
                                         
                                     

Team Member

Get team member with the given id.

GET https://api.bananatag.com/teams/member/memberID
Query Parameters
Parameter Type Default Description
rtn string json The format of the response "json", "text" or "html"
Response Parameters
Parameter Type Description
memberID string A member id hash.
firstname string Member first name.
lastname string Member last name.
email string Member email address.
accountType string Member account type.
groupID string Member groupID if they are a part of a group.
groupName string Member group name if they are a part of a group.
Examples
                                        
import java.util.HashMap;
import java.util.concurrent.TimeUnit;
import org.json.simple.JSONObject;

// create BtagAPI class object using your AuthID and Access Key
BtagAPI btag = new BtagAPI("AuthID", "Access Key");
HashMap<String, Object> params = new HashMap<String, Object>();
JSONObject result = new JSONObject();

do {
    result = btag.request("teams/member/k4IGo9", params);
    System.out.println(result);
    TimeUnit.SECONDS.sleep(1);
} while (!result.isEmpty());
                                        
                                    
                                        
var BtagAPI = require('bananatag-api.js');

// create BtagAPI object using your AuthID and Access Key
var btag = new BTagAPI('AuthID', 'Access Key');

// make request to get data
btag.request('teams/member/k4IGo9', {}, function (err, results) {
    console.log(results);
}
                                        
                                    
                                        
use Bananatag\Api;

// Create Api class instance
$btag = new Api('AuthID', 'Access Key');

// make request to get data
$results = $btag->request('teams/member/k4IGo9', []);

// print data
print_r($results);
                                        
                                    
                                         
# import BTagAPI class
from btapi.btapi import BTagAPI

# create BTagAPI object using your AuthID and Access Key
btag = BTagAPI('AuthID', 'Access Key')

# make request to get data
data = btag.request('teams/member/k4IGo9')

print data
                                         
                                     

Get Team Member Tags

Returns all team member tags.

GET https://api.bananatag.com/teams/member/memberID/tags
Query Parameters
Parameter Type Default Description
start string Return tags sent to contact after this date.
end string Return tags sent to contact before this date.
isClicked boolean false Only return clicked tags.
isUnclicked boolean false Only return unclicked tags.
isOpened boolean> false Only return opened tags.
isUnopened boolean false Only return unopened tags.
rtn string json The format of the response "json", "text" or "html"
Response Parameters
Parameter Type Description
tagID string A tag id hash.
subject string The tag subject.
dateSent timestamp The date the tag was sent.
recipients array An array of recipient objects.
recipient . name string The recipient name.
recipient . email string The recipient email.
stats object A data object containing tag stats
stats . totalOpens integer The total number of opens for tags sent to this contact.
stats . uniqueOpens integer The total number of unique opens for tags sent to this contact.
stats . totalClicks integer The total number of clicks for tags sent to this contact.
stats . uniqueClicks integer The total number of unique clicks for tags sent to this contact.
stats . desktopOpens integer The total number of desktop opens for tags sent to this contact.
stats . mobileOpens integer The total number of mobile opens for tags sent to this contact.
stats . desktopClicks integer The total number of desktop clicks for tags sent to this contact.
stats . mobileClicks integer The total number of mobile clicks for tags sent to this contact.
Examples
                                        
import java.util.HashMap;
import java.util.concurrent.TimeUnit;
import org.json.simple.JSONObject;

// create BtagAPI class object using your AuthID and Access Key
BtagAPI btag = new BtagAPI("AuthID", "Access Key");
HashMap<String, Object> params = new HashMap<String, Object>();
JSONObject result = new JSONObject();

// build parameters to map
params.put("start", "2013-10-30");
params.put("end", "2013-11-30");

do {
    result = btag.request('teams/member/{memberID}/tags', params);
    System.out.println(result);
    TimeUnit.SECONDS.sleep(1);
} while (!result.isEmpty());
                                        
                                    
                                        
var BtagAPI = require('bananatag-api.js');

// create BtagAPI object using your AuthID and Access Key
var btag = new BTagAPI('AuthID', 'Access Key');

// make request to get tag data
btag.request('teams/member/{memberID}/tags', {start : '2013-10-30', end : '2013-11-30'}, function (user) {
    console.log(user);
}
                                        
                                    
                                        
use Bananatag\Api;

// Create Api class instance
$btag = new Api('AuthID', 'Access Key');

// make request to get tag data
$results = $btag->request('teams/member/{memberID}/tags', [start => '2013-10-30', end => '2013-11-30']);

// print user data
print_r($results);
                                        
                                    
                                         
# import BTagAPI class
from btapi.btapi import BTagAPI

# create BTagAPI object using your AuthID and Access Key
btag = BTagAPI('AuthID', 'Access Key')

# make request to get tag data
data = btag.request('teams/member/{memberID}/tags', {start : '2013-10-30', end : '2013-11-30'})

print data
                                         
                                     

Team Group

Get team members in group with given id or group name.

GET https://api.bananatag.com/teams/group/groupID || group name
Query Parameters
Parameter Type Default Description
type string Option to filter results by account type. Available values are 'admin', 'manager' or 'user'.
rtn string json The format of the response "json", "text" or "html"
Response Parameters
Parameter Type Description
memberID string A member id hash.
firstname string Member first name.
lastname string Member last name.
email string Member email address.
accountType string Member account type.
groupID string Member groupID if they are a part of a group.
groupName string Member group name if they are a part of a group.
Examples
                                        
import java.util.HashMap;
import java.util.concurrent.TimeUnit;
import org.json.simple.JSONObject;

// create BtagAPI class object using your AuthID and Access Key
BtagAPI btag = new BtagAPI("AuthID", "Access Key");
HashMap<String, Object> params = new HashMap<String, Object>();
JSONObject result = new JSONObject();

do {
    result = btag.request("teams/group/hY3Tr5", params);
    System.out.println(result);
    TimeUnit.SECONDS.sleep(1);
} while (!result.isEmpty());
                                        
                                    
                                        
var BtagAPI = require('bananatag-api.js');

// create BtagAPI object using your AuthID and Access Key
var btag = new BTagAPI('AuthID', 'Access Key');

// make request to get data
btag.request('teams/group/hY3Tr5', {}, function (err, results) {
    console.log(results);
}
                                        
                                    
                                        
use Bananatag\Api;

// Create Api class instance
$btag = new Api('AuthID', 'Access Key');

// make request to get data
$results = $btag->request('teams/group/hY3Tr5', []);

// print data
print_r($results);
                                        
                                    
                                         
# import BTagAPI class
from btapi.btapi import BTagAPI

# create BTagAPI object using your AuthID and Access Key
btag = BTagAPI('AuthID', 'Access Key')

# make request to get data
data = btag.request('teams/group/hY3Tr5')

print data
                                         
                                     

Team Stats

Get Team Stats.

GET https://api.bananatag.com/stats
Query Parameters
Parameter Type Default Description
start string Return tags sent to contact after this date.
end string Return tags sent to contact before this date.
aggregateData boolean false Combine all stats records into one.
type string Option to filter results by account type. Available values are 'admin', 'manager' or 'user'.
rtn string json The format of the response "json", "text" or "html"
Response Parameters
Parameter Type Description
totalSent integer The total number of tracked tags.
totalOpens integer The total number of tag opens.
totalClicks integer The total number of tag clicks.
uniqueOpens integer The total number of unique tag opens.
uniqueClicks integer The total number unique tag clicks.
dateLastSent timestamp The date of the last tracked tag.
Examples
                                        
import java.util.HashMap;
import java.util.concurrent.TimeUnit;
import org.json.simple.JSONObject;

// create BtagAPI class object using your AuthID and Access Key
BtagAPI btag = new BtagAPI("AuthID", "Access Key");
HashMap<String, Object> params = new HashMap<String, Object>();
JSONObject result = new JSONObject();

// build parameters to map
params.put("aggregateData", true);

do {
    result = btag.request("teams/stats", params);
    System.out.println(result);
    TimeUnit.SECONDS.sleep(1);
} while (!result.isEmpty());
                                        
                                    
                                    
var BtagAPI = require('bananatag-api.js');

// create BtagAPI object using your AuthID and Access Key
var btag = new BTagAPI('AuthID', 'Access Key');

// make request to get data
btag.request('teams/stats', {aggregateData : true}, function (err, results) {
    console.log(results);
}
                                    
                                
                                    
use Bananatag\Api;

// Create Api class instance
$btag = new Api('AuthID', 'Access Key');

// make request to get data
$results = $btag->request('teams/stats', [aggregateData => true]);

// print data
print_r($results);
                                    
                                
                                     
# import BTagAPI class
from btapi.btapi import BTagAPI

# create BTagAPI object using your AuthID and Access Key
btag = BTagAPI('AuthID', 'Access Key')

# make request to get data
data = btag.request('teams/stats', {aggregateData : True})

print data
                                     
                                 

Team Group Stats

Get Team Group Stats for group with the given id or group name.

GET https://api.bananatag.com/teams/stats/group/groupID || group name
Query Parameters
Parameter Type Default Description
start string Return tags sent to contact after this date.
end string Return tags sent to contact before this date.
aggregateData boolean false Combine all stats records into one.
type string Option to filter results by account type. Available values are 'admin', 'manager' or 'user'.
rtn string json The format of the response "json", "text" or "html"
Response Parameters
Parameter Type Description
totalSent integer The total number of tracked tags.
totalOpens integer The total number of tag opens.
totalClicks integer The total number of tag clicks.
uniqueOpens integer The total number of unique tag opens.
uniqueClicks integer The total number unique tag clicks.
dateLastSent timestamp The date of the last tracked tag.
Examples
                                        
import java.util.HashMap;
import java.util.concurrent.TimeUnit;
import org.json.simple.JSONObject;

// create BtagAPI class object using your AuthID and Access Key
BtagAPI btag = new BtagAPI("AuthID", "Access Key");
HashMap<String, Object> params = new HashMap<String, Object>();
JSONObject result = new JSONObject();

// build parameters to map
params.put("aggregateData", true);

do {
    result = btag.request("teams/stats/group/hB71Fr", params);
    System.out.println(result);
    TimeUnit.SECONDS.sleep(1);
} while (!result.isEmpty());
                                        
                                    
                                        
var BtagAPI = require('bananatag-api.js');

// create BtagAPI object using your AuthID and Access Key
var btag = new BTagAPI('AuthID', 'Access Key');

// make request to get data
btag.request('teams/stats/group/hB71Fr', {aggregateData : true}, function (err, results) {
    console.log(results);
}
                                        
                                    
                                    
use Bananatag\Api;

// Create Api class instance
$btag = new Api('AuthID', 'Access Key');

// make request to get data
$results = $btag->request('teams/stats/group/hB71Fr', [aggregateData => true]);

// print data
print_r($results);
                                    
                                
                                     
# import BTagAPI class
from btapi.btapi import BTagAPI

# create BTagAPI object using your AuthID and Access Key
btag = BTagAPI('AuthID', 'Access Key')

# make request to get data
data = btag.request('teams/stats/group/hB71Fr', {aggregateData : True})

print data
                                     
                                 

Team Member Stats

Get team member stats for member with given id.

GET https://api.bananatag.com/teams/stats/member/memberID
Query Parameters
Parameter Type Default Description
start string Return tags sent to contact after this date.
end string Return tags sent to contact before this date.
aggregateData boolean false Combine all stats records into one.
rtn string json The format of the response "json", "text" or "html"
Response Parameters
Parameter Type Description
totalSent integer The total number of tracked tags.
totalOpens integer The total number of tag opens.
totalClicks integer The total number of tag clicks.
uniqueOpens integer The total number of unique tag opens.
uniqueClicks integer The total number unique tag clicks.
dateLastSent timestamp The date of the last tracked tag.
Examples
                                        
import java.util.HashMap;
import java.util.concurrent.TimeUnit;
import org.json.simple.JSONObject;

// create BtagAPI class object using your AuthID and Access Key
BtagAPI btag = new BtagAPI("AuthID", "Access Key");
HashMap<String, Object> params = new HashMap<String, Object>();
JSONObject result = new JSONObject();

// build parameters to map
params.put("aggregateData", true);

do {
    result = btag.request("teams/stats/member/T3Fdr4", params);
    System.out.println(result);
    TimeUnit.SECONDS.sleep(1);
} while (!result.isEmpty());
                                        
                                    
                                    
var BtagAPI = require('bananatag-api.js');

// create BtagAPI object using your AuthID and Access Key
var btag = new BTagAPI('AuthID', 'Access Key');

// make request to get data
btag.request('teams/stats/member/T3Fdr4', {aggregateData : true}, function (err, results) {
    console.log(results);
}
                                    
                                
                                    
use Bananatag\Api;

// Create Api class instance
$btag = new Api('AuthID', 'Access Key');

// make request to get data
$results = $btag->request('teams/stats/member/T3Fdr4', [aggregateData => true]);

// print data
print_r($results);
                                    
                                
                                     
# import BTagAPI class
from btapi.btapi import BTagAPI

# create BTagAPI object using your AuthID and Access Key
btag = BTagAPI('AuthID', 'Access Key')

# make request to get data
data = btag.request('teams/stats/member/T3Fdr4', {aggregateData : True})

print data