Bookitit REST API 1.1


Public Member Functions

addagenda ($p_sPublicKey)
addagendaservice ($p_sPublicKey)
addclient ($p_sPublicKey, $p_sWebaccess)
addcompany ($p_sPublicKey)
addcompanycustomfield ($p_sPublicKey)
addevent ($p_sPublicKey)
addextraservice ($p_sPublicKey)
addholidays ($p_sPublicKey)
addorder ($p_sPublicKey)
addservice ($p_sPublicKey)
addsocialevent ($p_sPublicKey, $p_sPublickeyNormalCompany)
addsocialuser ($p_sPublicKey)
addtrial ()
adduser ($p_sPublicKey)
auth ($p_sPublicKey, $p_sAccountType)
checkifcompanyemailexist ($p_sPublicKey, $p_sCompanyEmail)
confirmemail ($p_sPublicKey)
confirmevent ($p_sPublicKey)
confirmphone ($p_sPublicKey)
deleteagenda ($p_sPublicKey)
deleteagendaservice ($p_sPublicKey)
deleteclient ($p_sPublicKey)
deletecompany ($p_sPublicKey)
deletecompanyschedule ($p_sPublicKey)
deleteevent ($p_sPublicKey)
deleteservice ($p_sPublicKey)
getagendaconfiguration ($p_sPublicKey, $p_sAgendaID)
getagendas ($p_sPublicKey, $p_sServiceID=null)
getagendasbycategory ($p_sPublicKey, $p_sCategoryId)
getagendasservices ($p_sPublicKey)
getcategories ($p_sPublicKey)
getcities ($p_sPublicKey, $p_sLanguageID, $p_sRegionID)
getclient ($p_sPublicKey, $p_sIdClientId)
getclientbyvalidationfield ($p_sPublicKey)
getclientevents ($p_sPublicKey, $p_iClientId, $p_sDateFrom=»», $p_sDateTo=»»)
getclients ($p_sPublicKey, $p_sDateFrom, $p_sDateTo, $p_sType=null)
getclientsbyeventid ($p_sPublicKey, $p_sEventID)
getcompanies ($p_sPublicKey)
getcompanydata ($p_sPublicKey)
getcountries ($p_sPublicKey, $p_sLanguageID)
geteventbyid ($p_sPublicKey, $p_sEventID=null, $p_sLocator=null)
getevents ($p_sPublicKey, $p_sDateFrom, $p_sDateTo, $p_sAgendaID=null)
getextraservices ($p_sPublicKey)
getfreeslots ($p_sPublicKey, $p_sServiceID, $p_sAgendaID, $p_sDate, $p_bAlsoFullSlots=»false»)
getgroups ($p_sPublicKey)
getholidays ($p_sPublicKey)
getlanguages ($p_sPublicKey)
getorders ($p_sPublicKey)
getregions ($p_sPublicKey, $p_sLanguageID, $p_sCountryID)
getschedule ($p_sPublicKey)
getservices ($p_sPublicKey, $p_sGroupId=null)
getuser ($p_sPublicKey, $p_sUserID)
getuserevents ($p_sPublicKey, $p_iIdUser, $p_sDateFrom, $p_sDateTo)
setagendatocompanyschedule ($p_sPublicKey)
setphoneandsendvalidate ($p_sPublicKey)
testconnection ($p_sEchoValue)
updateagenda ($p_sPublicKey)
updateagendacommunications ($p_sPublicKey)
updateagendaconfiguration ($p_sPublicKey)
updateagendaservice ($p_sPublicKey)
updateclient ($p_sPublicKey)
updatecompany ($p_sPublicKey)
updatecompanycustomfield ($p_sPublicKey)
updatecompanyscheduleday ($p_sPublicKey)
updateevent ($p_sPublicKey)
updateeventstatus ($p_sPublicKey)
updateorder ($p_sPublicKey)
updateservice ($p_sPublicKey)
updatesocialuser ($p_sPublicKey)
updateuser ($p_sPublicKey)
uservalidate ($p_sUserMail, $p_sPassword, $p_sType=null)
validateorder ($p_sPublicKey)

Detailed Description

The most recent version of the Bookitit REST API.

Version 1 of the REST API is now deprecated.

Author
Bookitit
Version
1.1 *

Member Function Documentation

addagenda( $p_sPublicKey)

This function adds an agenda for your company.

URL to call this function: https://app.bookitit.com/api/11/addagenda/p_sPublicKey

Parameters
p_sPublicKeyYour public key

POST PARAMETERS

