SimplyBook.me
Not logged in
English
Log in
Search
Navigation
Help Center
Getting started
Booking website
Time settings
Prices and purchases
Custom Features
Calendar and bookings
Tips for specific businesses
Integration
For developers
Video tutorials
Tools
Special pages
Printable version
Refresh page
Export translations
Namespaces
Translate
Views
Language statistics
Message group statistics
Export
From SimplyBook.me
Settings
Group
1 is not greater than 2 (when trying to change number of clients per provider)
Accept deposits custom feature
Accept payments custom feature
Add elements to booking page
Adding other users to the system
Adding services, providers and availability(new interface)
Additional Bookings
Additional tips
Adjust your terminology/language
Adjusting client invoices
Adjusting notifications
Anti-Fraud/Spam Protection Custom Feature
Any Employee Selector custom feature
API
API custom feature
Appointment at Fixed Time custom feature
Approve Bookings custom feature
Authentication
Book days
Book Soon Notification System custom feature
Booking reports
Booking site SEO settings
Booking website
Booking Website QR Code
Bookings on Facebook
Break times
Brief overview of the system
Buffer time
Business enhancements
Calendar and Bookings
Calendar Notes
Calendar Sync custom feature
Campaign custom feature
Cancellation Policy custom feature
Catalogue
Categories and Locations
Classes custom feature
ClassPass custom feature
Clean History custom feature
Client Fields Custom Feature
Client Login custom feature
Client mobile app
Client Rescheduling custom feature
Client's report
Company administration service methods
Contact Widget custom feature
Cookie Banners: Essentials and Tips for Removal
Coupons and Gift Cards custom feature
Creating a Private Service/Event with a Direct Link
Custom CSS custom feature
Custom Domain custom feature
Custom Email custom feature
Custom Features
Custom Features by category
Custom Features dependent on other Custom Features
Custom interval before service reservation custom feature
Custom Page custom feature
Daily Report custom feature
Design
Display Remaining Spaces
Duda integration
Email notifications with Zapier
Email whitelisting instructions
Events (services on particular dates)
External Booking Validator custom feature
Facebook and Instagram Bookings
Facebook Client Info custom feature
Facebook Pixel Custom Feature
File Uploader - Google Drive custom feature
First and Last Names
Flexible Notifications custom feature
FreshBooks integration
Getting started
Giving access to the system to other people
Go Daddy
Google AdWords and Analytics custom feature
Google Authenticator custom feature
Google Business custom feature
Google Reviews custom feature
Google Tag Manager custom feature
Google Translate custom feature
Group Bookings custom feature
Help Center
HIPAA custom feature
How to add Google Meet links to appointments
How to cancel booking
How to Cancel SimplyBook.me subscription
How to change the way time slots are shown
How to change the way time slots are shown?
How to connect location with service?
How to delete account
How to enable custom feature
How to get invoice
How to manage bookings
How to remove "Reviews" tab?
How to reschedule booking
How to set my availability
How to unblock account
HTML button
HTML Description Field for Events custom feature
I have clients in different time zones
ICal
Import Clients custom feature
Important for Free accounts
Importing the list of clients
Insights custom feature
Instagram Photo Sharing custom feature
Intake Forms custom feature
Integration
Integration with Mailchimp
Is the system free?
Joomla integration
Kiosk custom feature
Limit Bookings custom feature
Line bot custom feature
LINE LIFF Custom Feature
Link removal and custom domain
Login and password
Loyalty System custom feature
Make me look busy custom feature
MediaWiki:Sidebar
Medical test custom feature
Membership custom feature
Memberships vs Packages: Choosing the Right Custom Feature for Your Business
Multiple Bookings custom feature
Multiple Locations custom feature
My SimplyBook.me subscription and how to renew
My subscription and how to renew
N8N Integration
Need to change interval (timeframe)
News custom feature
Notification is different from the template in Settings//Email and SMS settings
Number of clients per time slot
Online Video Meetings Custom Feature
Online Video Meetings via Zoom
Opening hours of the company vs Working hours of provider/service
Other Integrations
Own domain
Packages custom feature
Password Security Settings custom feature
Photo Gallery custom feature
Point of Sale custom feature
Popular custom features by business category
Products for Sale custom feature
Provider Color Coding custom feature
Quest rooms
QuickBooks integration
Recurring services(packs)
Related Resources custom feature
Remove Elements from booking page
Rentals
SBPay.me
SBPay.me - How to create account
SBPay.me integration
SBPay.me User Roles
Service Add-Ons custom feature
Service Categories custom feature
Service/Provider relations
Shopify
Should I use Classes or Services
SimplyBook.me Subscription Pricing and Additional Items
SITE123 integration
SMS Gateway custom feature
SMS Pricing
SMTP custom feature
SOAP with Encryption custom feature
Socials and Ads
Squarespace
SSL custom feature
SSO-SAML Custom Feature
Statistics & Analytics
Status custom feature
Tags Custom Feature
Take Me Back Home custom feature
Telegram Notifications custom feature
Terms and Conditions custom feature
Ticket's QR Code
Tickets custom feature
Time and date settings
Time settings
Time slots are not bookable
Time slots are not showing up
Tips Custom Feature
Tips for specific businesses
Tips for your business
Upgrade from lower to higher subscription before current subscription expired.
User API guide
Video
Views of the calendar
Visitor Counter custom feature
Waiting List custom feature
Weebly
What Custom Features do not work with each other
What image sizes are recommended for my booking website
What will happen if I don't pay?
Where to change logo and background?
Where to change my info
Where to change theme?
Where to find payment history?
Widgets for your own website
Wix integration
WordPress integration
Xero integration
Zapier Connector custom feature
Zapier integration wit SBPay.me
Language
aa - Afar
aae - Arbëresh
ab - Abkhazian
abs - Ambonese Malay
ace - Acehnese
acf - Saint Lucian Creole
acm - Iraqi Arabic
ady - Adyghe
ady-cyrl - Adyghe (Cyrillic script)
aeb - Tunisian Arabic
aeb-arab - Tunisian Arabic (Arabic script)
aeb-latn - Tunisian Arabic (Latin script)
af - Afrikaans
aln - Gheg Albanian
alt - Southern Altai
am - Amharic
ami - Amis
an - Aragonese
ang - Old English
ann - Obolo
anp - Angika
apc - Levantine Arabic
ar - Arabic
arc - Aramaic
arn - Mapuche
arq - Algerian Arabic
ary - Moroccan Arabic
arz - Egyptian Arabic
as - Assamese
ase - American Sign Language
ast - Asturian
atj - Atikamekw
av - Avaric
avk - Kotava
awa - Awadhi
ay - Aymara
az - Azerbaijani
azb - South Azerbaijani
ba - Bashkir
ban - Balinese
ban-bali - Balinese (Balinese script)
bar - Bavarian
bbc - Batak Toba
bbc-latn - Batak Toba (Latin script)
bcc - Southern Balochi
bci - Baoulé
bcl - Central Bikol
bdr - West Coast Bajau
be - Belarusian
be-tarask - Belarusian (Taraškievica orthography)
bew - Betawi
bg - Bulgarian
bgc - Haryanvi
bgn - Western Balochi
bh - Bhojpuri
bho - Bhojpuri
bi - Bislama
bjn - Banjar
blk - Pa'O
bm - Bambara
bn - Bangla
bo - Tibetan
bpy - Bishnupriya
bqi - Bakhtiari
br - Breton
brh - Brahui
bs - Bosnian
btm - Batak Mandailing
bto - Rinconada Bikol
bug - Buginese
bxr - Russia Buriat
ca - Catalan
cbk-zam - Chavacano
ccp - Chakma
cdo - Mindong
ce - Chechen
ceb - Cebuano
ch - Chamorro
chn - Chinook Jargon
cho - Choctaw
chr - Cherokee
chy - Cheyenne
ckb - Central Kurdish
co - Corsican
cps - Capiznon
cpx - Puxian
cpx-hans - Puxian (Simplified Han script)
cpx-hant - Puxian (Traditional Han script)
cpx-latn - Puxian (Latin script)
cr - Cree
crh - Crimean Tatar
crh-cyrl - Crimean Tatar (Cyrillic script)
crh-latn - Crimean Tatar (Latin script)
crh-ro - Dobrujan Tatar
cs - Czech
csb - Kashubian
cu - Church Slavic
cv - Chuvash
cy - Welsh
da - Danish
dag - Dagbani
de - German
de-at - Austrian German
de-ch - Swiss High German
de-formal - German (formal address)
dga - Southern Dagaare
din - Dinka
diq - Dimli
dsb - Lower Sorbian
dtp - Central Dusun
dty - Doteli
dua - Duala
dv - Divehi
dz - Dzongkha
ee - Ewe
efi - Efik
egl - Emilian
el - Greek
eml - Emiliano-Romagnolo
en - English
en-ca - Canadian English
en-gb - British English
eo - Esperanto
es - Spanish
es-419 - Latin American Spanish
es-formal - Spanish (formal address)
et - Estonian
eu - Basque
ext - Extremaduran
fa - Persian
fat - Fanti
ff - Fula
fi - Finnish
fit - Tornedalen Finnish
fj - Fijian
fo - Faroese
fon - Fon
fr - French
frc - Cajun French
frp - Arpitan
frr - Northern Frisian
fur - Friulian
fy - Western Frisian
ga - Irish
gaa - Ga
gag - Gagauz
gan - Gan
gan-hans - Gan (Simplified Han script)
gan-hant - Gan (Traditional Han script)
gcf - Guadeloupean Creole
gcr - Guianan Creole
gd - Scottish Gaelic
gl - Galician
gld - Nanai
glk - Gilaki
gn - Guarani
gom - Goan Konkani
gom-deva - Goan Konkani (Devanagari script)
gom-latn - Goan Konkani (Latin script)
gor - Gorontalo
got - Gothic
gpe - Ghanaian Pidgin
grc - Ancient Greek
gsw - Alemannic
gu - Gujarati
guc - Wayuu
gur - Frafra
guw - Gun
gv - Manx
ha - Hausa
hak - Hakka Chinese
hak-hans - Hakka (Simplified Han script)
hak-hant - Hakka (Traditional Han script)
hak-latn - Hakka (Latin script)
haw - Hawaiian
he - Hebrew
hi - Hindi
hif - Fiji Hindi
hif-latn - Fiji Hindi (Latin script)
hil - Hiligaynon
hno - Northern Hindko
ho - Hiri Motu
hr - Croatian
hrx - Hunsrik
hsb - Upper Sorbian
hsn - Xiang
ht - Haitian Creole
hu - Hungarian
hu-formal - Hungarian (formal address)
hy - Armenian
hyw - Western Armenian
hz - Herero
ia - Interlingua
iba - Iban
ibb - Ibibio
id - Indonesian
ie - Interlingue
ig - Igbo
igl - Igala
ii - Sichuan Yi
ik - Inupiaq
ike-cans - Eastern Canadian (Aboriginal syllabics)
ike-latn - Eastern Canadian (Latin script)
ilo - Iloko
inh - Ingush
io - Ido
is - Icelandic
isv-cyrl - Interslavic (Cyrillic script)
isv-latn - Interslavic (Latin script)
it - Italian
iu - Inuktitut
ja - Japanese
jam - Jamaican Creole English
jbo - Lojban
jut - Jutish
jv - Javanese
ka - Georgian
kaa - Kara-Kalpak
kab - Kabyle
kai - Karekare
kbd - Kabardian
kbd-cyrl - Kabardian (Cyrillic script)
kbp - Kabiye
kcg - Tyap
kea - Kabuverdianu
kg - Kongo
kge - Komering
khw - Khowar
ki - Kikuyu
kiu - Kirmanjki
kj - Kuanyama
kjh - Khakas
kjp - Eastern Pwo
kk - Kazakh
kk-arab - Kazakh (Arabic script)
kk-cn - Kazakh (China)
kk-cyrl - Kazakh (Cyrillic script)
kk-kz - Kazakh (Kazakhstan)
kk-latn - Kazakh (Latin script)
kk-tr - Kazakh (Turkey)
kl - Kalaallisut
km - Khmer
kn - Kannada
knc - Central Kanuri
ko - Korean
ko-kp - Korean (North Korea)
koi - Komi-Permyak
kr - Kanuri
krc - Karachay-Balkar
kri - Krio
krj - Kinaray-a
krl - Karelian
ks - Kashmiri
ks-arab - Kashmiri (Arabic script)
ks-deva - Kashmiri (Devanagari script)
ksh - Colognian
ksw - S'gaw Karen
ku - Kurdish
ku-arab - Kurdish (Arabic script)
ku-latn - Kurdish (Latin script)
kum - Kumyk
kus - Kusaal
kv - Komi
kw - Cornish
ky - Kyrgyz
la - Latin
lad - Ladino
lb - Luxembourgish
lbe - Lak
lez - Lezghian
lfn - Lingua Franca Nova
lg - Ganda
li - Limburgish
lij - Ligurian
liv - Livonian
lki - Laki
lld - Ladin
lmo - Lombard
ln - Lingala
lo - Lao
loz - Lozi
lrc - Northern Luri
lt - Lithuanian
ltg - Latgalian
lua - Luba-Lulua
lus - Mizo
luz - Southern Luri
lv - Latvian
lzh - Literary Chinese
lzz - Laz
mad - Madurese
mag - Magahi
mai - Maithili
map-bms - Banyumasan
mdf - Moksha
mg - Malagasy
mh - Marshallese
mhr - Eastern Mari
mi - Māori
min - Minangkabau
mk - Macedonian
ml - Malayalam
mn - Mongolian
mnc - Manchu
mnc-latn - Manchu (Latin script)
mnc-mong - Manchu (Mongolian script)
mni - Manipuri
mnw - Mon
mo - Moldovan
mos - Mossi
mr - Marathi
mrh - Mara
mrj - Western Mari
ms - Malay
ms-arab - Malay (Jawi script)
mt - Maltese
mui - Musi
mus - Muscogee
mwl - Mirandese
my - Burmese
myv - Erzya
mzn - Mazanderani
na - Nauru
nah - Nahuatl
nan - Minnan
nan-hant - Minnan (Traditional Han script)
nan-latn-pehoeji - Minnan (Pe̍h-ōe-jī)
nan-latn-tailo - Minnan (Tâi-lô)
nap - Neapolitan
nb - Norwegian Bokmål
nds - Low German
nds-nl - Low Saxon
ne - Nepali
new - Newari
ng - Ndonga
nia - Nias
nit - Southeastern Kolami
niu - Niuean
nl - Dutch
nl-informal - Dutch (informal address)
nmz - Nawdm
nn - Norwegian Nynorsk
no - Norwegian
nod - Northern Thai
nog - Nogai
nov - Novial
nqo - N’Ko
nr - South Ndebele
nrm - Norman
nso - Northern Sotho
nup - Nupe
nv - Navajo
ny - Nyanja
nyn - Nyankole
nyo - Nyoro
nys - Nyungar
oc - Occitan
ojb - Northwestern Ojibwa
olo - Livvi-Karelian
om - Oromo
or - Odia
os - Ossetic
pa - Punjabi
pag - Pangasinan
pam - Pampanga
pap - Papiamento
pcd - Picard
pcm - Nigerian Pidgin
pdc - Pennsylvania German
pdt - Plautdietsch
pfl - Palatine German
pi - Pali
pih - Pitcairn-Norfolk
pl - Polish
pms - Piedmontese
pnb - Western Punjabi
pnt - Pontic
prg - Prussian
ps - Pashto
pt - Portuguese
pt-br - Brazilian Portuguese
pwn - Paiwan
qqq - Message documentation
qu - Quechua
qug - Chimborazo Highland Quichua
rgn - Romagnol
rif - Riffian
rki - Arakanese
rm - Romansh
rmc - Carpathian Romani
rmy - Vlax Romani
rn - Rundi
ro - Romanian
roa-tara - Tarantino
rsk - Pannonian Rusyn
ru - Russian
rue - Rusyn
rup - Aromanian
ruq - Megleno-Romanian
ruq-cyrl - Megleno-Romanian (Cyrillic script)
ruq-latn - Megleno-Romanian (Latin script)
rut - Rutul
rw - Kinyarwanda
ryu - Okinawan
sa - Sanskrit
sah - Yakut
sat - Santali
sc - Sardinian
scn - Sicilian
sco - Scots
sd - Sindhi
sdc - Sassarese Sardinian
sdh - Southern Kurdish
se - Northern Sami
se-fi - Northern Sami (Finland)
se-no - Northern Sami (Norway)
se-se - Northern Sami (Sweden)
sei - Seri
ses - Koyraboro Senni
sg - Sango
sgs - Samogitian
sh - Serbo-Croatian
sh-cyrl - Serbo-Croatian (Cyrillic script)
sh-latn - Serbo-Croatian (Latin script)
shi - Tachelhit
shi-latn - Tachelhit (Latin script)
shi-tfng - Tachelhit (Tifinagh script)
shn - Shan
shy - Shawiya
shy-latn - Shawiya (Latin script)
si - Sinhala
simple - Simple English
sjd - Kildin Sami
sje - Pite Sami
sk - Slovak
skr - Saraiki
skr-arab - Saraiki (Arabic script)
sl - Slovenian
sli - Lower Silesian
sm - Samoan
sma - Southern Sami
smn - Inari Sami
sms - Skolt Sami
sn - Shona
so - Somali
sq - Albanian
sr - Serbian
sr-ec - Serbian (Cyrillic script)
sr-el - Serbian (Latin script)
srn - Sranan Tongo
sro - Campidanese Sardinian
ss - Swati
st - Southern Sotho
stq - Saterland Frisian
sty - Siberian Tatar
su - Sundanese
sv - Swedish
sw - Swahili
syl - Sylheti
szl - Silesian
szy - Sakizaya
ta - Tamil
tay - Atayal
tcy - Tulu
tdd - Tai Nuea
te - Telugu
tet - Tetum
tg - Tajik
tg-cyrl - Tajik (Cyrillic script)
tg-latn - Tajik (Latin script)
th - Thai
ti - Tigrinya
tig - Tigre
tk - Turkmen
tl - Tagalog
tly - Talysh
tly-cyrl - Talysh (Cyrillic script)
tn - Tswana
to - Tongan
tok - Toki Pona
tpi - Tok Pisin
tr - Turkish
tru - Turoyo
trv - Taroko
ts - Tsonga
tt - Tatar
tt-cyrl - Tatar (Cyrillic script)
tt-latn - Tatar (Latin script)
ttj - Tooro
tum - Tumbuka
tw - Twi
ty - Tahitian
tyv - Tuvinian
tzm - Central Atlas Tamazight
udm - Udmurt
ug - Uyghur
ug-arab - Uyghur (Arabic script)
ug-latn - Uyghur (Latin script)
uk - Ukrainian
ur - Urdu
uz - Uzbek
uz-cyrl - Uzbek (Cyrillic script)
uz-latn - Uzbek (Latin script)
ve - Venda
vec - Venetian
vep - Veps
vi - Vietnamese
vls - West Flemish
vmf - Main-Franconian
vmw - Makhuwa
vo - Volapük
vot - Votic
vro - Võro
wa - Walloon
wal - Wolaytta
war - Waray
wls - Wallisian
wo - Wolof
wuu - Wu
wuu-hans - Wu (Simplified Han script)
wuu-hant - Wu (Traditional Han script)
xal - Kalmyk
xh - Xhosa
xmf - Mingrelian
xsy - Saisiyat
yi - Yiddish
yo - Yoruba
yrl - Nheengatu
yue - Cantonese
yue-hans - Cantonese (Simplified Han script)
yue-hant - Cantonese (Traditional Han script)
za - Zhuang
zea - Zeelandic
zgh - Standard Moroccan Tamazight
zgh-latn - Standard Moroccan Tamazight (Latin script)
zh - Chinese
zh-cn - Chinese (China)
zh-hans - Simplified Chinese
zh-hant - Traditional Chinese
zh-hk - Chinese (Hong Kong)
zh-mo - Chinese (Macau)
zh-my - Chinese (Malaysia)
zh-sg - Chinese (Singapore)
zh-tw - Chinese (Taiwan)
zu - Zulu
Format
Export for off-line translation
Export in native format
Export in CSV format
Fetch
<languages/> <div lang="en" dir="ltr" class="mw-content-ltr"> {{#seo: |title=User API guide - SimplyBook.me |description=Use the SimplyBook.me User API to create advanced integrations. Follow our guide for seamless implementation. Learn more here! |titlemode=append |keywords=faq, frequently asked questions, booking software, appointment system questions, appointments online, calendar software, booking system, booking calendar, scheduling software, online appointment scheduling, online scheduling, plugins, custom features, custom booking page link, domain name, custom domain name, custom url }} </div> <br><br> <div lang="en" dir="ltr" class="mw-content-ltr"> Use our developer API to create your own booking interface. You can design any solution you want varying from the simplest widget to multifunctional application with functionality customized according to your business specific. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Simplybook Application Programming Interface uses [https://en.wikipedia.org/wiki/JSON-RPC#Version_2.0 JSON-RPC 2.0 protocol]. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> See [https://simplybook.me/api_example/index.html an example of API-based booking interface], and also read [https://simplybook.me/api_example/scheduler.js the source code] of this solution. <br><br><br> </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ='''AUTHORIZATION'''= <br><br> Using Simplybook API methods require an authentication. To authorize in Simplybook API you need to get an access key — access-token. In order to get this access-token you should call the JSON-RPC method getToken on https://user-api.simplybook.me/login service passing your personal API-key. You can copy your API-key at admin interface: go to the 'Custom Features' link and select API Custom Feature 'Settings'. Then you have to init remote access to Simplybook API. Your request should contain the following headers: 'X-Company-Login', 'X-Token'. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Getting the access-token can be implemented either from client side or from your server which is the more secure solution. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> You may use [https://simplybook.me/api_example/json-rpc-client.js javascript JSON-RPC-client library] and [https://simplybook.me/api_example/JsonRpcClient.zip php JSON-RPC-client library] from our examples for your own solution development. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Please note access-token has one hour one time. This is done for security reasons. You will need to regenerate it at least once per hour. <br><br><br> </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ='''CLIENT API([https://simplybook.me/api/doc#/admin COMPANY PUBLIC SERVICE])AUTHORIZATION'''= <br><br> =='''Authorization from client side code'''== <br><br> '''Getting the token-key'''. <br><br> <nowiki>var loginClient = new JSONRpcClient({ 'url': 'https://user-api.simplybook.me' + '/login', 'onerror': function (error) {}, }); var token = loginClient.getToken(YOUR_COMPANY_LOGIN, YOUR_API_KEY);</nowiki> <br><br> '''Initialization JSON-RPC-client.''' <br><br> <nowiki>this.client = new JSONRpcClient({ 'url': 'https://user-api.simplybook.me', 'headers': { 'X-Company-Login': YOUR_COMPANY_LOGIN, 'X-Token': token }, 'onerror': function (error) {} });</nowiki> <br><br> =='''Authorization from server side code'''== <br><br> '''Getting the token-key.'''<br><br> <nowiki>$loginClient = new JsonRpcClient('https://user-api.simplybook.me' . '/login/'); $token = $loginClient->getToken(YOUR_COMPANY_LOGIN, YOUR_API_KEY);</nowiki> <br><br> '''Initialization JSON-RPC-client.''' <br><br> <nowiki>$client = new JsonRpcClient('https://user-api.simplybook.me' . '/', array( 'headers' => array( 'X-Company-Login: ' . YOUR_COMPANY_LOGIN, 'X-Token: ' . $token ) ));</nowiki> <br><br><br> </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ='''USER/ADMIN API ([https://simplybook.me/api/doc#/admin COMPANY ADMINISTRATION SERVICE]) AUTHORIZATION'''= <br><br> =='''Authorization from client side code'''== <br><br> '''Getting the token-key.''' <br><br> <nowiki>var loginClient = new JSONRpcClient({ 'url': 'https://user-api.simplybook.me' + '/login', 'onerror': function (error) {}, }); var token = loginClient.getUserToken(YOUR_COMPANY_LOGIN, YOUR_USER_LOGIN, YOUR_USER_PASSWORD);</nowiki> <br><br> </div> <div lang="en" dir="ltr" class="mw-content-ltr"> '''Initialization JSON-RPC-client'''. <br><br> <nowiki>this.client = new JSONRpcClient({ 'url': 'https://user-api.simplybook.me' + '/admin/', 'headers': { 'X-Company-Login': YOUR_COMPANY_LOGIN, 'X-User-Token': token }, 'onerror': function (error) {} });</nowiki> <br><br> </div> <div lang="en" dir="ltr" class="mw-content-ltr"> =='''Authorization from server side code'''== <br><br> '''Getting the token-key.''' <br><br> <nowiki>$loginClient = new JsonRpcClient('https://user-api.simplybook.me' . '/login/'); $token = $loginClient->getUserToken(YOUR_COMPANY_LOGIN, YOUR_USER_LOGIN, YOUR_USER_PASSWORD);</nowiki> <br><br> '''Initialization JSON-RPC-client.''' <br><br> <nowiki>$client = new JsonRpcClient('https://user-api.simplybook.me' . '/admin/', array( 'headers' => array( 'X-Company-Login: ' . YOUR_COMPANY_LOGIN, 'X-User-Token: ' . $token ) ));</nowiki> <br><br><br> </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ='''GETTING DATA FROM SIMPLYBOOK SERVER'''= <br><br> A booking page usually is a page where clients choose service they need, an employee and a time of their meeting. Then a client enters some contact info and confirms the booking. The more complex solutions may include filling different intake forms, making some group or multi-times booking and so on. Lets describe the workflow of creation the simpliest booking page. Then if you need to add some extra functionality to your page, see here the full list of [https://simplybook.me/api/doc Simplybook API methods]. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> So the first thing you should display is the list of services and the list of employes. Get this data by getEventList and getUnitList methods. They both return a list with complete information about each item in it, so you have many possibilities how to display services and employees at your page. To make employee filtration use unit_map property of the service list, it contains the info about employees who can provide the selected service. <br><br> </div> <div lang="en" dir="ltr" class="mw-content-ltr"> '''Code example of getting services list''' <br><br> <nowiki>$services = $client->getEventList(); // returns array(array( // 'id' => 1, - service id // 'name' => 'Service 1', - service's name // 'description' => 'Describe your service...', - service description // 'duration' => 60, - service duration // 'hide_duration' => 0, - Hide duration to clients flag, // 'picture' => null, - file name of picture or null // 'picture_path' => '/uploads/apidemo/event__picture/small/', - full path to picture, // 'position' => 1 - service position // 'is_active' => 1, - the service is activated // 'is_public' => 1, - the service is allowed to book by clients // ), ...)</nowiki> <br><br> </div> <div lang="en" dir="ltr" class="mw-content-ltr"> '''Code example of getting service performers list''' <br><br> <nowiki>$services = $client->getUnitList(); // returns array(array( // 'id' => 1, - performer id // 'name' => 'Provider 1', - performer name // 'phone' => '111111111', - perfomer phone number // 'description' => 'Describe your performer...', - performer description // 'email' => 'test@gmail.com', - perfomer email, // 'is_active' => 1, - the performer is activated // 'is_visible' => 1, - the perfomer is visible for clients, // 'picture' => null, - file name of picture or null, // 'picure_path' => '/uploads/apidemo/unit_group__picture/small/', - full path to picture // 'position' => 1, - performer position // 'qty' => 1, performer quantity // ), ...)</nowiki> <br><br> </div> <div lang="en" dir="ltr" class="mw-content-ltr"> The next step to a client is to pick a date and time of his service. We've used a Bootstrap date-picker in API-usage example, you can also use this or any other calendar. To set your calendar first date use getFirstWorkingDay method. It can take employee id as a parameter and returns the next date when the selected employee (or any employee in the company by default) is avaiable for booking. To show time slots inside a selected date you need getWorkCalendar and getStartTimeMatrix methods. The first method give you an information about working day start and end time, and about day-offs. And the second one returns the list of time-slots which can be booked for a certain date. <br><br> '''Code example of getting work days info''' <br><br> </div> <div lang="en" dir="ltr" class="mw-content-ltr"> <nowiki>$year = 2015; $month = 3; // March $performerId = 1; // Can be null $workDaysInfo = $client->getWorkCalendar($year, $month, $performerId); // returns array( // '2015-03-01' => array('from' => '09:00:00', 'to' => '18:00:00', 'is_day_off' => 0), // '2015-03-02' => array('from' => '09:00:00', 'to' => '18:00:00', 'is_day_off' => 0), // ... //);</nowiki> <br><br> '''Code example of getting start time matrix''' <br><br> <nowiki>$dateFrom = '2015-03-03'; $dateTo = '2015-03-04'; $serviceId = 1; $performerId = 1; $qty = 1; $availableTime = $client->getStartTimeMatrix($dateFrom, $dateTo, $serviceId, $performerId, $qty); // returns array( // '2015-03-03' => array('09:00:00', '09:30:00', '10:00:00', ....), // '2015-03-04' => array('09:00:00', '09:30:00', '10:00:00', ....), //);</nowiki> <br><br> </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Another usefull method you may need is calculateEndTime. Each service can have its own duration, also your company's employees possible have different work schedule form day to day. So using this method you can show to a client an end date and time of the service he've booked in a correct way. <br><br> '''Code example of calculating booking end time''' <br><br> <nowiki>$startDateTime = '2015-03-03 09:00:00'; $serviceId = 1; $performerId = 1; $availableTime = $client->calculateEndTime($startDateTime, $serviceId, $performerId); // returns '2015-03-03 10:00:00' </nowiki> <br><br> </div> <div lang="en" dir="ltr" class="mw-content-ltr"> When a client clicks confirm booking button you have to call book method. This is the main function which performs all necessary validations and registers a new booking in Simplybook system. It takes information about booking, client data like name and phone and some additional params. See all params descriptions of this method in [https://simplybook.me/api/doc API functions list]. The book method responce contains an uniqe code and other details of the new booking or the list of errors if some problems occured, so you can use this information to show booking result to a client in convinient and intuitive way. <br><br><br> </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ='''USING OF API SECRET KEY'''= <br><br> In some cases the book method may require the confirmation, e.g. if your accept payments from clients you confirm booking only after the payment is already came. The Simplybook API confirmBookng method takes booking-id and secure signature as params (another method which requires secure signature is cancelBookng). For the secure signature generation your secret API-key should be used. See how it can be done in the example below. You can find the secret key at admin interface under 'Settings' link of API Custom Feature in 'Custom Features' list. <br><br> </div> <div lang="en" dir="ltr" class="mw-content-ltr"> '''Code example of service booking and its confirmation using secret API key''' <br><br> <nowiki>$additionalFields = array( '6740d3bce747107ddb9a789cbb78abf3' => 'value1', 'b0657bafaec7a2c9800b923f959f8163' => 'value2' ); $clientData = array( 'name' => 'Client name', 'email' => 'client@email.com', 'phone' => '+13152108338' ); $bookingsInfo = $client->book($eventId, $unitId, $date, $time, $clientData, $additionalFields); </div> <div lang="en" dir="ltr" class="mw-content-ltr"> if ($bookingsInfo->require_confirm) { foreach ($bookingsInfo->bookings as $booking) { $sign = md5($booking->id . $booking->hash . YOUR_API_SECRET_KEY); $result = $client->confirmBooking($booking->id, $sign); echo ' Confirm result '; var_dump($result); } }</nowiki> <br><br> </div> <div lang="en" dir="ltr" class="mw-content-ltr"> '''Code example of getting intake forms''' <br><br> <nowiki>$fields = $client->getAdditionalFields($eventId); // returns - array(array( // 'name' => 'b0657bafaec7a2c9800b923f959f8163', - field name // 'title' => 'Test digits', - field title // 'type' => 'digits', - field type // 'values' => null, - available values for select field type // 'default' => null, - default value for field // 'is_null' => null, - is filed nullable // 'on_main_page' => 1, // 'pos' => 1, - field position // 'value' => null // )), ...)</nowiki> <br><br><br> </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ='''SIMPLYBOOK CUSTOM FEATURES'''= <br><br> If your company specific requires some additional functionality you can activate some of our additional Custom Features. The complete Custom Features list with detailed description is avaiable in your admin interface under the 'Custom Feature' link. After the necessary Custom Feature is enabled the corresponding API methods will be activated so you can use them in your code. <br><br><br> ='''BOOKING FUNCTIONALITY CODEFLOW'''= <br><br> Authorize in Simplybook API using '''loginClient.getToken(companyLogin, apiKey);''' function. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Check if Service categories Custom Feature is activated by [https://simplybook.me/en/api/doc#isPluginActivated isPluginActivated("event_category")] if yes then display list of categories [https://simplybook.me/en/api/doc#getCategoriesList getCategoriesList()]. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Get list of services (events) and performers (units) using [https://simplybook.me/en/api/doc#getEventList getEventList()] and [https://simplybook.me/en/api/doc#getUnitList getUnitList()] functions. If "unit_map" array is available for service it means this service can be provided by given performers only. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> If Any Employee Selector Custom Feature is activated [https://simplybook.me/en/api/doc#isPluginActivated isPluginActivated("any_unit")] and no special duration is set for service-performer pair in "unit_map" array then user should be allowed to select Any provider option or choose provider manually. But manual selection of performers should not be possible if [https://simplybook.me/en/api/doc#getCompanyParam getCompanyParam("any_unit__hide_other_units")] is enabled. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Use [https://simplybook.me/en/api/doc#getStartTimeMatrix getStartTimeMatrix ($from as current date, $to as current date, $eventId, $unitId, $count as selected participants value )] to get available timeslots for given date. '''$unitId''' should be null if Any employee option is selected. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> If Any Employee selector is active and Any employee was selected call [https://simplybook.me/en/api/doc#getAvailableUnits getAvailableUnits($eventId, $dateTime, $count)] to get available $unitId </div> <div lang="en" dir="ltr" class="mw-content-ltr"> If Intake Forms Custom Feature is activated [https://simplybook.me/en/api/doc#isPluginActivated isPluginActivated("event_field")] call [https://simplybook.me/en/api/doc#getAdditionalFields getAdditionalFields($eventId)] function to get list of fields for client to fill. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Call [https://simplybook.me/en/api/doc#book book($eventId, $unitId, $date, $time, $clientData, $additional, $count, $batchId)] to make a booking. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> <br><br> </div>