webBooks APIs

From Cliquesoft
Revision as of 09:09, 26 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. Any questions, comments, or concerns should be directed to our staff. For any modifications to the API's, please use the 'Issues' link on our website so that our users can participate in that process.


The below key elaborates on the requested values:

  • {...|...|...} - specifies that the value can be one of the items in the list
  • (...........) - specifies a description for the what the value needs to be
  • [...........] - specifies that the value is optional
  • /.........../ - specifies the use of a variable value



Contents

Login and Logout

To login and out of the software, the below two calls can be made.


Logging into the software

To log into the software, the below parameters will need to be passed via a GET request to the 'modules/webbooks/_login.php' file. It is important to note that there is not a request to load the screen content so you must create it.

action=login
target=username
username=(the username for the account)
password=(the password for the account)
txtCaptcha=[the captcha if they are enabled]

This will return all the information in the following XML:

   <s><msg>...</msg><data SID="STRING" username="STRING" decrypt="STRING" name="STRING"></data></s>

   OR

   <f><msg>...</msg></f>


Logging out of the software

To log out of the software, the below parameters will need to be passed via a GET request to the 'modules/webbooks/_logout.php' file:

action=logout
target=username
username=(the username for the account)
SID=(the security identifier for the account)

This will return all the information in the following XML:

   <s></s>

   OR

   <f><msg>...</msg></f>



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=(the username for the account)
SID=(the security identifier for the account)

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" />

      ...repeated for each job associated with the employee...
   </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=(the username for the account)
SID=(the security identifier for the account)
uri=(the URI of the email provider such as 'http://www.gmail.com')

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 'Employee' tab data

To update the data on the 'Employees' tab, the below parameters will need to be passed via a GET request:

action=update
target=employees
username=(the username for the account)
SID=(the security identifier for the account)

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}" />

      ...repeated for each employee of the company...
   </employees>
   <jobs>
      <job id="INTEGER" module="STRING" customerID="INTEGER" customerName="STRING" required="DATE" />

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


Update user status

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

action=update
target=status
username=(the username for the account)
SID=(the security identifier for the account)
status={in|out|pto|sick|delayed}

This will return all the information in the following XML:

   <s><msg>Your status has been updated successfully!</msg><data status="{in|out|pto|sick|delayed}" /></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>


Update user availability

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

action=update
target=status
username=(the username for the account)
SID=(the security identifier for the account)
avail={yes|no|break|meeting}

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=(the username for the account)
SID=(the security identifier for the account)

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=(the username for the account)
SID=(the security identifier for the account)

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"] />
      <module update="STRING" install="STRING" />
      <dirs data="STRING" logs="STRING" cron="STRING" temp="STRING" />
      <update module="STRING" />

      ...repeated for each update available...
   </general>
   <people>
      <person id="INTEGER" name="STRING" />

      ...repeated for each account that can become the administrator...
   </people>
   <groups>
      <group id="INTEGER" name="STRING" icon="STRING">
         <module id="INTEGER" name="STRING" icon="STRING" />

         ...repeated for each module associated with the group...
      </group>

      ...repeated for each defined group...
      <installed id="INTEGER" name="STRING" icon="STRING" />

      ...repeated for each installed module...
   </groups>

NOTE: 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.


Save the configuration

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

action=save
target=system
username=(the username for the account)
SID=(the security identifier for the account)
decrypt=(the decryption string for the account)

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

   <s><msg>The system configuration has been updated successfully!</msg></s>

   OR

   <f><msg>...</msg></f>


Load the admin accounts

To load all the associated accounts based on the admin type, the below parameters will need to be passed via a GET request:

action=load
target=admins
username=(the username for the account)
SID=(the security identifier for the account)
type={employee|provider|vendor}

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

   <admins>
      <admin id="INTEGER" name="STRING" />

      ...repeated for each account...
   </admins>


Load the admin information

To load all the information associated with the selected admin account, the below parameters will need to be passed via a GET request:

action=load
target=admin
username=(the username for the account)
SID=(the security identifier for the account)
type={employee|provider|vendor}
id=(the ID of the admin account)

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

   <admins>
      <admin id="INTEGER" name="STRING" type="{employee|provider|vendor}" email="STRING" phone="INTEGER" ext="INTEGER" mobile="INTEGER" sms="{0|1}" mail="{0|1}" />
   </admins>


