Bxp API - APP API

Revision as of 10:43, 16 August 2015 by Philip Lacey (talk | contribs)
Revision as of 10:43, 16 August 2015 by Philip Lacey (talk | contribs)

Contents

1 Warning!

This document is under construction.


2 Introduction

The bxp API (Application Programming Interface) allows digital interaction with bxp without the need for a human to interact with bxp.


The bxp APP API is a subset of the bxp API designed specifically to work with APPs.


3 How it works

The APP API requires secure posts to be sent to the relevant system. This can be done using a number of DOM (Document Object Technologies)


The primary post is sent to https://ww3.allnone.ie/client/client_demo/cti/userAPP_Main.asp You must replace client_demo with the system you are communicating with.


A number of criteria must be passed for the process to work. The first process is a login process which will provide tokenisation for your app.


After login, all function calls must include the tokens in order for the API to respond correctly.


4 Functions

4.1 Function List

The functions are laid out in terms of usual order of processing

Initial

  • login
  • settings
  • config
    • config_primary
    • config_buttonX

Lister

  • insert_listee
  • list_listee


Diary

  • diary
  • reminders
  • todo
  • list
    • list_appointment
    • list_reminders

Forms

  • campaignlookup
  • insert_record


System

  • list_hamsters


4.2 Login Function

Primary Function: Provide a login session token


You must post four key pair values. (not including the semi colons)

  • strFunction:login
  • strSystem:client_demo
  • strClient_Username:Demo Account
  • strClient_Password:demoPassword


The system will respond with XML.


<?xml version="1.0" encoding="UTF-8" ?>
<data>
	<strFunction>login</function>
	<intErrorId></intErrorId>
	<strError></error>
	<intClient_Id>123</userid>
	<strClient_SessionField>asdfasdfasdf</strClient_SessionField>
</data>


4.3 Settings / Config recall Function

Primary Function: Provide APP settings for the bxp app.


You must post four key pair values. (not including the semi colons)

  • strFunction:settings
  • strSystem:client_demo
  • intClient_Id:123
  • strClient_SessionField:asdfasdfasdf


The Client Id and Client Session Field are retrieved from the login process.


It is possible to also limit the data returned to a specific button or just the primary settings. Use config_primary or config_buttonX (replacing X with the button number) instead of settings.


The system will respond with XML. The comments were added for highlighting purposes only and will not be in the exported xml


