CreateUpdateMember


The CreateUpdateMember API allows one to create or update member information in the Frankly Media database.

Parameters

  • member – A collection of member attributes in the XML format. See Remarks for the detailed description
  • token – An encrypted string constructed using the passed-in parameters and the partner-specific “shared secret” provided by Frankly Media. Unless requested differently by the partner, the MD5 hashing algorithm is used to produce the token. For the purpose of this call the following formula should be used: md5(SiteID + UserName + Email + Password + timestamp + shared secret). SiteID, UserName, Email and Password are attributes of the member parameter (see Remarks for details).
  • partnerCode – Partner identifier issued by Frankly Media.
  • timestamp – Verification timestamp. UTC time of the client call. Must be the same value used to produce the token and in the following format: YYYYMMDDHHmmss.

How to call

This request is an http post. The contenttype attribute must be set to application/XML. The body of the post must be in the following format:

<CreateUpdateMember xmlns=”http://www.franklymedia.com/ISubscriptions” xmlns:i=”<a href=”http://www.w3.org/2001/XMLSchema-instance”>http://www.w3.org/2001/XMLSchema-instance</a>”>
<member xmlns:a=”http://www.franklymedia.com/datacontract/MemberApiDO” xmlns:i=”<a href=”http://www.w3.org/2001/XMLSchema-instance”>http://www.w3.org/2001/XMLSchema-instance</a>”>
<a:MemberID>0</a:MemberID>
<a:UserName>[email protected]</a:UserName>
<a:Password>xyz</a:Password>
<a:Email>[email protected]</a:Email>
<a:Gender>F</a:Gender>
<a:Zip>31562</a:Zip>
<a:SiteID>567</a:SiteID>
<a:TimeZoneCode>ET</a:TimeZoneCode>
<a:ReferredBy />
<a:HomeNetworkID />
<a:PersistCookie />
<a:HomePhone>770-123-4567</a:HomePhone>
<a:WorkPhone />
<a:FirstName>Bob</a:FirstName>
<a:LastName>Fireman</a:LastName>
<a:Address1>500 Chastain Blvd</a:Address1>
<a:Address2 />
<a:City>Kennesaw</a:City>
<a:State>GA</a:State>
<a:ScanCardNo>GA</a:ScanCardNo>
<a:EmailHTML>true</a:EmailHTML>
<a:NoEmail>false</a:NoEmail>
<a:DefaultSubscriptions>true</a:DefaultSubscriptions>
<a:DOB>1970-01-01</a:DOB>
<a:MemberOptIn1 />
<a:EmailOnly />
<a:EthnicityID />
<a:CompanyName />
<a:WorkAddress1 />
<a:WorkAddress2 />
<a:WorkCity />
<a:WorkState />
<a:WorkZip />
<a:MonthlyEmailOptIn />
<a:Country>US</a:Country>
<a:MyPoints />
<a:MobileNumber />
<a:ExMemberID />
<a:IPAddress />
<a:ListeningFrom />
<a:SetPasswordEmail />
<a:ThirdPartyAllowed />
<a:AffiliationID />
<a:Source />
<a:Subscriptions xmlns:b=”<a href=”http://www.franklymedia.com/datacontract/SubscriptionInfo”>http://www.franklymedia.com/datacontract/SubscriptionInfo</a>”>
<b:SubscriptionInfo>
<b:SubscriptionID>1234</b:SubscriptionID>
<b:OptIn>true</b:OptIn>
</b:SubscriptionInfo>
<b:SubscriptionInfo>
<b:SubscriptionID>5678</b:SubscriptionID>
<b:OptIn>false</b:OptIn>
</b:SubscriptionInfo>
<b:SubscriptionInfo>
<b:SubscriptionID>9101112</b:SubscriptionID>
<b:OptIn>false</b:OptIn>
</b:SubscriptionInfo>
</a:Subscriptions>
</member>
<token>6B-2C-68-3B-56-BE-49-03-62-98-01-33-E6-5B-B5-66</token>
<partnerCode>FranklyTest</partnerCode>
<timestamp>20100615161000</timestamp>
</CreateUpdateMember>
[/xml]

