gift

Mobile API Server Documentation

Introduction

iBuildApp provides server API (SOAP Web Service) - a server-side solution that allows developers to manage content for their mobile apps.

We recommend that you download a SOAP client that can access and interact with SOAP-based service.

Example - PHP SOAP extension:

    require_once 'APITypes.php';
$client = new SoapClient( "https://ibuildapp.com/api/soap.wsdl", array(
   'classmap' => APIGlobal::$classmap
));

When the Client-object is initiated, you may call a function from the Web Service (see examples below). Web service transfers string data in UTF-8 format.

All API requests require private key (apiSecret). You can download it from App management page.

The API secret key value is the same and unique for each application.

To make a call using PHP, you can use APIMessage, APIParam, or APIItem classes. Those classes are described in APITypes.php file. The objects might be represented as associative array (see asArray functions).


addFunctionParamItem

The function is used to add an item (image, event, etc) to app function. Input parameters may vary based on certain function.

here are two ways to upload files on the server:

  • Specify *Url parameter (link to file located on a server) - the file is getting uploaded on iBuildApp server for additional processing.
  • Specify *Data parameter (file data, encoded into Base64 format) - the file is processed and stored on iBuildApp server.

The function returns the new item id.

Output parameters:

Parameter Description Data Type Required
id Item identifier Integer Yes

Example of XML-message with input parameters:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 <SOAP-ENV:Body>
  <SOAP-ENV:addFunctionParamItemResponse>
   <data>
    <param name="id">311</param>
   </data>
  </SOAP-ENV:addFunctionParamItemResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

If an error occurs during a SOAP request, the API returns a SoapFault message. The faultstring property contains the error description.

Example:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 <SOAP-ENV:Body>
  <SOAP-ENV:Fault>
   <faultcode>Download</faultcode>
   <faultstring>The requested URL returned error: 404</faultstring>
  </SOAP-ENV:Fault>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Adding an image

The function is used to add an image to Photo Gallery.

Input parameters:

Parameter Description Data Type Required
apiSecret API secret key String Yes
functionId App function ID Integer Yes
photoCaption Image caption String Yes
photoDescription Image description String NO
photoFileUrl Link to image file located on a server String, URL Yes
photoFileData Image file data encoded into Base64 format String, base64 encoded Yes

PHP example:

try {
   $result = $client->addFunctionParamItem( new APIMessage(
      new APIParam('apiSecret', 'your API key'),
      new APIParam('functionId', 1480),
      new APIParam('photoCaption', 'New image'),
      new APIParam('photoFileUrl', 'http://example.com/upload/123.jpg')
   ));
   print_r( $result->asArray('param'));
}
catch (SoapFault $e) {
   print $e->faultcode.' - '.$e->faultstring;
}

Example of XML-message with input parameters:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 <SOAP-ENV:Body>
  <SOAP-ENV:addFunctionParamItem>
   <data>
    <param name="apiSecret">your API key</param>
    <param name="functionId">1480</param>
    <param name="photoCaption">New image</param>
    <param name="photoFileUrl">http://localhost/upload/123.jpg</param>
   </data>
  </SOAP-ENV:addFunctionParamItem>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Adding an event

The function is used to add an event to Events function.

Input parameters:

Parameter Description Data Type Required
apiSecret API secret key String Yes
functionId App function ID Integer Yes
eventDate Event date and time String, Date Yes
eventName Event title String Yes
eventDescription Event description String Yes

The date should be formatted as "MM/DD/YYYY hh:mm am|pm".

PHP example:

try {
   $result = $client->addFunctionParamItem( new APIMessage(
      new APIParam('apiSecret', 'your API key'),
      new APIParam('functionId', 1512),
      new APIParam('eventName', 'New event'),
      new APIParam('eventDescription', 'New event description'),
      new APIParam('eventDate', '03/24/2012 06:00 pm')
   ));
   print_r( $result->asArray('param'));
}
catch (SoapFault $e) {
   print $e->faultcode.' - '.$e->faultstring;
}

Example of XML-message with input parameters:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 <SOAP-ENV:Body>
  <SOAP-ENV:addFunctionParamItem>
   <data>
    <param name="apiSecret">your API key</param>
    <param name="functionId">1512</param>
    <param name="eventName">New event</param>
    <param name="eventDescription">New event description</param>
    <param name="eventDate">03/24/2012 06:00 pm</param>
   </data>
  </SOAP-ENV:addFunctionParamItem>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Adding news

The function is used to add a news to News function.

Input Parameters:

Parameter Description Data Type Required
apiSecret API secret key String Yes
functionId App function ID Integer Yes
newsDate News date and time String, date Yes
newsTitle News title String Yes
newsContent News description String Yes
newsImageUrl Link to image file located on a server String, URL Yes
newsImageData File data encoded into Base64 format String, base64 encoded Yes

The date should be formatted as "MM/DD/YYYY hh:mm am|pm".

PHP example:

try {
   $result = $client->addFunctionParamItem( new APIMessage(
      new APIParam('apiSecret', 'your API key'),
      new APIParam('functionId', 1512),
      new APIParam('newsTitle', 'News'),
      new APIParam('newsContent', 'Last News'),
      new APIParam('newsDate', '03/24/2012 06:00 pm'),
      new APIParam('newsImageUrl', 'http://localhost/upload/123.jpg')
   ));
   print_r( $result->asArray('param'));
}
catch (SoapFault $e) {
   print $e->faultcode.' - '.$e->faultstring;
}