Parameters
nameagenda name
phoneagenda phone (optional)
emailagenda email (optional)
public(optional) indicates if the agenda is «public» or «private». Default is «public»
synchroid(optional) id of the agenda in your software (MUST USE in case of an integration or synchronization between your software and Bookitit)
serviceid(optional) id of a previously created service, which associate with this agenda (format bktXXXXXXX)
Returns
on success, if xml was chosen:

  • <agenda>
    • <status>true</status>
    • <id>id of the created agenda (format bktXXXXXXXX)</id>
  • </agenda>
  • on success, if json was chosen:
    • {«agenda»:
      • {
        • «status»:true,
        • «id»:id of the created agenda (format bktXXXXXXXX)
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <agenda>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </agenda>
  • on failure, if json was chosen:
    • {«agenda»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

addagendaservice( $p_sPublicKey)

This function connects an agenda and a service for your company. Both must be already created, and its IDs supplied. It can be the IDs of the agenda and the service in Bookitit or, if you are synchronizing/integrating services between your software and Bookitit, the ID of the agenda and the service in your software (we call it Synchro IDs). If both IDs are provided, the Synchro IDs have preference.

URL to call this function: https://app.bookitit.com/api/11/addagendaservice/$p_sPublicKey

Parameters
p_sPublicKeyYour public key

POST PARAMETERS

Parameters
p_sAgendaIDagenda ID (format bktXXXXXXX)
p_sServiceIDservice ID (format bktXXXXXXX)
p_sAgendaSynchroIDagenda ID in your software (use in case of software integration)
p_sServiceSynchroIDservice ID in your software (use in case of software integration)
p_iDuration(optional) Duration of the service specific for this agenda, in minutes.
p_dPrice(optional) Price of the service specific for this agenda, in your currency
Returns
on success, if xml was chosen:

  • <agenda_service>
    • <status>true</status>
  • </agenda_service>
  • on success, if json was chosen:
    • {«agenda_service»:
      • {
        • «status»:true,
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <agenda_service>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </agenda_service>
  • on failure, if json was chosen:
    • {«agenda_service»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

addclient( $p_sPublicKey,
 $p_sWebaccess 
)

This function adds a client with or without web access

URL to call this function: https://app.bookitit.com/api/11/addclient/p_sPublicKey

A client with web access can login from widget. With this action the client can create new appointments without register again, or delete pending appointments. This client registration requires some mandatory fields.

A client without web access can’t login at widget. This type of client only contains its data that allow to center create new appointment This client registration only requires to fill some fields (one field at least)

Parameters
$p_sPublicKeyYour public key
$p_sWebaccessIf the client has web access or not (string with «true» or «false»)

POST PARAMETERS

Parameters
$p_sPassword(optional) Encrypted (md5) password for the client. If you don’t want to send this parameter set it as «».
$p_sEmail(optional) Email of the client. If you don’t want to send this parameter set it as «».
$p_sCellphone(optional) Cellphone of the client without international code. If you don’t want to send this parameter set it as «».
$p_sInternationalCode(optional) The country international code (Ex: +34), if you don’t set this value the default value inserted will be the international code of the company. If you don’t want to send this parameter set it as «».
$p_sDocument(optional) Document of the client. If you don’t want to send this parameter set it as «».
$p_sName(optional) Name of the client. If you don’t want to send this parameter set it as «».
$p_sAddress(optional) Address of the client. If you don’t want to send this parameter set it as «».
$p_sPhone(optional) Phone of the client. If you don’t want to send this parameter set it as «».
$p_someCustomFields(optional) If your company account is using custom fields for the users, you can set it there.

$p_someCustomFields param example: array( «customvalidate1» => «data in text format», «customvalidate2″=> «data in text format», «custom1″=> «data in text format», «custom2″=> «data in text format», «custom3″=> «data in text format», «custom4″=> «data in text format», «custom5″=> «data in text format» )

Returns
  • on success, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <client>
        • <status>true</status>
        • <id>id of the created client (format bktXXXXXXXXX)</id>
      • </client>
  • on success, if json was chosen:
    • {«client»:
      • {
        • «status»:true,
        • «id»:id of the created client (format bktXXXXXXXXX)
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <client>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </client>
  • on failure, if json was chosen:
    • {«client»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

addcompany( $p_sPublicKey)

This function is used to add a new company to Bookitit.

URL to call this function: https://app.bookitit.com/api/11/addcompany/p_sPublicKey

Warning
You need an Administrator API KEY with a multicenter account to use this function.
Parameters
$p_sPublicKeyPublic key of the administrator user

POST PARAMETERS

Parameters
p_sEmailemail of the company
p_sPasswordEncrypted password (md5) of the company. You have to use an md5 library to encrypt.
p_sNameName of the company
p_sCellPhoneCellphone of the company (optional)
p_sPhonePhone of the company (optional)
p_sAddressAddress of the company (optional)
p_sPostalCodePostal code of the company (optional)
p_sWebWebsite of the company (optional)
p_sExpirationDatethe expiration date of the account (format YYYY-MM-DD). Optional, default is one year from today.
p_sShowWizard(optional) indicates if the company administrator will have to complete the first-time wizard. Options are «yes» or «no», default is «yes».
Returns
  • on success, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <company>
        • <status>true</status>
        • <id>id of the created company (format bkt XXXXXXXXX)</id>
        • <public>the public key of the created company</public>
        • <private>the private key of the created company</private>
      • </company>
  • on success, if json was chosen:
    • {«company»:
      • {
        • «status»:true,
        • «id»:id of the created company (format bkt XXXXXXXXX),
        • «public»:the public key of the created company,
        • «private»:the private key of the created company
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <company>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </company>
  • on failure, if json was chosen:
    • {«company»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

addcompanycustomfield( $p_sPublicKey)

This function adds a custom field for the company whose public key is given.

Warning
only administrator users, who have an administrator api key, can use this function. Moreover, an administrator can only add custom fields to a company created by himself.

URL to call this function: https://app.bookitit.com/api/11/addcompanycustomfield/p_sPublicKey

Parameters
$p_sPublicKeyPublic key of the administrator user

POST PARAMETERS

Parameters
p_sPublicKeyToAddpublic key of the company to add the field to
p_sInputTypethe kind of the custom field, current options are «text», «checkbox»
p_sInputLabelthe label that will precede the field wherever it is shown
p_sInputNamethe name of the field form html and DOM purposes
p_sInputValuethe value of the field
p_sShowInMyCenter(optional) indicates if the custom field has to be shown in the «my center» section of bookitit. Options are «yes» or «no», default is «no».
p_sLanguageID(optional) (format bktXXXXX) indicates the language of the field, as they can be multilanguage. Must add one field per language.
Returns
  • on success, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <companycustomfield>
        • <status>true</status>
        • <id>id of the created custom field (format bktXXXXX)</id>
      • </companycustomfield>
  • on success, if json was chosen:
    • {«companycustomfield»:
      • {
        • «status»:true
        • «id»:id of the created custom field (format bktXXXXX)
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <companycustomfield>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </companycustomfield>
  • on failure, if json was chosen:
    • {«companycustomfield»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

addevent( $p_sPublicKey)

This function creates an event.

URL to call this function: https://app.bookitit.com/api/11/addevent/p_sPublicKey

Warning
If you are creating an event for a social network, you might want to use the «addsocialevent» function instead.
Parameters
p_sPublicKeyYour public key

POST PARAMETERS

Parameters
p_sAgendaIDID of the agenda (format bktXXXXXXXX)
p_sServiceIDID of the service (format bktXXXXXXXX)
p_dStartDatestart date of the event (YYYY-MM-DD), if date doesn’t exist, date will be 0000-00-00
p_dEndDateend date of the event (YYYY-MM-DD), if date doesn’t exist, date will be 0000-00-00
p_iStartTimestart time of the event (in minutes, since 00:00): 01:00 am = 60, 02:00 am = 120 …
p_iEndTimeend time of the event (in minutes, since 00:00): 01:00 am = 60, 02:00 am = 120 …
p_sTitle(optional) title of the event, if it’s set p_sServiceID the title will get automatically the name of the service. DEPRECATED the p_sServiceID is allways needed.
p_sDescription(optional) description of the event DEPRECATED, use p_sComments
p_sComments(optional) comments of the event
p_sEventSynchroID(optional) In case you are synchronizing your software with Bookitit, provide your event ID.
p_sAgendaSynchroID(optional) (mandatory if $p_sAgendaID is not set) In case you are synchronizing your software with Bookitit, provide your agenda ID.
p_sServiceSynchroID(optional) (mandatory if $p_sServiceID is not set) In case you are synchronizing your software with Bookitit, provide your service ID.
p_sUserID(optional) ID of the final user who makes the event (format bktXXXXXXXX) DEPRECATED, use p_sClientID
p_sUserPhone(optional) a phone number of the final user who makes the event. DEPRECATED
p_sClientID(optional) ID of the client who makes the event (format bktXXXXXXXX)
p_sClientName(optional) name of the client, to create the new client if p_sUserID or p_sClientID is not set
p_sClientPhone(optional) phone of the client, to create the new client if p_sUserID or p_sClientID is not set
p_sClientEmail(optional) email of the client, to create the new client if p_sUserID or p_sClientID is not set
$p_someCustomFields(optional) If your company account is using custom fields for the users, you can set it there.

$p_someCustomFields param example: array( «customevent1» => «data in text format», «customevent2″=> «data in text format», «customevent3″=> «data in text format», «customevent4″=> «data in text format», «customevent5″=> «data in text format» )

Returns
on success, if xml was chosen:

  • <event>
    • <status>true</status>
    • <id>id of the created event (format bktXXXXXXXX)</id>
  • </event>
  • on success, if json was chosen:
    • {«event»:
      • {
        • «status»:true,
        • «id»:id of the created event (format bktXXXXXXXX)
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <event>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </event>
  • on failure, if json was chosen:
    • {«event»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

addextraservice( $p_sPublicKey)

This function adds an extra service for your company. An extra service is separated from the rest of services for some reason, i.e. temporary offers. They can’t be associated with an agenda, only with an event.

URL to call this function: https://app.bookitit.com/api/11/addextraservice/p_sPublicKey

Parameters
p_sPublicKeyYour public key

POST PARAMETERS

Parameters
p_sNamename of the extra service
Returns
on success, if xml was chosen:

  • <extraservice>
    • <status>true</status>
    • <id>id of the created extra service (format bktXXXXXXXX)</id>
  • </extraservice>
  • on success, if json was chosen:
    • {«extraservice»:
      • {
        • «status»:true,
        • «id»:id of the created extra service (format bktXXXXXXXX)
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <extraservice>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </extraservice>
  • on failure, if json was chosen:
    • {«extraservice»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

addholidays( $p_sPublicKey)

This function adds an array of holidays

URL to call this function: https://app.bookitit.com/api/11/addholidays/p_sPublicKey

Parameters
p_sPublicKeyYour public key

POST PARAMETERS

Parameters
$p_someHolidaysthe array of holidays will have this format: myarray[«2012-01-01»] = «title 1»;myarray[«2012-01-02»] = «title 2»; …
Returns
on success, if xml was chosen:

  • <holidays>
    • <status>true</status>
  • </holidays>
  • on success, if json was chosen:
    • {«holidays»:
      • {
        • «status»:true,
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <holidays>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </holidays>
  • on failure, if json was chosen:
    • {«holidays»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

addorder( $p_sPublicKey)

This function creates an order for your company when a client intends to book a prepay service. The order is created in an initial state (not paid).

URL to call this function: https://app.bookitit.com/api/11/addorder/p_sPublicKey

Parameters
p_sPublicKeyYour public key
Returns
on success, if xml was chosen:

  • <order>
    • <status>true</status>
    • <id>id of the created order (format bktXXXXXXXX)</id>
  • </order>
  • on success, if json was chosen:
    • {«order»:
      • {
        • «status»:true,
        • «id»:id of the created order (format bktXXXXXXXX)
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <order>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </order>
  • on failure, if json was chosen:
    • {«order»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

addservice( $p_sPublicKey)

This function adds a service for your company.

URL to call this function: https://app.bookitit.com/api/11/addservice/p_sPublicKey

Parameters
p_sPublicKeyYour public key

POST PARAMETERS

Parameters
p_sNamename of the service
p_iTimeduration of the service in minutes
p_dPriceprice of the service (only numbers in format XX.XX)
p_sCurrencyin which currency would be the service the price, accepted values are «EUR» for euro «GBP» for british pound and «USD» for United States dollar. Default is euro.
p_sPublic(optional) service marked as «public» or «private». Default is «public».
p_iPrepay(optional) «prepay» or «not_prepay». Default is «not_prepay».
p_sSynchroID(optional) id of the service in your software (MUST USE in case of an integration or synchronization between your software and Bookitit)
Returns
on success, if xml was chosen:

  • <service>
    • <status>true</status>
    • <id>id of the created service (format bktXXXXXXXX)</id>
  • </service>
  • on success, if json was chosen:
    • {«service»:
      • {
        • «status»:true,
        • «id»:id of the created service (format bktXXXXXXXX)
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <service>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </service>
  • on failure, if json was chosen:
    • {«service»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

addsocialevent( $p_sPublicKey,
 $p_sPublickeyNormalCompany 
)

This function creates a «social» event. The user must be a «social» user. A social event is like an event but linked to a social user.

A «social» event will always show for a user in different companies of the same social network.

URL to call this function: https://app.bookitit.com/api/11/addsocialevent/p_sPublicKey

Warning
You need an Administrator API KEY with a multicenter account to use this function.
This function will only create the event if the user is a «social» user. If you are creating the event for a normal, single-site user, please use the «addevent» function instead.
Parameters
p_sPublicKeyThe public key of an Administrator API KEY
p_sPublickeyNormalCompanyThe public key of the company for which the user is going to booking

POST

Parameters
p_sEmailThe email of the user-client that is booking the event (format bktXXXXX)
p_sAgendaIDid of the agenda (format bktXXXXXXXX)
p_sServiceIDid of the service (format bktXXXXXXXX)
p_dStartDatestart date of the event (YYYY-MM-DD)
p_dEndDateend date of the event (YYYY-MM-DD)
p_iStartTimestart time of the event (in minutes, since 00:00), 01:00 am = 60, 02:00 am = 120 …
p_iEndTimeend time of the event (in minutes, since 00:00), optional if not set it will use the duration of the service
p_sTitletitle of the event, optional if not set it will use the title of the service
p_sCommentsdescription of the event, optional if not set it will be void
p_sState(optional) The state of the event. The possible states are: «completed», «inpayment»
p_sCreatedBy(optional) set «client» if it is created by the client or set «company» if it is created by the company (default value «client»)
Returns
on success, if xml was chosen:

  • <event>
    • <status>true</status>
    • <id>id of the created event (format bktXXXXXXXX)</id>
  • </event>
  • on success, if json was chosen:
    • {«event»:
      • {
        • «status»:true,
        • «id»:id of the created event (format bktXXXXXXXX)
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <event>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </event>
  • on failure, if json was chosen:
    • {«event»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }
      See Also
      addsocialuser

addsocialuser( $p_sPublicKey)

This function adds a «social» user given his basic data. The social user can book in any company of a social network, in our case, all the companies of a multicenter account. This social user is the same for all the companies of a multicenter account. A social user has to sign in its social network before the developer call this method to create an account in Bookitit because Bookitit will not check anything.

URL to call this function: https://app.bookitit.com/api/11/addsocialuser/p_sPublicKey

Warning
If you are adding a user for a single site, please use the «adduser» function instead.
You need an Administrator API KEY with a multicenter account to use this function.
Parameters
p_sPublicKeyyour public key (administrator key)

POST PARAMETERS

Parameters
p_sNameName of the user
p_sPhonePhone number of the user
p_sEmailemail of the user
p_sPassword(optional) the password of the user in md5
Returns
  • on success, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <user>
        • <status>true</status>
        • <id>id of the created user (format bktXXXXXXXXX)</id>
      • </user>
  • on success, if json was chosen:
    • {«user»:
      • {
        • «status»:true,
        • «id»:id of the created user (format bktXXXXXXXXX)
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
    • <user>
      • <status>false</status>
      • <id>error id</id>
      • <message>error message</message>
    • </user>
  • on failure, if json was chosen:
    • {«user»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }
See Also
adduser

addtrial()

This function is used to add a new trial company account to Bookitit.

URL to call this function: https://app.bookitit.com/api/11/addtrial/p_sPublicKey

Warning
You need a valid Ip address to use this function.

POST PARAMETERS

Parameters
p_sNameName of the company
p_iCellPhoneCellphone of the company
p_iCountryCountry id of the company
p_sEmailEmail of the company
p_sLanguageCodeLanguage code (‘en’, ‘es’, ‘XX’), default ‘es’ (optional)
p_sSignUpUrlAccount created from (optional)
Returns
  • on success, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <company>
        • <status>true</status>
        • <id>id of the created company (format bkt XXXXXXXXX)</id>
        • <public>public key</public>
        • <private>private key</private>
      • </company>
  • on success, if json was chosen:
    • {«company»:
      • {
        • «status»: true,
        • «id»: id of the created company (format bkt XXXXXXXXX),
        • «public»: public key,
        • «private»: private key
      • }
    • }
  • on not valid fields, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <company>
        • <status>false</status>
        • <id>error id</id>
        • <errors>
          • <field_1>Message text</field_1>
          • <field_X>Message text</field_X>

</errors>

  • </company>
  • on not valid fields, if json was chosen:
    • {«company»:
      • {
        • «status»:false,
        • «id»:error id,
        • «errors»:{«field_1» : «Text message», «field_x» : «Text message»},
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <company>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </company>
  • on failure, if json was chosen:
    • {«company»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

adduser( $p_sPublicKey)

DEPRECATED use addclient This function adds a user with its basic data.

URL to call this function: https://app.bookitit.com/api/11/adduser/p_sPublicKey

Warning
If you are adding a user for a social network, you might want to use the «addsocialuser» function instead.
Parameters
p_sPublicKeyYour public key

POST PARAMETERS

Parameters
p_sNameName of the user
p_sEmailemail of the user
p_sPasswordEncrypted (md5) password for the user
p_sPhone(optional) CellPhone number of the user. If you don’t want to send this parameter set it as «».
p_sDocument(optional) Document of the user. If you don’t want to send this parameter set it as «».
p_sAddress(optional) The address of the user. If you don’t want to send this parameter set it as «».
p_someCustomFields(optional) If your company account is using custom fields for the users, you can set it there. array( «customvalidate1» => «data in text format», «customvalidate2″=> «data in text format», «custom1″=> «data in text format», «custom2″=> «data in text format», «custom3″=> «data in text format», «custom4″=> «data in text format», «custom5″=> «data in text format» )
Returns
  • on success, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <user>
        • <status>true</status>
        • <id>id of the created user (format bktXXXXXXXXX)</id>
      • </user>
  • on success, if json was chosen:
    • {«user»:
      • {
        • «status»:true,
        • «id»:id of the created user (format bktXXXXXXXXX)
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <user>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </user>
  • on failure, if json was chosen:
    • {«user»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }
See Also
addsocialuser
setphoneandsendvalidate
confirmphone

auth( $p_sPublicKey,
 $p_sAccountType 
)

This function authenticates a professional account into system. After that, the function will return a url where the client software will redirect.

URL to call this function: https://app.bookitit.com/api/11/auth/p_sAccountType

Parameters
p_sPublicKeythe api public key of the company
p_sAccountTypethe account of the company single or multiple
Returns
on success, if xml was chosen:

  • <auth>
    • <status>true</status>
    • <authenticated_url>the url</authenticated_url>
  • </auth>
  • on success, if json was chosen:
    • {«auth»:
      • {
        • «status»:true
        • «authenticated_url»: the url where the client software will redirect
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <auth>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </auth>
  • on failure, if json was chosen:
    • {«auth»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

checkifcompanyemailexist( $p_sPublicKey,
 $p_sCompanyEmail 
)

This function gets checks if the company email exists.

Only for multicenter

URL to call this function: https://app.bookitit.com/api/checkifcompanyemailexist/$p_sPublicKey/$p_sCompanyEmail

Parameters
$p_sPublicKeyYour public key
$p_sCompanyEmailCompany email.
Returns
  • on success, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <user>
        • <status>true</status>
    • </user>
  • on success, if json was chosen:
    • {«user»:
      • {
        • «status»:true,
        • «id»:id of the user (format bktXXXXXXXXX),
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <user>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </user>
  • on failure, if json was chosen:
    • {«user»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

confirmemail( $p_sPublicKey)

This function changes the email of one of your users (if a user’s ID is given) or the email of your company (if no ID is given). Also marks the user or company as ACTIVE. It should be used after the user or company enters the activation code received in a cellphone.

URL to call this function: https://app.bookitit.com/api/11/confirmemail/p_sPublicKey

Parameters
p_sPublicKeyYour public key

POST PARAMETERS

Parameters
p_sEmailemail of the user
p_sUserIDthe id of the user (format bktXXXXXXXXX)
Returns
  • on success, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <user>
        • <status>true</status>
      • </user>
  • on success, if json was chosen:
    • {«user»:
      • {
        • «status»:true
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <user>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </user>
  • on failure, if json was chosen:
    • {«user»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }
See Also
setphoneandsendvalidate

confirmevent( $p_sPublicKey)

This function is used to set an event of your company to status CONFIRMED. If synchronization is activated for your company, it will try to send the event to your local software.

URL to call this function: https://app.bookitit.com/api/11/confirmevent/p_sPublicKey

Parameters
p_sPublicKeyYour public key

POST PARAMETERS

Parameters
p_sEventIDthe id of the event (format «bktXXXXXXXX»)
Returns
  • on success, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <event>
        • <status>true</status>
      • </event>
  • on success, if json was chosen:
    • {«event»:
      • {
        • «status»:true
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <event>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </event>
  • on failure, if json was chosen:
    • {«event»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

confirmphone( $p_sPublicKey)

This function changes the phone of one of your users (if a user’s ID is given) or the phone of your company (if no ID is given). Also marks the user or company as ACTIVE. It should be used after the user or company enters the activation code received in a cellphone.

URL to call this function: https://app.bookitit.com/api/11/confirmphone/p_sPublicKey

Parameters
p_sPublicKeyYour public key

POST PARAMETERS

Parameters
p_sPhonePhone number of the user
p_sUserIDthe id of the user (optional, format bktXXXXXXXXX)
Returns
  • on success, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <user>
        • <status>true</status>
      • </user>
  • on success, if json was chosen:
    • {«user»:
      • {
        • «status»:true
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <user>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </user>
  • on failure, if json was chosen:
    • {«user»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }
See Also
setphoneandsendvalidate

deleteagenda( $p_sPublicKey)

This function deletes an agenda of your company. An agenda ID must be provided. It can be the ID of the agenda in Bookitit or, if you are synchronizing or integrating agendas between your software and Bookitit, the ID of the agenda in your software (we call it Synchro ID). If both are provided, the Synchro ID has preference.

URL to call this function: https://app.bookitit.com/api/11/deleteagenda/p_sPublicKey

Parameters
typep_sPublicKey Your public key

POST PARAMETERS

Parameters
typep_sAgendaID ID of the agenda (format bktXXXXXXX)
typep_sSynchroID ID of the agenda in your software
Returns
on success, if xml was chosen:

  • <agenda>
    • <status>true</status>
  • </agenda>
  • on success, if json was chosen:
    • {«agenda»:
      • {
        • «status»:true,
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <agenda>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </agenda>
  • on failure, if json was chosen:
    • {«agenda»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

deleteagendaservice( $p_sPublicKey)

This function deletes an agenda-service connection of your company. Agenda ID and service ID must be provided. They can be the IDs in Bookitit or, if you are synchronizing or integrating agendas between your software and Bookitit, the IDs of your software (we call it Synchro ID). If both are given, Synchro IDs have preference.

URL to call this function: https://app.bookitit.com/api/11/deleteagendaservice/p_sPublicKey

Parameters
p_sPublicKeyYour public key

POST PARAMETERS

Parameters
p_sAgendaIDagenda ID (format bktXXXXXXX)
p_sServiceIDservice ID (format bktXXXXXXX)
p_sAgendaSynchroIDagenda ID in your software (use in case of software integration)
p_sServiceSynchroIDservice ID in your software (use in case of software integration)
Returns
on success, if xml was chosen:

  • <agenda_service>
    • <status>true</status>
  • </agenda_service>
  • on success, if json was chosen:
    • {«agenda_service»:
      • {
        • «status»:true,
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <agenda_service>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </agenda_service>
  • on failure, if json was chosen:
    • {«agenda_service»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

deleteclient( $p_sPublicKey)

This function deletes a client of your company.

URL to call this function: https://app.bookitit.com/api/11/deleteclient/p_sPublicKey

Parameters
p_sPublicKeyYour public key

POST PARAMETERS

Parameters
p_sClientIdid of the client to be deleted (format bktXXXXXXX)
Returns
on success, if xml was chosen:

  • <client>
    • <status>true</status>
  • </client>
  • on success, if json was chosen:
    • {«client»:
      • {
        • «status»:true,
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <client>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </event>
  • on failure, if json was chosen:
    • {«client»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

deletecompany( $p_sPublicKey)

This function is used to delete a company in Bookitit. Only administrator users, who have an administrator api key, can delete companies with this function. Moreover, an administrator can only delete the companies created by himself.

URL to call this function: https://app.bookitit.com/api/11/deletecompany/p_sPublicKey

Parameters
p_sPublicKeyPublic key of the administrator user

POST PARAMETERS

Parameters
(optional)p_sPublicKeyToDelete Public key of the company to delete
(optional)p_sCompanyId the id of the company in bkt format (BKTXXXXXXX) At least you need one of these parameters.
Returns
  • on success, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <company>
        • <status>true</status>
      • </company>
  • on success, if json was chosen:
    • {«company»:
      • {
        • «status»:true
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <company>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </company>
  • on failure, if json was chosen:
    • {«company»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

deletecompanyschedule( $p_sPublicKey)

This function updates the schedule of your company for a single weekday. That is, at which time your company is open or closed. Should be called once per day you want to update.

URL to call this function: https://app.bookitit.com/api/deletecompanyschedule/$p_sPublicKey/

Parameters
$p_sPublicKeyYour public key
Returns
  • on success, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <schedule>
        • <status>true</status>
      • </schedule>
  • on success, if json was chosen:
    • {«schedule»:
      • {
        • «status»:true
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <schedule>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </schedule>
  • on failure, if json was chosen:
    • {«schedule»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

deleteevent( $p_sPublicKey)

This function deletes an event of your company.

URL to call this function: https://app.bookitit.com/api/11/deleteevent/p_sPublicKey

Parameters
p_sPublicKeyYour public key

POST PARAMETERS

Parameters
p_sEventIDid of the event to delete (format bktXXXXXXX)
p_sEventSynchroIDid of the event in your software (use in case of software integration)
p_bSendNotification(optional) Indicates if an email will be sent to notify the client
p_sDeletedBy(optional) «client» if the client deletes the event or «company» if the company deletes the event
Returns
on success, if xml was chosen:

  • <event>
    • <status>true</status>
  • </event>
  • on success, if json was chosen:
    • {«event»:
      • {
        • «status»:true,
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <event>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </event>
  • on failure, if json was chosen:
    • {«event»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

deleteservice( $p_sPublicKey)

This function deletes a service of your company. A service ID must be provided. It can be the ID of the service in Bookitit or, if you are synchronizing or integrating services between your software and Bookitit, the ID of the service in your software (we call it Synchro ID). If both are provided, the Synchro ID has preference.

URL to call this function: https://app.bookitit.com/api/11/deleteservice/p_sPublicKey

Parameters
typep_sPublicKey Your public key

POST PARAMETERS

Parameters
typep_sServiceID ID of the service (format bktXXXXXXX)
typep_sSynchroID ID of the service in your software
Returns
on success, if xml was chosen:

  • <service>
    • <status>true</status>
  • </service>
  • on success, if json was chosen:
    • {«service»:
      • {
        • «status»:true,
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <service>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </service>
  • on failure, if json was chosen:
    • {«service»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

getagendaconfiguration( $p_sPublicKey,
 $p_sAgendaID 
)

This function gets the configuration of one agenda of your company.

URL to call this function: https://app.bookitit.com/api/11/getagendaconfiguration/p_sPublicKey/p_sServiceID

Parameters
p_sPublicKeyYour public key
p_sAgendaIDId of the agenda (format «bktXXXXXXX»)
Returns
-on success, if xml was chosen:

  • <?xml version=’1.0′ encoding=’utf-8′?>
    • <configuration>
      • <status>true</status> *
      • <id>id of the agenda (format «bktXXXXXXX»)</id>
      • <name>name of the agenda</name>
      • <phone>mobile phone of the agenda</phone>
      • <email>email of the agenda</email>
      • <public>indicates if the agenda is public (1) or private (0)</public>
      • <synchro_id>id of the agenda if it is shared with other software, NULL otherwise</synchro_id>
      • <photo>url of the photo</photo>
      • description of the agenda
    • </configuration>
  • on success, if json was chosen:
    • {«agendas»:
      • {
        • «status»:false,
        • one or more «agenda»:
          • {
            • id:id of the agenda (format «bktXXXXXXX»),
            • name: name of the agenda,
            • phone: mobile phone of the agenda
            • email: email of the agenda
            • public:indicates if the agenda is public (1) or private (0)
            • synchro_id:id of the agenda if it is shared with other software, NULL otherwise
            • photo:url of the photo,
            • description:description of the agenda
          • }
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <agendas>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </agendas>
  • on failure, if json was chosen:
    • {«agendas»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

getagendas( $p_sPublicKey,
 $p_sServiceID = null 
)

This function gets the agendas of your company. Optionally, if a service ID is given, it will filter the agendas that offer that service.

URL to call this function: https://app.bookitit.com/api/11/getagendas/p_sPublicKey/p_sServiceID

Parameters
p_sPublicKeyYour public key
p_sServiceIDoptional, a service id (format «bktXXXXXXX»)
Returns
-on success, if xml was chosen:

  • <?xml version=’1.0′ encoding=’utf-8′?>
    • <agendas>
      • <status>true</status>
      • one or more <agenda>
        • <id>id of the agenda (format «bktXXXXXXX»)</id>
        • <name>name of the agenda</name>
        • <phone>mobile phone of the agenda</phone>
        • <email>email of the agenda</email>
        • <public>indicates if the agenda is public (1) or private (0)</public>
        • <synchro_id>id of the agenda if it is shared with other software, NULL otherwise</synchro_id>
        • <photo>url of the photo</photo>
        • description of the agenda
      • </agenda>
    • </agendas>
  • on success, if json was chosen:
    • {«agendas»:
      • {
        • «status»:false,
        • one or more «agenda»:
          • {
            • id:id of the agenda (format «bktXXXXXXX»),
            • name: name of the agenda,
            • phone: mobile phone of the agenda
            • email: email of the agenda
            • public:indicates if the agenda is public (1) or private (0)
            • synchro_id:id of the agenda if it is shared with other software, NULL otherwise
            • photo:url of the photo,
            • description:description of the agenda
          • }
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <agendas>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </agendas>
  • on failure, if json was chosen:
    • {«agendas»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

getagendasbycategory( $p_sPublicKey,
 $p_sCategoryId 
)

This function gets the agendas inside of a category of your company.

URL to call this function: https://app.bookitit.com/api/11/getagendasbycategory/p_sPublicKey/$p_sCategoryId

Parameters
p_sPublicKeyYour public key
$p_sCategoryIdThe category id (format «bktXXXXXXX»)
Returns
-on success, if xml was chosen:

  • <?xml version=’1.0′ encoding=’utf-8′?>
    • <agendas>
      • <status>true</status>
      • one or more <agenda>
        • <id>id of the agenda (format «bktXXXXXXX»)</id>
        • <name>name of the agenda</name>
        • <phone>mobile phone of the agenda</phone>
        • <email>email of the agenda</email>
        • <public>indicates if the agenda is public (1) or private (0)</public>
        • <synchro_id>id of the agenda if it is shared with other software, NULL otherwise</synchro_id>
        • <photo>url of the photo</photo>
        • description of the agenda
        • <updated>The datetime of last update</updated>
        • <categories_id>The datetime of last update</categories_id>
      • </agenda>
    • </agendas>
  • on success, if json was chosen:
    • {«agendas»:
      • {
        • «status»:false,
        • one or more «agenda»:
          • {
            • id:id of the agenda (format «bktXXXXXXX»),
            • name: name of the agenda,
            • phone: mobile phone of the agenda
            • email: email of the agenda
            • public:indicates if the agenda is public (1) or private (0)
            • synchro_id:id of the agenda if it is shared with other software, NULL otherwise
            • photo:url of the photo,
            • description:description of the agenda
            • updated: The datetime of last update
            • categories_id: The id of the category (format «bktXXXXXX»)
          • }
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <agendas>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </agendas>
  • on failure, if json was chosen:
    • {«agendas»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

getagendasservices( $p_sPublicKey)

This function gets the agenda-service relationships for your company.

URL to call this function: https://app.bookitit.com/api/11/getagendasservices/p_sPublicKey

Parameters
p_sPublicKeyYour public key
Returns
-on success, if xml was chosen:

  • <?xml version=’1.0′ encoding=’utf-8′?>
    • <agenda_services>
      • <status>true</status>
      • one or more <agenda_service>
        • <agendas_id>id of the agenda (format «bktXXXXXXX»)</agendas_id>
        • <services_id>id of the service (format «bktXXXXXXX»)</services_id>
        • <agendas_synchro_id>id of the agenda in your software (in case of software integration)</agendas_synchro_id>
        • <services_synchro_id>id of the service in your software (in case of software integration)</services_synchro_id>
        • <duration>duration of the service (specific for this agenda)</duration>
        • <price>price of the service (specific for this agenda)</price>
      • </agenda_service>
    • </agenda_services>
  • on success, if json was chosen:
    • {«agenda_services»:
      • {
        • «status»:true,
        • one or more «agenda_service»:
          • {
            • agendas_id: id of the agenda (format «bktXXXXXXX»),
            • services_id: id of the service (format «bktXXXXXXX»),
            • agendas_synchro_id: id of the agenda in your software (in case of software integration),
            • services_synchro_id: id of the service in your software (in case of software integration),
            • duration: duration of the service (specific for this agenda),
            • price: price of the service (specific for this agenda),
          • }
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <agenda_services>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </agenda_services>
  • on failure, if json was chosen:
    • {«agenda_services»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

getcategories( $p_sPublicKey)

This function gets the categories of your company. One agenda belongs to zero or one categories.

URL to call this function: https://app.bookitit.com/api/11/getcategories/p_sPublicKey

Parameters
p_sPublicKeyYour public key
Returns
-on success, if xml was chosen:

  • <?xml version=’1.0′ encoding=’utf-8′?>
    • <categories>
      • <status>true</status>
      • one or more -<categorie>
        • <id>id of the category (format «bktXXXXXXX»)</id>
        • <name>name of the category</name> -</categorie>
    • </categories>
  • on success, if json was chosen:
    • {«categories»:
      • {
        • «status»:false,
        • one or more «categorie»:
          • {
            • id:id of the category (format «bktXXXXXXX»),
            • name: name of the category
          • }
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <categories>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </categories>
  • on failure, if json was chosen:
    • {«categories»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

getcities( $p_sPublicKey,
 $p_sLanguageID,
 $p_sRegionID 
)

This function gets the cities of a given region, in a given language, from the Bookitit city database

URL to call this function: https://app.bookitit.com/api/11/getcities/p_sPublicKey/p_sLanguageID/p_sRegionID

Parameters
p_sPublicKeyYour public key
p_sLanguageIDID of the chosen language (format bktXXXXXX)
p_sRegionIDID of the chosen region (format bktXXXXXX)
Returns
-on success, if xml was chosen:

  • <?xml version=’1.0′ encoding=’utf-8′?>
    • <cities>
      • <status>true</status>
      • one or more <citie>
        • <id>id of the city (format «bktXXXXXXX»)</id>
        • <name>name of the city in the chosen language</name>
        • <longitude>longitude of the city’s center</longitude>
        • <latitude>latitude of the city’s center</latitude>
      • </citie>
    • </cities>
  • on success, if json was chosen:
    • {«cities»:
      • {
        • «status»:false,
        • one or more «citie»:
          • {
            • id:id of the city (format «bktXXXXXXX»),
            • name: name of the city in the chosen language,
            • longitude: longitude of the city’s center,
            • latitude: latitude of the city’s center,
          • }
      • }
    • }

  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <cities>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </cities>

  • on failure, if json was chosen:
    • {«cities»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

getclient( $p_sPublicKey,
 $p_sIdClientId 
)

This function gets one client from its client id. The format is bktXXXXX

Parameters
$p_sIdClientthe id of the client in bktXXXXXXXXX format
$p_sModexml or json
$p_bSecuretrue for https, false for http
Returns
  • on success, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <client>
        • <email>The email of the client</email>
        • <address>The address of the client</address>
        • <cellphone>The cellphone of the client</cellphone>
        • <phone>The phone of the client</phone>
        • <document>The document of the client</document>
        • <name>The name of the client</name>
        • <custom1>The first custom field</custom1>
        • <custom2>The second custom field</custom2>
        • <customN>The N custom field</customN>
        • <status>if success «true» otherwise «false»</status>
      • </client>
  • on success, if json was chosen: {«client»: {«email»:»The email of the client», «address»:»The address of the client», «cellphone»:»The cellphone of the client», «phone»:»The phone of the client», «document»:»The document of the client», «name»:»Raulope», «custom1″:»The first custom field», «custom2″:»The second custom field», «customN»:»The N custom field», «status»:»true»}}
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <client>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </client>
  • on failure, if json was chosen:
    • {«client»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

getclientbyvalidationfield( $p_sPublicKey)

This function gets some client data by a validation field. URL to call this function: https://app.bookitit.com/api/getclientbyvalidationfield/$p_sPublicKey

Parameters
$p_sPublicKeyYour public key

POST PARAMETERS

Parameters
$p_sFieldTypethe field type text («email», «cellphone», «document», «customvalidate1», … ). If not value is set (empty sring «») the search will be do for all validation fields configured
$p_sFieldvaluethe field value to search
Returns
-on success, if xml was chosen:

  • <?xml version=’1.0′ encoding=’utf-8′?>
    • <clients>
      • <status>true</status>
      • one or more
      • <client>
        • <id>id of the client (format «bktXXXXXXX»)</id>
        • <client_webaccess>if client has webaccess or not. (true => webaccess)</client_webaccess>
        • <client_email>email of the client, if exists. empty otherwise</client_email>
        • <client_address>address of the client, if exists. empty otherwise</client_address>
        • <client_cellphone>cellphone of the client, if exists. empty otherwise</client_cellphone>
        • <client_phone>phone of the client, if exists. empty otherwise</client_phone>
        • <client_document>document of the client, if exists. empty otherwise</client_document>
        • <client_name>name of the client, if exists. empty otherwise</client_name>
        • <customvalidate1>client custom validate field 1, if exists. empty otherwise</customvalidate1>
        • <customvalidateX>client custom validate field X, if exists. empty otherwise</customvalidateX>
        • <custom1>client custom field 1, if exists. empty otherwise</custom1>
        • <custom2>client custom field 2, if exists. empty otherwise</custom2>
        • <customX>client custom field X, if exists. empty otherwise</customX>
      • </client>
    • </clients>
  • on success, if json was chosen:
    • {«clients»:
      • {
        • «status»:false,
        • one or more
          • «client»:
          • {
            • id: id of the client (format «bktXXXXXXX»)
            • client_webaccess: if client has webaccess or not. (true => webaccess)
            • client_email: email of the client, if exists. empty otherwise
            • client_address: address of the client, if exists. empty otherwise
            • client_cellphone: cellphone of the client, if exists. empty otherwise
            • client_phone: phone of the client, if exists. empty otherwise
            • client_document: document of the client, if exists. empty otherwise
            • client_name: name of the client, if exists. empty otherwise
            • customvalidate1: client custom validate field 1, if exists. empty otherwise
            • customvalidateX: client custom validate field X, if exists. empty otherwise
            • custom1: client custom field 1, if exists. empty otherwise
            • custom2: client custom field 2, if exists. empty otherwise
            • customX: client custom field X, if exists. empty otherwise
          • }
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <clients>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </clients>
  • on failure, if json was chosen:
    • {«clients»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

getclientevents( $p_sPublicKey,
 $p_iClientId,
 $p_sDateFrom = "",
 $p_sDateTo = "" 
)

This function gets a list of events of a client between two dates or all events. URL to call this function: https://app.bookitit.com/api/getclientevents/$p_sPublicKey/$p_iClientId/$p_sDateFrom/$p_sDateTo

Parameters
$p_sPublicKeyYour public key
$p_iClientIdthe id of the client with format bktXXXXX
$p_sDateFromthe start day to get the events
$p_sDateTothe end day to get the events.
Returns
-on success, if xml was chosen:

  • <?xml version=’1.0′ encoding=’utf-8′?>
    • <events>
      • <status>true</status>
      • one or more
      • <event>
        • <id>id of the event (format «bktXXXXXXX»)</id>
        • <startdate>start date of the event (format YYYY-MM-DD)</startdate>
        • <enddate>end date of the event</enddate>
        • <starttime>start date of the event (format HH:MM)</starttime>
        • <endtime>end date of the event (format HH:MM)</endtime>
        • <agenda_id>id of the agenda (format «bktXXXXX»)</agenda_id>
        • <created>create date of the event</created>
        • <updated>last update of the event</updated>
        • <agenda_name>name of agenda</agenda_name>
        • <client_id>id of the client for the event (format «bktXXXXX»)</client_id>
        • <client_name>name of the client, if exists. empty otherwise</client_name>
        • <client_cellphone>phone of the client, if exists. empty otherwise</client_cellphone>
        • <client_email>email of the client, if exists. empty otherwise</client_email>
        • <created_from>where event was create</created_from>
        • <created_by>who created the event</created_by>
        • <confirmed>event confirmation</confirmed>
        • <showup>the client attended the appointment</showup>
        • <locator>event locator</locator>
        • description of the event, if exists. empty otherwise
        • <comments>comments of the event, if exists. empty otherwise</comments>
        • <people>number of people, if exists. empty otherwise</people>
        • <price_total>total price, if exists. empty otherwise</price_total>
        • <price_paid>paid price, if exists. empty otherwise</price_paid>
        • <coupons_code>coupons codes, if exists. empty otherwise</coupons_code>
        • <service_id>id of the service (format «bktXXXXX»), if exists. empty otherwise</service_id>
        • <title>title of the event, if exists. empty otherwise</title>
        • <agenda_synchro_id>id of the agenda if it is shared with other software, if exists. empty otherwise</agenda_synchro_id>
        • <synchro_id>id of the event if it is shared with other software, if exists. empty otherwise</synchro_id>
        • <customvalidate1>client custom validate field 1, if exists. empty otherwise</customvalidate1>
        • <customvalidateX>client custom validate field X, if exists. empty otherwise</customvalidateX>
        • <custom1>client custom field 1, if exists. empty otherwise</custom1>
        • <custom2>client custom field 2, if exists. empty otherwise</custom2>
        • <customX>client custom field X, if exists. empty otherwise</customX>
        • <customevent1>client custom field 1, if exists. empty otherwise</customevent1>
        • <customevent2>client custom field 2, if exists. empty otherwise</customevent2>
        • <customeventX>client custom field X, if exists. empty otherwise</customeventX>
      • </event>
    • </events>
  • on success, if json was chosen:
    • {«events»:
      • {
        • «status»:false,
        • one or more «events»:
          • {
            • id: id of the event (format «bktXXXXXXX»)
            • startdate: start date of the event (format YYYY-MM-DD)
            • enddate: end date of the event
            • starttime: start date of the event (format HH:MM)
            • endtime: end date of the event (format HH:MM)
            • agenda_id: id of the agenda (format «bktXXXXX»)
            • created: create date of the event
            • updated: last update of the event
            • agenda_name: name of agenda
            • client_id: id of the client for the event (format «bktXXXXX»)
            • client_name: name of the client, if exists. empty otherwise
            • client_cellphone: phone of the client, if exists. empty otherwise
            • client_email: email of the client, if exists. empty otherwise
            • created_from: where event was create
            • created_by: who created the event
            • confirmed: event confirmation
            • showup: the client attended the appointment
            • locator: event locator
            • description: description of the event, if exists. empty otherwise
            • comments: comments of the event, if exists. empty otherwise
            • people: number of people, if exists. empty otherwise
            • price_total: total price, if exists. empty otherwise
            • price_paid: paid price, if exists. empty otherwise
            • coupons_code: coupons codes, if exists. empty otherwise
            • service_id: id of the service (format «bktXXXXX»), if exists. empty otherwise
            • title: title of the event, if exists. empty otherwise
            • agenda_synchro_id: id of the agenda if it is shared with other software, if exists. empty otherwise
            • synchro_id: id of the event if it is shared with other software, if exists. empty otherwise
            • customvalidate1: client custom validate field 1, if exists. empty otherwise
            • customvalidateX: client custom validate field X, if exists. empty otherwise
            • custom1: client custom field 1, if exists. empty otherwise
            • custom2: client custom field 2, if exists. empty otherwise
            • customX: client custom field X, if exists. empty otherwise
            • customevent1: client custom field 1, if exists. empty otherwise
            • customevent2: client custom field 2, if exists. empty otherwise
            • customeventX: client custom field X, if exists. empty otherwise
          • }
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <events>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </events>
  • on failure, if json was chosen:
    • {«events»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

getclients( $p_sPublicKey,
 $p_sDateFrom,
 $p_sDateTo,
 $p_sType = null 
)

This function gets the data for all clients of your company. (limit to max 30 days)

Parameters
$p_sModexml or json
$p_bSecuretrue for https, false for http
p_sStartDatethe start day to get the clients (when the client was registered)
p_sEndDatethe end day to get the clients (when the client was registered)
Returns
  • on success, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <clients>
        • <status>true</status>
        • one or more <client>
          • <id>id of the client (format bktXXXXXXXXX)</id>
          • <user_id>id of the user (format bktXXXXXXXXX). If this parameter is void the client will be without web access, otherwise it will be a client with web access</user_id>
          • <name>name of the user</name>
          • <email>email of the user</email>
          • <phone>phone of the user</phone>
          • <document>document of the user</document>
          • <cellphone>cellphone of the user</cellphone>
          • <customvalidate1>user custom validate field 1</customvalidate1>
          • <customvalidateX>user custom validate field X</customvalidateX>
          • <custom1>user custom field 1</custom1>
          • <custom2>user custom field 2</custom2>
          • <customX>user custom field X</customX>
        • </client>
      • </clients>
  • on success, if json was chosen:
    • {«clients»:
      • one or more {«client»:
        • {
          • «status»:true,
          • «id»:id of the user (format bktXXXXXXXXX),
          • «user_id»:id of the user (format bktXXXXXXXXX). If this parameter is void the client will be without web access, otherwise it will be a client with web access,
          • «name»:name of the user,
          • «email»:email of the user,
          • «phone»:phone of the user,
          • «document»:document of the user,
          • «cellphone»:cellphone of the user,
          • «customvalidate1»:user custom validate field 1,
          • «customvalidateX»:user custom validate field X,
          • «custom1»:user custom field 1,
          • «custom2»:user custom field 2,
          • «customX»:user custom field X
        • }
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <clients>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </clients>
  • on failure, if json was chosen:
    • {«clients»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

getclientsbyeventid( $p_sPublicKey,
 $p_sEventID 
)

This function gets a client of one event. If you have an event and you want to know who went to the appointment, you must use this function.

Parameters
p_sPublicKeyYour public key
$p_sEventIDthe identifier of one event (format bktXXXXX)
Returns
-on success, if xml was chosen:

  • <?xml version=’1.0′ encoding=’utf-8′?>
    • <clients>
      • <status>true</status>
      • one or more «client»:
      • <client>
        • <name>the name of the client</name>
        • <email>the email of the client</email>
        • <address>the address of the client</address>
        • <document>the document of the client</document>
        • <cellphone>the cellphone of the client</cellphone>
        • <phone>the phone of the client</phone>
        • <custom1>the first custom field of the client</custom1>
        • <customn>the N custom field of the client</customn>
        • <id>The id of the client</id>
        • <event_id>The id of the event</event_id>
        • <agendas_id>The id of the agenda where the event was created</agendas_id>
        • <start_date>The start date of the event</start_date>
        • <end_date>The end date of the event</end_date>
        • <start_time>660</start_time>
        • <end_time>720</end_time>
        • <title>The title of the event</title>
        • The description of the event
        • <coupons_code>The code of the coupon for the event</coupons_code>
        • <coupon_id>The id of the coupon related to the event</coupon_id>
        • <comments>The comments of the event</comments>
        • <synchro_id>the id of the event of your database</synchro_id>
        • <people>The people that went to the event</people>
        • <showup>The client went to the appointment, yes or not</showup>
        • <locator>The locator of the event</locator>
        • <price_total>The total price of the event</price_total>
        • <price_paid>The event price</price_paid>
        • <agenda_name>The name of the agenda selected for the event</agenda_name>
        • <customevent1>The first custom field of the event</customevent1>
        • <customeventN>The N custom field of the event</customeventN>
      • </client>
    • </clients>
  • on success, if json was chosen: -{«clients»: -{«0»: -{ «name»:»the name of the client», «email»:»the email of the client», «address»:»the address of the client», «document»:»the document of the client», «cellphone»:»the cellphone of the client», «phone»:»the phone of the client», «custom1″:»the first custom field of the client», «customN»: «the N custom field of the client», «id»:»The id of the client», «event_id»:»The id of the event», «agendas_id»:»The id of the agenda where the event was created», «services_id»:»The id of the selected service for the event», «start_date»:»The start date of the event», «end_date»:»The end date of the event», «start_time»:»The start time of the event», «end_time»:»The end time of the event», «title»:»The title of the event», «description»:»The description of the event», «coupons_code»: «The code of the coupon for the event», «coupon_id»:»The id of the coupon», «comments»:»The comments inside the event», «synchro_id»:»the id of the event of your database», «people»:»the number of people that went to the event», «showup»:»The client went to the appointment, yes or not», «locator»:»The locator of the event», «price_total»:»The total price of the event», «price_paid»:»The event price», «agenda_name»:»The name of the agenda selected for the event», «customevent1″:»The first custom field of the event», «customeventN»:»The N custom field of the event», }, -«status»:»true»}}
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <clients>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </clients>
  • on failure, if json was chosen:
    • {«clients»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

getcompanies( $p_sPublicKey)

This function is used to get the companies of an account multicenter.

URL to call this function: https://app.bookitit.com/api/11/getcompanies/p_sPublicKey

Warning
You need an Administrator API KEY with a multicenter account to use this function.
Parameters
$p_sPublicKeyPublic key of the multicenter/administrator account
Returns
  • on success, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <companies> –one or more <companie>
        • <status>true</status>
        • <id>id of the created company (format bkt XXXXXXXXX)</id>
        • <name>The name of the company</name>
        • <email>The email of the company</email>
        • <expiration_date>The expiration date of the account</expiration_date> -</companie>
      • </companies>
  • on success, if json was chosen:
    • {«company»: -{ «companie»:
      • {
        • «status»:true,
        • «id»:id of the created company (format bkt XXXXXXXXX),
        • «name»:The name of the company,
        • «email»:The email of the company,
        • «expiration_date»: The expiration date of the account
      • } -}
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <company>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </company>
  • on failure, if json was chosen:
    • {«company»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

getcompanydata( $p_sPublicKey)

This function is used to get data of your company in Bookitit.

URL to call this function: https://app.bookitit.com/api/11/getcompanydata/p_sPublicKey

Parameters
p_sPublicKeyPublic key of the company user
Returns
  • on success, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <company>
        • <status>true</status>
        • <id>id of the company (format bktXXXXXXXX)</id>
        • <name>name of the company</name>
        • <address>address of the company</address>
        • <postalcode>postal code of the company</postalcode>:
        • <phone>phone number of the company</phone>
        • <schedule>schedule of the company</schedule>
      • </company>
  • on success, if json was chosen:
    • {«company»:
      • {
        • «status»:true,
        • «id»:id of the service (format bktXXXXXXXX),
        • «name»:name of the service
        • «address»:address of the company
        • «postalcode»: postal code of the company
        • «phone»:phone number of the company
        • «schedule»:schedule of the company
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <company>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </company>
  • on failure, if json was chosen:
    • {«company»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

getcountries( $p_sPublicKey,
 $p_sLanguageID 
)

This function gets the countries of the Bookitit city database, in a given language

URL to call this function: https://app.bookitit.com/api/11/getcountries/p_sPublicKey/p_sLanguageID

Parameters
p_sPublicKeyYour public key
p_sLanguageIDID of the language (format bktXXXXXX)
Returns
-on success, if xml was chosen:

  • <?xml version=’1.0′ encoding=’utf-8′?>
    • <countries>
      • <status>true</status>
      • one or more <countrie>
        • <id>id of the country (format «bktXXXXXXX»)</id>
        • <name>name of the country in the choosed language</name>
        • <longitude>longitude of the country’s center</longitude>
        • <latitude>latitude of the country’s center</latitude>
        • <phone_code>phone code of the country</phone_code>
      • </countrie>
    • </countries>
  • on success, if json was chosen:
    • {«countries»:
      • {
        • «status»:false,
        • one or more «countrie»:
          • {
            • id:id of the country (format «bktXXXXXXX»),
            • name: name of the country,
            • longitude: longitude of the country’s center,
            • latitude: latitude of the country’s center,
            • phone_code: phone code of the country,
          • }
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <countries>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </countries>
  • on failure, if json was chosen:
    • {«countries»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

geteventbyid( $p_sPublicKey,
 $p_sEventID = null,
 $p_sLocator = null 
)

This function gets an event by id, locator or both.

Parameters
p_sPublicKeyYour public key
$p_sEventIDthe identifier of one event (format bktXXXXX)
$p_sLocatorthe locator of one event
Returns
-on success, if xml was chosen:

  • <?xml version=’1.0′ encoding=’utf-8′?>
    • <event>
      • <status>true</status>
      • <id>id of the event (format «bktXXXXXXX»)</id>
      • <title>title of the event service, if exists. empty otherwise</title>
      • description of the event, if exists. empty otherwise
      • <comments>comments of the event, if exists. empty otherwise</comments>
      • <synchro_id>id of the event if it is shared with other software, if exists. empty otherwise</synchro_id>
      • <startdate>start date of the event (format YYYY-MM-DD)</startdate>
      • <enddate>end date of the event</enddate>
      • <starttime>start date of the event (format HH:MM)</starttime>
      • <endtime>end date of the event</endtime>
      • <updated>the date when the event was updated, if exists. empty otherwise</updated>
      • <coupon>the event has associated a coupon, if exists. empty otherwise</coupon>
      • <agenda_id>the agenda where the event was created (format «bktXXXXXXX»)</agenda_id>
      • <service_id>the service linked to the event, if exists. empty otherwise (format «bktXXXXXXX»)</service_id>
      • <people> the number of people that will go to the event, if exists. empty otherwise</people>
      • <locator>the locator of the event/appointment, if exists. empty otherwise. Each event has one locator</locator>
      • <customevent1>event custom field 1, if exists. empty otherwise</customevent1>
      • <customevent2>event custom field 2, if exists. empty otherwise</customevent2>
      • <customeventX>event custom field X, if exists. empty otherwise</customeventX>
    • </event>
  • on success, if json was chosen:
    • {«event»:
      • {
        • «status»:false,

id: id of the event (format «bktXXXXXXX»)

  • title: title of the event service, if exists. empty otherwise
  • description: description of the event, if exists. empty otherwise
  • comments: comments of the event, if exists. empty otherwise
  • synchro_id: id of the event if it is shared with other software, if exists. empty otherwise
  • startdate: start date of the event (format YYYY-MM-DD)
  • enddate: end date of the event
  • starttime: start date of the event (format HH:MM)
  • endtime: end date of the event
  • updated: the date when the event was updated, if exists. empty otherwise
  • coupon: the event has associated a coupon, if exists. empty otherwise
  • agenda_id: the agenda where the event was created (format «bktXXXXXXX»)
  • service_id: the service linked to the event, if exists. empty otherwise (format «bktXXXXXXX»)
  • people: the number of people that will go to the event, if exists. empty otherwise
  • locator: the locator of the event/appointment, if exists. empty otherwise. Each event has one locator
  • customevent1: event custom field 1, if exists. empty otherwise
  • customevent2: event custom field 2, if exists. empty otherwise
  • customeventX: event custom field X, if exists. empty otherwise

}

  • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <event>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </event>
  • on failure, if json was chosen:
    • {«event»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

getevents( $p_sPublicKey,
 $p_sDateFrom,
 $p_sDateTo,
 $p_sAgendaID = null 
)

This function gets a list of events between two dates. (limit to max 30 days) If no agenda ID is given, it will get the events of all the agendas. If an agenda ID is supplied, it will only get the events for that agenda. For the second option it will be ordered by the id of the agenda. If you want to get the events of a client you must use method «getclientevents» instead.

Parameters
p_sPublicKeyYour public key
p_sStartDatethe start day to get the events
p_sEndDatethe end day to get the events
p_sAgendaID(optional) ID of the agenda. If no ID is given, you will get all the events of your company.
Returns
-on success, if xml was chosen:

  • <?xml version=’1.0′ encoding=’utf-8′?>
    • <events>
      • <status>true</status>
      • one or more <events>
        • <id>id of the event (format «bktXXXXXXX»)</id>
        • <title>title of the event, if exists. empty otherwise</title>
        • description of the event, if exists. empty otherwise
        • <comments>comments for the event, if exists. empty otherwise</comments>
        • <synchro_id>id of the event if it is shared with other software, empty otherwise</synchro_id>
        • <start_date>the start date of the event</startdate>
        • <end_date>the end time of the event</enddate>
        • <start_time>the starttime of the event (format HH:MM)</starttime>
        • <end_time>the endtime of the event (format HH:MM)</endtime>
        • <coupon>the coupon code of the offer, if exists. empty otherwise</coupon_code>
        • <agenda_id>id of the agenda (format «bktXXXXX»)</agenda_id>
        • <user_id>id of the client (format «bktXXXXX»), if exists. empty otherwise</user_id>
        • <user_name>name of the client, if exists. empty otherwise</user_name>
        • <user_cellphone>cellphone of the client, if exists. empty otherwise</user_cellphone>
        • <user_email>email of the client, if exists. empty otherwise</user_email>
        • <service_id>id service of the event (format «bktXXXXX»), if exists. empty otherwise</services_id>
        • <locator>locator of the event, if exists. empty otherwise</locator>
        • <updated>last update of the event</updated>
        • <customvalidate1>user custom validate field 1, if exists. empty otherwise</customvalidate1>
        • <customvalidateX>user custom validate field X, if exists. empty otherwise</customvalidateX>
        • <custom1>user custom field 1, if exists. empty otherwise</custom1>
        • <custom2>user custom field 2, if exists. empty otherwise</custom2>
        • <customX>user custom field X, if exists. empty otherwise</customX>
        • <customevent1>event custom field 1, if exists. empty otherwise</customevent1>
        • <customevent2>event custom field 2, if exists. empty otherwise</customevent2>
        • <customeventX>event custom field X, if exists. empty otherwise</customeventX>
      • </event>
    • </events>
  • on success, if json was chosen:
    • {«events»:
      • {
        • «status»:false,
        • one or more «events»:
          • {
            • id: id of the event (format «bktXXXXXXX»)
            • title: title of the event, if exists. empty otherwise
            • description: description of the event, if exists. empty otherwise
            • comments: comments for the event, if exists. empty otherwise
            • synchro_id: id of the event if it is shared with other software, empty otherwise
            • agenda_synchro_id: id of the agenda synchro if it is shared with other software, empty otherwise
            • start_date: the start date of the event
            • end_date: the end time of the event
            • start_time: the starttime of the event (format HH:MM)
            • end_time: the endtime of the event (format HH:MM)
            • coupon: the coupon code of the offer, if exists. empty otherwise
            • agenda_id: id of the agenda (format «bktXXXXX»)
            • user_id: id of the client (format «bktXXXXX»), if exists. empty otherwise
            • user_name: name of the client, if exists. empty otherwise
            • user_cellphone: cellphone of the client, if exists. empty otherwise
            • user_email: email of the client, if exists. empty otherwise
            • service_id: id service of the event (format «bktXXXXX»), if exists. empty otherwise
            • locator: locator of the event, if exists. empty otherwise
            • updated: last update of the event
            • «customvalidate1»: user custom validate field 1, if exists. empty otherwise
            • «customvalidateX»: user custom validate field X, if exists. empty otherwise
            • «custom1»: user custom field 1, if exists. empty otherwise
            • «custom2»: user custom field 2, if exists. empty otherwise
            • «customX»: user custom field X, if exists. empty otherwise
            • «customevent1»: event custom field 1, if exists. empty otherwise
            • «customevent2»: event custom field 2, if exists. empty otherwise
            • «customeventX»: event custom field X, if exists. empty otherwise
          • }
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <events>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </events>
  • on failure, if json was chosen:
    • {«events»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

getextraservices( $p_sPublicKey)

This function gets the extra services of your company. An extra service is separated from the rest of services for some reason, i.e. temporary offers. They can’t be associated with an agenda, only with an event.

URL to call this function: https://app.bookitit.com/api/11/getextraservices/p_sPublicKey

Parameters
p_sPublicKeyYour public key
Returns
  • on success, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <extraservices>
        • <status>true</status>
        • one or more <extraservice>
          • <id>id of the extra service (format bktXXXXXXXX)</id>
          • <name>name of the extra service</name>
        • </extraservice>
      • </extraservices>
  • on success, if json was chosen:
    • {«extraservices»:
      • {
        • «status»:true,
        • one or more «extraservice»:
          • {
            • «id»:id of the extra service (format bktXXXXXXXX),
            • «name»:name of the extra service,
          • }
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <extraservices>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </extraservices>
  • on failure, if json was chosen:
    • {«extraservices»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

getfreeslots( $p_sPublicKey,
 $p_sServiceID,
 $p_sAgendaID,
 $p_sDate,
 $p_bAlsoFullSlots = "false" 
)

This function gets the free minutes for a service of an agenda

URL to call this function: https://app.bookitit.com/api/11/getfreeslots/p_sPublicKey/p_sServiceID/p_sAgendaID/p_sDate

Parameters
p_sPublicKeyYour public key
p_sServiceIDservice id (format bktXXXXXXX)
p_sAgendaIDagenda id (format bktXXXXXXX)
p_sDatethe date to show the slots of (format YYYY-MM-DD)
p_bAlsoFullSlots(optional, default to «false») If set to true, slots that are already picked and unavailable will also be returned
Returns
on success, if xml was chosen:

  • <slots>
    • <status>true</status>
    • <hours>
      • one or more
      • <hour> a time where a reservation could be made (format HH:MM)</hour> OR
      • <hour> a time where a reservation could NOT be made (format *HH:MM)</hour>
    • </hours>
  • </slots>
  • on success, if json was chosen:
    • {«slots»:
      • {
        • «status»:true,
        • «hours»:
          • {
            • one or more«hour»: a time where a reservation could be made (format HH:MM), OR
            • one or more«hour»: a time where a reservation could NOT be made (format *HH:MM)
          • }
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <slots>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </slots>
  • on failure, if json was chosen:
    • {«slots»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

getgroups( $p_sPublicKey)

This function gets the groups of your company. One service belongs to zero or one group.

URL to call this function: https://app.bookitit.com/api/11/getgroups/p_sPublicKey

Parameters
p_sPublicKeyYour public key
Returns
-on success, if xml was chosen:

  • <?xml version=’1.0′ encoding=’utf-8′?>
    • <groups>
      • <status>true</status>
      • one or more -<group>
        • <id>id of the group (format «bktXXXXXXX»)</id>
        • <name>name of the group</name> -</group>
    • </groups>
  • on success, if json was chosen:
    • {«groups»:
      • {
        • «status»:false,
        • one or more «group»:
          • {
            • id:id of the group (format «bktXXXXXXX»),
            • name: name of the group
          • }
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <groups>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </groups>
  • on failure, if json was chosen:
    • {«groups»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

getholidays( $p_sPublicKey)

This function gets the holidays of your company

URL to call this function: https://app.bookitit.com/api/11/getholidays/p_sPublicKey

Parameters
p_sPublicKeyYour public key
Returns
  • on success, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <holidays>
        • <status>true</status>
        • zero or more <date>YYYY-MM-DD</date>
      • </holidays>
  • on success, if json was chosen:
    • {«holidays»:
      • {
        • «status»:true,
        • zero or more «date»: XXX
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <services>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </services>
  • on failure, if json was chosen:
    • {«services»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

getlanguages( $p_sPublicKey)

This function gets the languages of the Bookitit city database

URL to call this function: https://app.bookitit.com/api/11/getlanguages/p_sPublicKey

Parameters
p_sPublicKeyYour public key
Returns
-on success, if xml was chosen:

  • <?xml version=’1.0′ encoding=’utf-8′?>
    • <languages>
      • <status>true</status>
      • one or more <language>
        • <id>id of the language (format «bktXXXXXXX»)</id>
        • international code of the language
      • </language>
    • </languages>
  • on success, if json was chosen:
    • {«languages»:
      • {
        • «status»:false,
        • one or more «language»:
          • {
            • id:id of the language (format «bktXXXXXXX»),
            • code: international code of the language,
          • }
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <languages>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </languages>
  • on failure, if json was chosen:
    • {«languages»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

getorders( $p_sPublicKey)

This function gets the orders of a company

URL to call this function: https://app.bookitit.com/api/11/getorders/p_sPublicKey

Parameters
p_sPublicKeyYour public key
Returns
-on success, if xml was chosen:

  • <?xml version=’1.0′ encoding=’utf-8′?>
    • <orders>
      • <status>true</status>
      • one or more <order>
        • <id>id of the order (format «bktXXXXXXX»)</id>
        • <created>creation date of the order</created>
        • <updated>modification date of the order</updated>
        • <state>state of the event</state>
        • <events_id>id of the event associated to the order (format «bktXXXXXXX»)</events_id>
        • <clients_id>id of the client associated to the order (format «bktXXXXXXX»)</clients_id>
        • <transaction_id>id of the economic transaction in the payment platform</transaction_id>
      • </order>
    • </orders>
  • on success, if json was chosen:
    • {«orders»:
      • {
        • «status»:false,
        • one or more «order»:
          • {
            • id: id of the order (format «bktXXXXXXX»),
            • created: creation date of the order,
            • updated: modification date of the order,
            • state: state of the event,
            • events_id: id of the event associated to the order (format «bktXXXXXXX»),
            • clients_id: id of the client associated to the order (format «bktXXXXXXX»),
            • transaction_id: id of the economic transaction in the payment platform,
          • }
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <orders>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </languages>
  • on failure, if json was chosen:
    • {«languages»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

getregions( $p_sPublicKey,
 $p_sLanguageID,
 $p_sCountryID 
)

This function gets the regions of a given country, in a given language, from the Bookitit city database

URL to call this function: https://app.bookitit.com/api/11/getregions/p_sPublicKey/p_sLanguageID/p_sCountryID

Parameters
p_sPublicKeyYour public key
p_sLanguageIDID of the chosen language (format bktXXXXXX)
p_sCountryIDID of the chosen country (format bktXXXXXX)
Returns
-on success, if xml was chosen:

  • <?xml version=’1.0′ encoding=’utf-8′?>
    • <regions>
      • <status>true</status>
      • one or more <region>
        • <id>id of the region (format «bktXXXXXXX»)</id>
        • <name>name of the region in the chosen language</name>
        • <longitude>longitude of the region’s center</longitude>
        • <latitude>latitude of the region’s center</latitude>
        • <gmt>time from GMT</gmt>
      • </region>
    • </regions>
  • on success, if json was chosen:
    • {«regions»:
      • {
        • «status»:false,
        • one or more «region»:
          • {
            • id:id of the region (format «bktXXXXXXX»),
            • name: name of the region in the chosen language,
            • longitude: longitude of the region’s center,
            • latitude: latitude of the region’s center,
            • gmt: time from GMT,
          • }
      • }
    • }

  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <regions>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </regions>

  • on failure, if json was chosen:
    • {«regions»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

getschedule( $p_sPublicKey)

This function gets the schedule of your company

URL to call this function: https://app.bookitit.com/api/11/getschedule/p_sPublicKey

Parameters
p_sPublicKeyYour public key
Returns
  • on success, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <schedule>
        • <status>true</status>
        • one or more <opentime>XXX</opentime>
      • </schedule>
  • on success, if json was chosen:
    • {«schedule»:
      • {
        • «status»:true,
        • one or more «opentime»: XXX
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <services>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </services>
  • on failure, if json was chosen:
    • {«services»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

getservices( $p_sPublicKey,
 $p_sGroupId = null 
)

This function gets the services of your company

URL to call this function: https://app.bookitit.com/api/11/getservices/p_sPublicKey

Parameters
p_sPublicKeyYour public key
Returns
  • on success, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <services>
        • <status>true</status>
        • one or more <service>
          • <id>id of the service (format bktXXXXXXXX)</id>
          • <name>name of the service</name>
          • <duration>duration of the service in minutes</duration>
          • <prepay>flag to indicate if it is a prepay service:
            • 0: not prepay service
            • 1: prepay service
          • </prepay>
          • <price>price of the service</price>
          • <price_no_prepary> real price of the service. It will be shown to the user in the widget </price_no_prepay>
          • <public> It is a published service or not </public>
          • <updated>Datetime with its last update </updated>
          • <groups_id>The id of the group that belongs the service</service>
          • <groupname>The name of the group that belongs the service</groupname>
        • </service>
      • </services>
  • on success, if json was chosen:
    • {«services»:
      • {
        • «status»:true,
        • one or more «service»:
          • {
            • «id»:id of the service (format bktXXXXXXXX),
            • «name»:name of the service,
            • «duration»:duration of the service in minutes,
            • «prepay»: 0 (is not prepay service) or 1 (is prepay service),
            • «price»:price of the service that will be sent to the payment gateway
            • «price_no_prepay»:real price of the service. It will be shown to the user in the widget
            • «public» : It is a published service or not
            • «updated»: Datetime with its last update
            • «groups_id» : The id of the group that belongs the service
            • «groupname» : The name of the group that belongs the service
          • }
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <services>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </services>
  • on failure, if json was chosen:
    • {«services»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

getuser( $p_sPublicKey,
 $p_sUserID 
)

This function gets the data of a user of your company.

URL to call this function: https://app.bookitit.com/api/11/getuser/p_sPublicKey/$p_sUserID

Parameters
$p_sPublicKeyYour public key
$p_sUserIDIdentifier of the user to retrieve data of. The format is bktXXXXXXXXX.
Returns
  • on success, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <user>
        • <status>true</status>
        • <id>id of the user (format bktXXXXXXXXX)</id>
        • <name>name of the user</name>
        • <email>email of the user</email>
        • <phone>phone of the user</phone>
    • </user>
  • on success, if json was chosen:
    • {«user»:
      • {
        • «status»:true,
        • «id»:id of the user (format bktXXXXXXXXX),
        • «name»:name of the user,
        • «email»:email of the user,
        • «phone»:phone of the user
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <user>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </user>
  • on failure, if json was chosen:
    • {«user»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

getuserevents( $p_sPublicKey,
 $p_iIdUser,
 $p_sDateFrom,
 $p_sDateTo 
)

DEPRECATED please use getclientevents This function gets a list of events of a user between two dates. It will get the events of the user for the given company URL to call this function: https://app.bookitit.com/api/getuserevents/$p_sPublicKey/$p_iIdUser/$p_sStartDate/$p_sEndDate

Parameters
$p_sPublicKeyYour public key
$p_iIdUserthe id of the user with format bktXXXXX
$p_sStartDatethe start day to get the events
$p_sEndDatethe end day to get the events.
Returns
-on success, if xml was chosen:

  • <?xml version=’1.0′ encoding=’utf-8′?>
    • <events>
      • <status>true</status>
      • one or more <events>
        • <id>id of the event (format «bktXXXXXXX»)</id>
  • <title>title of the event</name>
  • description of the event
  • <comments>comments of the event</comments>
  • <synchro_id>id of the event if it is shared with other software, NULL otherwise</synchro_id>
  • <startdate>start date of the event (format YYYY-MM-DD)</startdate>
  • <enddate>end date of the event</enddate>
  • <starttime>start date of the event (format HH:MM)</starttime>
  • <endtime>end date of the event</endtime>
  • <coupon_code>the coupon code</coupon_code>
  • <agenda_id>id of the agenda (format «bktXXXXX»)</agenda_id>
  • <user_id>id of the user/client for the event(format «bktXXXXX»)</user_id>
  • <user_name>name of the user/client</user_name>
  • <user_cellphone>phone of the user/client</user_cellphone>
  • <user_email>email of the user/client</user_email>
  • <service_id>id of the service</client</services_id>
  • <user_prof_id>id of the company which event belongs</user_prof_id>

</event>

  • </events>
  • on success, if json was chosen:
    • {«events»:
      • {
        • «status»:false,
        • one or more «events»:
          • {
            • id:id of the event (format «bktXXXXXXX»),
            • title: title of the event,
            • description: description of the event, if exists. NULL otherwise
            • comments: comments for the event, if exists. NULL otherwise
            • synchro_id:id of the event if it is shared with other software, NULL otherwise
            • startdate:the start date of the event
            • enddate:the end time of the event
            • starttime:the starttime of the event
            • endtime:the endtime of the event
            • coupon_code:the coupon code of the offer, if exists. NULL otherwise.
            • agenda_id:if of the agenda(format «bktXXXXX»)
            • user_id:id of the user/client(format «bktXXXXX»)
            • user_name:name of the user/client
            • user_cellphone:cellphone of the user/client
            • user_email:email of the user/client
            • service_id: service of the event
            • user_prof_id:id of the company which event belongs{format «bktXXXXX»}
          • }
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <agendas>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </agendas>
  • on failure, if json was chosen:
    • {«agendas»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

setagendatocompanyschedule( $p_sPublicKey)

This function makes an agenda schedule to be the same as the previously set company general schedule.

URL to call this function: https://app.bookitit.com/api/11/setagendatocompanyschedule/p_sPublicKey

Parameters
p_sPublicKeyYour public key

POST PARAMETERS

Parameters
p_sAgendaIDid of the agenda (format bktXXXXXXX)
Returns
on success, if xml was chosen:

  • <agenda>
    • <status>true</status>
  • </agenda>
  • on success, if json was chosen:
    • {«agenda»:
      • {
        • «status»:true,
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <agenda>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </agenda>
  • on failure, if json was chosen:
    • {«agenda»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

setphoneandsendvalidate( $p_sPublicKey)

This function sets the cellphone of one of your company’s users (if a user’s ID is given) or the cellphone of your company (if no ID is given).

Since cellphone numbers have to be always confirmed, the user or company will be set as INACTIVE, and a new confirmation code will be returned by the function and sent to the user’s or company’s cellphone. Please store that code for later confirmation of the phone.

See Also
confirmphone

URL to call this function: https://app.bookitit.com/api/11/setphoneandsendvalidate/p_sPublicKey

Parameters
p_sPublicKeyYour public key

POST PARAMETERS

Parameters
p_sPhonenew phone number
p_sUserIDoptional, id of your user (format bktXXXXXXXXX)
Returns
  • on success, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <phone>
        • <status>true</status>
        • <validatephonekey>the new activation code</validatephonekey>
      • </phone>
  • on success, if json was chosen:
    • {«phone»:
      • {
        • «status»:true,
        • «validatephonekey»:the new activation code,
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <phone>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </phone>
  • on failure, if json was chosen:
    • {«phone»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

testconnection( $p_sEchoValue)

This function tests the connection. The sent value is just echoed by the server.

URL to call this function: https://app.bookitit.com/api/11/testconnection/p_sEchoValue

Parameters
p_sEchoValueA value defined by the user.
Returns
  • on success, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <connection>
        • <status>true</status>
        • <echovalue>$p_sEchoValue</echovalue>
      • </connection>
  • on success, if json was chosen:
    • {«connection»:
      • {
        • «status»:true,
        • «echovalue»:p_sEchoValue
      • }
    • }
  • on failure, if xml was chosen:
    • nothing (if the connection fails it will not return data)
  • on failure, if json was chosen:
    • nothing (if the connection fails it will not return data)

updateagenda( $p_sPublicKey)

This function updates data of an agenda of your company. An agenda ID must be provided. It can be the ID of the agenda in Bookitit or, if you are synchronizing or integrating agendas between your software and Bookitit, the ID of the agenda in your software (we call it Synchro ID).

URL to call this function: https://app.bookitit.com/api/11/updateagenda/p_sPublicKey

Parameters
p_sPublicKeyYour public key

POST PARAMETERS

Parameters
p_sAgendaIDID of the agenda (format bktXXXXXXX)
p_sSynchroIDID of the agenda in your software
p_sNameagenda name (optional)
p_sPhoneagenda phone (optional)
p_sEmailagenda email (optional)
p_sPublic(optional) indicates if the agenda is «public» or «private». Default is «public»
Returns
on success, if xml was chosen:

  • <agenda>
    • <status>true</status>
  • </agenda>
  • on success, if json was chosen:
    • {«agenda»:
      • {
        • «status»:true,
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <agenda>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </agenda>
  • on failure, if json was chosen:
    • {«agenda»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

updateagendacommunications( $p_sPublicKey)

This function sets or updates agenda communications

URL to call this function: https://app.bookitit.com/api/11/updateagendacommunications/p_sPublicKey

Parameters
p_sPublicKeyYour public key

AVAILABLE VALUES «email» for email communication «sms» for sms communication «both» for email and sms communication «none» for none communication

POST PARAMETERS

Parameters
$p_sAgendaIDid of the agenda (format bktXXXXXXX)
$p_sClient_event_add_admin(optional) Send to admin when client adds an event. «email» / «sms» / «both» / «none»
$p_sAdmin_event_add_admin(optional) Sent to admin when an event its added from calendar. «email» / «sms» / «both» / «none»
$p_sUser_event_confirm_admin(optional) Sent to admin when agenda/admin confirms an event. «email» / «sms» / «both» / «none»
$p_sUser_event_unconfirm_admin(optional) Sent to admin when agenda/admin unconfirms an event. «email» / «sms» / «both» / «none»
$p_sUser_event_delete_admin(optional) Sent to admin when client deletes an event. «email» / «sms» / «both» / «none»
$p_sClient_event_add(optional) Sent to agenda when client adds an event. «email» / «sms» / «both» / «none»
$p_sUser_event_add_admin(optional) Sent to agenda when an event its added from calendar. «email» / «sms» / «both» / «none»
$p_sUser_event_confirm_agenda(optional) Sent to agenda when agenda/admin confirms an event. «email» / «sms» / «both» / «none»
$p_sUser_event_unconfirm_agenda(optional) Sent to agenda when agenda/admin unconfirms an event. «email» / «sms» / «both» / «none»
$p_sUser_event_delete_agenda(optional) Sent to agenda when client deletes an event . «email» / «sms» / «both» / «none»
$p_sUser_event_add(optional) Sent to client when an event is added from calendar. «email» / «sms» / «both» / «none»
$p_sUser_event_modify(optional) Sent to client when an event is modify from calendar. «email» / «sms» / «both» / «none»
$p_sUser_event_delete(optional) Sent to client when an event is deleted from calendar. «email» / «sms» / «both» / «none»
$p_sUser_event_confirm(optional) Sent to client when an event is confirmed. «email» / «sms» / «both» / «none»
$p_sUser_event_uncofirm(optional) Sent to client when an event is unconfirmed. «email» / «sms» / «both» / «none»
$p_sClient_event_remember(optional) Sent reminder to client. «email» / «sms» / «both» / «none»
$p_iClient_event_remember_min(optional) Minutes before the event to send the reminder to the client. «email» / «sms» / «both» / «none»
$p_sUser_event_remember(optional) Sent reminder to agenda. «email» / «sms» / «both» / «none»
$p_iUser_event_remember_min(optional) Minutes before the event to send the reminder to the agenda. «email» / «sms» / «both» / «none»
Returns
on success, if xml was chosen:

  • <agenda>
    • <status>true</status>
  • </agenda>
  • on success, if json was chosen:
    • {«agenda»:
      • {
        • «status»:true,
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <agenda>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </agenda>
  • on failure, if json was chosen:
    • {«agenda»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

updateagendaconfiguration( $p_sPublicKey)

This function updates the configuration for an agenda of your company.

URL to call this function: https://app.bookitit.com/api/11/updateagendaconfiguration/p_sPublicKey

Parameters
p_sPublicKeyYour public key

POST PARAMETERS

Parameters
p_sAgendaIDid of the agenda (format bktXXXXXXX)
p_iMinAdvanceMakeEventinteger, the minimum advance that users can make reservations with (in days)
p_iMinAdvanceSeeAgendainteger, the maximum anticipation that users can see the free hours with (in days)
p_iMinAdvanceCancelEventinteger, the minimum advance that users can cancel reservations with (in days)
p_sConfirmEventsindicates if the company has to manually confirm the reservations. Options are «yes» or «no», default is «no».
p_sUserValidateindicates if the users need to validate before making reservations. Options are «yes» or «no», default is «no».
p_sKeySendMethodindicates how to send the activation keys to users. Options are «sms» and «email», default is «email».
p_iWidgetIntervalSizehow to set the interval between reservation hours in the widget. Options are:

  • «service»: Interval time depends on the duration of selected service
  • «shifts»: Interval time depends on the duration of selected service, but multiple users can pick the same service at the same time
  • any number: in minutes, Interval time is globally set
p_iShiftNumber(optional) integer, number of users that can make a reservation for the same service at the same time. Used when p_iWidgetIntervalSize is set to «shifts».
p_iShiftStep(optional) if you select the interval size as «shifts» you will have to select an step for each shift. 5, 10, 15, 30, 60, 90, 120, 240 minutes.
Returns
on success, if xml was chosen:

  • <agenda>
    • <status>true</status>
  • </agenda>
  • on success, if json was chosen:
    • {«agenda»:
      • {
        • «status»:true,
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <agenda>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </agenda>
  • on failure, if json was chosen:
    • {«agenda»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

updateagendaservice( $p_sPublicKey)

This function updates an agenda-service connection of your company. Agenda ID and service ID must be provided. They can be the IDs in Bookitit or, if you are synchronizing or integrating agendas between your software and Bookitit, the IDs of your software (we call it Synchro ID). If both are given, Synchro IDs have preference.

URL to call this function: https://app.bookitit.com/api/11/updateagendaservice/p_sPublicKey

Parameters
p_sPublicKeyYour public key

POST PARAMETERS

Parameters
p_sAgendaIDagenda ID (format bktXXXXXXX)
p_sServiceIDservice ID (format bktXXXXXXX)
p_sAgendaSynchroIDagenda ID in your software (use in case of software integration)
p_sServiceSynchroIDservice ID in your software (use in case of software integration)
p_iDuration(optional) New duration of the service specific for this agenda, in minutes.
p_dPrice(optional) New price of the service specific for this agenda, in your currency
Returns
on success, if xml was chosen:

  • <agenda_service>
    • <status>true</status>
  • </agenda_service>
  • on success, if json was chosen:
    • {«agenda_service»:
      • {
        • «status»:true,
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <agenda_service>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </agenda_service>
  • on failure, if json was chosen:
    • {«agenda_service»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

updateclient( $p_sPublicKey)

This function updates a client of your company. You can modify different fields, name, cellphone,… as well as change the web access of the client

URL to call this function: https://app.bookitit.com/api/11/updateclient/p_sPublicKey

A client with web access can login from widget. With this action the client can create new appointments without register again, or delete pending appointments. This client registration requires some mandatory fields.

A client without web access can’t login at widget. This type of client only contains its data and allows the center create new appointments to him. This client registration only requires to fill some fields (one field at least)

Parameters
$p_sPublicKeyYour public key

POST PARAMETERS

Parameters
$p_sClientId(mandatory) The id of the client that will be updated. (format bktXXXXXXXXX)
$p_sWebaccess(optional). If you want to modify the web access set «true» or «false» state otherwise it will do nothing.
$p_sPassword(optional). If you are changing a client from without webaccess to webaccess it will be mandatory. Encrypted (md5) password for the client if has webaccess. If you don’t want to modify this parameter set it as «».
$p_sEmail(optional) Email of the client. If you don’t want to modify this parameter set it as «».
$p_sCellphone(optional) Cellphone of the client without international code. If you don’t want to modify this parameter set it as «».
$p_sInternationalCode(optional) The country international code (Ex: +34), if you don’t set this value the default value inserted will be the international code of the company. If you don’t want to modify this parameter set it as «».
$p_sDocument(optional) Document of the client. If you don’t want to modify this parameter set it as «». If you want to delete this field send a «null» string.
$p_sName(optional) Name of the client. If you don’t want to modify this parameter set it as «». If you want to delete this field send a «null» string.
$p_sAddress(optional) Address of the client. If you don’t want to modify this parameter set it as «». If you want to delete this field send a «null» string.
$p_sPhone(optional) Phone of the client. If you don’t want to modify this parameter set it as «». If you want to delete this field send a «null» string.
$p_sBlocked(optional) If you want to block a client you will have to set it as «true» otherwise «false».
$p_someCustomFields(optional) If your company account is using custom fields for the users, you can set it there. If you want to delete this field send a «null» string in the correct position of the array.

$p_someCustomFields param example: array( «customvalidate1» => «data in text format», «customvalidate2″=> «data in text format», «custom1″=> «data in text format», «custom2″=> «data in text format», «custom3″=> «data in text format», «custom4″=> «data in text format», «custom5″=> «data in text format» )

Returns
  • on success, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <client>
        • <status>true</status>
        • <id>id of the updated client (format bktXXXXXXXXX)</id>
      • </client>
  • on success, if json was chosen:
    • {«client»:
      • {
        • «status»:true,
        • «id»:id of the updated client (format bktXXXXXXXXX)
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <client>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </client>
  • on failure, if json was chosen:
    • {«client»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

updatecompany( $p_sPublicKey)

This function is used to update data of a company in Bookitit. Only administrator users, who have an administrator api key, can update companies with this function. Moreover, an administrator can only update the companies created by himself.

URL to call this function: https://app.bookitit.com/api/11/updatecompany/p_sPublicKey

Parameters
p_sPublicKeyPublic key of the administrator user

POST PARAMETERS If you don’t want to change the value in Bookitit of an optional parameter you can set it as a void string «». If you want unset or delete a value in Bookitit set the parameter as string with «null» value

Parameters
p_sPublicKeyToModifyPublic key of the company to modify
$p_sModexml or json
$p_bSecuretrue for https, false for http
p_sName(optional) Name of the company, can’t be unset or delete
p_sCellPhone(optional) Cellphone of the company
p_sPhone(optional) Phone of the company
p_sPassword(optional) Encrypted password (md5) of the company, can’t be unset or delete
p_sAddress(optional) Address of the company
p_sPostalCode(optional) Postal code of the company
p_sWeb(optional) Url of the company
$p_iCountryId(optional) the id of the country for the company in bktXXXX format, can’t be unset or delete
$p_iRegionId(optional) the id of the region for the company in bktXXXX format, can’t be unset or delete
$p_iCityId(optional) the id of the city for the company in bktXXXX format, can’t be unset or delete
$p_sDocument(optional) Document of the company
Returns
  • on success, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <company>
        • <status>true</status>
      • </company>
  • on success, if json was chosen:
    • {«company»:
      • {
        • «status»:true
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <company>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </company>
  • on failure, if json was chosen:
    • {«company»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

updatecompanycustomfield( $p_sPublicKey)

This function updates a custom field for the company whose public key is given.

Warning
only administrator users, who have an administrator api key, can use this function. Moreover, an administrator can only update custom fields of a company created by himself.
Parameters
p_sPublicKeyToAddpublic key of the company to add the field to
p_sCustomFieldIDthe id of the custom field to update (format bktXXXXXX)
p_sInputTypethe kind of the custom field, current options are «text», «checkbox»
p_sInputLabelthe label that will precede the field wherever it is shown
p_sInputNamethe name of the field form html and DOM purposes
p_sInputValuethe value of the field
p_sShowInMyCenterindicates if the custom field has to be shown in the «my center» section of bookitit. Options are «yes» or «no», default is «no».
p_sLanguageID(optional) (format bktXXXXX) indicates the language of the field, as it can be multilanguage. Must add one field per language.
Returns
  • on success, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <companycustomfield>
        • <status>true</status>
      • </companycustomfield>
  • on success, if json was chosen:
    • {«companycustomfield»:
      • {
        • «status»:true
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <companycustomfield>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </companycustomfield>
  • on failure, if json was chosen:
    • {«companycustomfield»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

updatecompanyscheduleday( $p_sPublicKey)

This function updates the schedule of your company for a single weekday. That is, at which time your company is open or closed. Should be called once per day you want to update. Only works for standard companies.

URL to call this function: https://app.bookitit.com/api/11/updatecompanyscheduleday/p_sPublicKey

Parameters
p_sPublicKeyYour public key

POST PARAMETERS

Parameters
Youmust build a string with 97 variables with the format «var0=[1 to 7]&var1=0&var2=[‘c’ or ‘o’]&var3=30&var4=[‘c’ or ‘o’]»… until … «var95=1410&var96=[‘c’ or ‘o’]»
The meaning of the variables of this string is as follows:

  • var0: the weekday to update
    • 1 is Monday
    • 2 is Tuesday
    • 3 is Wednesday
    • 4 is Thursday
    • 5 is Friday
    • 6 is Saturday
    • 7 is Sunday
  • The rest are 96 variables successively representing pairs «starting minute of the period – company status»
    • the 48 uneven variables (var1, var3… var93, var95):
      • increments by 30 starting at 0, ending at 1410. This represents the half an hour period that starts in that minute. var1=0 means from 00:00 to 00:30, var3=30 means from 00:30 to 01:30… and var95=1410 means from 23:30 to 00:00
    • the 48 even variables (var2, var4… var94, var96):
      • «c» is «closed» and «o» is «open»
Returns
  • on success, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <schedule>
        • <status>true</status>
      • </schedule>
  • on success, if json was chosen:
    • {«schedule»:
      • {
        • «status»:true
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <schedule>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </schedule>
  • on failure, if json was chosen:
    • {«schedule»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

updateevent( $p_sPublicKey)

This function updates an event.

URL to call this function: https://app.bookitit.com/api/11/updateevent/p_sPublicKey

Parameters
p_sPublicKeyYour public key

POST PARAMETERS If you don’t want to change the value in Bookitit of an optional parameter you can set it as a void string «». If you want unset or delete a value in Bookitit set the parameter as string with «null» value

Parameters
p_sEventIDid of the event (format bktXXXXXXXX)
p_sAgendaIDid of the agenda (format bktXXXXXXXX)
p_dStartDatestart date of the event (YYYY-MM-DD)
p_dEndDateend date of the event (YYYY-MM-DD)
p_iStartTimestart time of the event (in minutes, since 00:00)
p_iEndTimeend time of the event (in minutes, since 00:00)
p_sServiceID(optional) id of the service (format bktXXXXXXXX), To unset or delete this data the array field must be a «null» value
p_sEventSynchroID(optional) synchro ID of the event
p_sAgendaSynchroID(optional) synchro ID of the agenda
p_sServiceSynchroID(optional) synchro ID of the service
p_sTitle(optional) title of the event, To unset or delete this data the array field must be a «null» value
p_sDescription(optional) description of the event, To unset or delete this data the array field must be a «null» value
$p_sModexml or json
$p_bSecuretrue for https, false for http
$p_bSendNotification(optional) Indicates if an email will be sent to notify the client «true»: send email «false»: don’t send email default is «false»
Returns
on success, if xml was chosen:

  • <event>
    • <status>true</status>
  • </event>
  • on success, if json was chosen:
    • {«event»:
      • {
        • «status»:true,
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <event>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </event>
  • on failure, if json was chosen:
    • {«event»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

updateeventstatus( $p_sPublicKey)

This function updates the state of an event. URL to call this function: https://app.bookitit.com/api/11/updateeventstatus/p_sPublicKey

Parameters
p_sPublicKeyYour public key

POST PARAMETERS

Parameters
p_sEventIDid of the event (format bktXXXXXXX)
p_sStatusthe new status of the event, options are «canceled», «completed», «pending», «pending_accepted», «pending_rejected», «in_payment», «wiretransfer» and «time_block»
Returns
on success, if xml was chosen:

  • <event>
    • <status>true</status>
  • </event>
  • on success, if json was chosen:
    • {«event»:
      • {
        • «status»:true
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <event>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </event>
  • on failure, if json was chosen:
    • {«event»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

updateorder( $p_sPublicKey)

This function updates an previously created order of a prepay service. URL to call this function: https://app.bookitit.com/api/11/updateorder/$p_sPublicKey/$p_sOrderID/$p_sServiceID/$p_sEventID/$p_sStatus/$p_iBankID/$p_sStore

Parameters
$p_sPublicKeyYour public key
$p_sOrderIDid of the order (format bktXXXXXXX)
$p_sServiceIDid of the related service (format bktXXXXXXX)
$p_sEventIDid of the related event (format bktXXXXXXX)
$p_sStatusnew status of the order. Options are:

  • «not_paid»: the initial status (default)
  • «bank_selected»: User has selected the bank. *
  • «paid»: The service is definitely paid.
  • «error»: There has been a problem with the payment.
  • «wiretransfer»: This order is paid by wire transfer.
$p_sBankname of the bank. Current options are:

  • «paypal» (default)
  • «bookitit»
$p_sStoreid of the store to which the payment is made (more concrete than the bank)
Returns
on success, if xml was chosen:

  • <order>
    • <status>true</status>
    • <id>id of the created agenda (format bktXXXXXXXX)</id>
  • </order>
  • on success, if json was chosen:
    • {«order»:
      • {
        • «status»:true,
        • «id»:id of the created service (format bktXXXXXXXX)
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <order>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </order>
  • on failure, if json was chosen:
    • {«order»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

updateservice( $p_sPublicKey)

This function updates data of a service of your company. A service ID must be provided. It can be the ID of the service in Bookitit or, if you are synchronizing or integrating services between your software and Bookitit, the ID of the service in your software (we call it Synchro ID).

URL to call this function: https://app.bookitit.com/api/11/updateservice/p_sPublicKey

Parameters
p_sPublicKeyYour public key
p_sServiceIDID of the service (format bktXXXXXXX)
p_sSynchroIDID of the service in your local software
p_sNameservice name (optional)
p_sDurationservice duration in minutes (optional)
p_sPriceservice price (format XX.XX)(optional)
p_sPublic(optional) indicates if the service is «public» or «private». Default is «public»
p_sPrepay(optional) indicates is the services is «prepay» or «not_prepay». Default is «not_prepay»
p_sCurrency(optional) in which currency is the price, accepted values are «EUR» for euro «GBP» for british pound and «USD» for United States dollar. Default is euro.

updatesocialuser( $p_sPublicKey)

This function updates a social user given his basic data.

URL to call this function: https://app.bookitit.com/api/11/updatesocialuser/p_sPublicKey

Warning
You need an Administrator API KEY with a multicenter account to use this function.
Parameters
p_sPublicKeyYour public key

POST PARAMETERS

Parameters
p_sUserIDThe id of the user you want to update (format bktXXXXXXX)
p_sNameName of the user
p_sPhonePhone number of the user
p_sEmailemail of the user
$p_iCountryId(optional) the id of the country for the company in bktXXXX format
$p_iRegionId(optional) the id of the region for the company in bktXXXX format
$p_iCityId(optiona) the id of the city for the company in bktXXXX format
Returns
  • on success, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <user>
        • <status>true</status>
      • </user>
  • on success, if json was chosen:
    • {«user»:
      • {
        • «status»:true,
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <user>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </user>
  • on failure, if json was chosen:
    • {«user»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }
See Also
addsocialuser
setphoneandsendvalidate

updateuser( $p_sPublicKey)

This function updates a user given his basic data.

URL to call this function: https://app.bookitit.com/api/11/updateuser/p_sPublicKey

Parameters
p_sPublicKeyYour public key

POST PARAMETERS

Parameters
p_sUserIDThe id of the user you want to update (format bktXXXXXXX)
p_sName(optional) Name of the user. If you don’t want to send this parameter set it as «».
p_sEmail(optional) email of the user. If you don’t want to send this parameter set it as «».
p_sPassword(optional) Encrypted (md5) password for the user. If you don’t want to send this parameter set it as «».
p_sPhone(optional) CellPhone number of the user. If you don’t want to send this parameter set it as «».
p_sDocument(optional) Document of the user. If you don’t want to send this parameter set it as «».
p_sAddress(optional) The address of the user. If you don’t want to send this parameter set it as «».
$p_sBlocked(optional) If you want to block a client you will have to set it as «true» otherwise «false».
$p_someCustomFields(optional) If your company account is using custom fields for the users, you can set it there. array( «customvalidate1» => «data in text format», «customvalidate2″=> «data in text format», «custom1″=> «data in text format», «custom2″=> «data in text format», «custom3″=> «data in text format», «custom4″=> «data in text format», «custom5″=> «data in text format» )
Returns
  • on success, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <user>
        • <status>true</status>
      • </user>
  • on success, if json was chosen:
    • {«user»:
      • {
        • «status»:true,
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <user>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </user>
  • on failure, if json was chosen:
    • {«user»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }
See Also
addsocialuser
setphoneandsendvalidate

uservalidate( $p_sUserMail,
 $p_sPassword,
 $p_sType = null 
)

This function validates (checks) if user’s (or company’s) credentials are correct. Company Phone API keys are returned (they are generated if they don’t exist).

URL to call this function: https://app.bookitit.com/api/11/uservalidate/p_sUserMail/p_sPassword/p_sType

Parameters
p_sUserMailUser’s email
p_sPasswordUser’s enrypted (md5) password
p_sTypeThe type of user, can be «administrator», «client», «company, «social». Default is «client»;
Returns
on success, if xml was chosen:

  • <validate>
    • <status>true</status>
    • <public_key>mobile public key</public_key>
    • <private_key>mobile private key</private_key>
  • </validate>
  • on success, if json was chosen:
    • {«validate»:
      • {
        • «status»:true
        • «public_key»:mobile public key
        • «private_key»:mobile private key
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <validate>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </validate>
  • on failure, if json was chosen:
    • {«validate»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

validateorder( $p_sPublicKey)

This function checks if the amount of an order is valid URL to call this function: https://app.bookitit.com/api/11/validateorder/p_sPublicKey

Parameters
p_sPublicKeyYour public key

POST PARAMETERS

Parameters
p_sOrderIDid of the order (format bktXXXXXXX)
p_iAmountid of the related service (format bktXXXXXXX)
Returns
on success, if xml was chosen:

  • <order>
    • <status>true</status>
  • </order>
  • on success, if json was chosen:
    • {«order»:
      • {
        • «status»:true,
      • }
    • }
  • on failure, if xml was chosen:
    • <?xml version=’1.0′ encoding=’utf-8′?>
      • <order>
        • <status>false</status>
        • <id>error id</id>
        • <message>error message</message>
      • </order>
  • on failure, if json was chosen:
    • {«order»:
      • {
        • «status»:false,
        • «id»:error id,
        • «message»:error message
      • }
    • }

This site is registered on wpml.org as a development site.