Subscriber Management API
The Subscriber Management API is available to customers of Collective2's Private Platform product. C2's Private Platform allows companies to build their own customized version of Collective2, entirely without Collective2 branding, and to conduct all subscription processing commerce offsite, without any involvement by C2. Please contact us to learn more about our Private Platform product.
Table of Contents
getListSystems
http://api.collective2.com/cgi-perl/api.mpl?cmd=getListSystems&apikey=yourAPIkeyValue
<c2xml> <status> <ok>1</ok> <errorType></errorType> <errorDetail></errorDetail> </status> <response> <system> <systemid>19400168</systemid> <systemname>Midway Futures</systemname> </system> <system> <systemid>19400648</systemid> <systemname>Trident Options Alerts</systemname> </system> <system> <systemid>10118627</systemid> <systemname>Cicero Stocks</systemname> </system> </response> </c2xml>
getListSubscribers
http://api.collective2.com/cgi-perl/api.mpl?cmd=getListSubscribers&systemid=1736096&apikey=yourAPIkeyValue
<c2xml> <status> <ok>1</ok> <errorType></errorType> <errorDetail></errorDetail> </status> <response> <subscriber> <subscriberid>11881207</subscriberid> <currentStatus>current</currentStatus> <dateStarted>07/07/2013</dateStarted> <dateStopped></dateStopped> <nextChargeWhen></nextChargeWhen> <geo>usa</geo> <person> <personid>11157289</personid> <firstname>Pritep</firstname> <lastname>Jones</lastname> <email>[email protected]</email> </person> <autoTradeStatus> <trading_status></trading_status> <brokerName></brokerName> <accountnum></accountnum> <scaling></scaling> </autoTradeStatus> </subscriber> <subscriber> <subscriberid>11881206</subscriberid> <currentStatus>current</currentStatus> <dateStarted>07/07/2013</dateStarted> <dateStopped></dateStopped> <nextChargeWhen></nextChargeWhen> <geo>usa</geo> <person> <personid>10823850</personid> <firstname>Greg</firstname> <lastname>Johnson</lastname> <email>[email protected]</email> </person> <autoTradeStatus> <trading_status></trading_status> <brokerName></brokerName> <accountnum></accountnum> <scaling></scaling> </autoTradeStatus> </subscriber> </response> </c2xml>
createUser_platform
createUser_platform allows an optional parameter &flavor= which allows you to set a custom "flavor" for the customer. This flavor can be used to determine which custom text to show the user. You can set custom text and view available flavors on your Private Platform management console.
https://api.collective2.com/cgi-perl/api.mpl?cmd=createUser_platform&platformid=yourPlatformID&firstname=Zebra&lastname=Zebrinski&email=zebra%40collective2.com&password=stripes33&apikey=yourAPIkeyValue[&flavor=customFlavorString]
<c2xml> <status> <ok>1</ok> <errorType> </errorType> <errorDetail> </errorDetail> </status> <response> <newPerson> <personid>81981470</personid> <firstname>Zebra</firstname> <lastname>Zebrinski</lastname> <email>[email protected]</email> </newPerson> </response> </c2xml>
getListUsers
Returns an XML list of all users associated with your private platform. Users may or may not be subscribers. (A subscriber to a trading system must be a user, but a user does not necessarily need to be a subscriber.)
http://api.collective2.com/cgi-perl/api.mpl?cmd=getListUsers&platformid=299&apikey=yourAPIkeyValue
<c2xml> <status> <ok>1</ok> <errorType></errorType> <errorDetail></errorDetail> </status> <response> <person> <personid>16879123</personid> <firstname>Milly</firstname> <lastname>Ranna</lastname> <email>[email protected]</email> <alias></alias> <dateRecordCreated_ET>2014-04-06 14:51</dateRecordCreated_ET> <customFlavors> </customFlavors> </person> <person> <personid>17183622</personid> <firstname>Ghol</firstname> <lastname>Gedrosian</lastname> <email>[email protected]</email> <alias>screenName22</alias> <dateRecordCreated_ET>2014-04-21 14:13</dateRecordCreated_ET> <customFlavors> <flavor>investor</flavor> <flavor>monster</flavor> <flavor>goldClubMember</flavor> </customFlavors> </person> </response> </c2xml>
flavor_add
Set a custom "flavor" for an already-existing customer of your platform. This flavor can be used to determine which custom text to show the user. You can set custom text and view available flavors on your Private Platform management console. If the customer was previously tagged with the flavor, no error condition will be returned.
https://api.collective2.com/cgi-perl/api.mpl?cmd=flavor_add&platformid=yourPlatformID&personid=81981470&flavor=goldClubMember&apikey=yourAPIkeyValue
<c2xml> <status> <ok>1</ok> <errorType> </errorType> <errorDetail> </errorDetail> </status> <response> <flavorAdded> <personid>81981470</personid> <flavor>goldClubMember</flavor> </flavorAdded> </response> </c2xml>
flavor_remove
Remove a custom "flavor" for an already-existing customer of your platform. If flavor was not associated with customer at the time of this command, no error will be returned, but the numberRecordsModified field will return 0.
https://api.collective2.com/cgi-perl/api.mpl?cmd=flavor_remove&platformid=yourPlatformID&personid=81981470&flavor=goldClubMember&apikey=yourAPIkeyValue
<c2xml> <status> <ok>1</ok> <errorType> </errorType> <errorDetail> </errorDetail> </status> <response> <flavorRemoved> <personid>81981470</personid> <flavor>goldClubMember</flavor> <numberRecordsModified>goldClubMember</numberRecordsModified> </flavorRemoved> </response> </c2xml>
setPlatformSubscriptionCredit
There are two variations of this command. The first gives a user subscription credit to a system until a specific date and time. (All times are in Eastern USA.) The second variation gives the user subscription credit until a time expressed as the number of seconds in future, from the instant of the call being made. Since there are 86,400 seconds in each day, a 30-day subscription would be expressed as 2,592,000 seconds.
http://api.collective2.com/cgi-perl/api.mpl?cmd=setPlatformSubscriptionCredit&personid=21981470&systemid=80736096&dateTimeYYYYMMDDhhmmss=20130815235959&allowIfNewSubShorterThanExisting=0&apikey=yourAPIkeyValue
<c2xml> <status> <ok>1</ok> <errorType> </errorType> <errorDetail> </errorDetail> </status> <response> <subscription> <subscriberid>21981492</subscriberid> <firstname>Zebra</firstname> <lastname>Zebrinski</lastname> <email>[email protected]</email> <subscriptionCreditEnds>20130815235959</subscriptionCreditEnds> </subscription> </response> </c2xml>
http://api.collective2.com/cgi-perl/api.mpl?cmd=setPlatformSubscriptionCredit&personid=21981470&systemid=80736096&relativeIncreaseSecs=2592000&allowIfNewSubShorterThanExisting=0&apikey=yourAPIkeyValue
<c2xml> <status> <ok>1</ok> <errorType> </errorType> <errorDetail> </errorDetail> </status> <response> <subscription> <subscriberid>21981492</subscriberid> <firstname>Zebra</firstname> <lastname>Zebrinski</lastname> <email>[email protected]</email> <subscriptionCreditEnds>20130816235959</subscriptionCreditEnds> </subscription> </response> </c2xml>
endPlatformSubscription
http://api.collective2.com/cgi-perl/api.mpl?cmd=endPlatformSubscription&personid=21981470&systemid=80736096&apikey=yourAPIkeyValue&unsubAtYYYYMMDDhhmm=201412312359
If &unsubAtYYYYMMDDhhmm is not specified, unsubscription will be processed immediately.
<c2xml> <status> <ok>1</ok> <errorType> </errorType> <errorDetail> </errorDetail> </status> <response> <subscription> <subscriberid>21981492</subscriberid> <firstname>Zebra</firstname> <lastname>Zebrinski</lastname> <email>[email protected]</email> <subscriptionCreditEnds>20130712161454</subscriptionCreditEnds> </subscription> </response> </c2xml>