Example of XML-message with input parameters:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 <SOAP-ENV:Body>
  <SOAP-ENV:addFunctionParamItem>
   <data>
    <param name="apiSecret">your API key</param>
    <param name="functionId">1512</param>
    <param name="newsTitle">Last News</param>
    <param name="newsContent">Last News Content</param>
    <param name="newsDate">03/24/2012 06:00 pm</param>
    <param name="newsImageUrl">http://localhost/upload/123.jpg</param>
   </data>
  </SOAP-ENV:addFunctionParamItem>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

updateFunctionParamItem

The function is used to change one or more parameters of existing item (images, events, etc). Input parameters may vary based on certain app function.

There are two ways to upload files on the server:

  • Specify *Url parameter (link to file located on a server) - the file is getting uploaded on iBuildApp server for additional processing.
  • Specify *Data parameter (file data, encoded into Base64 format) - the file is processed and stored on iBuildApp server.

The function does not return any value.

If an error occurs during a SOAP request, the API returns a SoapFault message. The faultstring property contains the error description.

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 <SOAP-ENV:Body>
  <SOAP-ENV:Fault>
   <faultcode>Error</faultcode>
   <faultstring>Incorrect item id</faultstring>
  </SOAP-ENV:Fault>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Image Editing

The function is used to change an image.

Input parameters:

Parameter Description Data Type Required
apiSecret API secret key String Yes
functionId App function ID Integer Yes
id Image Identifier Integer Yes
photoCaption Image title String No
photoDescription Image description String No
photoFileUrl Link to image file located on a server String, URL No
photoFileData Image file data encoded into Base64 format String, base64 encoded No

PHP example:

try {
   $client->updateFunctionParamItem( new APIMessage(
      new APIParam('apiSecret', 'your API key'),
	new APIParam('functionId', 1512),
	new APIParam('id', 310),
	new APIParam('photoFileUrl', 'http://localhost/upload/123.jpg')
   ));
}
catch (SoapFault $e) {
   print $e->faultcode.' - '.$e->faultstring;
}

Example of XML-message with input parameters:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 <SOAP-ENV:Body>
  <SOAP-ENV:updateFunctionParamItem>
   <data>
    <param name="apiSecret">your API key</param>
    <param name="functionId">1512</param>
    <param name="id">310</param>
    <param name="photoFileUrl">http://localhost/upload/123.jpg</param>
   </data>
  </SOAP-ENV:updateFunctionParamItem>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Event Editing

The function is used to edit events.

Input parameters:

Parameter Description Data Type Required
apiSecret API secret key String Yes
functionId App function ID Integer Yes
id Event Identifier Integer Yes
eventDate Event date and time String, date No
eventName Event name String No
eventDescription Event description String No

The date should be formatted as "MM/DD/YYYY hh:mm am|pm".

PHP example:

try {
   $client->updateFunctionParamItem( new APIMessage(
      new APIParam('apiSecret', 'your API key'),
	new APIParam('functionId', 1512),
	new APIParam('id', 310),
	new APIParam('eventDate', '03/24/2012 06:00 am')
   ));
}
catch (SoapFault $e) {
   print $e->faultcode.' - '.$e->faultstring;
}

Example of XML-message with input parameters:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 <SOAP-ENV:Body>
  <SOAP-ENV:updateFunctionParamItem>
   <data>
    <param name="apiSecret">your API key</param>
    <param name="functionId">1512</param>
    <param name="id">310</param>
    <param name="eventDate">03/24/2012 06:00 am</param>
   </data>
  </SOAP-ENV:updateFunctionParamItem>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Editing News

The function is used to edit news.

Input parameters:

Parameter Description Data Type Required
apiSecret API secret key String Yes
functionId App function ID Integer Yes
id News ID Integer Yes
newsDate News date and time String, date No
newsTitle News title String No
newsContent News description String No
newsImageUrl Link to image file located on a server String, URL No
newsImageData Image file data encoded into Base64 format String, base64 encoded No

The date should be formatted as "MM/DD/YYYY hh:mm am|pm".

PHP example:

try {
   $client->updateFunctionParamItem( new APIMessage(
      new APIParam('apiSecret', 'your API key'),
	new APIParam('functionId', 1512),
	new APIParam('id', 310),
	new APIParam('newsDate', '03/24/2012 06:00 am')
   ));
}
catch (SoapFault $e) {
   print $e->faultcode.' - '.$e->faultstring;
}

Example of XML-message with input parameters:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 <SOAP-ENV:Body>
  <SOAP-ENV:updateFunctionParamItem>
   <data>
    <param name="apiSecret">your API key</param>
    <param name="functionId">1512</param>
    <param name="id">310</param>
    <param name="newsDate">03/24/2012 06:00 am</param>
   </data>
  </SOAP-ENV:updateFunctionParamItem>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

deleteFunctionParamItem

The function is used to delete an item (image, event, etc) from app functions.

Input parameters:

Parameter Description Data Type Required
apiSecret API secret key String Yes
functionId App function ID Integer Yes
id Item identifier Integer Yes

PHP example:

try {
   $client->deleteFunctionParamItem( new APIMessage(
      new APIParam('apiSecret', 'Your API key'),
	new APIParam('functionId', 1512),
	new APIParam('id', 310)
   ));
}
catch (SoapFault $e) {
   print $e->faultcode.' - '.$e->faultstring;
}

