Revision as of 11:00, 18 December 2015 by Admin (talk | contribs) (→‎Constants)

Company public service methods

From SimplyBook.me

You can find full list of Company public service] API methods here.

Methods


getCompanyParam

getCompanyParam(key)

Params:

  • key string

Returns string.

getCompanyParam API method returns configuration value for specified key. Method return invalid params error (code -32602) in case if specified key not allowed.

Possible values of key parameter:

  • allow_delay_payment
  • allow_event_breaktime_break
  • allow_event_day_break
  • company_timezone
  • date_format
  • fixed_country_prefix
  • hide_sale_tax
  • max_time_till_event
  • min_time_till_event
  • monday_is_first_day
  • payment_timeout
  • require_fields
    String. Client's data fields required for booking. Possible values:
    • phone - phone number is required
    • email - email address is required
    • email_phone - phone number and email address are required
  • sale_tax
  • send_notifications_in_client_timezone
  • show_booking_page_in_client_timezone
  • time_format
  • timeframe
  • user_public_timeline_type

getPluginStatuses

getPluginStatuses(pluginNames)

Params:

  • pluginNames an array of strings

Returns an associative array with strings as keys and booleans as values.

Returns an associative array (a JSON object) with values from pluginNames parameter as keys and boolean values for each plugin. See list of available plugin identifiers.


isPluginActivated

isPluginActivated(pluginName)

Params:

  • pluginName string

Returns boolean (1 or 0).

Return plugin status true if status active, else false. pluginName parameter should be one of the plugin's identifiers. See list of available plugin identifiers.


Constants

Company params

Use these values to get configuration params for company with getCompanyParam API method.

  • allow_delay_payment
  • allow_event_breaktime_break
  • allow_event_day_break
  • company_timezone
  • date_format
  • fixed_country_prefix
  • hide_sale_tax
  • max_time_till_event
  • min_time_till_event
  • monday_is_first_day
  • payment_timeout
  • require_fields
    String. Client's data fields required for booking. Possible values:
    • phone - phone number is required
    • email - email address is required
    • email_phone - phone number and email address are required
  • sale_tax
  • send_notifications_in_client_timezone
  • show_booking_page_in_client_timezone
  • time_format
  • timeframe
  • user_public_timeline_type

Plugin's identifiers

Plugin identifier is a string constant which represents a plugin in system. These constants used in isPluginActivated and getPluginStatuses API methods.

  • advanced_notification
    Book Soon notification system plugin
  • any_unit
    Any Employee selector plugin
  • api
    API plugin
  • approve_booking
    Approve booking plugin
  • back_to_site
    Take me back home plugin
  • contact_widget
    Contact widget plugin
  • counter
    Visitor Counter plugin
  • custom_css
    Custom CSS plugin
  • data_security
    Clean history plugin
  • description
    HTML description field for events
  • event_category
    Service categories plugin
  • event_field
    Additional fields plugin
  • facebookImage
    Facebook client info plugin
  • financial_dashboard
    Insights plugin
  • google_analytics
    Google Adwords and analytics plugin
  • google_calendar_export
    Google calendar sync plugin
  • group_booking
    Group bookings plugin
  • hipaa
    HIPAA plugin
  • limit_bookings
    Limit bookings plugin
  • location
    Unit location plugin
  • mobile_app_backend
    Mobile application plugin
  • multiple_booking
    Multiple bookings plugin
  • news
    News plugin
  • paid_events
    Accept payments plugin
  • promo
    Simply Smart Promotions plugin
  • recap
    Daily report plugin
  • secure
    SSL plugin
  • status
    Status plugin
  • unit_colors
    Providers color coding plugin
  • user_license
    Terms and conditions plugin

See Plugins page for description for each plugin.