Check for updates

To check for updates to the software, the below parameters will need to be passed via a GET request:

action=check
target=updates
username=(the username for the account)
SID=(the security identifier for the account)
decrypt=(the decryption string for the account)

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

   <update module="STRING" />
   ...repeated for each update found...


Install updates

To install downloaded updates for the software, the below parameters will need to be passed via a POST request:

action=install
target=updates
username=(the username for the account)
SID=(the security identifier for the account)
decrypt=(the decryption string for the account)
nUpdatesList_SystemConfiguration=(the list of updates to install)

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

   <update module="STRING" />
   ...repeated for each update that was successfully installed...


Load the group

To load all the modules associated with the selected group, the below parameters will need to be passed via a GET request:

action=load
target=group
username=(the username for the account)
SID=(the security identifier for the account)
groupID=(the ID of the group)

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

   <groups>
      <group id="INTEGER" name="STRING" icon="STRING">
         <module id="INTEGER" name="STRING" icon="STRING" />

         ...repeated for each module associated with the group...
      </group>
   </groups>


Create a group

To create a new group on the dashboard, the below parameters will need to be passed via a GET request:

action=new
target=group
username=(the username for the account)
SID=(the security identifier for the account)
name=(the name of the new group)
icon=(the name of the icon associated with the new group)

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

   <s><msg>The group has been created successfully!</msg><data id="INTEGER"></data></s>

   OR

   <f><msg>...</msg></f>


Delete a group

To delete an existing group from the dashboard, the below parameters will need to be passed via a GET request:

action=delete
target=group
username=(the username for the account)
SID=(the security identifier for the account)
groupID=(the ID of the existing group to delete)

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

   <s><msg>The group has been deleted successfully!</msg></s>

   OR

   <f><msg>...</msg></f>


Update a group

To update an existing group on the dashboard, the below parameters will need to be passed via a GET request:

action=update
target=group
username=(the username for the account)
SID=(the security identifier for the account)
groupID=(the ID of the existing group to delete)
name=(the new name of the existing group)
icon=(the new name of the icon associated with the existing group)

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

   <s><msg>The group has been updated successfully!</msg></s>

   OR

   <f><msg>...</msg></f>


Add a module to a group

To add a module to an existing group, the below parameters will need to be passed via a GET request:

action=add
target=module
username=(the username for the account)
SID=(the security identifier for the account)
groupID=(the ID of the existing group to add to)
moduleID=(the ID of an installed module to add)

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

   <s><msg>The module has been added to the group successfully!</msg></s>

   OR

   <f><msg>...</msg></f>


Delete a module from a group

To delete a module from an existing group, the below parameters will need to be passed via a GET request:

action=delete
target=module
username=(the username for the account)
SID=(the security identifier for the account)
groupID=(the ID of the group to remove the module from)
moduleID=(the ID of the module to delete)

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

   <s><msg>The module has been deleted from the group successfully!</msg></s>

   OR

   <f><msg>...</msg></f>



Business Configuration