Example of XML-message with input parameters:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 <SOAP-ENV:Body>
  <SOAP-ENV:deleteFunctionParamItem>
   <data>
    <param name="apiSecret">Your API key</param>
    <param name="functionId">1512</param>
    <param name="id">310</param>
   </data>
  </SOAP-ENV:deleteFunctionParamItem>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

The function doesn't return any value.

If an error occurs during a SOAP request, the API returns a SoapFault message. The faultstring property contains the error description.

Example of XML-message:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 <SOAP-ENV:Body>
  <SOAP-ENV:Fault>
   <faultcode>Error</faultcode>
   <faultstring>Incorrect item id</faultstring>
  </SOAP-ENV:Fault>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

getFunctions

The function is used to retrieve a list of app functions.

Input parameters:

Parameter Description Data Type Required
apiSecret API secret key String Yes

PHP example:

try {
   $result = $client->getFunctions( new APIMessage(
      new APIParam('apiSecret', 'Your API key')
   ));
   print_r( $result->asArray('item'));
}
catch (SoapFault $e) {
   print $e->faultcode.' - '.$e->faultstring;
}

Example of XML-message with input parameters:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 <SOAP-ENV:Body>
  <SOAP-ENV:getFunctions>
   <data>
    <param name="apiSecret">Your API key</param>
   </data>
  </SOAP-ENV:getFunctions>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

If an error occurs during a SOAP request, the API returns a SoapFault message. The faultstring property contains the error description.

Example of XML-message:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 <SOAP-ENV:Body>
  <SOAP-ENV:Fault>
   <faultcode>Auth</faultcode>
   <faultstring>Access denied</faultstring>
  </SOAP-ENV:Fault>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Output parameters consist of several items that describe app functions. Function ID is specified into the item ID parameter.

Nested parameters:

Parameter Description Data Type Required
controlId Identifier of a control item that calls the function Integer Yes
title Page title String Yes
type Function type String Yes

Example of XML-message with output parameters:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://new.webservice.namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <SOAP-ENV:Body>
  <SOAP-ENV:getFunctionsResponse>
   <data>
    <item id="1480">
     <param name="controlId" xsi:type="ns1:param">3</param>
     <param name="title" xsi:type="ns1:param">Photo Gallery</param>
     <param name="type" xsi:type="ns1:param">photo</param>
    </item>
    <item id="1504">
     <param name="controlId" xsi:type="ns1:param">5</param>
     <param name="title" xsi:type="ns1:param">My Ebook</param>
     <param name="type" xsi:type="ns1:param">ebook</param>
    </item>
   </data>
  </SOAP-ENV:getFunctionsResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

getFunctionParams

The function is used to retrieve the list of parameters and descriptions for items (images, events, etc.) connected with app function.

Input Parameters:

Parameter Description Data Type Required
apiSecret API secret key String Yes
functionId App function identifier Integer Yes

PHP example:

try {
   $result = $client->getFunctionParams( new APIMessage(
      new APIParam('apiSecret', 'Your API key'),
	new APIParam('functionId', 1512)
   ));
   print_r( $result->asArray('param'));
   print_r( $result->asArray('item'));
}
catch (SoapFault $e) {
   print $e->faultcode.' - '.$e->faultstring;
}

Example of XML-message with input parameters:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 <SOAP-ENV:Body>
  <SOAP-ENV:deleteFunctionParamItem>
   <data>
    <param name="apiSecret">Your API key</param>
    <param name="functionId">1512</param>
   </data>
  </SOAP-ENV:deleteFunctionParamItem>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

If an error occurs during a SOAP request, the API returns a SoapFault message. The faultstring property contains the error description.

Example of XML-message:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 <SOAP-ENV:Body>
  <SOAP-ENV:Fault>
   <faultcode>Auth</faultcode>
   <faultstring>Incorrect function id</faultstring>
  </SOAP-ENV:Fault>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Output parameters depend on the certain app function.

Photo Gallery

Output parameters:

Parameter Description Data Type Required
functionId App function identifier Integer Yes
title Page title String Yes
backgroundColor Background color String, #rrggbb No
useSource Image source: RSS-feed or manual entry String or Yes
rssurl RSS-feed URL link String, URL No

Images are described as items. Identifier is specified into id parameter.

Nested parameters:

Parameter Description Data Type Required
order Item order Integer Yes
photoCaption Image caption String Yes
photoDescription Image description String No
photoFile Image file URL String, URL Yes

Example of XML-message with output parameters:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://new.webservice.namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <SOAP-ENV:Body>
  <SOAP-ENV:getFunctionParamsResponse>
   <data>
    <param name="functionId">1480</param>
    <param name="title">Photo Gallery</param>
    <param name="backgroundColor">#eb9be3</param>
    <param name="rssurl">http://api.flickr.com/services/feeds/groups_discuss.gne? id=1803[email protected]&format=rss_200</param>
    <param name="useSource">rss</param>
    <item id="289">
     <param name="order" xsi:type="ns1:param">1</param>
     <param name="photoCaption" xsi:type="ns1:param">Photo #1</param>
     <param name="photoDescription" xsi:type="ns1:param">Photo #1 description</param>
     <param name="photoFile" xsi:type="ns1:param">https://ibuldapp.com/assets/ photos/7-493-1329296573.png</param>
    </item>
   </data>
  </SOAP-ENV:getFunctionParamsResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

News

Output parameters:

Parameter Description Data Type Required
functionId App function identifier Integer Yes
title Page title String Yes
backgroundColor Background color String, #rrggbb No
useSource News source: RSS-feed or manual entry String or Yes
rssurl RSS-feed URL link String, URL No

