TemplateContentUpdated


The TemplateContentUpdated API method is a scraper like method that allows clients to setup end-points (URLs) that render the specific portions of HTML markup to be placed on Frankly Media hosted pages of rewards sites. On the Frankly Media template rewards site, clients will be able to replace three zones in the template (template top zone, station header zone, and station footer zone). These zones are specified in the template menu of the Frankly Media admin.

Once the API method is called by the client/partner, FM will go to configured endpoints to scrape the HTML and place it into the corresponding engagement site’s template zone.

In summary:

1. Create end-points (URLs) that render HTML that needs to be placed.

2. When the content is updated on the client’s side, the API method will need to be called to inform Frankly Media that the content has been changed.

3. Frankly Media will turn around and scrape the HTML and place the updated content into the corresponding zones.

Parameters

• PARTNERCODE – Identifier issued by Frankly Media

• SITECODE – Partner’s unique identifier of the site

• TIMESTAMP – Verification timestamp. UTC time of the client call. Must be in the following format: YYYYMMDDHHmmss

• TOKEN – An encrypted string constructed using the passed-in parameters and the partner-specific “shared secret” provided by the 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(partnerCode + SiteCode + TimeStamp + SharedSecrect)

How to call

This request is an http get. The request is expected to be as follows:

https://api.enticent.com/Subscriptions.svc/TemplateContentUpdated/{PARTNERCODE}/{SITECODE}/{TIMESTAMP}/{TOKEN}

Where the text in the request that is in {CAPS} should be replaced with network-specific values.

Return value

The call will return a SynchResponse XML structure with a status of success or failure, depending on the results of the call.

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

Remarks

Note that if the content is not changed when Frankly Media worker process compares the scraped HTML with the existing HTML, it will not update the content.

Example

Partner: testpartner01

Site: testsite01

Timestamp: 20110207184849

Token: fe8d4a55191f0c8ec362790fb54338d9
https://api.enticent.com/Subscriptions.svc/TemplateContentUpdated/ testpartner01/testsite01/20110207184849/fe8d4a55191f0c8ec362790fb54338d9