Note: Subscriptions XML is optional and can be excluded.

Return value

<SynchResponse xmlns=”http://schemas.datacontract.org/2004/07/ListenerAPI.DataObjects” xmlns:i=”http://www.w3.org/2001/XMLSchema-instance”>
<Status>FAILED</Status>
<MemberID i:nil=”true”/>
<Message>Call expired</Message>
<StatusCode>500</StatusCode>
</SynchResponse>

  • Status: “SUCCESS” or “FAILED”.
  • MemberID: will be filled if it was successfully processed. And this is the TL member id you may want to hold on for future use.
  • Message: error message.
  • StatusCode: 200, 400 or 500 (200 means no errors, it was successfully processed. 400 means client error, and 500 means system error).

Remarks

The member parameter has the following set of attributes. The attributes are listed in the order, in which they are expected to appear when the structure is posted to the API.

Values that are required or used in the generation of the token parameter are highlighted.

  • MemberID(Required) – Unique ID of the member in the FM database. If the value is set to 0, a new record will be created in the FM database, provided that other values in the object meet all validation requirements.
  • UserName(Required) – Also used for the token generation. Depending on the site setting, the value can be either user-generated or user’s email. See GetStationInfo API.
  • Password(Required) – Also used for the token generation.
  • Email(Required) – Also used for the token generation.
  • Gender – acceptable values are [M, F, X, and U] which are [Male, Female, Didn’t respond, and Unknown (didn’t ask)]
  • Zip (Required) – User’s zip/postal code.
  • SiteID(Required) – Also used for the token generation. Unique ID for your Site in the FM database. Given by FM.
  • TimeZoneCode(Required) – Time Zone Code using one of the following values: ET, CT, PT
  • ReferredBy
  • HomeNetworkID(Required) – Use “1” for Engage sites.
  • PersistCookie
  • HomePhone – Phone Number in the following format 999-999-9999
  • WorkPhone – Phone Number in the following format 999-999-9999
  • FirstName
  • LastName
  • Address1
  • Address2
  • City
  • State
  • ScanCardNo
  • EmailHTML – HTML Format in Email only
  • NoEmail – Indicates whether the member wants to receive communications from the FM program. Allowed value: “true” or “false”.
  • DefaultSubscriptions – (optional) This can be used to override automatic subscribing to all subscriptions which are set to ‘defaulted on’.  By default when a new user is created, that user is automatically subscribed to any subscription that is set up as ‘defaulted on’.  To prevent the user from being automatically subscribed to ‘defaulted on’ subscriptions use the value “false”.  This only applies to creation of new records and has no affect on updates since users are not automatically subscribed during an update.
  • DOB – Members date of birth in the following format: yyyy-mm-dd.
  • MemberOptIn1 – special use case for previous integrations
  • EmailOnly
  • EthnicityID
  • CompanyName
  • WorkAddress1
  • WorkAddress2
  • WorkCity
  • WorkState
  • WorkZip
  • SetPasswordEmail
  • MonthlyEmailOptIn – if your integration is not already using this field, please do not include it in your calls
  • Country -Country using one of the following values: US, CA, AU, KY
  • MyPoints – if your integration is not already using this field, please do not include it in your calls
  • MobileNumber – Phone Number in the following format 999-999-9999
  • ExMemberID – Unique ID of the member in the partner database.
  • IPAddress
  • ListeningFrom – if your integration is not already using this field, please do not include it in your calls
  • ThirdPartyAllowed – if your integration is not already using this field, please do not include it in your calls
  • AffiliationID – if your integration is not already using this field, please do not include it in your calls
  • Source – maximum length: 50 characters, indicates where the member is being created from for reporting purposes. In generally, should only be used on creation of member, not update.
  • Subscriptions (optional). This allows a registration to include information about which subscriptions to opt-in / opt-out of. Containing one or more SubscriptionInfo structures. Each SubscriptionInfo tag contains two sub-tags: SubscriptionID and OptIn. SubscriptionID simply contains the unique identifier for a subscription, while OptIn indicates whether or not to subscribe to that particular item.

Examples

For an generic example of this API call from PHP, please refer to UpdateMember