<?xml version="1.0" encoding="UTF-8" ?>
<data>
	<strFunction>settings</function>
	<intErrorId></intErrorId>
	<strError></error>
	<!-- Primary Settings  -->
	<intInterface_SystemId>2</intInterface_SystemId>
	<intInterface_UserId>0</intInterface_UserId>
	<intInterface_Columns>2</intInterface_Columns>
	<strInterface_RSSTitle>Latest News</strInterface_RSSTitle>
	<strInterface_RSSFeed>http://ww3.allnone.ie/client/client_allnone/message/rssfeed.asp</strInterface_RSSFeed>
	<strInterface_StoreSystemAndUsername>true</strInterface_StoreSystemAndUsername>
	<strInterface_Image_LogoURL>http://ww3.allnone.ie/client/client_allnone/images/Banner.jpg</strInterface_Image_LogoURL>
	<strInterface_Image_Background>http://ww3.allnone.ie/images/backgrounds/textureBackground002.jpg</strInterface_Image_Background>
	<strInterface_FontColours>#000000,#000000,#000000</strInterface_FontColours>
	<strInterface_FontFaces>Calibri,Calibri,Calibri</strInterface_FontFaces>
	<strInterface_FontSizes>18,12,10</strInterface_FontSizes>
	<strInterface_SystemKeywords>Login,Back,Get config file,Reset all settings</strInterface_SystemKeywords>
	<!-- Button 0 Settings  -->
	<strInterface_Button0_Title>To Do!</strInterface_Button0_Title>
	<strInterface_Button0_Styling>#ff0000,#000000,Calibri,12,URL</strInterface_Button0_Styling>
	<strInterface_Button0_Layout>1Text1Button1LargeDisplay</strInterface_Button0_Layout>
	<strInterface_Button0_FunctionType>App</strInterface_Button0_FunctionType>
	<strInterface_Button0_APICall>https://ww3.allnone.ie/client/client_allnone/cti/userApp.asp</strInterface_Button0_APICall>
	<strInterface_Button0_Config>[[--SEP--]]Insert,Listee[[--SEP--]]List,Listee,All</strInterface_Button0_Config>
	<strInterface_Button0_URL></strInterface_Button0_URL>
	<strInterface_Button0_Parameters></strInterface_Button0_Parameters>
	<!-- Button 1 Settings  -->
	<strInterface_Button1_Title>Ticket</strInterface_Button1_Title>
	<strInterface_Button1_Styling>#ff0000,#000000,Calibri,12,URL</strInterface_Button1_Styling>
	<strInterface_Button1_Layout>1SmallText1LargeText1Button</strInterface_Button1_Layout>
	<strInterface_Button1_FunctionType>App</strInterface_Button1_FunctionType>
	<strInterface_Button1_APICall>https://ww3.allnone.ie/client/client_allnone/cti/userAPP_Main.asp</strInterface_Button1_APICall>
	<strInterface_Button1_Config>[[--SEP--]][[--SEP--]]Insert,Record,intCampaignId,strFields,strValues</strInterface_Button1_Config>
	<strInterface_Button1_URL></strInterface_Button1_URL>
	<strInterface_Button1_Parameters></strInterface_Button1_Parameters>
	<strInterface_Button2_Title>Today</strInterface_Button2_Title>
	<strInterface_Button2_Styling>#ff0000,#000000,Calibri,12,URL</strInterface_Button2_Styling>
	<strInterface_Button2_Layout>2LargeDisplay1LinkButton</strInterface_Button2_Layout>
	<strInterface_Button2_FunctionType>App</strInterface_Button2_FunctionType>
	<strInterface_Button2_APICall>https://ww3.allnone.ie/client/client_allnone/cti/userAPP_Main.asp</strInterface_Button2_APICall>
	<strInterface_Button2_Config>List,Listee,Today[[--SEP--]]List,Appointment,Today[[--SEP--]]Redir,Button0</strInterface_Button2_Config>
	<strInterface_Button2_URL></strInterface_Button2_URL>
	<strInterface_Button2_Parameters></strInterface_Button2_Parameters>
	<strInterface_Button3_Title>Tomorrow</strInterface_Button3_Title>
	<strInterface_Button3_Styling>#ff0000,#000000,Calibri,12,URL</strInterface_Button3_Styling>
	<strInterface_Button3_Layout>2LargeDisplay1LinkButton</strInterface_Button3_Layout>
	<strInterface_Button3_FunctionType>App</strInterface_Button3_FunctionType>
	<strInterface_Button3_APICall>https://ww3.allnone.ie/client/client_allnone/cti/userAPP_Main.asp</strInterface_Button3_APICall>
	<strInterface_Button3_Config>List,Listee,Tomorrow[[--SEP--]]List,Appointment,Tomorrow[[--SEP--]]Redir,Button0</strInterface_Button3_Config>
	<strInterface_Button3_URL></strInterface_Button3_URL>
	<strInterface_Button3_Parameters></strInterface_Button3_Parameters>
	<strInterface_Button4_Title>Contacts</strInterface_Button4_Title>
	<strInterface_Button4_Styling>#ff0000,#000000,Calibri,12,URL</strInterface_Button4_Styling>
	<strInterface_Button4_Layout>1Text1Button1LargeDisplay</strInterface_Button4_Layout>
	<strInterface_Button4_FunctionType>App</strInterface_Button4_FunctionType>
	<strInterface_Button4_APICall>https://ww3.allnone.ie/client/client_allnone/cti/userAPP_Main.asp</strInterface_Button4_APICall>
	<strInterface_Button4_Config>[[--SEP--]]Lookup,intCampaign_Id,strCDA_X_field_Y_Z-strCDA_X_field_Y_Z[[--SEP--]]</strInterface_Button4_Config>
	<strInterface_Button4_URL></strInterface_Button4_URL>
	<strInterface_Button4_Parameters></strInterface_Button4_Parameters>
	<strInterface_Button5_Title>Critical</strInterface_Button5_Title>
	<strInterface_Button5_Styling>#ff0000,#000000,Calibri,12,URL</strInterface_Button5_Styling>
	<strInterface_Button5_Layout>1LargeDisplay</strInterface_Button5_Layout>
	<strInterface_Button5_FunctionType>App</strInterface_Button5_FunctionType>
	<strInterface_Button5_APICall>https://ww3.allnone.ie/client/client_allnone/cti/userAPP_Main.asp</strInterface_Button5_APICall>
	<strInterface_Button5_Config>List-Hamsters</strInterface_Button5_Config>
	<strInterface_Button5_URL></strInterface_Button5_URL>
	<strInterface_Button5_Parameters></strInterface_Button5_Parameters>
	<strInterface_Button6_Title>Website</strInterface_Button6_Title>
	<strInterface_Button6_Styling>#ff0000,#000000,Calibri,12,URL</strInterface_Button6_Styling>
	<strInterface_Button6_Layout>Redirect</strInterface_Button6_Layout>
	<strInterface_Button6_FunctionType>Redirect</strInterface_Button6_FunctionType>
	<strInterface_Button6_APICall></strInterface_Button6_APICall>
	<strInterface_Button6_Config></strInterface_Button6_Config>
	<strInterface_Button6_URL>http://www.bxpsoftware.com</strInterface_Button6_URL>
	<strInterface_Button6_Parameters></strInterface_Button6_Parameters>
	<strInterface_Button7_Title>Wixi</strInterface_Button7_Title>
	<strInterface_Button7_Styling>#ff0000,#000000,Calibri,12,URL</strInterface_Button7_Styling>
	<strInterface_Button7_Layout>Redirect</strInterface_Button7_Layout>
	<strInterface_Button7_FunctionType>Redirect</strInterface_Button7_FunctionType>
	<strInterface_Button7_APICall></strInterface_Button7_APICall>
	<strInterface_Button7_Config></strInterface_Button7_Config>
	<strInterface_Button7_URL>http://www.bxpsoftware.com/wixi</strInterface_Button7_URL>
	<strInterface_Button7_Parameters></strInterface_Button7_Parameters>
	<strInterface_Button8_Title>System</strInterface_Button8_Title>
	<strInterface_Button8_Styling>#ff0000,#000000,Calibri,12,URL</strInterface_Button8_Styling>
	<strInterface_Button8_Layout>Redirect</strInterface_Button8_Layout>
	<strInterface_Button8_FunctionType>Redirect</strInterface_Button8_FunctionType>
	<strInterface_Button8_APICall></strInterface_Button8_APICall>
	<strInterface_Button8_Config></strInterface_Button8_Config>
	<strInterface_Button8_URL>https://ww3.allnone.ie/client/client_allnone/main/main.asp</strInterface_Button8_URL>
	<strInterface_Button8_Parameters>strInterface_LoginId,strInterface_LoginKey</strInterface_Button8_Parameters>
	<strInterface_Button9_Title>Settings</strInterface_Button9_Title>
	<strInterface_Button9_Styling>#ff0000,#000000,Calibri,12,URL</strInterface_Button9_Styling>
	<strInterface_Button9_Layout>Settings</strInterface_Button9_Layout>
	<strInterface_Button9_FunctionType>App</strInterface_Button9_FunctionType>
	<strInterface_Button9_APICall>https://ww3.allnone.ie/client/client_allnone/cti/userAPP_Main.asp</strInterface_Button9_APICall>
	<strInterface_Button9_Config>strInterface_LoginId,strInterface_LoginKey</strInterface_Button9_Config>
	<strInterface_Button9_URL></strInterface_Button9_URL>
	<strInterface_Button9_Parameters></strInterface_Button9_Parameters>