In order to process any of these API's, all requests should be directed to the 'modules/webbooks/business_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.business_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=(the username for the account)
SID=(the security identifier for the account)

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=(the username for the account)
SID=(the security identifier for the account)

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

   <general>
      <business name="STRING" type="STRING" fein="INTEGER" salesTax="INTEGER" salesTaxRate="DECIMAL" unemploymentTax="INTEGER" unemploymentTaxRate="DECIMAL" founded="DATE" foundedCountry="STRING\" fiscalYear="DATE" timezone="INTEGER" beginTime="INTEGER" endTime="INTEGER" phone="INTEGER" fax="INTEGER" website="STRING" merchant="STRING" merchantID="STRING" OPoID="STRING" bbn="{0|1}" payDay="DATE" payTerm="{weekly|biweekly|bimonthly|monthly}" commissionDay="DATE" commissionTerm="{weekly|biweekly|bimonthly|monthly}" />
      <address type="main" addr1="STRING" addr2="STRING" city="STRING" state="STRING" zip="STRING" country="STRING" />
      <address type="bill" addr1="STRING" addr2="STRING" city="STRING" state="STRING" zip="STRING" country="STRING" />
      <address type="ship" addr1="STRING" addr2="STRING" city="STRING" state="STRING" zip="STRING" country="STRING" />
   </general>
   <employees>
      <employee id=\"".$empl['id']."\" name=\"".$empl['name']."\" />

      ...repeated for each employee of the organization...
   </employees>
   <departments>
      <dept id="INTEGER" name="STRING" />

      ...repeated for each created department...
   </departments>
   <positions>
      <pos id="INTEGER" name="STRING" />

      ...repeated for each created position...
   </positions>
   <freights>
      <freight id="INTEGER" name="STRING" />

      ...repeated for each freight account of the organization...
   </freights>
   <banks>
      <bank id="INTEGER" name="STRING" />

      ...repeated for each bank account of the organization...
   </banks>
   <cards>
      <card id="INTEGER" name="STRING" />

      ...repeated for each employee credit card of the organization...
   </cards>
   <locations>
      <location id="INTEGER" name="STRING" OPoID="STRING" phone="INTEGER" fax="INTEGER" website="STRING" timezone="INTEGER" beginTime="INTEGER" endTime="INTEGER" founded="DATE" foundedCountry="STRING" status="STRING" salesTax="INTEGER" salesTaxRate="DECIMAL" rating="DECIMAL" />
      <address type="main" addr1="STRING" addr2="STRING" city="STRING" state="STRING" zip="STRING" country="STRING" />

      ...repeated for each additional location of the organization...
   </locations>
   <vendors>
      <vendor id="INTEGER" name="STRING" OPoID="STRING" phone="INTEGER" fax="INTEGER" website="STRING" timezone="INTEGER" beginTime="INTEGER" endTime="INTEGER" founded="DATE" foundedCountry="STRING" status="STRING" salesTax="INTEGER" salesTaxRate="DECIMAL" rating="DECIMAL" />
      <address type="main" addr1="STRING" addr2="STRING" city="STRING" state="STRING" zip="STRING" country="STRING" />

      ...repeated for each vendor of the organization...
   </vendors>
   <providers>
      <provider id="INTEGER" name="STRING" OPoID="STRING" phone="INTEGER" fax="INTEGER" website="STRING" timezone="INTEGER" beginTime="INTEGER" endTime="INTEGER" founded="DATE" foundedCountry="STRING" status="STRING" salesTax="INTEGER" salesTaxRate="DECIMAL" rating="DECIMAL" />
      <address type="main" addr1="STRING" addr2="STRING" city="STRING" state="STRING" zip="STRING" country="STRING" />

      ...repeated for each service provider of the organization...
   </providers>
   <data>
      <entry id="INTEGER" title="STRING" filename="STRING" />
      ...repeated for each custom data field on the 'Data' tab...

      <file filename="STRING" />
      ...repeated for each file uploaded through the 'Data' tab...
   </data>

NOTE: 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.


Save the configuration

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

action=save
target=system
username=(the username for the account)
SID=(the security identifier for the account)
decrypt=(the decryption string for the account)

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

   <s><msg>The general business information has been saved successfully!</msg></s>

   OR

   <f><msg>...</msg></f>


Load a department

To load the associated information of a selected department, the below parameters will need to be passed via a GET request:

action=load
target=department
username=(the username for the account)
SID=(the security identifier for the account)
deptID=(the ID of the department to load)

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

   <departments>
      <dept id="INTEGER" name="STRING" />
   </departments>


Create a department

To create a new department for the organization, the below parameters will need to be passed via a GET request:

action=new
target=department
username=(the username for the account)
SID=(the security identifier for the account)
name=(the name of the department to create)

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

   <s><msg>The department has been created successfully!</msg><data id="INTEGER"></data></s>

   OR

   <f><msg>...</msg></f>


Delete a department

To delete a existing department from the organization, the below parameters will need to be passed via a GET request:

action=delete
target=department
username=(the username for the account)
SID=(the security identifier for the account)
deptID=(the ID of the department to delete)

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

   <s><msg>The department has been deleted successfully!</msg></s>

   OR

   <f><msg>...</msg></f>


Update a department

To update a existing department of the organization, the below parameters will need to be passed via a GET request:

action=update
target=department
username=(the username for the account)
SID=(the security identifier for the account)
deptID=(the ID of the department to update)
name=(the updated name of the department)

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

   <s><msg>The department has been updated successfully!</msg></s>

   OR

   <f><msg>...</msg></f>


Load a job position

To load the associated information of a selected job position, the below parameters will need to be passed via a GET request:

action=load
target=position
username=(the username for the account)
SID=(the security identifier for the account)
posID=(the ID of the position to load)

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

   <positions>
      <pos id="INTEGER" name="STRING" type="{part-time|full-time|contractor|call|internship|volunteer}" pay="{hourly|salary|salary+ot|commission|commission+base|job}" base="DECIMAL" ot="DECIMAL" pto="DECIMAL" sick="DECIMAL" mileage="DECIMAL" cola="DECIMAL" perDiem="DECIMAL" dept="INTEGER" />
   </positions>


Create a job position

To create a new job position for the organization, the below parameters will need to be passed via a POST request:

action=new
target=position
username=(the username for the account)
SID=(the security identifier for the account)
sJobTitle_BusinessConfiguration=(the title of the position to create)
sDept_BusinessConfiguration=(the ID of the department that the job position belongs to)
sJobType_BusinessConfiguration={part-time|full-time|contractor|call|internship|volunteer}
sJobPay_BusinessConfiguration={hourly|salary|salary+ot|commission|commission+base|job}
nJobPay_BusinessConfiguration=(the base pay of the job position)
nJobOTRate_BusinessConfiguration=(the overtime pay rate of the job position)
nCOLA_BusinessConfiguration=(the rate of cost of living annual increase in pay for the job position)
sJobPTO_BusinessConfiguration=(the rate of personal time off the job position gives the employee per pay cycle)
sJobSick_BusinessConfiguration=(the rate of sick leave the job position gives the employee per pay cycle)
nMileage_BusinessConfiguration=(the amount of reimbursement for mileage incurred on business travel)
nPerDiem_BusinessConfiguration=(the per diem amount of reimbursement for expenses incurred on business travel)

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

   <s><msg>The department has been created successfully!</msg><data id="INTEGER"></data></s>

   OR

   <f><msg>...</msg></f>


Delete a job position

To delete a existing job position from the organization, the below parameters will need to be passed via a GET request:

action=delete
target=position
username=(the username for the account)
SID=(the security identifier for the account)
posID=(the ID of the job position to delete)

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

   <s><msg>The position has been deleted successfully!</msg></s>

   OR

   <f><msg>...</msg></f>


Update a job position

To update a existing job position of the organization, the below parameters will need to be passed via a POST request:

action=update
target=position
username=(the username for the account)
SID=(the security identifier for the account)
sJobTitle_BusinessConfiguration=(the title of the position to create)
sDept_BusinessConfiguration=(the ID of the department that the job position belongs to)
sJobType_BusinessConfiguration={part-time|full-time|contractor|call|internship|volunteer}
sJobPay_BusinessConfiguration={hourly|salary|salary+ot|commission|commission+base|job}
nJobPay_BusinessConfiguration=(the base pay of the job position)
nJobOTRate_BusinessConfiguration=(the overtime pay rate of the job position)
nCOLA_BusinessConfiguration=(the rate of cost of living annual increase in pay for the job position)
sJobPTO_BusinessConfiguration=(the rate of personal time off the job position gives the employee per pay cycle)
sJobSick_BusinessConfiguration=(the rate of sick leave the job position gives the employee per pay cycle)
nMileage_BusinessConfiguration=(the amount of reimbursement for mileage incurred on business travel)
nPerDiem_BusinessConfiguration=(the per diem amount of reimbursement for expenses incurred on business travel)
sJobList_BusinessConfiguration=(the ID of the job position to update)

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

   <s><msg>The position has been updated successfully!</msg></s>

   OR

   <f><msg>...</msg></f>


Load a credit card

To load the associated information of a selected credit card, the below parameters will need to be passed via a GET request:

action=load
target=card
username=(the username for the account)
SID=(the security identifier for the account)
decrypt=(the decryption string for the account)
acctID=(the ID of the credit card to load)

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

   <cards>
      <card id="INTEGER" name="STRING" number="INTEGER" employee="INTEGER" type="{amex|dc|mc|visa}" month="INTEGER" year="INTEGER" cvv2="INTEGER" />
   </cards>