News are described as items. Identifier is specified into id parameter.

Nested parameters:

Parameter Description Data Type Required
order Item order Integer Yes
newsDate News date and time String Yes
newsTitle News title String Yes
newsContent News description String Yes
newsImage Image file URL String, URL Yes

The date should be formatted as "MM/DD/YYYY hh:mm am|pm".

Example of XML-message with output parameters:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://new.webservice.namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <SOAP-ENV:Body>
  <SOAP-ENV:getFunctionParamsResponse>
   <data>
    <param name="functionId">1512</param>
    <param name="title">News</param>
    <param name="backgroundColor">#b0fcde</param>
    <param name="textColor">#850000</param>
    <param name="rssurl">https://ibuildapp.com/feed/</param>
    <param name="useSource">manual</param>
    <item id="310">
     <param name="order" xsi:type="ns1:param">3</param>
     <param name="newsTitle" xsi:type="ns1:param">News #1</param>
     <param name="newsContent" xsi:type="ns1:param">News #1 content</param>
     <param name="newsDate" xsi:type="ns1:param">03/01/2012 06:00 pm</param>
     <param name="newsImage" xsi:type="ns1:param">https://ibuildapp.com/assets/data/00000/7/493/images/1330414277.jpg</param>
    </item>
   </data>
  </SOAP-ENV:getFunctionParamsResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Events

Output parameters:

Parameter Description Data Type Required
functionId App function identifier Integer Yes
title Page title String Yes
backgroundColor Background color String, #rrggbb No
useSource Event source: RSS-feed or manual entry String or Yes
rssurl RSS-feed URL link String, URL No

Events are described as items. Identifier is specified into id parameter.

Nested parameters:

Parameter Description Data Type Required
order Item order Integer Yes
eventDate Event date and time String Yes
eventName Event name String Yes
eventDescription Event description String Yes

The date should be formatted as "MM/DD/YYYY hh:mm am|pm".

Example of XML-message with output parameters:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://new.webservice.namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <SOAP-ENV:Body>
  <SOAP-ENV:getFunctionParamsResponse>
   <data>
    <param name="functionId">1512</param>
    <param name="title">Event</param>
    <param name="backgroundColor">#b0fcde</param>
    <param name="textColor">#850000</param>
    <param name="rssurl">https://ibuildapp.com/feed/</param>
    <param name="useSource">manual</param>
    <item id="310">
     <param name="order" xsi:type="ns1:param">3</param>
     <param name="eventDate" xsi:type="ns1:param">03/01/2012 06:00 pm</param>
     <param name="eventName" xsi:type="ns1:param">Event #1</param>
     <param name="eventDescription" xsi:type="ns1:param">Event #1 description</param>
    </item>
   </data>
  </SOAP-ENV:getFunctionParamsResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Ebook

Output parameters:

Parameter Description Data Type Required
functionId App function identifier Integer Yes
title Page title String Yes

Ebook chapters are described as items. Identifier is specified into id parameter.

Nested parameters:

Parameter Description Data Type Required
chapter Chapter title String Yes
url Link to a file containing HTML code String, URL Yes

Example of XML-message with output parameters:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://new.webservice.namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <SOAP-ENV:Body>
  <SOAP-ENV:getFunctionParamsResponse>
   <data>
    <param name="functionId">1504</param>
    <param name="title">My Ebook</param>
    <item id="1329742290">
     <param name="chapter" xsi:type="ns1:param">Chapter #1</param>
     <param name="url" xsi:type="ns1:param">https://ibuildapp.com/assets/ebooks/ 1504/1329742290.txt</param>
    </item>
    <item id="1329742427">
     <param name="chapter" xsi:type="ns1:param">Chapter #2</param>
     <param name="url" xsi:type="ns1:param">https://ibuildapp.com/assets/ebooks/ 1504/1329742427.txt</param>
    </item>
   </data>
  </SOAP-ENV:getFunctionParamsResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Ecommerce

Output parameters:

Parameter Description Data Type Required
functionId App function identifier Integer Yes
title Page title String Yes

Products are described as items. Identifier is specified into id parameter.

Nested parameters:

Parameter Description Data Type Required
id AppStore product ID String Yes
name Product name String Yes
price Product price, USD Number Yes
image Image file URL String, URL Yes

Example of XML-message with output parameters:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://new.webservice.namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <SOAP-ENV:Body>
  <SOAP-ENV:getFunctionParamsResponse>
   <data>
    <param name="functionId">1509</param>
    <param name="title">eCommerce</param>
    <item id="1329809282">
     <param name="id" xsi:type="ns1:param">888222</param>
     <param name="name" xsi:type="ns1:param">Daring Doo</param>
     <param name="price" xsi:type="ns1:param">9.95</param>
     <param name="image" xsi:type="ns1:param">https://ibuildapp.com/assets/ecommerce/493-1329809278.png</param>
    </item>
   </data>
  </SOAP-ENV:getFunctionParamsResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Video List

Output parameters:

Parameter Description Data Type Required
functionId App function identifier Integer Yes
title Page title String Yes
backgroundColor Background color String, #rrggbb No

Videos are described as items. Identifier is specified into id parameter.

Nested parameters:

Parameter Description Data Type Required
mediaCaption Video caption String Yes
mediaDescription Video description String No
mediaFile Video file URL String, URL Yes
thumbFile Thumbnail image file URL String, URL Yes

