User API guide/uk: Difference between revisions

Created page with "= '''АВТОРИЗАЦІЯ''' = <br><br> Для використання методів Simplybook API необхідна автентифікація. Для авторизації в Simplybook API вам потрібно отримати ключ доступу — access-token. Щоб отримати цей access-token, ви повинні викликати метод JSON-RPC getToken на сервісі https://user-api.simplybook.me/login, передавши..."
Created page with "Інтерфейс програмування додатків Simplybook використовує [https://en.wikipedia.org/wiki/JSON-RPC#Version_2.0 протокол JSON-RPC 2.0]."
Line 114: Line 114:
<br><br>
<br><br>


<div lang="en" dir="ltr" class="mw-content-ltr">
'''Приклад коду для отримання списку послуг'''
'''Code example of getting services list'''
<br><br>
<br><br>
  <nowiki>$services = $client->getEventList();
  <nowiki>$services = $client-&gt;getEventList();
// returns array(array(
// повертає масив(array(
//    'id' => 1, - service id
//    'id' =&gt; 1, - ідентифікатор послуги
//    'name' => 'Service 1', - service's name
//    'name' =&gt; 'Service 1', - назва послуги
//    'description' => 'Describe your service...', - service description
//    'description' =&gt; 'Опишіть свою послугу...', - опис послуги
//    'duration' => 60, - service duration
//    'duration' =&gt; 60, - тривалість послуги
//    'hide_duration' => 0, - Hide duration to clients flag,
//    'hide_duration' =&gt; 0, - прапорець приховування тривалості від клієнтів,
//    'picture' => null, - file name of picture or null
//    'picture' =&gt; null, - ім'я файлу зображення або null
//    'picture_path' => '/uploads/apidemo/event__picture/small/', - full path to picture,
//    'picture_path' =&gt; '/uploads/apidemo/event__picture/small/', - повний шлях до зображення,
//    'position' => 1 - service position
//    'position' =&gt; 1 - позиція послуги
//    'is_active' => 1, - the service is activated
//    'is_active' =&gt; 1, - послуга активована
//    'is_public' => 1, - the service is allowed to book by clients
//    'is_public' =&gt; 1, - послуга доступна для бронювання клієнтами
// ), ...)</nowiki>
// ), ...)</nowiki>
<br><br>
<br><br>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
'''Приклад коду для отримання списку виконавців послуг'''
'''Code example of getting service performers list'''
<br><br>
<br><br>
  <nowiki>$services = $client->getUnitList();
  <nowiki>$services = $client-&gt;getUnitList();
// returns array(array(
// повертає масив (array(
//    'id' => 1, - performer id
//    'id' =&gt; 1, - ідентифікатор виконавця
//    'name' => 'Provider 1', - performer name
//    'name' =&gt; 'Provider 1', - ім'я виконавця
//    'phone' => '111111111', - perfomer phone number
//    'phone' =&gt; '111111111', - номер телефону виконавця
//    'description' => 'Describe your performer...', - performer description
//    'description' =&gt; 'Опишіть свого виконавця...', - опис виконавця
//    'email' => 'test@gmail.com', - perfomer email,
//    'email' =&gt; 'test@gmail.com', - електронна адреса виконавця,
//    'is_active' => 1, - the performer is activated
//    'is_active' =&gt; 1, - виконавець активований
//    'is_visible' => 1, - the perfomer is visible for clients,
//    'is_visible' =&gt; 1, - виконавець видимий для клієнтів,
//    'picture' => null, - file name of picture or null,
//    'picture' =&gt; null, - ім'я файлу зображення або null,
//    'picure_path' => '/uploads/apidemo/unit_group__picture/small/', - full path to picture
//    'picure_path' =&gt; '/uploads/apidemo/unit_group__picture/small/', - повний шлях до зображення
//    'position' => 1, - performer position
//    'position' =&gt; 1, - позиція виконавця
//    'qty' => 1, performer quantity
//    'qty' =&gt; 1, кількість виконавців
// ), ...)</nowiki>
// ), ...)</nowiki>
<br><br>
<br><br>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">