Create a credit card

To create a new credit card for the organization, the below parameters will need to be passed via a POST request:

action=new
target=card
username=(the username for the account)
SID=(the security identifier for the account)
decrypt=(the decryption string for the account)
sCreditCardDesc_BusinessConfiguration=(the description of the credit card to create)
nCreditCardNumber_BusinessConfiguration=(the credit card number)
sCreditCardEmployee_BusinessConfiguration=(the ID of the employee that will be responsible for the credit card)
sCreditCardType_BusinessConfiguration={amex|dc|mc|visa}
nCreditCardMonth_BusinessConfiguration=(the expiration month for the credit card)
nCreditCardYear_BusinessConfiguration=(the expiration year for the credit card)
nCreditCardCVV2_BusinessConfiguration=(the CVV2 number of the credit card)

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

   <s><msg>The credit card has been created successfully!</msg><data id="INTEGER"></data></s>

   OR

   <f><msg>...</msg></f>


Delete a credit card

To delete a existing credit card from the organization, the below parameters will need to be passed via a GET request:

action=delete
target=card
username=(the username for the account)
SID=(the security identifier for the account)
acctID=(the ID of the credit card to delete)

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

   <s><msg>The credit card has been deleted successfully!</msg></s>

   OR

   <f><msg>...</msg></f>


Update a credit card

To update a existing job position of the organization, the below parameters will need to be passed via a POST request:

action=update
target=card
username=(the username for the account)
SID=(the security identifier for the account)
decrypt=(the decryption string for the account)
sCreditCardDesc_BusinessConfiguration=(the description of the credit card to create)
nCreditCardNumber_BusinessConfiguration=(the credit card number)
sCreditCardEmployee_BusinessConfiguration=(the ID of the employee that will be responsible for the credit card)
sCreditCardType_BusinessConfiguration={amex|dc|mc|visa}
nCreditCardMonth_BusinessConfiguration=(the expiration month for the credit card)
nCreditCardYear_BusinessConfiguration=(the expiration year for the credit card)
nCreditCardCVV2_BusinessConfiguration=(the CVV2 number of the credit card)
sCardList_BusinessConfiguration=(the ID of the credit card to update)

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

   <s><msg>The credit card has been updated successfully!</msg></s>

   OR

   <f><msg>...</msg></f>


Load a Location|Vendor|Provider

To load the associated information of a selected additional location, vendor, or service provider, the below parameters will need to be passed via a GET request:

action=load
target={Location|Vendor|Provider}
username=(the username for the account)
SID=(the security identifier for the account)
decrypt=(the decryption string for the account)
acctID=(the ID of the additional location, vendor, or service provider to load)

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

   <{Location|Vendor|Provider}s>
      <{Location|Vendor|Provider} id="INTEGER" name="STRING" OPoID="STRING" phone="INTEGER" fax="INTEGER" website="STRING" commerceURI="STRING" commerceSID="STRING" timezone="INTEGER" beginTime="INTEGER" endTime="INTEGER" founded="STRING" foundedCountry="STRING" status="{opened|closed|re-opened}" salesTax="INTEGER" salesTaxRate="DECIMAL" rating="DECIMAL" />
      <address type="main" addr1="STRING" addr2="STRING" city="STRING" state="STRING" zip="STRING" country="STRING" />
      <contact id="INTEGER" name="STRING" />

      ...repeated for each contact associated with the location, vendor, or provider...
      <freight id="INTEGER" name="STRING" />

      ...repeated for each freight account associated with the location, vendor, or provider...
      <bank id="INTEGER" name="STRING" />

      ...repeated for each bank account associated with the location, vendor, or provider...
   </{Location|Vendor|Provider}s>


Create a Location|Vendor|Provider

To create a new credit card for the organization, the below parameters will need to be passed via a POST request:

action=new
target=card
username=(the username for the account)
SID=(the security identifier for the account)
decrypt=(the decryption string for the account)

