Loading...
Area: Episerver Campaign
Applies to versions: Not applicable

onlineversion

This operation shows a personalized online version of a mailing in Episerver Campaign.

You can select a specific mailing by its internal name or search your mailings using the bmPattern parameter. If more than one mailing matches the pattern, the latest one is selected. Also, if you only specify the recipient ID, the latest mailing is displayed.

Use this operation, for example, to create a link to the latest newsletter. This link can be used in confirmation emails or on your website. Unlike other operations, this one always performs forwarding to a web page, where the online version of the mailing is shown. Thus, no bmUrl or bmSuccessUrl parameters have to be transmitted.

This operation is available in the mail and the form service.

Warning:
Never use this HTTP API request directly on a web page or in a mailing
. HTTP API requests of the form service must always be executed by the server without exposing the used source code to others. To use HTTP operations in mailings, use the mail service of the HTTP API (refer to Mail service).

Parameters

Name Mandatory Default value Description

bmRecipientId

yes/no

The ID of the new recipient (usually the email address)

If used in the mail service, this parameter is not mandatory (the email address is sent anyway). If used in the form service, the parameter is mandatory.

bmPattern

no

With the pattern parameter, you can search for mailings that match this pattern. The pattern refers to the internal names of the mailings.

You can use wildcards to define a pattern. Use a question mark ? for a single character and * for several characters. If more than one mailing is found, the latest one is selected.

bmMailingId

yes/no

This parameter explicitly transmits the ID of the mailing you want to display. If bmPattern and bmMailingId are transmitted, the bmMailingId has priority.

If used in the mail service, the parameter is mandatory.

Return values

Value Description
ok

Recipient forwarded to the online version of the email

missing_id

The recipient with the given bmRecipientId does not exist in the recipient list, or no appropriate mailing was found.

wrong_tag

Authorization failed.

Error codes:

  • 501=wrong authentication tag
  • 502=wrong request IP
  • 503=wrong request method
  • 504=wrong protocol
  • 505=wrong recipient list
  • 506=wrong action
  • 507=action not found

Note: If a verification of the authentication tag does not solve the problem, contact customer support.

system_error

A general error occurred.

Example 1

.../mail/.../onlineversion?bmMailingId={bmMailingId} 

The recipient of the email is forwarded to the last mailing sent by the same client.
Example 2

.../form/.../onlineversion?bmRecipientId=john.smith%40example.com&bmPattern=special* 

The recipient with the ID "john.smith@example.com" is redirected to the last mailing sent by the same client whose internal name starts with "special".

Last updated: Apr 25, 2018