Getting Started

This API documentation includes everything you need to start building your application. Whether you wish to create a connection with your CRM, CMS, website or other platform, you can simply choose the services that you want to include in your integration.

Before you start programming, you need to download the WSDL file.

A WSDL (Web Services Description Language) defines the interface for a SOAP Web services API. Normally, you use the WSDL file with a programming environment, such as Visual Studio or Axis, that generates classes or objects for calling the API. For PHP web applications, all that is necessary to use SOAP is to enable the SOAP Extension. The WSDL File: http://soap.flexmail.eu/3.0.0/flexmail.wsdl

The service itself connects to: http://soap.flexmail.eu/3.0.0/flexmail.php

Example

Every section of the API comes with a PHP 5 example. The examples put together are in fact one application, which is build up along the way. This is also the reason why the code cannot be repeated over and over again. The creation of the SOAPClient is only shown once, since it is a basic building block.

Example Basis (PHP 5)

After you have saved the WSDL file to your local working directory, you need to create a new SOAP Client. The example below shows you how to do that. From now on in this reference guide the variable "$SoapClient" will reference to this SOAP Client.
                <?php
                try {
                    $SoapClient = new SoapClient('flexmail.wsdl', array(
                        'location' => 'http://soap.flexmail.eu/3.0.0/flexmail.php',
                        'uri' => 'http://soap.flexmail.eu/3.0.0/flexmail.php',
                        'trace' => 1
                    ));
                } catch(Exception $ex) {
                    echo "SOAP Exception\r\n";
                    print_r($ex);
                }
                ?>
                

Headers

Type: APIRequestHeader

The APIRequestHeader type is used for authentication on each request that is performed on the Flexmail API.

Table: Parameters for APIRequestHeader type

Parameter Mandatory Type Discription
userId Y Integer The user id, from the account you wish to access.
userToken Y String Your personal token

Type: APIResponseHeader

The APIResponseHeader type returns information on authentication. Any errors which occur on authentication are contained in the APIResponseHeader type.

Table: Parameters for APIResponseHeader type

Parameter Mandatory Type Discription
errorCode / Integer Numerical value of the error
errorMessage / String Short literal description of the error
timestamp / String Timestamp, format: YYYY-MM-DDTHH:ii:ss

Table: List of all possible error codes

Code Description
0 No error
201 User ID is mandatory
202 User ID is invalid
203 User Token is mandatory
204 IP Address is not connectable
205 Invalid token


You are now ready to integrate the services.

Get started