Bookitit REST API 1.1
|
|
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.
- 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_sPublicKey Your public key
POST PARAMETERS
- Parameters
-
name agenda name phone agenda phone (optional) email agenda 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>
- <agenda>
- on success, if json was chosen:
- {«agenda»:
- {
- «status»:true,
- «id»:id of the created agenda (format bktXXXXXXXX)
- }
- {
- }
- {«agenda»:
- 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>
- <agenda>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«agenda»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«agenda»:
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_sPublicKey Your public key
POST PARAMETERS
- Parameters
-
p_sAgendaID agenda ID (format bktXXXXXXX) p_sServiceID service ID (format bktXXXXXXX) p_sAgendaSynchroID agenda ID in your software (use in case of software integration) p_sServiceSynchroID service 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>
- <agenda_service>
- on success, if json was chosen:
- {«agenda_service»:
- {
- «status»:true,
- }
- {
- }
- {«agenda_service»:
- 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>
- <agenda_service>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«agenda_service»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«agenda_service»:
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_sPublicKey Your public key $p_sWebaccess If 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>
- <client>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on success, if xml was chosen:
- on success, if json was chosen:
- {«client»:
- {
- «status»:true,
- «id»:id of the created client (format bktXXXXXXXXX)
- }
- {
- }
- {«client»:
- 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>
- <client>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«client»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«client»:
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_sPublicKey Public key of the administrator user
POST PARAMETERS
- Parameters
-
p_sEmail email of the company p_sPassword Encrypted password (md5) of the company. You have to use an md5 library to encrypt. p_sName Name of the company p_sCellPhone Cellphone of the company (optional) p_sPhone Phone of the company (optional) p_sAddress Address of the company (optional) p_sPostalCode Postal code of the company (optional) p_sWeb Website of the company (optional) p_sExpirationDate the 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>
- <company>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on success, if xml was chosen:
- 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
- }
- {
- }
- {«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>
- <company>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«company»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«company»:
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_sPublicKey Public key of the administrator user
POST PARAMETERS
- Parameters
-
p_sPublicKeyToAdd public key of the company to add the field to p_sInputType the kind of the custom field, current options are «text», «checkbox» p_sInputLabel the label that will precede the field wherever it is shown p_sInputName the name of the field form html and DOM purposes p_sInputValue the 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>
- <companycustomfield>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on success, if xml was chosen:
- on success, if json was chosen:
- {«companycustomfield»:
- {
- «status»:true
- «id»:id of the created custom field (format bktXXXXX)
- }
- {
- }
- {«companycustomfield»:
- 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>
- <companycustomfield>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«companycustomfield»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«companycustomfield»:
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_sPublicKey Your public key
POST PARAMETERS
- Parameters
-
p_sAgendaID ID of the agenda (format bktXXXXXXXX) p_sServiceID ID of the service (format bktXXXXXXXX) p_dStartDate start date of the event (YYYY-MM-DD), if date doesn’t exist, date will be 0000-00-00 p_dEndDate end date of the event (YYYY-MM-DD), if date doesn’t exist, date will be 0000-00-00 p_iStartTime start time of the event (in minutes, since 00:00): 01:00 am = 60, 02:00 am = 120 … p_iEndTime end 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>
- <event>
- on success, if json was chosen:
- {«event»:
- {
- «status»:true,
- «id»:id of the created event (format bktXXXXXXXX)
- }
- {
- }
- {«event»:
- 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>
- <event>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«event»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«event»:
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_sPublicKey Your public key
POST PARAMETERS
- Parameters
-
p_sName name 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>
- <extraservice>
- on success, if json was chosen:
- {«extraservice»:
- {
- «status»:true,
- «id»:id of the created extra service (format bktXXXXXXXX)
- }
- {
- }
- {«extraservice»:
- 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>
- <extraservice>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«extraservice»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«extraservice»:
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_sPublicKey Your public key
POST PARAMETERS
- Parameters
-
$p_someHolidays the 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>
- <holidays>
- on success, if json was chosen:
- {«holidays»:
- {
- «status»:true,
- }
- {
- }
- {«holidays»:
- 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>
- <holidays>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«holidays»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«holidays»:
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_sPublicKey Your public key
- Returns
- on success, if xml was chosen:
- <order>
- <status>true</status>
- <id>id of the created order (format bktXXXXXXXX)</id>
- </order>
- <order>
- on success, if json was chosen:
- {«order»:
- {
- «status»:true,
- «id»:id of the created order (format bktXXXXXXXX)
- }
- {
- }
- {«order»:
- 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>
- <order>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«order»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«order»:
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_sPublicKey Your public key
POST PARAMETERS
- Parameters
-
p_sName name of the service p_iTime duration of the service in minutes p_dPrice price of the service (only numbers in format XX.XX) p_sCurrency in 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>
- <service>
- on success, if json was chosen:
- {«service»:
- {
- «status»:true,
- «id»:id of the created service (format bktXXXXXXXX)
- }
- {
- }
- {«service»:
- 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>
- <service>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«service»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«service»:
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_sPublicKey The public key of an Administrator API KEY p_sPublickeyNormalCompany The public key of the company for which the user is going to booking
POST
- Parameters
-
p_sEmail The email of the user-client that is booking the event (format bktXXXXX) p_sAgendaID id of the agenda (format bktXXXXXXXX) p_sServiceID id of the service (format bktXXXXXXXX) p_dStartDate start date of the event (YYYY-MM-DD) p_dEndDate end date of the event (YYYY-MM-DD) p_iStartTime start time of the event (in minutes, since 00:00), 01:00 am = 60, 02:00 am = 120 … p_iEndTime end time of the event (in minutes, since 00:00), optional if not set it will use the duration of the service p_sTitle title of the event, optional if not set it will use the title of the service p_sComments description 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>
- <event>
- on success, if json was chosen:
- {«event»:
- {
- «status»:true,
- «id»:id of the created event (format bktXXXXXXXX)
- }
- {
- }
- {«event»:
- 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>
- <event>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«event»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- See Also
- addsocialuser
- {«event»:
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_sPublicKey your public key (administrator key)
POST PARAMETERS
- Parameters
-
p_sName Name of the user p_sPhone Phone number of the user p_sEmail email 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>
- <user>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on success, if xml was chosen:
- on success, if json was chosen:
- {«user»:
- {
- «status»:true,
- «id»:id of the created user (format bktXXXXXXXXX)
- }
- {
- }
- {«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
- }
- {
- }
- {«user»:
- 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_sName Name of the company p_iCellPhone Cellphone of the company p_iCountry Country id of the company p_sEmail Email of the company p_sLanguageCode Language code (‘en’, ‘es’, ‘XX’), default ‘es’ (optional) p_sSignUpUrl Account 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>
- <company>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on success, if xml was chosen:
- on success, if json was chosen:
- {«company»:
- {
- «status»: true,
- «id»: id of the created company (format bkt XXXXXXXXX),
- «public»: public key,
- «private»: private key
- }
- {
- }
- {«company»:
- 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>
- <company>
- <?xml version=’1.0′ encoding=’utf-8′?>
</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»},
- }
- {
- }
- {«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>
- <company>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«company»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«company»:
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_sPublicKey Your public key
POST PARAMETERS
- Parameters
-
p_sName Name of the user p_sEmail email of the user p_sPassword Encrypted (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>
- <user>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on success, if xml was chosen:
- on success, if json was chosen:
- {«user»:
- {
- «status»:true,
- «id»:id of the created user (format bktXXXXXXXXX)
- }
- {
- }
- {«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>
- <user>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«user»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«user»:
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_sPublicKey the api public key of the company p_sAccountType the 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>
- <auth>
- on success, if json was chosen:
- {«auth»:
- {
- «status»:true
- «authenticated_url»: the url where the client software will redirect
- }
- {
- }
- {«auth»:
- 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>
- <auth>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«auth»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«auth»:
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_sPublicKey Your public key $p_sCompanyEmail Company email.
- Returns
-
- on success, if xml was chosen:
- <?xml version=’1.0′ encoding=’utf-8′?>
- <user>
- <status>true</status>
- <user>
- </user>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on success, if xml was chosen:
- on success, if json was chosen:
- {«user»:
- {
- «status»:true,
- «id»:id of the user (format bktXXXXXXXXX),
- }
- {
- }
- {«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>
- <user>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«user»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«user»:
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_sPublicKey Your public key
POST PARAMETERS
- Parameters
-
p_sEmail email of the user p_sUserID the 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>
- <user>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on success, if xml was chosen:
- on success, if json was chosen:
- {«user»:
- {
- «status»:true
- }
- {
- }
- {«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>
- <user>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«user»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«user»:
- 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_sPublicKey Your public key
POST PARAMETERS
- Parameters
-
p_sEventID the 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>
- <event>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on success, if xml was chosen:
- on success, if json was chosen:
- {«event»:
- {
- «status»:true
- }
- {
- }
- {«event»:
- 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>
- <event>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«event»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«event»:
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_sPublicKey Your public key
POST PARAMETERS
- Parameters
-
p_sPhone Phone number of the user p_sUserID the 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>
- <user>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on success, if xml was chosen:
- on success, if json was chosen:
- {«user»:
- {
- «status»:true
- }
- {
- }
- {«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>
- <user>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«user»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«user»:
- 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
-
type p_sPublicKey Your public key
POST PARAMETERS
- Parameters
-
type p_sAgendaID ID of the agenda (format bktXXXXXXX) type p_sSynchroID ID of the agenda in your software
- Returns
- on success, if xml was chosen:
- <agenda>
- <status>true</status>
- </agenda>
- <agenda>
- on success, if json was chosen:
- {«agenda»:
- {
- «status»:true,
- }
- {
- }
- {«agenda»:
- 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>
- <agenda>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«agenda»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«agenda»:
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_sPublicKey Your public key
POST PARAMETERS
- Parameters
-
p_sAgendaID agenda ID (format bktXXXXXXX) p_sServiceID service ID (format bktXXXXXXX) p_sAgendaSynchroID agenda ID in your software (use in case of software integration) p_sServiceSynchroID service ID in your software (use in case of software integration)
- Returns
- on success, if xml was chosen:
- <agenda_service>
- <status>true</status>
- </agenda_service>
- <agenda_service>
- on success, if json was chosen:
- {«agenda_service»:
- {
- «status»:true,
- }
- {
- }
- {«agenda_service»:
- 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>
- <agenda_service>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«agenda_service»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«agenda_service»:
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_sPublicKey Your public key
POST PARAMETERS
- Parameters
-
p_sClientId id of the client to be deleted (format bktXXXXXXX)
- Returns
- on success, if xml was chosen:
- <client>
- <status>true</status>
- </client>
- <client>
- on success, if json was chosen:
- {«client»:
- {
- «status»:true,
- }
- {
- }
- {«client»:
- 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>
- <client>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«client»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«client»:
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_sPublicKey Public 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>
- <company>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on success, if json was chosen:
- {«company»:
- {
- «status»:true
- }
- {
- }
- {«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>
- <company>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«company»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«company»:
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_sPublicKey Your public key
- Returns
-
- on success, if xml was chosen:
- <?xml version=’1.0′ encoding=’utf-8′?>
- <schedule>
- <status>true</status>
- </schedule>
- <schedule>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on success, if xml was chosen:
- on success, if json was chosen:
- {«schedule»:
- {
- «status»:true
- }
- {
- }
- {«schedule»:
- 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>
- <schedule>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«schedule»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«schedule»:
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_sPublicKey Your public key
POST PARAMETERS
- Parameters
-
p_sEventID id of the event to delete (format bktXXXXXXX) p_sEventSynchroID id 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>
- <event>
- on success, if json was chosen:
- {«event»:
- {
- «status»:true,
- }
- {
- }
- {«event»:
- 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>
- <event>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«event»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«event»:
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
-
type p_sPublicKey Your public key
POST PARAMETERS
- Parameters
-
type p_sServiceID ID of the service (format bktXXXXXXX) type p_sSynchroID ID of the service in your software
- Returns
- on success, if xml was chosen:
- <service>
- <status>true</status>
- </service>
- <service>
- on success, if json was chosen:
- {«service»:
- {
- «status»:true,
- }
- {
- }
- {«service»:
- 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>
- <service>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«service»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«service»:
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_sPublicKey Your public key p_sAgendaID Id 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>
- <configuration>
- <?xml version=’1.0′ encoding=’utf-8′?>
- 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
- }
- {
- }
- {
- }
- {«agendas»:
- 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>
- <agendas>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«agendas»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«agendas»:
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_sPublicKey Your public key p_sServiceID optional, 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>
- <agendas>
- <?xml version=’1.0′ encoding=’utf-8′?>
- 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
- }
- {
- }
- {
- }
- {«agendas»:
- 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>
- <agendas>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«agendas»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«agendas»:
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_sPublicKey Your public key $p_sCategoryId The 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>
- <agendas>
- <?xml version=’1.0′ encoding=’utf-8′?>
- 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»)
- }
- {
- }
- {
- }
- {«agendas»:
- 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>
- <agendas>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«agendas»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«agendas»:
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_sPublicKey Your 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>
- <agenda_services>
- <?xml version=’1.0′ encoding=’utf-8′?>
- 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),
- }
- {
- }
- {
- }
- {«agenda_services»:
- 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>
- <agenda_services>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«agenda_services»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«agenda_services»:
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_sPublicKey Your 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>
- <categories>
- <?xml version=’1.0′ encoding=’utf-8′?>
- 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
- }
- {
- }
- {
- }
- {«categories»:
- 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>
- <categories>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«categories»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«categories»:
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_sPublicKey Your public key p_sLanguageID ID of the chosen language (format bktXXXXXX) p_sRegionID ID 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>
- <cities>
- <?xml version=’1.0′ encoding=’utf-8′?>
- 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,
- }
- {
- }
- {
- }
- {«cities»:
- 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>
- <cities>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«cities»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«cities»:
getclient | ( | $p_sPublicKey, | |
$p_sIdClientId | |||
) |
This function gets one client from its client id. The format is bktXXXXX
- Parameters
-
$p_sIdClient the id of the client in bktXXXXXXXXX format $p_sMode xml or json $p_bSecure true 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>
- <client>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on success, if xml was chosen:
- 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>
- <client>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«client»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«client»:
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_sPublicKey Your public key
POST PARAMETERS
- Parameters
-
$p_sFieldType the 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_sFieldvalue the 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>
- <clients>
- <?xml version=’1.0′ encoding=’utf-8′?>
- 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
- }
- }
- {
- }
- {«clients»:
- 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>
- <clients>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«clients»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«clients»:
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_sPublicKey Your public key $p_iClientId the id of the client with format bktXXXXX $p_sDateFrom the start day to get the events $p_sDateTo the 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>
- <events>
- <?xml version=’1.0′ encoding=’utf-8′?>
- 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
- }
- {
- }
- {
- }
- {«events»:
- 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>
- <events>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«events»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«events»:
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_sMode xml or json $p_bSecure true for https, false for http p_sStartDate the start day to get the clients (when the client was registered) p_sEndDate the 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>
- <clients>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on success, if xml was chosen:
- 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
- }
- {
- }
- one or more {«client»:
- }
- {«clients»:
- 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>
- <clients>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«clients»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«clients»:
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_sPublicKey Your public key $p_sEventID the 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>
- <clients>
- <?xml version=’1.0′ encoding=’utf-8′?>
- 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>
- <clients>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«clients»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«clients»:
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_sPublicKey Public 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>
- <companies> –one or more <companie>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on success, if xml was chosen:
- 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
- } -}
- {
- }
- {«company»: -{ «companie»:
- 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>
- <company>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«company»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«company»:
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_sPublicKey Public 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>
- <company>
- <?xml version=’1.0′ encoding=’utf-8′?>
- 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
- }
- {
- }
- {«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>
- <company>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«company»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«company»:
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_sPublicKey Your public key p_sLanguageID ID 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>
- <countries>
- <?xml version=’1.0′ encoding=’utf-8′?>
- 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,
- }
- {
- }
- {
- }
- {«countries»:
- 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>
- <countries>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«countries»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«countries»:
geteventbyid | ( | $p_sPublicKey, | |
$p_sEventID = null , |
|||
$p_sLocator = null |
|||
) |
This function gets an event by id, locator or both.
- Parameters
-
p_sPublicKey Your public key $p_sEventID the identifier of one event (format bktXXXXX) $p_sLocator the 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>
- <event>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on success, if json was chosen:
- {«event»:
- {
- «status»:false,
- {
- {«event»:
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>
- <event>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«event»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«event»:
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_sPublicKey Your public key p_sStartDate the start day to get the events p_sEndDate the 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>
- <events>
- <?xml version=’1.0′ encoding=’utf-8′?>
- 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
- }
- {
- }
- {
- }
- {«events»:
- 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>
- <events>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«events»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«events»:
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_sPublicKey Your 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>
- <extraservices>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on success, if xml was chosen:
- 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,
- }
- {
- }
- {
- }
- {«extraservices»:
- 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>
- <extraservices>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«extraservices»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«extraservices»:
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_sPublicKey Your public key p_sServiceID service id (format bktXXXXXXX) p_sAgendaID agenda id (format bktXXXXXXX) p_sDate the 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>
- <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)
- }
- {
- }
- {
- }
- {«slots»:
- 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>
- <slots>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«slots»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«slots»:
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_sPublicKey Your 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>
- <groups>
- <?xml version=’1.0′ encoding=’utf-8′?>
- 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
- }
- {
- }
- {
- }
- {«groups»:
- 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>
- <groups>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«groups»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«groups»:
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_sPublicKey Your 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>
- <holidays>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on success, if xml was chosen:
- on success, if json was chosen:
- {«holidays»:
- {
- «status»:true,
- zero or more «date»: XXX
- }
- {
- }
- {«holidays»:
- 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>
- <services>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«services»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«services»:
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_sPublicKey Your 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>
- <languages>
- <?xml version=’1.0′ encoding=’utf-8′?>
- 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,
- }
- {
- }
- {
- }
- {«languages»:
- 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>
- <languages>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«languages»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«languages»:
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_sPublicKey Your 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>
- <orders>
- <?xml version=’1.0′ encoding=’utf-8′?>
- 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,
- }
- {
- }
- {
- }
- {«orders»:
- 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>
- <orders>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«languages»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«languages»:
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_sPublicKey Your public key p_sLanguageID ID of the chosen language (format bktXXXXXX) p_sCountryID ID 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>
- <regions>
- <?xml version=’1.0′ encoding=’utf-8′?>
- 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,
- }
- {
- }
- {
- }
- {«regions»:
- 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>
- <regions>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«regions»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«regions»:
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_sPublicKey Your 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>
- <schedule>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on success, if xml was chosen:
- on success, if json was chosen:
- {«schedule»:
- {
- «status»:true,
- one or more «opentime»: XXX
- }
- {
- }
- {«schedule»:
- 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>
- <services>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«services»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«services»:
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_sPublicKey Your 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>
- <services>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on success, if xml was chosen:
- 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
- }
- {
- }
- {
- }
- {«services»:
- 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>
- <services>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«services»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«services»:
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_sPublicKey Your public key $p_sUserID Identifier 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>
- </user>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on success, if xml was chosen:
- 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
- }
- {
- }
- {«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>
- <user>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«user»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«user»:
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_sPublicKey Your public key $p_iIdUser the id of the user with format bktXXXXX $p_sStartDate the start day to get the events $p_sEndDate the 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>
- <events>
- <?xml version=’1.0′ encoding=’utf-8′?>
- <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»}
- }
- {
- }
- {
- }
- {«events»:
- 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>
- <agendas>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«agendas»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«agendas»:
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_sPublicKey Your public key
POST PARAMETERS
- Parameters
-
p_sAgendaID id of the agenda (format bktXXXXXXX)
- Returns
- on success, if xml was chosen:
- <agenda>
- <status>true</status>
- </agenda>
- <agenda>
- on success, if json was chosen:
- {«agenda»:
- {
- «status»:true,
- }
- {
- }
- {«agenda»:
- 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>
- <agenda>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«agenda»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«agenda»:
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_sPublicKey Your public key
POST PARAMETERS
- Parameters
-
p_sPhone new phone number p_sUserID optional, 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>
- <phone>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on success, if xml was chosen:
- on success, if json was chosen:
- {«phone»:
- {
- «status»:true,
- «validatephonekey»:the new activation code,
- }
- {
- }
- {«phone»:
- 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>
- <phone>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«phone»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«phone»:
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_sEchoValue A 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>
- <connection>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on success, if xml was chosen:
- on success, if json was chosen:
- {«connection»:
- {
- «status»:true,
- «echovalue»:p_sEchoValue
- }
- {
- }
- {«connection»:
- 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_sPublicKey Your public key
POST PARAMETERS
- Parameters
-
p_sAgendaID ID of the agenda (format bktXXXXXXX) p_sSynchroID ID of the agenda in your software p_sName agenda name (optional) p_sPhone agenda phone (optional) p_sEmail agenda 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>
- <agenda>
- on success, if json was chosen:
- {«agenda»:
- {
- «status»:true,
- }
- {
- }
- {«agenda»:
- 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>
- <agenda>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«agenda»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«agenda»:
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_sPublicKey Your 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_sAgendaID id 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>
- <agenda>
- on success, if json was chosen:
- {«agenda»:
- {
- «status»:true,
- }
- {
- }
- {«agenda»:
- 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>
- <agenda>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«agenda»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«agenda»:
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_sPublicKey Your public key
POST PARAMETERS
- Parameters
-
p_sAgendaID id of the agenda (format bktXXXXXXX) p_iMinAdvanceMakeEvent integer, the minimum advance that users can make reservations with (in days) p_iMinAdvanceSeeAgenda integer, the maximum anticipation that users can see the free hours with (in days) p_iMinAdvanceCancelEvent integer, the minimum advance that users can cancel reservations with (in days) p_sConfirmEvents indicates if the company has to manually confirm the reservations. Options are «yes» or «no», default is «no». p_sUserValidate indicates if the users need to validate before making reservations. Options are «yes» or «no», default is «no». p_sKeySendMethod indicates how to send the activation keys to users. Options are «sms» and «email», default is «email». p_iWidgetIntervalSize how 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>
- <agenda>
- on success, if json was chosen:
- {«agenda»:
- {
- «status»:true,
- }
- {
- }
- {«agenda»:
- 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>
- <agenda>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«agenda»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«agenda»:
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_sPublicKey Your public key
POST PARAMETERS
- Parameters
-
p_sAgendaID agenda ID (format bktXXXXXXX) p_sServiceID service ID (format bktXXXXXXX) p_sAgendaSynchroID agenda ID in your software (use in case of software integration) p_sServiceSynchroID service 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>
- <agenda_service>
- on success, if json was chosen:
- {«agenda_service»:
- {
- «status»:true,
- }
- {
- }
- {«agenda_service»:
- 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>
- <agenda_service>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«agenda_service»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«agenda_service»:
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_sPublicKey Your 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>
- <client>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on success, if xml was chosen:
- on success, if json was chosen:
- {«client»:
- {
- «status»:true,
- «id»:id of the updated client (format bktXXXXXXXXX)
- }
- {
- }
- {«client»:
- 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>
- <client>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«client»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«client»:
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_sPublicKey Public 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_sPublicKeyToModify Public key of the company to modify $p_sMode xml or json $p_bSecure true 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>
- <company>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on success, if json was chosen:
- {«company»:
- {
- «status»:true
- }
- {
- }
- {«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>
- <company>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«company»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«company»:
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_sPublicKeyToAdd public key of the company to add the field to p_sCustomFieldID the id of the custom field to update (format bktXXXXXX) p_sInputType the kind of the custom field, current options are «text», «checkbox» p_sInputLabel the label that will precede the field wherever it is shown p_sInputName the name of the field form html and DOM purposes p_sInputValue the value of the field p_sShowInMyCenter 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 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>
- <companycustomfield>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on success, if xml was chosen:
- on success, if json was chosen:
- {«companycustomfield»:
- {
- «status»:true
- }
- {
- }
- {«companycustomfield»:
- 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>
- <companycustomfield>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«companycustomfield»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«companycustomfield»:
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_sPublicKey Your public key
POST PARAMETERS
- Parameters
-
You must 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
- var0: the weekday to update
- 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»
- the 48 uneven variables (var1, var3… var93, var95):
- Returns
-
- on success, if xml was chosen:
- <?xml version=’1.0′ encoding=’utf-8′?>
- <schedule>
- <status>true</status>
- </schedule>
- <schedule>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on success, if xml was chosen:
- on success, if json was chosen:
- {«schedule»:
- {
- «status»:true
- }
- {
- }
- {«schedule»:
- 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>
- <schedule>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«schedule»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«schedule»:
updateevent | ( | $p_sPublicKey | ) |
This function updates an event.
URL to call this function: https://app.bookitit.com/api/11/updateevent/p_sPublicKey
- Parameters
-
p_sPublicKey Your 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_sEventID id of the event (format bktXXXXXXXX) p_sAgendaID id of the agenda (format bktXXXXXXXX) p_dStartDate start date of the event (YYYY-MM-DD) p_dEndDate end date of the event (YYYY-MM-DD) p_iStartTime start time of the event (in minutes, since 00:00) p_iEndTime end 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_sMode xml or json $p_bSecure true 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>
- <event>
- on success, if json was chosen:
- {«event»:
- {
- «status»:true,
- }
- {
- }
- {«event»:
- 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>
- <event>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«event»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«event»:
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_sPublicKey Your public key
POST PARAMETERS
- Parameters
-
p_sEventID id of the event (format bktXXXXXXX) p_sStatus the 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>
- <event>
- on success, if json was chosen:
- {«event»:
- {
- «status»:true
- }
- {
- }
- {«event»:
- 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>
- <event>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«event»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«event»:
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_sPublicKey Your public key $p_sOrderID id of the order (format bktXXXXXXX) $p_sServiceID id of the related service (format bktXXXXXXX) $p_sEventID id of the related event (format bktXXXXXXX) $p_sStatus new 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_sBank name of the bank. Current options are: - «paypal» (default)
- «bookitit»
$p_sStore id 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>
- <order>
- on success, if json was chosen:
- {«order»:
- {
- «status»:true,
- «id»:id of the created service (format bktXXXXXXXX)
- }
- {
- }
- {«order»:
- 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>
- <order>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«order»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«order»:
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_sPublicKey Your public key p_sServiceID ID of the service (format bktXXXXXXX) p_sSynchroID ID of the service in your local software p_sName service name (optional) p_sDuration service duration in minutes (optional) p_sPrice service 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_sPublicKey Your public key
POST PARAMETERS
- Parameters
-
p_sUserID The id of the user you want to update (format bktXXXXXXX) p_sName Name of the user p_sPhone Phone number of the user p_sEmail email 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>
- <user>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on success, if xml was chosen:
- on success, if json was chosen:
- {«user»:
- {
- «status»:true,
- }
- {
- }
- {«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>
- <user>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«user»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«user»:
- 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_sPublicKey Your public key
POST PARAMETERS
- Parameters
-
p_sUserID The 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>
- <user>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on success, if xml was chosen:
- on success, if json was chosen:
- {«user»:
- {
- «status»:true,
- }
- {
- }
- {«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>
- <user>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«user»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«user»:
- 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_sUserMail User’s email p_sPassword User’s enrypted (md5) password p_sType The 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>
- <validate>
- on success, if json was chosen:
- {«validate»:
- {
- «status»:true
- «public_key»:mobile public key
- «private_key»:mobile private key
- }
- {
- }
- {«validate»:
- 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>
- <validate>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«validate»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«validate»:
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_sPublicKey Your public key
POST PARAMETERS
- Parameters
-
p_sOrderID id of the order (format bktXXXXXXX) p_iAmount id of the related service (format bktXXXXXXX)
- Returns
- on success, if xml was chosen:
- <order>
- <status>true</status>
- </order>
- <order>
- on success, if json was chosen:
- {«order»:
- {
- «status»:true,
- }
- {
- }
- {«order»:
- 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>
- <order>
- <?xml version=’1.0′ encoding=’utf-8′?>
- on failure, if json was chosen:
- {«order»:
- {
- «status»:false,
- «id»:error id,
- «message»:error message
- }
- {
- }
- {«order»: