Need An Email Marketing Solution For All Of Your Customers?

Partner With VerticalResponse!

renderCampaignContent


The renderCampaignContent() method is used to provide a picture of what the finished campaign looks like. The campaign can be specified by id or by hash. The content_type should be set to either “html” or “text”. The only view_type currently supported is “preview”.

If you’re looking for the campaign’s subject line, it can be accessed with the method enumerateEmailCampaigns with the “include_content” option set to true.

Input

[vrtypens:renderCampaignContentArgs]

session_id [xsd:string] (required)
Your API session id.
campaign_id [xsd:int]
The ID of the campaign to render. Either this or “campaign_hash” must be provided.
campaign_hash [xsd:string]
The hash of the campaign to render. Either this or “campaign_id” must be provided.
content_type [xsd:string] (required)
Set this to “html” for an HTML rendering of the campaign, and set it to “text” for a text-only rendering of the campaign.
view_type [xsd:string] (required)
Set this to “preview” for a preview rendering of the campaign, and set it to “mailing” for an actual
mailable rendering of the campaign. For actual mailable renderings, all links are replaced with redirect
links.
max_text_line_length [xsd:int]
For text-only renderings of a campaign, this is the width of a line in the rendering
after text wrapping. The default value is 70.

Examples

Perl

$vrapi->renderCampaignContent( {
    session_id   => $sid,
    campaign_id  => $cid,
    view_type    => 'preview',
    content_type => 'html',
} );

PHP

$vrapi->renderCampaignContent( array(
    'session_id'     => $sid,
    'campaign_id'    => $cid,
    'view_type'      => 'preview',
    'content_type'   => 'html',
) );

Ruby

vr.renderCampaignContent({
    'session_id'     => sid,
    'campaign_id'    => cid,
    'view_type'      => 'preview',
    'content_type'   => 'html',
})