webBooks APIs

From Cliquesoft
Revision as of 14:01, 23 March 2015 by Digitalpipe (Talk | contribs)

Jump to: navigation, search

Below you will see a list of each official module produced by Cliquesoft. Clicking on a module name from the list will take you to the appropriate section that outlines the various API's used by the modules' graphical frontend. It is important to note that the 'username' and 'SID' values should be passed for every communication with the server, even if they are null values (which will default to the 'guest' account). Also, all the mentioned parameters that are encapsulated with parenthesis are optional. Any questions, comments, or concerns should be directed to our staff.

Dashboard

In order to process any of these API's, all requests should be directed to the 'modules/webbooks/webbooks.php' file. The type of request will be specified per section below.

Load the interface

Since the default themed dashboard is hard coded within the 'themes/default/webbooks.html' file, there isn't a request to load the interface. This will also be the case if any other theme is used.


Populate the form

To populate all the various values of the interface form objects, the below parameters will need to be passed via a GET request:

action=init
target=values
username=
SID=

This will return all the information in the following XML layout:

   <system socialURI="STRING" />
   <user id="INTEGER" name="STRING" />
   <employees>
      <employee id="INTEGER" name="STRING" status="{in|out|delayed}" avail="{yes|no|break|meeting}" />

      ...repeated for each employee in the company...
   </employees>
   <jobs>
      <job id="INTEGER" module="STRING" customerID="INTEGER" customerName="STRING" required="DATE" />
   </jobs>
   <groups>
      <group id="INTEGER" name="STRING" icon="STRING">
         <module id="INTEGER" name="STRING" icon="STRING" />

         ...repeated for each module within the group...
      </group>

      ...repeated for each defined group on the dashboard...
   </groups>


Change the interface

To change between the dashboard and the social interface, the below parameters will need to be passed via a GET request:

action=check
target=provider
username=
SID=
uri=

When changing to the social interface, the server-side script will perform a quick test to see if the provider allows for an embedded version of their service and returns the following XML:

   <s></s>

   OR

   <f><msg>The service provider for your social interaction does not allow embedding in an iframe.</msg></f>


Update user status

To update the users working status, the below parameters will need to be passed via a GET request:

action=update
target=availability
username=
SID=

NOTE: there is currently an existing issue to rename the 'target' value to 'status'

This will return all the information in the following XML layout:

   <employees>
      <employee id="INTEGER" name="STRING" status="{in|out|delayed}" avail="{yes|no|break|meeting}" />
   </employees>
   <jobs>
      <job id="INTEGER" module="STRING" customerID="INTEGER" customerName="STRING" required="DATE" />

      ...repeated for each job assigned to the employee...
   </jobs>


Update user availability

To update the users working status, the below parameters will need to be passed via a GET request:

action=update
target=status
username=
SID=

NOTE: there is currently an existing issue to rename the 'target' value to 'availability'

This will return all the information in the following XML:

   <s><msg>Your status has been updated successfully!</msg><data status="{yes|no|break|meeting}" /></s>

   OR

   <f><msg>There was an error processing your request and our staff has been notified.  Please try again in a few minutes.</msg><data prior="{yes|no|break|meeting}" /></f>



System Configuration

In order to process any of these API's, all requests should be directed to the 'modules/webbooks/system_configuration.php' file. The type of request will be specified per section below.

Load the interface

To load the modules default HTML interface (themes/default/webbooks.system_configuration.html), the below parameters should be passed to the appropriate php file via a GET request. Loading an alternative screen relies on the symlinks set in the users data directory (e.g. data/_guest/_theme/{images|layout|styles}).

action=init
target=screen
username=
SID=

This will return the raw contents as it is found in the file, replacing all occurrences of the variable ${UN} anywhere.


Populate the form

To populate all the various values of the interface form objects, the below parameters will need to be passed via a GET request:

action=init
target=values
username=
SID=

This will return all the information in the following XML layout:

<general>
   <admin id="INTEGER" name="STRING" type="{provider|vendor|employee}" email="STRING" phone="INTEGER" ext="INTEGER" mobile="INTEGER" sms="{0|1}" mail="{0|1}" />
   <system socialURI="STRING" [accessURI="STRING" logins="INTEGER" support="STRING" balance="DECIMAL" prefix="STRING"] />
</general>

The <system> tag has only one mandatory value (socialURI) when the software is not working in a HOSTED mode, otherwise all the other values will be returned as well.

Business Configuration

Employees

Accounting

Asset Management

Customer Accounts

Inventory

Quotes & Invoices

Work Orders