Added by admin, last edited by admin on Jan 25, 2010  (view change)

Labels:

Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.

BookingBug REST API: config/setting

Purpose

Each business has a single set of global settings that control the type and style of the business and what they are offering. These setting are core to BookingBug and fundamentally alter the user experience and options available accross the rest of the system.

These options can be set by copying an existing company rather than creating a new one everytime, which is especially useful if you have many business with similar booking needs

The default settings will generally configure a time based business with a single person offering a single service with a simple schedule.

URL

http://[site].bookingbug.com/api/config/setting.format

Formats

json, xml

Authentication

Requies business API access

Parameters

Core Parameters

Essential settings that effect all other options

param type description values default
manage_services integer Does this business manage time slot bookable services, rather than specifically configured classes, courses or events? 0:no
1:single service
2:multiple services
 1
manage_resources integer Does this business manage physical resources 0:no
1:single resource
2 multiple resources
0
manage_people integer Does this business manage the time of single or multiple people 0:no
1:single person
2:multiple people
1
has_classes bool Does this business manage classes or courses. A class is a series of events that are booked as a single item occurring on more than one date. false/true false
has_events bool Does this business manage events. Events are one off bookable items that happen at a specific time and day. The can recur on a regular basis, but each one is treated as a separate booking false/true false

Service Settings

Setting for business who are offering time-slot bookable services

param type description values default
service_type service_type The time basis of the service being offered. This can be a single service type that will apply to all service, or you can specify that this business runs multiple types of service which can then be configured per-service (see service_type)  time

Examples

XML

curl curl -basic --url http://[site].bookingbug.com/api/config/setting.xml -uusername:password -H 'Content-type: text/xml'
-X PUT -d "<?xml version='1.0' encoding='UTF-8'?>
<settings>
  <manage_people>0</manage_people>
  <manage_services>0</manage_services>
  <manage_resources>0</manage_resources>
  <has_classes>false</has_classes>
  <has_events>false</has_events>
</settings>"

curl -basic --url http://[site].bookingbug.com/api/config/setting.xml -uusername:password -H 'Content-type: text/xml' -X PUT -d
"<?xml version='1.0' encoding='UTF-8'?>
<settings>
  <company_id>id_of_sub_company</company_id>
  <manage_people>0</manage_people>
  <manage_services>0</manage_services>
  <manage_resources>0</manage_resources>
  <has_classes>false</has_classes>
  <has_events>false</has_events>
</settings>" (for multiple sub-companies)

JSON

curl -basic --url http://[site].bookingbug.com/api/config/setting.json -uusername:password -H 'Content-type: application/json'
-X PUT -d {"settings":{"manage_people":0,"manage_services":0,"manage_resources":0,"has_classes":false,"has_events":false}}
curl -basic --url http://[site].bookingbug.com/api/config/setting.json -uusername:password -H 'Content-type: application/json' -X PUT -d {"settings":{"company_id":56,"manage_people":0,"manage_services":1,"manage_resources":0,"has_classes":false,"has_events":false}} (for multiple sub-companies)