Example of XML-message with output parameters:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://new.webservice.namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <SOAP-ENV:Body>
  <SOAP-ENV:getFunctionParamsResponse>
   <data>
    <param name="functionId">1507</param>
    <param name="title">Media</param>
    <param name="backgroundColor">#52c2ff</param>
    <item id="297">
     <param name="order" xsi:type="ns1:param">1</param>
     <param name="mediaFile" xsi:type="ns1:param">https://ibuildapp.com/assets/ media/7-493-1329806488.mp4</param>
     <param name="thumbFile" xsi:type="ns1:param">https:// ibuildapp.com/assets/ media/7-493-1329806488.jpg</param>
     <param name="mediaDescription" xsi:type="ns1:param"></param>
     <param name="mediaCaption" xsi:type="ns1:param">Fluttershy's cheer</param>
    </item>
   </data>
  </SOAP-ENV:getFunctionParamsResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

HTML-page

Output parameters:

Parameter Description Data Type Required
functionId App function identifier Integer Yes
title Page title String Yes
backgroundColor Background color String, #rrggbb No
content HTML-code String Yes

Example of XML-message with output parameters:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 <SOAP-ENV:Body>
  <SOAP-ENV:getFunctionParamsResponse>
   <data>
    <param name="functionId">1513</param>
    <param name="title">Home</param>
    <param name="backgroundColor">#f5f19d</param>
    <param name="content"><div style=\"text-align: center;\"> <font size=\"5\">Lorem ipsum dolor amet...</font></div><div style=\"text-align: center;\"><br></div></param>
   </data>
  </SOAP-ENV:getFunctionParamsResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Google calendar

Output parameters:

Parameter Description Data Type Required
functionId App function identifier Integer Yes
title Page title String Yes
code HTML-code String Yes

Example of XML-message with output parameters:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 <SOAP-ENV:Body>
  <SOAP-ENV:getFunctionParamsResponse>
   <data>
    <param name="functionId">1518</param>

    <param name="title">Calendar</param>
    <param name="code">&lt;iframe src=&quot;https://www.google.com/calendar/embed?src=test%40example.com&amp;ctz=Europe/Moscow&quot; style=&quot;border: 0&quot; width=&quot;800&quot; height=&quot;600&quot; frameborder=&quot;0&quot; scrolling=&quot;no&quot;&gt;&lt;/iframe&gt;</param>

   </data>
  </SOAP-ENV:getFunctionParamsResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Contacts

Output parameters:

Parameter Description Data Type Required
functionId App function identifier Integer Yes
title Page title String Yes
backgroundColor Background color String, #rrggbb No
name Business/person name String No
phone Phone number String No
email Email address String No
homepage Website URL String, URL No
address Address String No

Phone number should be formatted as <+n(nnn)nnnnnnn>.

Example of XML-message with output parameters:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 <SOAP-ENV:Body>
  <SOAP-ENV:getFunctionParamsResponse>
   <data>
    <param name="functionId">1515</param>
    <param name="title">Contacts</param>
    <param name="backgroundColor">#a9f7a1</param>
    <param name="name">John Doe</param>
    <param name="phone">+7(123)1234567</param>
    <param name="email"></param>
    <param name="homepage"></param>
    <param name="address"></param>
   </data>
  </SOAP-ENV:getFunctionParamsResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Facebook

Output parameters:

Parameter Description Data Type Required
functionId App function identifier Integer Yes
title Page title String Yes
url Facebook wall page URL String, URL Yes

Example of XML-message with output parameters:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 <SOAP-ENV:Body>
  <SOAP-ENV:getFunctionParamsResponse>
   <data>
    <param name="functionId">1516</param>
    <param name="title">FB</param>
    <param name="url">http://touch.facebook.com/ibuildapp</param>
   </data>
  </SOAP-ENV:getFunctionParamsResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Twitter

Output parameters:

Parameter Description Data Type Required
functionId App function identifier Integer Yes
title Page title String Yes
backgroundColor Background color String, #rrggbb No
textColor Text color String, #rrggbb No
username Twitter's username String Yes

Example of XML-message with output parameters:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 <SOAP-ENV:Body>
  <SOAP-ENV:getFunctionParamsResponse>
   <data>
    <param name="functionId">1517</param>
    <param name="title">Twitter</param>
    <param name="backgroundColor">#f6ff7d</param>
    <param name="textColor">#2c1b3d</param>
    <param name="username">iBuildApp</param>
   </data>
  </SOAP-ENV:getFunctionParamsResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

RSS

Output parameters:

Parameter Description Data Type Required
functionId App function identifier Integer Yes
title Page title String Yes
backgroundColor Background color String, #rrggbb No
textColor Text color String, #rrggbb No
rssurl RSS feed URL String, URL Yes

Example of XML-message with output parameters:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 <SOAP-ENV:Body>
  <SOAP-ENV:getFunctionParamsResponse>
   <data>
    <param name="functionId">1521</param>
    <param name="title">Bash</param>
    <param name="backgroundColor">#0b0e47</param>
    <param name="textColor">#21ebd0</param>
    <param name="rssurl">http://bash.im/rss</param>
   </data>
  </SOAP-ENV:getFunctionParamsResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Google Map

Output parameters:

Parameter Description Data Type Required
functionId App function identifier Integer Yes
title Page title String Yes

Locations are described as items. Identifier is specified into id parameter.

Nested parameters:

Parameter Description Data Type Required
point Location name String Yes
latitude Location latitude Number Yes
longitude Location Longitude Number Yes
details Location description String Yes
url Location URL String, URL No