</data>


4.4 Diary Function

Primary Function: Provide listing of diary events


You must post five key pair values. (not including the semi colons)

  • strFunction:diary
  • strSystem:client_demo
  • intClient_Id:123
  • strClient_SessionField:asdfasdfasdf
  • intDiary:1

The strFunction setting can have a number of settings.

  • diary - defaults for today
  • diary_today - explicitly today listing
  • diary_tomorrow - explicitly tomorrow listing
  • diary_thisweek - explicitly this week listing
  • diary_nextweek - explicitly next week listing
  • diary_thismonth - explicitly this month listing
  • diary_nextmonth - explicitly next month listing


The intDiary is the specific diary to be queried.


The system will respond with XML.


<?xml version="1.0" encoding="UTF-8" ?>
<data>
	<strFunction>diary_today</strFunction>
	<intErrorId>0</intErrorId>
	<strError></strError>
	<dtePeriodStart>2015-01-01 00:00:00</dtePeriodStart>
	<dtePeriodEnd>2015-01-02 00:00:00</dtePeriodEnd>
	<item>
		<id>2490</id>
		<title>Demo Item 1</title>
		<start>2015-01-03T14:30:00</start>
		<end>2015-01-03T17:30:00</end>
		<url>../appointment/userTimeEvent_Edit-details.asp?intTime_Event_Id=2490</url>
	</item>
	<item>
		<id>2491</id>
		<title>Demo Item 2</title>
		<start>2015-01-06T14:00:00</start>
		<end>2015-01-06T15:30:00</end>
		<url>../appointment/userTimeEvent_Edit-details.asp?intTime_Event_Id=2491</url>
	</item>
	<item>
		<id>1171</id>
		<title>Demo Item 3</title>
		<start>2015-01-08T10:00:00</start>
		<end>2015-01-08T14:00:00</end>
		<url>../appointment/userTimeEvent_Edit-details.asp?intTime_Event_Id=1171</url>
	</item>
</data>


Notes:

  • Each item represents a calendar entry. Id is unique for each entry.
  • All titles are HTML encoded.
  • Time is separated with a T.
  • The URL represents navigation within the bxp system to be able to edit that item.


5 Error Listing

  1. "A function must be provided"
  2. "A system must be provided"
  3. "Cross System Calls Not Possible [your call] [system location] "
  4. "Invalid Account Details"
  5. "Login - No Username"
  6. "Login - No Password"
  7. "Login - System Not Active"
  8. "Login - System Expired"
  9. "Login - Unrecognised username [username]"
  10. "Login - Unrecognised username and or password"
  11. "Login - IP Restriction Failure"
  12. "Unrecognised Function [function]"
  13. "Account Check - No client id"
  14. "Account Check - No session field"
  15. "Account Check - Account not found"
  16. "Diary - No Diary Id passed"
  17. "Diary - No permissions to access this diary [intDiary]"
  18. "Diary - Incorrect parameters"


6 History

This API was developed to further the work of Calvin O'Brien and Adam McGivern who work as interns in All n One developing the bxp APP for iPhone, Android and Microsoft devices.

More details on the original project spec can be found here.