s{Location|Vendor|Provider}Desc_BusinessConfiguration=(the description of the location, vendor, or provider to create)
s{Location|Vendor|Provider}OPoID_BusinessConfiguration=[for future use]
s{Location|Vendor|Provider}CommerceURI_BusinessConfiguration=[the commerce URI of the location, vendor, or provider]
s{Location|Vendor|Provider}CommerceSID_BusinessConfiguration=[the commerce SID of the location, vendor, or provider]
n{Location|Vendor|Provider}Phone_BusinessConfiguration=(the expiration month for the credit card)
n{Location|Vendor|Provider}Fax_BusinessConfiguration=(the expiration year for the credit card)
s{Location|Vendor|Provider}Website_BusinessConfiguration=(the CVV2 number of the credit card)
s{Location|Vendor|Provider}MainAddr1_BusinessConfiguration=()
s{Location|Vendor|Provider}MainAddr2_BusinessConfiguration=()
s{Location|Vendor|Provider}MainCity_BusinessConfiguration=()
s{Location|Vendor|Provider}MainState_BusinessConfiguration=()
s{Location|Vendor|Provider}MainZip_BusinessConfiguration=()
s{Location|Vendor|Provider}MainCountry_BusinessConfiguration=()
s{Location|Vendor|Provider}Timezone_BusinessConfiguration=()
n{Location|Vendor|Provider}BeginHour_BusinessConfiguration=()
n{Location|Vendor|Provider}BeginMin_BusinessConfiguration=()
s{Location|Vendor|Provider}BeginHalf_BusinessConfiguration={am|pm}
n{Location|Vendor|Provider}EndHour_BusinessConfiguration=()
n{Location|Vendor|Provider}EndMin_BusinessConfiguration=()
s{Location|Vendor|Provider}EndHalf_BusinessConfiguration={am|pm}
e{Location|Vendor|Provider}Founded_BusinessConfiguration=()
s{Location|Vendor|Provider}Country_BusinessConfiguration=()
sLocationStatus_BusinessConfiguration=[]
sLocationSalesTax_BusinessConfiguration=[]
nLocationSalesTaxRate_BusinessConfiguration=[]

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

   <s><msg>The credit card has been created successfully!</msg><data id="INTEGER"></data></s>

   OR

   <f><msg>...</msg></f>



Employees

Accounting

Asset Management

Customer Accounts

Inventory

Quotes & Invoices

Work Orders

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.



Common Calls

The below calls are common in various modules within the program.


Loading a contact

To load a contact within the module, the below parameters will need to be passed via a GET request. It is important to note that the server-side script to call needs to be the one for the module.

action=load
target=contact
username=(the username for the account)
SID=(the security identifier for the account)
acctID=(the integer ID of the contact)

This will return all the information in the following XML:

   <contacts>
      <contact id="INTEGER" type="{vendor|provider|employee}" rowID="INTEGER" OPoID="STRING" name="STRING" email="STRING" phone="INTEGER" ext="INTEGER" mobile="INTEGER" sms="{0|1}" mail="{0|1}" title="STRING" />

      ...repeat for each associated contact...
   </contacts>


Creating a contact

To create a contact within the module, the below parameters will need to be passed via a POST request. It is important to note that the server-side script to call needs to be the one for the module.

action=new
target=contact
username=(the username for the account)
SID=(the security identifier for the account)
type={vendor|provider|employee}
id=(the ID of the contact)
s{Location|Vendor|Provider|Customer}ContactOPoID_/module name/=[for future use, can be null]
s{Location|Vendor|Provider|Customer}Contact_/module name/=(the name of the contact)
s{Location|Vendor|Provider|Customer}ContactEmail_/module name/=[the email address of the contact]
n{Location|Vendor|Provider|Customer}ContactPhone_/module name/=[the work phone number of the contact]
n{Location|Vendor|Provider|Customer}ContactExt_/module name/=[the work phone extension of the contact]
n{Location|Vendor|Provider|Customer}ContactMobile_/module name/=[the mobile phone number of the contact]
b{Location|Vendor|Provider|Customer}ContactMobileSMS_/module name/=(the mobile phone SMS capabilities of the contact)
b{Location|Vendor|Provider|Customer}ContactMobileEmail_/module name/=(the mobile phone email capabilities of the contact)
s{Location|Vendor|Provider|Customer}ContactTitle_/module name/=[the job title of the contact]

This will return all the information in the following XML:

   <s><msg>The contact has been created successfully!</msg><data id="INTEGER"></data></s>

   OR

   <f><msg>...</msg></f>