Example of XML-message with output parameters:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://new.webservice.namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <SOAP-ENV:Body>
  <SOAP-ENV:getFunctionParamsResponse>
   <data>
    <param name="functionId">1518</param>
    <param name="title">Map</param>
    <item id="1330677095">
     <param name="point" xsi:type="ns1:param">Akihabara</param>
     <param name="latitude" xsi:type="ns1:param">35.697314</param>
     <param name="longitude" xsi:type="ns1:param">139.77251890000002</param>
     <param name="details" xsi:type="ns1:param">Japan, Tokio, Chiyoda</param>
     <param name="url" xsi:type="ns1:param"></param>
    </item>
   </data>
   </SOAP-ENV:getFunctionParamsResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

AudioStream

Output parameters:

Parameter Description Data Type Required
functionId App function identifier Integer Yes
title Page title String Yes
backgroundColor Background color String, #rrggbb No

Audio streams are described as items. Identifier is specified into id parameter.

Nested parameters:

Parameter Description Data Type Required
url File/stream URL String, URL Yes
description Audio file description String Yes

Example of XML-message with output parameters:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://new.webservice.namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <SOAP-ENV:Body>
  <SOAP-ENV:getFunctionParamsResponse>
   <data>
    <param name="functionId">1519</param>
    <param name="title">Radio</param>
    <param name="backgroundColor"/>
    <item id="1330683429">
     <param name="url" xsi:type="ns1:param">http://yp.shoutcast.com/sbin/tunein-station.pls?id=168942</param>
     <param name="description" xsi:type="ns1:param">Radio Free Vermont</param>
    </item>
   </data>
  </SOAP-ENV:getFunctionParamsResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Video Stream

Output parameters:

Parameter Description Data Type Required
functionId App function identifier Integer Yes
title Page title String Yes
backgroundColor Background color String, #rrggbb No

Video streams are described as items. Identifier is specified into id parameter.

Nested parameters:

Parameter Description Data Type Required
url Stream/file URL String, URL Yes
description Video description String Yes

Example of XML-message with output parameters - see Audio Stream.

Tap to Call

Output parameters:

Parameter Description Data Type Required
functionId App function identifier Integer Yes
title Page title String Yes
phone Phone number String Yes

Phone number should be formatted as +N(NNN)NNNNNNN .

Example of XML-message with output parameters:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 <SOAP-ENV:Body>
  <SOAP-ENV:getFunctionParamsResponse>
   <data>
    <param name="functionId">1522</param>
    <param name="title">Tap</param>
    <param name="phone">+7(123)1234567</param>
   </data>
  </SOAP-ENV:getFunctionParamsResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Tap to Email

Output parameters:

Parameter Description Data Type Required
functionId App function identifier Integer Yes
title Page title String Yes
email Email address String Yes

Example of XML-message with output parameters:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 <SOAP-ENV:Body>
  <SOAP-ENV:getFunctionParamsResponse>
   <data>
    <param name="functionId">1523</param>
    <param name="title">Tap</param>
    <param name="email">[email protected]</param>
   </data>
  </SOAP-ENV:getFunctionParamsResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

WEB

Output parameters:

Parameter Description Data Type Required
functionId App function identifier Integer Yes
title Page title String Yes
url Website URL String, URL Yes

Example of XML-message with output parameters:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 <SOAP-ENV:Body>
  <SOAP-ENV:getFunctionParamsResponse>
   <data>
    <param name="functionId">1524</param>
    <param name="title">I Build App</param>
    <param name="url">https://ibuildapp.com</param>
   </data>
  </SOAP-ENV:getFunctionParamsResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Coupon

Output parameters:

Parameter Description Data Type Required
functionId App function identifier Integer Yes
title Page title String Yes
useSource Image source: RSS feed or manual entry String rss or manual Yes
rssurl RSS-feed URL String, URL No

Coupons are described as items. Identifier is specified into id parameter.

Nested parameters:

Parameter Description Data Type Required
title Coupon title String Yes
description Coupon description String Yes
useSource Source: URL or HTML code String url or html Yes
url Webpage URL String, URL No
html Link to a file with HTML code String, URL No

Example of XML-message with output parameters:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://new.webservice.namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <SOAP-ENV:Body>
  <SOAP-ENV:getFunctionParamsResponse>
   <data>
    <param name="functionId">1525</param>
    <param name="title">Coupons</param>
    <param name="rssurl">http://ibash.org.ru/rss.xml</param>
    <param name="useSource">rss</param>
    <item id="1330937835">
     <param name="title" xsi:type="ns1:param">Test</param>
     <param name="description" xsi:type="ns1:param">Description</param>
     <param name="url" xsi:type="ns1:param">https://ibuildapp.com</param>
     <param name="html" xsi:type="ns1:param">https://ibuildapp.com/assets/data/ 00000/7/493/coupons/1525-1330937835.html</param>
     <param name="useSource" xsi:type="ns1:param">html</param>
    </item>
   </data>
  </SOAP-ENV:getFunctionParamsResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Take a picture

Output parameters:

Parameter Description Data Type Required
functionId App function identifier Integer Yes
title Page title String Yes
share Share options: Standard Share functionality, or send via Email String standard or email Yes
email Email address String No
button Button caption String No

Example of XML-message with output parameters:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 <SOAP-ENV:Body>
  <SOAP-ENV:getFunctionParamsResponse>
   <data>
    <param name="functionId">1526</param>
    <param name="title">Take</param>
    <param name="share">email</param>
    <param name="email">[email protected]</param>
    <param name="button">Send Email</param>
   </data>
  </SOAP-ENV:getFunctionParamsResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

