The GetForms service allows you to recall a list of all forms in a Flexmail account.
SOAP Action: GetForms
SOAP Return Object: GetFormsResp
The following table describes the parameters used for calling the GetForms service.
Parameter | Mandatory | Type | Description |
---|---|---|---|
header | Y | APIRequestHeader | Header for authentication |
The following table describes the parameters returned from the GetForms service.
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 |
0 | No error |
---|---|
220 | Authentication error, see header object for detailed information |
221 | No forms found. Internal error or user has no forms |
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; } ?>