Deleting a contact

To delete a contact within the module, the below parameters will need to be passed via a GET request. It is important to note that the server-side script to call needs to be the one for the module.

action=delete
target=contact
username=(the username for the account)
SID=(the security identifier for the account)
acctID=(the ID of the contact being deleted)

This will return all the information in the following XML:

   <s><msg>The contact has been deleted successfully!</msg></s>

   OR

   <f><msg>...</msg></f>


Updating a contact

To update a contact within the module, the below parameters will need to be passed via a POST request. It is important to note that the server-side script to call needs to be the one for the module.

action=update
target=contact
username=(the username for the account)
SID=(the security identifier for the account)
type={vendor|provider|employee}
n{Location|Vendor|Provider|Customer}ContactList_/module name/=(the ID of the contact)
s{Location|Vendor|Provider|Customer}ContactOPoID_/module name/=[for future use, can be null]
s{Location|Vendor|Provider|Customer}Contact_/module name/=(the name of the contact)
s{Location|Vendor|Provider|Customer}ContactEmail_/module name/=[the email address of the contact]
n{Location|Vendor|Provider|Customer}ContactPhone_/module name/=[the work phone number of the contact]
n{Location|Vendor|Provider|Customer}ContactExt_/module name/=[the work phone extension of the contact]
n{Location|Vendor|Provider|Customer}ContactMobile_/module name/=[the mobile phone number of the contact]
b{Location|Vendor|Provider|Customer}ContactMobileSMS_/module name/=(the mobile phone SMS capabilities of the contact)
b{Location|Vendor|Provider|Customer}ContactMobileEmail_/module name/=(the mobile phone email capabilities of the contact)
s{Location|Vendor|Provider|Customer}ContactTitle_/module name/=[the job title of the contact]

This will return all the information in the following XML:

   <s><msg>The contact has been updated successfully!</msg></s>

   OR

   <f><msg>...</msg></f>


Loading a freight account

To load a freight account within the module, the below parameters will need to be passed via a GET request. It is important to note that the server-side script to call needs to be the one for the module.

action=load
target=freight
username=(the username for the account)
SID=(the security identifier for the account)
decrypt=(the decryption string for the account)
id=(the integer ID of the freight account)

This will return all the information in the following XML:

   <freights>
      <freight id="INTEGER" name="STRING" account="STRING" />

      ...repeat for each freight account...
   </freights>


Creating a freight account

To create a freight account within the module, the below parameters will need to be passed via a POST request. It is important to note that the server-side script to call needs to be the one for the module.

action=new
target=freight
username=(the username for the account)
SID=(the security identifier for the account)
decrypt=(the decryption string for the account)
type={customer|business}
id=(the ID of the freight account)
s{Customer|Business}ShipName_/module name/=(the name of the freight company)
s{Customer|Business}ShipAccount_/module name/=(the account number of the freight company)

This will return all the information in the following XML:

   <s><msg>The freight account has been created successfully!</msg><data id="INTEGER"></data></s>

   OR

   <f><msg>...</msg></f>


Deleting a freight account

To delete a freight account within the module, the below parameters will need to be passed via a GET request. It is important to note that the server-side script to call needs to be the one for the module.

action=delete
target=freight
username=(the username for the account)
SID=(the security identifier for the account)
id=(the ID of the freight account)

This will return all the information in the following XML:

   <s><msg>The freight account has been deleted successfully!</msg></s>

   OR

   <f><msg>...</msg></f>


Updating a freight account

To update a freight account within the module, the below parameters will need to be passed via a POST request. It is important to note that the server-side script to call needs to be the one for the module.

action=update
target=freight
username=(the username for the account)
SID=(the security identifier for the account)
decrypt=(the decryption string for the account)
type={customer|business}
n{Customer|Business}ShipList_/module name/=(the ID of the freight account)
s{Customer|Business}ShipName_/module name/=(the name of the freight company)
s{Customer|Business}ShipAccount_/module name/=(the account number of the freight company)

This will return all the information in the following XML:

   <s><msg>The freight account has been updated successfully!</msg></s>

   OR

   <f><msg>...</msg></f>


Loading a bank account

