Service: GetForms

The GetForms service allows you to recall a list of all forms in a Flexmail account.

Service Details

SOAP Action: GetForms
SOAP Return Object: GetFormsResp

Input

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

Table: instance of GetFormsReq

Parameter Mandatory Type Description
header Y APIRequestHeader Header for authentication

Output

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

Table: instance of GetFormsResp

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
formTypeItems / Array of FormType Array of FormType items

Table: response codes of GetFormsResp.

0 No error
220 Authentication error, see header object for detailed information
221 No forms found. Internal error or user has no forms

Example

This example show the request of a list of all forms.

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

// create the request
$getFormsReq->header = $header;

// execute the request
$getFormsResp = $SoapClient->__soapCall("GetForms", array($getFormsReq));

if ($getFormsResp->ErrorCode == 0) {
	foreach ($getFormsResp->formTypeItems as $formType) {
		echo $formType->formId." - ".$formType->formName."<br/>"; 
	}
} else {
	echo "A list of forms could not be retrieved: " . $getFormsResp->errorMessage;
}
?>