Changes

From SimplyBook.me
no edit summary
Line 9: Line 9:  
='''AUTHORIZATION'''=
 
='''AUTHORIZATION'''=
 
<br><br>
 
<br><br>
Using Simplybook API methods require an authentication. To authorize in Simplybook API you need to get an access key — access-token. In order to get this access-token you should call the JSON-RPC method getToken on http://user-api.simplybook.me/login service passing your personal API-key. You can copy your API-key at admin interface: go to the 'Plugins' link and select API plugin 'Settings'. Then you have to init remote access to Simplybook API. Your request should contain the following headers: 'X-Company-Login', 'X-Token'.
+
Using Simplybook API methods require an authentication. To authorize in Simplybook API you need to get an access key — access-token. In order to get this access-token you should call the JSON-RPC method getToken on http://user-api.simplybook.me/login service passing your personal API-key. You can copy your API-key at admin interface: go to the 'Custom Features' link and select API Custom Feature 'Settings'. Then you have to init remote access to Simplybook API. Your request should contain the following headers: 'X-Company-Login', 'X-Token'.
    
Getting the access-token can be implemented either from client side or from your server which is the more secure solution.
 
Getting the access-token can be implemented either from client side or from your server which is the more secure solution.
Line 173: Line 173:  
='''USING OF API SECRET KEY'''=
 
='''USING OF API SECRET KEY'''=
 
<br><br>
 
<br><br>
In some cases the book method may require the confirmation, e.g. if your accept payments from clients you confirm booking only after the payment is already came. The Simplybook API confirmBookng method takes booking-id and secure signature as params (another method which requires secure signature is cancelBookng). For the secure signature generation your secret API-key should be used. See how it can be done in the example below. You can find the secret key at admin interface under 'Settings' link of API plugin in 'Plugins' list.
+
In some cases the book method may require the confirmation, e.g. if your accept payments from clients you confirm booking only after the payment is already came. The Simplybook API confirmBookng method takes booking-id and secure signature as params (another method which requires secure signature is cancelBookng). For the secure signature generation your secret API-key should be used. See how it can be done in the example below. You can find the secret key at admin interface under 'Settings' link of API Custom Feature in 'Custom Features' list.
 
<br><br>
 
<br><br>
 
'''Code example of service booking and its confirmation using secret API key'''
 
'''Code example of service booking and its confirmation using secret API key'''
Line 215: Line 215:  
// )), ...)</nowiki>
 
// )), ...)</nowiki>
 
<br><br><br>
 
<br><br><br>
='''SIMPLYBOOK PLUGINS'''=
+
='''SIMPLYBOOK CUSTOM FEATURES'''=
 
<br><br>
 
<br><br>
If your company specific requires some additional functionality you can activate some of our additional plugins. The complete plugin list with detailed description is avaiable in your admin interface under the 'Plugins' link. After the necessary plugin is enabled the corresponding API methods will be activated so you can use them in your code.
+
If your company specific requires some additional functionality you can activate some of our additional Custom Features. The complete Custom Features list with detailed description is avaiable in your admin interface under the 'Custom Feature' link. After the necessary Custom Feature is enabled the corresponding API methods will be activated so you can use them in your code.
 
<br><br><br>
 
<br><br><br>
 
='''BOOKING FUNCTIONALITY CODEFLOW'''=
 
='''BOOKING FUNCTIONALITY CODEFLOW'''=
Line 224: Line 224:       −
Check if Service categories plugin is activated by [https://simplybook.me/en/api/doc#isPluginActivated isPluginActivated("event_category")]  if yes then display list of categories [https://simplybook.me/en/api/doc#getCategoriesList getCategoriesList()].
+
Check if Service categories Custom Feature is activated by [https://simplybook.me/en/api/doc#isPluginActivated isPluginActivated("event_category")]  if yes then display list of categories [https://simplybook.me/en/api/doc#getCategoriesList getCategoriesList()].
      Line 230: Line 230:       −
If Any Employee selector plugin is activated [https://simplybook.me/en/api/doc#isPluginActivated isPluginActivated("any_unit")] and no special duration is set for service-performer pair in "unit_map" array then user should be allowed to select Any provider option or choose provider manually. But manual selection of performers should not be possible if [https://simplybook.me/en/api/doc#getCompanyParam getCompanyParam("any_unit__hide_other_units")] is enabled.
+
If Any Employee Selector Custom Feature is activated [https://simplybook.me/en/api/doc#isPluginActivated isPluginActivated("any_unit")] and no special duration is set for service-performer pair in "unit_map" array then user should be allowed to select Any provider option or choose provider manually. But manual selection of performers should not be possible if [https://simplybook.me/en/api/doc#getCompanyParam getCompanyParam("any_unit__hide_other_units")] is enabled.
      Line 239: Line 239:       −
If Additional fields plugin is activated [https://simplybook.me/en/api/doc#isPluginActivated isPluginActivated("event_field")] call [https://simplybook.me/en/api/doc#getAdditionalFields getAdditionalFields($eventId)] function to get list of fields for client to fill.
+
If Additional Fields Custom Feature is activated [https://simplybook.me/en/api/doc#isPluginActivated isPluginActivated("event_field")] call [https://simplybook.me/en/api/doc#getAdditionalFields getAdditionalFields($eventId)] function to get list of fields for client to fill.