To load a bank account within the module, the below parameters will need to be passed via a GET request. It is important to note that the server-side script to call needs to be the one for the module.

action=load
target=bank
username=(the username for the account)
SID=(the security identifier for the account)
decrypt=(the decryption string for the account)
id=(the integer ID of the bank account)

This will return all the information in the following XML:

   <banks>
      <bank id="INTEGER" name="STRING" routing="INTEGER" account="INTEGER" type="STRING" check="INTEGER" />

      ...repeat for each bank account...
   </banks>


Creating a bank account

To create a bank account within the module, the below parameters will need to be passed via a POST request. It is important to note that the server-side script to call needs to be the one for the module.

action=new
target=bank
username=(the username for the account)
SID=(the security identifier for the account)
decrypt=(the decryption string for the account)
type={business|vendor|provider|employee}
id=(the ID of the bank account)
s{business|vendor|provider|employee}BankDesc_/module name/=(the name of the bank)
n{business|vendor|provider|employee}BankRouting_/module name/=(the routing number of the bank account)
n{business|vendor|provider|employee}BankAccount_/module name/=(the account number of the bank account)

This will return all the information in the following XML:

   <s><msg>The bank account has been created successfully!</msg><data id="INTEGER"></data></s>

   OR

   <f><msg>...</msg></f>


Deleting a bank account

To delete a bank account within the module, the below parameters will need to be passed via a GET request. It is important to note that the server-side script to call needs to be the one for the module.

action=delete
target=bank
username=(the username for the account)
SID=(the security identifier for the account)
id=(the ID of the bank account)

This will return all the information in the following XML:

   <s><msg>The bank account has been deleted successfully!</msg></s>

   OR

   <f><msg>...</msg></f>


Updating a bank account

To update a bank account within the module, the below parameters will need to be passed via a POST request. It is important to note that the server-side script to call needs to be the one for the module.

action=update
target=bank
username=(the username for the account)
SID=(the security identifier for the account)
decrypt=(the decryption string for the account)
type={business|vendor|provider|employee}
s{business|vendor|provider|employee}BankDesc_/module name/=(the name of the bank)
n{business|vendor|provider|employee}BankRouting_/module name/=(the routing number of the bank account)
n{business|vendor|provider|employee}BankAccount_/module name/=(the account number of the bank account)
n{business|vendor|provider|employee}BankList_/module name/=(the account number of the bank account)

This will return all the information in the following XML:

   <s><msg>The bank account has been updated successfully!</msg></s>

   OR

   <f><msg>...</msg></f>


Saving a note

To save a note within the module, the below parameters will need to be passed via a POST request. It is important to note that the server-side script to call needs to be the one for the module.

action=save
target=note
username=(the username for the account)
SID=(the security identifier for the account)
id=(the ID of the record that the note belongs to)
sNoteAccess_/module name/=(the personel/department to restrict the note to)
sNote_/module name/=(the note itself)

This will return all the information in the following XML:

   <s><msg>The note has been saved successfully!</msg><data date="DATE" creator="STRING">STRING</data></s>

   OR

   <f><msg>...</msg></f>


Update a data field

To update an upload value associated with a data field, the below parameters will need to be passed via a GET request. It is important to note that the server-side script to call needs to be the one for the module.

action=update
target=upload
username=(the username for the account)
SID=(the security identifier for the account)
module=(the case-sensative name of the module containing the data field)
title=(the title associated with the data field)
filename=(the filename associated with the data field)
record=(the ID that corresponds with the module record associated with the data field)
id=(the ID in the 'Upload' table that corresponds with the data field -OR- 0 for a new entry)

This will return all the information in the following XML:

   <s><msg>The uploaded file has been updated successfully!</msg></s>

   OR

   <f><msg>...</msg></f>


Submit a search

To submit a search for a field, the below parameters will need to be passed via a GET request. It is important to note that the server-side script to call needs to be the one for the module.

action=search
target=(the value to pass to the server-side script to identify what to search for)
username=(the username for the account)
SID=(the security identifier for the account)
decrypt=(the decryption string for the account)
value=(the value to match in the database)

This will return all the information in the following XML:

   <match id="INTEGER" ...variety of fields...>STRING</match>
   ...repeat for each match found...

   OR

   <f><msg>...</msg></f>