setFunctionParams

The function is used to modify one or more parameters of app function. Input parameters vary depending on the certain app function. No output parameters.

If an error occurs during a SOAP request, the API returns a SoapFault message. The faultstring property contains the error description.

Example of XML-message:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 <SOAP-ENV:Body>
  <SOAP-ENV:Fault>
   <faultcode>Error</faultcode>
   <faultstring>textColor is not supported by takepicture</faultstring>
  </SOAP-ENV:Fault>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Photo Gallery (photo)

Input parameters:

Parameter Description Data Type Required
apiSecret API secret key String Yes
functionId App function identifier Integer Yes
title Page title String No
backgroundColor Background color String, #rrggbb No
useSource Image source: RSS feed or manual entry String "rss" or "manual" No
rssurl RSS-feed URL String, URL No
Example of XML-message with input parameters

News

Input parameters:

Parameter Description Data Type Required
apiSecret API secret key String Yes
functionId App function identifier Integer Yes
title Page title String No
backgroundColor Background color String, #rrggbb No
textColor Text color String, #rrggbb No
useSource Image source: RSS feed or manual entry String "rss" or "manual" No
rssurl RSS-feed URL String, URL No
Example of XML-message with input parameters

Event

Input parameters:

Parameter Description Data Type Required
apiSecret API secret key String Yes
functionId App function identifier Integer Yes
title Page title String No
backgroundColor Background color String, #rrggbb No
textColor Text color String, #rrggbb No
useSource Image source: RSS feed or manual entry String "rss" or "manual" No
rssurl RSS-feed URL String, URL No
Example of XML-message with input parameters

Ebook

Input parameters:

Parameter Description Data Type Required
apiSecret API secret key String Yes
functionId App function identifier Integer Yes
title Page title String No
Example of XML-message with input parameters

Ecommerce

Input parameters:

Parameter Description Data Type Required
apiSecret API secret key String Yes
functionId App function identifier Integer Yes
title Page title String No
Example of XML-message with input parameters

Video List (media)

Input parameters:

Parameter Description Data Type Required
apiSecret API secret key String Yes
functionId App function identifier Integer Yes
title Page title String No
backgroundColor Background color String, #rrggbb No
Example of XML-message with input parameters

HTML-page (htmlcode)

Input parameters:

Parameter Description Data Type Required
apiSecret API secret key String Yes
functionId App function identifier Integer Yes
title Page title String No
backgroundColor Background color String, #rrggbb No
content HTML-code String No

PHP example:

try {
   $client->setFunctionParams( new APIMessage(
      new APIParam('apiSecret', $api_secret),
      new APIParam('functionId', 1542 ),
      new APIParam('backgroundColor', '#f2ec83'),
      new APIParam('content', '<h1>Friendship is Magic</h1>')
   ));
}
catch (SoapFault $e) {
   print $e->faultcode.' - '.$e->faultstring;
}

Example of XML-message with input parameters

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 <SOAP-ENV:Body>
  <SOAP-ENV:setFunctionParams>
   <data>
    <param name="apiSecret">Your API key</param>
    <param name="functionId">1542</param>
    <param name="backgroundColor">#f2ec83</param>
    <param name="content">&lt;h1&gt;Friendship is Magic&lt;/h1&gt;</param>
   </data>
  </SOAP-ENV:setFunctionParams>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Google calendar (calendar)

Input parameters:

Parameter Description Data Type Required
apiSecret API secret key String Yes
functionId App function identifier Integer Yes
title Page title String No
backgroundColor Background color String, #rrggbb No
code HTML-code String No
Example of XML-message with input parameters

Contacts

Input parameters:

Parameter Description Data Type Required
apiSecret API secret key String Yes
functionId App function identifier Integer Yes
title Page title String No
backgroundColor Background color String, #rrggbb No
name Business/person name String No
phone Phone number String No
email Email address String No
homepage Website URL String, URL No
address Address String No

Phone number should be formatted as "+n(nnn)nnnnnnn".

Example of XML-message with input parameters

Facebook (facebook)

Input parameters:

Parameter Description Data Type Required
apiSecret API secret key String Yes
functionId App function identifier Integer Yes
title Page title String No
url Facebook personal page URL String, URL No
Example of XML-message with input parameters

Twitter (twitter)

Input parameters:

Parameter Description Data Type Required
apiSecret API secret key String Yes
functionId App function identifier Integer Yes
title Page title String No
backgroundColor Background color String, #rrggbb No
textColor Text color String, #rrggbb No
username Twitter username String No
Example of XML-message with input parameters

RSS

Input parameters:

Parameter Description Data Type Required
apiSecret API secret key String Yes
functionId App function identifier Integer Yes
title Page title String No
backgroundColor Background color String, #rrggbb No
textColor Text color String, #rrggbb No
rssurl RSS-feed URL String, URL No
Example of XML-message with input parameters

Google Map (map)

Input parameters:

Parameter Description Data Type Required
apiSecret API secret key String Yes
functionId App function identifier Integer Yes
title Page title String No
Example of XML-message with input parameters

Audio Stream (streamaudio)

Input parameters:

Parameter Description Data Type Required
apiSecret API secret key String Yes
functionId App function identifier Integer Yes
title Page title String No
backgroundColor Background color String, #rrggbb No
Example of XML-message with input parameters

Video Stream (streamvideo)

Input parameters:

