Service: CreateLandingPage

The CreateLandingPage service allows you to create a new landing page within Flexmail. The ID of the newly created landing page will be returned to you.

Service Details

SOAP Action: CreateLandingPage
SOAP Return Object: CreateLandingResp

Input

The following table describes the parameters used for calling the CreateLandingPage service.

Table: instance of CreateLandingPageReq

Parameter Mandatory Type Description
header Y APIRequestHeader Header for authentication
landingPageType Y LandingPageType Landing page type to create

Output

The following table describes the parameters returned from the CreateLandingPage service.

Table: instance of CreateLandingPageResp

Parameter Mandatory Type Description
header / APIResponseHeader Header containing authentication information
errorCode / Integer Numerical value of the error
errorMessage / String Short literal description of the error
landingPageId / Integer Id of the new landing page

Table: response codes of CreateLandingPageResp.

0 No error
220 Authentication error, see header object for detailed information
221 Landing page name is mandatory
222 Landing page text is mandatory
223 Landing page name already exists
224 Internal error

Example

This example shows you the creation of a new landing page within Flexmail, the name of our landing page is "my new landing page" and the text contains the actual HTML code which makes up the message.

<?php
$header->userId = USER_ID;
$header->userToken = USER_TOKEN;

$createLandingPageReq->header = $header;
$createLandingPageReq->landingPageType->landingPageName= "my new landing page";
$createLandingPageReq->landingPageType->landingPageText= urlencode("<html>new</html>");

$createLandingPageResp = $SoapClient->__soapCall("CreateLandingPage", array($createLandingPageReq));

if ($createLandingPageResp->errorCode == 0) {
	echo "Landing page created, landing page id:" . $createLandingPageResp->messageId;
} else {
	echo "Landing page creation failed: " . $createLandingPageResp->errorMessage;
}
?>