Parameter Description Data Type Required
apiSecret API secret key String Yes
functionId App function identifier Integer Yes
title Page title String No
backgroundColor Background color String, #rrggbb No
Example of XML-message with input parameters

Tap to Call (taptocall)

Input parameters:

Parameter Description Data Type Required
apiSecret API secret key String Yes
functionId App function identifier Integer Yes
title Page title String No
phone Phone number String No

Phone number should be formatted as "+N(NNN)NNNNNNN".

Example of XML-message with input parameters

Tap to Email (taptoemail)

Input parameters:

Parameter Description Data Type Required
apiSecret API secret key String Yes
functionId App function identifier Integer Yes
title Page title String No
email Email address String No
Example of XML-message with input parameters

Web URL (htmlurl)

Input parameters:

Parameter Description Data Type Required
apiSecret API secret key String Yes
functionId App function identifier Integer Yes
title Page title String No
url Website URL String No
Example of XML-message with input parameters

Coupon

Input parameters:

Parameter Description Data Type Required
apiSecret API secret key String Yes
functionId App function identifier Integer Yes
title Page title String No
useSource Image source: RSS feed or manual entry String "rss" or "manual" No
rssurl RSS-feed URL String, URL No
Example of XML-message with input parameters

Take a picture (takepicture)

Input parameters:

Parameter Description Data Type Required
apiSecret API secret key String Yes
functionId App function identifier Integer Yes
title Page title String No
share Share options: Standard Share functionality, or send via email String "standard" or "email" No
email Email address String No
button Button caption String No

PHP example:

try {
   $result = $client->setFunctionParams( new APIMessage(
      new APIParam('apiSecret', 'Your API key'),
      new APIParam('functionId', 1541 ),
      new APIParam('textColor', '#000000')
   ));
}
catch (SoapFault $e) {
   print $e->faultcode.' - '.$e->faultstring;
}

Example of XML-message with input parameters:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 <SOAP-ENV:Body>
  <SOAP-ENV:setFunctionParams>
   <data>
    <param name="apiSecret">Your API key</param>
    <param name="functionId">1541</param>
    <param name="textColor">#000000</param>
   </data>
  </SOAP-ENV:setFunctionParams>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

addFunction

The function is used to add a new function to the app. The added function should be assigned to existing control element (one function per control element). If there is another function assigned to the control element, it should be deleted first (see deleteFunction).

PHP example:

try {
   $result = $client->addFunction( new APIMessage(
      new APIParam('apiSecret', ‘Your API key‘),
      new APIParam('controlId', 2),
      new APIParam('title', 'Facebook'),
      new APIParam('type', 'facebook')
   ));
   print_r( $result->asArray('item'));
}
catch (SoapFault $e) {
   print $e->faultcode.' - '.$e->faultstring;
}

Input parameters:

Parameter Description Data Type Required
apiSecret API secret key String Yes
controlId Identifier of the control element that will call the function Integer Yes
title Page title String Yes
type Function type String Yes

Supported function types:

Type value App function name
htmlcode HTML
calendar Google Calendar
photo Photo Gallery
contact Contacts
facebook Facebook
twitter Twitter
streamaudio Audio Stream
map Google Map
streamvideo Video Stream
media Video List
rss RSS/ATOM feed
taptocall Tap To Call
taptoemail Tap To Email
ebook Ebook
event Events
htmlurl Web
news News
ecommerce eCommerce
coupons Coupons
takepicture Take a Picture
customform Custom Form

Example of XML-message with input parameters:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 <SOAP-ENV:Body>
  <SOAP-ENV:addFunction>
   <data>
    <param name="apiSecret">Your API key</param>
    <param name="controlId">2</param>
    <param name="title">Facebook</param>
    <param name="type">facebook</param>
   </data>
  </SOAP-ENV:addFunction>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

The function returns identifier for added function.

Output parameters:

Input parameters:

Parameter Description Data Type Required
id Function identifier Integer Yes

Example of XML-message with output parameters:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 <SOAP-ENV:Body>
  <SOAP-ENV:addFunctionResponse>
   <data>
    <param name="id">1512</param>
   </data>
  </SOAP-ENV:addFunctionResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

If an error occurs during a SOAP request, the API returns a SoapFault message. The faultstring property contains the error description.

Example of XML-message:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 <SOAP-ENV:Body>
  <SOAP-ENV:Fault>
   <faultcode>Error</faultcode>
   <faultstring>Target control is already occupied</faultstring>
  </SOAP-ENV:Fault>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

deleteFunction

The function is used to delete an app function. No output parameters.

PHP example:

try {
   $result = $client->deleteFunction( new APIMessage(
      new APIParam('apiSecret', ‘Your API key‘),
      new APIParam('id', 1600)
   ));
}
catch (SoapFault $e) {
   print $e->faultcode.' - '.$e->faultstring;
}

Input Parameters

Parameter Description Data Type Required
apiSecret API secret key String Yes
id Function identifier Integer Yes

Example of XML-message with input parameters:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 <SOAP-ENV:Body>
  <SOAP-ENV:deleteFunction>
   <data>
    <param name="apiSecret">Your API key</param>
    <param name="id">1600</param>
   </data>
  </SOAP-ENV:deleteFunction>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

If an error occurs during a SOAP request, the API returns a SoapFault message. The faultstring property contains the error description.

Example of XML-message:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 <SOAP-ENV:Body>
  <SOAP-ENV:Fault>
   <faultcode>Auth</faultcode>
   <faultstring>Incorrect function id</faultstring>
  </SOAP-ENV:Fault>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>