API документация

Get api token

Using Simplybook API methods require an authentification. 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 http://user-api.simplybook.me/login service passing your personal API-key. You can copy your API-key at admin interface: go to the 'Plugins' link and select API plugin 'Settings'.

var token = loginClient.getToken(companyLogin, apiKey);

var loginClient = new JSONRpcClient({
	'url': 'https://user-api.simplybook.me/login',
	'onerror': function (error) {
		alert(error);
	}
});
var token = loginClient.getToken('{companyLogin}', '{apiKey}');
Результат
Тело ответа
Запрос HTTP

Используйте наш API интерфейс для создания Вашего собственного приложения бронирования. С его помощью Вы можете реализовать любое решение от простейшего виджета до сложной многофункциональной системы, отвечающей специфике Вашей компании

Интерфейс программирования приложений (API) SimplyBook.me использует протокол JSON-RPC 2.0.

Ознакомтесь с примером интерфейса бронирования на основе API и прочитайте исходный код этого решения.

Авторизация

Использование методов SimplyBook.me API требует аутентификации. Чтобы авторизоваться в SimplyBook.me API, Вам необходимо получить ключ доступа — access-token. Для того, чтобы получить access-token, Вам необходимо вызвать метод JSON-RPC getToken в сервисе https://user-api.simplybook.me/login, передав Ваш личный API-ключ. Вы можете скопировать Ваш API-ключ в интерфейсе администратора: перейдите в раздел 'Дополнения' и выберите 'Настройки' дополнения API. Затем Вам нужно установить удалённый доступ к SimplyBook.me API. Ваш запрос должен содержать следующие заголовки: 'X-Company-Login', 'X-Token'.

Получение access-token может проводиться как на стороне клиента, так и с Вашего сервера, что является более безопасным решением.

Используйте библиотеку javascript JSON-RPC-client и библиотеку php JSON-RPC-client из наших примеров, чтобы разработать собственное решение.


Авторизация в Client API (Company public service)

Код процедуры авторизации с клиентской стороны

Получение токена


    var loginClient = new JSONRpcClient({
        'url': 'https://user-api.simplybook.me' + '/login',
        'onerror': function (error) {},
    });
    var token = loginClient.getToken( YOUR_COMPANY_LOGIN, YOUR_API_KEY);
    

Инициализация JSON-RPC-клиента


    this.client = new JSONRpcClient({
        'url': 'https://user-api.simplybook.me',
        'headers': {
            'X-Company-Login': YOUR_COMPANY_LOGIN,
            'X-Token': token
        },
        'onerror': function (error) {}
    });
    

Код авторизации на стороне сервера

Получение токена


    $loginClient = new JsonRpcClient('https://user-api.simplybook.me' . '/login/');
    $token = $loginClient->getToken(YOUR_COMPANY_LOGIN, YOUR_API_KEY);
    

Инициализация JSON-RPC-клиента


    $client = new JsonRpcClient( 'https://user-api.simplybook.me' . '/', array(
        'headers' => array(
            'X-Company-Login: ' .  YOUR_COMPANY_LOGIN,
            'X-Token: ' . $token
        )
    ));
    

Авторизация в User/Admin API (Company administration service)

Код процедуры авторизации с клиентской стороны

Получение токена


    var loginClient = new JSONRpcClient({
        'url': {$api_url} + '/login',
        'onerror': function (error) {},
    });
    var token = loginClient.getUserToken( YOUR_COMPANY_LOGIN,  YOUR_USER_LOGIN,  YOUR_USER_PASSWORD);
    

Инициализация JSON-RPC-клиента


    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) {}
    });
    

Код авторизации на стороне сервера

Получение токена


    $loginClient = new JsonRpcClient('https://user-api.simplybook.me' . '/login/');
    $token = $loginClient->getUserToken({YOUR_COMPANY_LOGIN, YOUR_USER_LOGIN, YOUR_USER_PASSWORD);
    

Инициализация JSON-RPC-клиента


    $client = new JsonRpcClient('https://user-api.simplybook.me' . '/admin/', array(
        'headers' => array(
            'X-Company-Login: ' . YOUR_COMPANY_LOGIN,
            'X-User-Token: ' . $token
        )
    ));
    

Получение данных с сервера SimplyBook.me

Страница бронирования обычно предлагает клиентам выбор необходимого сервиса, сотрудника, а также дату и время встречи. Затем клиент вводит контактную информацию и подтверждает бронь. Более сложные решения могут включать заполнение дополнительных полей, бронирование для группы или бронирование нескольких сервисов и т.д. Ниже описан процесс создания простейшей страницы бронирования. Поэтому, если Вам необходимо добавить дополнительные функции на Вашу страницу, Вы можете посмотреть полный перечень методов SimplyBook.me API здесь.

Первым делом Вам нужно показать список сервисов и список сотрудников. Эти данные Вы можете получить с помощью методов getEventList и getUnitList. Оба метода возвращают список с полной информацией о каждом элементе в нём, так что Вы можете выбирать, как представить сервисы и сотрудников на Вашей странице. Чтобы выбрать некоторых сотрудников, используйте свойство unit_map Вашего списка сервисов, т.к. оно содержит информацию о сотрудниках, которые могут выполнять выбранный сервис.

Пример кода для получения списка сервисов


    $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
    // ), ...)
    

Пример кода для получения списка сотрудников


    $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
    // ), ...)
    

Следующий шаг клиента - выбор даты и времени сервиса. В примере использования API мы применили выбор дат Bootstrap, Вы можете также работать с ним или выбрать любой другой календарь. Чтобы задать первый день календаря, используйте метод getFirstWorkingDay. Он может получать в качестве параметра id сострудника и возвращать следующую дату, когда выбранный сотрудник (или любой сотрудник компании по умолчанию) доступен для бронирования сервисов с ним.{""|t} Чтобы показать слоты времени для выбранной даты, Вам нужны методы getWorkCalendar и getStartTimeMatrix. Первый метод возвращает информацию о начале и конце рабочего дня, и о выходных днях. Второй метод возвращает список слотов времены, доступных для бронирования в выбранную дату.

Пример кода для получения информации о рабочих днях


    $year = 2020;
    $month = 3; // March
    $performerId = 1; // Can be null
    $workDaysInfo = $client->getWorkCalendar($year, $month, $performerId);
    // returns array(
    //     '2020-03-01' => array('from' => '09:00:00', 'to' => '18:00:00', 'is_day_off' => 0),
    //     '2020-03-02' => array('from' => '09:00:00', 'to' => '18:00:00', 'is_day_off' => 0),
    //     ...
    //);
    

Пример кода для получения матрицы доступных слотов


    $dateFrom = '2020-03-03';
    $dateTo = '2020-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', ....),
    //);
    

Еще один полезный метод, который может Вам пригодиться, - это calculateEndTime. Поскольку каждый сервис может иметь свою длительность и расписание сотрудников компании может отличаться в разные дни, с использованием этого метода Вы можете показать клиенту правильные дату и время окончания забронированного им сервиса.

Пример кода для расчета времени окончания события


    $startDateTime = '2020-03-03 09:00:00';
    $serviceId = 1;
    $performerId = 1;
    $availableTime = $client->calculateEndTime($startDateTime, $serviceId, $performerId);
    // returns '2020-03-03 10:00:00'
    

Когда клиент нажимает кнопку подтверждения брони, Вы должны вызвать метод book. Это основная функция, которая выполняет все необходимые проверки и регистрирует новое событие в системе SimplyBook.me. Она получает информацию о бронировании, данных клиента, таких как имя и телефон, а также в неё передаются некоторые дополнительные праметры. Вы можете посмотреть описания всех параметров этой функции в списке функций API. Метод book возвращает уникальный код и другие детали нового забронированного события или список ошибок, если возникли проблемы в процессе бронирования, поэтому Вы можете показать клиенту результат в удобной и интуитивно-понятной форме.


Использование секретного ключа API

В некоторых случаях метод book может потребовать подтверждение, например, если Вы принимаете платежи от клиентов, событие может быть забронировано только после поступления платежа. Метод SimplyBook.me API confirmBookng получает id бронирования и секретную подпись в качестве параметров (еще один метод, требующий подписи - это cancelBookng). Для генерации подписи используйте Ваш секретный API-ключ. В примере ниже показано, как это сделать. Вы можете взять секретный ключ в интерфейсе администратора в разделе 'Настройки' дополнения API в секции 'Дополнения'.

Пример кода для бронирования сервиса и подтверждения брони с использованием секретного ключа API


    $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);

    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 '<br>Confirm result</b><br />';
           var_dump($result);
        }
    }
    

Пример кода для получения дополнительных полей


    $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
    // )), ...)
    

Дополнения системы SimplyBook.me

Если для работы Вашей компании требуются специальные функции, Вы можете активировать наши дополнения. Полный перечень дополнений с их детальным описанием доступен в Вашем интерфейсе администратора в разделе 'Дополнения'. После того как необходимые дополнения активированы, соответствующие методы API станут доступны и Вы сможете использовать их в Вашем коде.

Порядок вызова функций бронирования

Авторизация в SimplyBook.me API с помощью функции loginClient.getToken(companyLogin, apiKey);


Проверка, активировано ли дополнение 'Категории сервисов', с помощью метода isPluginActivated('event_category'). Если да, то отобразить список категорий методом getCategoriesList().


Получить перечень сервисов (events) и сотрудников (units) с помощью методов getEventList() и getUnitList(). Если массив 'unit_map' доступен для сервиса, это означает, что сервис может выполняться только данными исполнителями.


Если активировано дополнение 'Любой сотрудник' isPluginActivated('any_unit') и не задано специальной длительности для пары сервис-сотрудник в массиве 'unit_map', тогда пользователь может выбрать исполнителя Любой сотрудник или выбрать исполнителя самостоятельно. Но выбор исполнителя пользователем должен быть невозможен, если активирован getCompanyParam('any_unit__hide_other_units').


Получить доступные слоты времени с помощью метода getStartTimeMatrix ($from as current date, $to as current date, $eventId, $unitId, $count as selected participants value )$unitId для заданной даты. $unitId должно быть null если выбрана опция Любой сотрудник.


Если дополнение 'Любой сотрудник' активировано и выбран исполнитель Любой сотрудник, вызвать метод getAvailableUnits($eventId, $dateTime, $count), чтобы получить $unitId доступного сотрудника.


Если активировано дополнение 'Дополнительные поля' (метод isPluginActivated('event_field')), вызвать функцию getAdditionalFields($eventId) чтобы получить перечень полей, которые должен заполнить клиент.


Вызов метода book($eventId, $unitId, $date, $time, $clientData, $additional, $count, $batchId), чтобы создать бронирование.


URL сервиса  https://user-api.simplybook.me/login

  • getServiceUrl ($companyLogin)

    Returns API url for given company login

    • @param String $companyLogin
    • @return String
  • getToken ($companyLogin, $apiKey)

    Returns an application's token string for a company. You should use this token to authenticate all calls of
    [[Company public service methods|Company public service API methods]] and [[Catalogue|Catalogue API methods]]. To

    get application API key you need to enable [[Plugins#API|API plugin]].

    • @param String $companyLogin
    • @param String $apiKey
    • @return String
  • getUserToken ($companyLogin, $userLogin, $userPassword)

    Returns an authentication token string for certain user registered for company. You should use this token to
    authenticate all calls of [[Company administration service methods|Company administration service API methods]] and

    [[Catalogue|Catalogue API methods]].

    • @param String $companyLogin a company identifier (login)
    • @param String $userLogin user's login associated with company
    • @param String $userPassword user's password
    • @return String
  • getApplicationToken ($applicationApiKey)

    Returns an application's token string for an application. You should use this token to authenticate all calls of
    [[Company public service methods|Company public service API methods]] and [[Catalogue|Catalogue API methods]]. To

    get application API key please contact SimplyBook.me support team.

    • @param String $applicationApiKey
    • @return String

URL сервиса  https://user-api.simplybook.me/

  • getUnitList ($isVisibleOnly, $asArray, $handleClasses, $searchString)

    {@inheritdoc}

    • @param bool $isVisibleOnly
    • @param bool $asArray
    • @param integer $handleClasses
    • @param string $searchString part of name (used for comboboxes)
    • @return Array
  • getEventList ($isVisibleOnly, $asArray, $handleClasses, $searchString)

    {@inheritdoc}

    • @param bool $isVisibleOnly
    • @param bool $asArray
    • @param integer $handleClasses (1 - classes only, -1 without classes, null - skip classes check)
    • @param string $searchString part of name (used for comboboxes)
    • @return Array
  • getCategoriesList ($isPublic)

    {@inheritdoc}

    • @param bool $isPublic
    • @return Array
  • getLocationsList ($isPublic)

    {@inheritdoc}

    • @param Boolean $isPublic
    • @return Array
  • getPaymentProcessorConfig ($paymentProcessor)

    Returns payment processor config

    • @param String $paymentProcessor
    • @return Array
  • validatePayment ($paymentInfo, $cartId)

    Validate application payment.

    • @param mixed $paymentInfo
    • @param Integer $cartId
    • @return Boolean
  • getBookingCart ($bookingIds)

    Returns cart information by bookings ids.
    cart_id and cart_hash is used to create secure signature to confirm cart payment.

    status - current cart status
    amount - is total amount to payment
    currency - cart currency
    cart - contains cart items. You can use them to provide information for payment system. Each item is object with following fields:
    id - booking id
    event_id - service id
    name - event name + start date time (use it to provide cart information for payment system)
    price - booking price
    qty - qty of bookings

    • @param Array $bookingIds
    • @return Object
  • getBookingCartInfo ($cartId, $sign)

    Returns current cart information
    cart_id and cart_hash is used to create secure signature to confirm cart payment.

    amount - is total amount to payment
    currency - cart currency
    cart - contains cart items. You can use them to provide information for payment system. Each item is object with following fields:
    id - booking id
    event_id - service id
    name - event name + start date time (use it to provide cart information for payment system)
    price - booking price
    qty - qty of bookings

    • @param Integer $cartId cart id
    • @param String $sign signature. (md5($cartId . $cartHash . $secretKey))
    • @return Object
  • getBookingCartStatus ($id)

    Returns current cart status
    Possible result values:

    cancel - user has canceled payment
    paid - user has paid
    error - error has been occurred on validation payment
    not_paid - cart is not paid yet or payment status is pending

    • @param Integer $id
    • @return String
  • confirmBookingCart ($cartId, $paymentProcessor, $sign)

    Confirm booking cart. Use it to confirm payment. Signature is required.

    • @param Integer $cartId cart id
    • @param String $paymentProcessor payment processor name
    • @param String $sign signature. (md5($cartId . $cartHash . $secretKey))
    • @return Boolean
  • confirmBooking ($id, $sign)

    Confirm booking. Signature is required.
    $sign = md5($bookingId . $bookingHash . $secretKey);

    Call this method from server side only

    • @param Integer $id
    • @param String $sign
    • @return Boolean
  • confirmBookingPayment ($id, $paymentProcessor, $sign)

    Confirm booking payment. Signature is required.
    $sign = md5($bookingId . $bookingHash . $secretKey);

    Call this method from server side only

    • @param Integer $id
    • @param String $paymentProcessor
    • @param String $sign
    • @return Boolean
  • confirmBookingBatch ($batchId, $batchType, $sign)

    Confirms booking batch. Signature is required.
    $sign = md5($batchId . $batchHash . $secret)

    Call this method from server side only

    • @param Integer $batchId
    • @param String $batchType
    • @param String $sign
    • @return Boolean
  • getBooking ($id, $sign)

    Returns an object with details information about booking. $sign parameter must be a string created
    with formula: md5($bookingId . $bookingHash . $secretKey). You can get $bookingHash

    value as result of [[#book|book]] API method call. Method return an error with code -32080
    (Appointment couldn't be found) if record with specified id not exists. Methods returns an error with code -32085
    (Signature error) if $sign parameter is wrong.

    • @param Integer $id
    • @param String $sign
    • @return Object
  • getBookingDetails ($id, $sign)

    Returns an object with details information about booking. $sign parameter must be a string created
    with formula: md5($bookingId . $bookingHash . $secretKey). You can get $bookingHash

    value as result of [[#book|book]] API method call. Method return an error with code -32080
    (Appointment couldn't be found) if record with specified id not exists. Methods returns an error with code -32085
    (Signature error) if $sign parameter is wrong.

    • @param Integer $id
    • @param String $sign
    • @return Object
  • isPaymentRequired ($eventId)

    Returns true if [[Plugins#Accept_payments|Accept payments]] plugin activated and event with specified id has
    configured price. If no paramentes specified then method returns true if payments plugin activated and at least

    one event has configured price. Otherwise returns false.

    • @param Integer $eventId
    • @return Boolean
  • book ($eventId, $unitId, $date, $time, $clientData, $additional, $count, $batchId, $recurringData)

    Creates new booking record. Returns an object with appointment information or throw exception if booking time not
    available or any of required parameters missed. If appointment requires confirmation, in result object will be

    require_confirm = true. $startDate and $startTime specifies a date of
    booking and time slot. Time value should be multiple to 'timeframe' configuration of company (see
    [[#getTimeframe|getTimeframe]] API method). $endDate and $endTime parameters
    should be calculated according to service duration. However you can specify different values to make appointment
    longer or shorter then service configuration. Note that $endDate and $endTime should be
    later in time than $startDate and $startTime. If your clients located in different time
    zone you should specify 'client_time_offset' value in $clientData object as difference
    between client's time zone and company's time zone in minutes. For example if company located in city with time
    zone GMT+2 and customer located in city with GMT+3 then $clientTimeOffset will be 60 minutes. You
    can get information about company's time zone using [[#getCompanyInfo|getCompanyInfo]] API method. To
    create batch booking you can specify either count more then 1 or valid batchId (only one
    parameter can be specified). You should specify an $additionalFields parameter if service requires
    some additional fields (see [[Plugins#Additional fields|Additional fields plugin]]). To create a booking with promo code you
    should pass it as additional field. For example: {"name": "promocode", "value": "some code", "type": "text"}

    See [[#book response|example]] of book API method response.

    • @see http://wiki.simplybook.me/index.php/Settings#Timeframe Timeframe information
    • @param Integer $eventId
    • @param Integer $unitId
    • @param String $date in Y-m-d format
    • @param String $time in H:i:s format
    • @param Object|array $clientData eg. {name: 'Name', email: 'test@gmail.com', phone: '+38099999999'}
    • @param array|Object $additional additional params and fields.
    • @param Integer $count bookings count, min. 1 (using for group bookings batch). (optional)
    • @param Integer $batchId add booking to multiple bookings batch. (optional)
    • @param Array $recurringData make booking recurrent. (optional)
    • @return Object
  • getRecurringDatetimes ($eventId, $unitId, $date, $time, $recurringData, $productIds)

    Get list of dates for recurring booking

    • @param Integer $eventId
    • @param Integer $unitId
    • @param String $date
    • @param String $time
    • @param array $recurringData
    • @param array $productIds
    • @return array
  • hasUpcommingPromotions ()

    Returns availability of active promotions

    • @return Boolean
  • validatePromoCode ($code, $startDateTime, $eventId, $count, $clientData)

    Validate promotion code.
    Returns true in case promocode is valid otherwise throws exception with error.

    • @param String $code
    • @param String $startDateTime
    • @param Integer $eventId
    • @param Integer $count
    • @param array|Object $clientData
    • @return Boolean
  • getPromocodeInfo ($code)

    Returns an object with detailed information about promotion by promotion code. Returns null if no promotions with
    specified code were not found.

    • @param String $code
    • @return Array
  • getPromotionRewardInfo ($commonPromotionId, $clientId, $hash)

    Returns promotion reward by common promotion id, client id and hash.

    • @param Integer $commonPromotionId
    • @param Integer $clientId
    • @param String $hash
    • @return Array
  • getUserLicenseText ()

    Returns user license text if user license plugin is turned on,
    otherwise throws exception

    • @return String
  • getPrivacyPolicyText ()

    Returns user privacy policy text if user license plugin is turned on and privacy policy is enabled,
    otherwise throws exception

    • @return String
  • getClientInfo ($clientId, $sign)

    Returns client info by client id

    • @param Integer $clientId
    • @param String $sign signature = md5($clientId . $clientHash . $secretKey)
    • @return Object
  • getClientInfoByLoginPassword ($login, $password)

    Returns client information by clients login (email)/password

    • @param String $login
    • @param String $password
    • @return Object
  • remindClientPassword ($email)

    Sends remind email for client

    • @param String $email
    • @return Boolean
  • getClientByLoginHash ($hash)

    Get client information by client login hash

    • @param String $hash
    • @return Object
  • modifyClientInfo ($clientId, $data, $sign)

    Edit client information data

    • @param Integer $clientId
    • @param Array $data
    • @param String $sign signature = md5($clientId . $clientHash . $secretKey)
    • @return Object
  • getMembershipList ()

    Returns list of available memberships

    • @return Array
  • getClientMembershipList ($filter, $clientId, $sign)

    Returns purchased membership list

    • @param Array $filter
    • @param Integer $clientId
    • @param String $sign
    • @return Array
  • getClientBookings ($clientId, $sign, $filter)

    Returns client bookings, accepts $filter ($filter {upcoming_only: true/false, confirmed_only: true/false})

    • @param integer $clientId
    • @param string $sign
    • @param object|array $filter
    • @return array
  • getProductList ($filter)

    Returns product list with filter.
    At this time filter can accept only service_id parameter

    • @param object $filter
    • @return array
  • getClassesList ($filter)

    Returns company's classes list. Ordered by position

    • @param Array $filter
    • @return Array
  • rescheduleBook ($shedulerId, $sign, $startDate, $startTime, $endDate, $endTime, $additional, $clientTimeOffset, $clientTimezone)

    Edit existing booking record. See [[#book|book]] API method description for more details about date/time parameters,
    time zone handling and additional fields. Returns null if parameters not valid.

    • @param int $shedulerId an id of booking to edit. See <code>[[#book|book]]</code> or <code>[[#getBookings|getBookings]]</code> API methods.
    • @param string $sign
    • @param String $startDate in Y-m-d format
    • @param String $startTime in H:i:s format
    • @param String $endDate in Y-m-d format
    • @param String $endTime in H:i:s format
    • @param array $additional
    • @param int $clientTimeOffset
    • @param string $clientTimezone
    • @return Object
    • @throws Api_Service_Exception
    • @throws Exception
  • getCompanyParam ($key)

    Returns company config value for key. A different set of keys available for public API and for company
    administration API. Method return 'invalid params' error (code -32602) in case if access to specified key not

    allowed. See [[#Company_params|list of available keys]].

    • @param String $key
    • @return mixed
  • getCompanyParams ($keys)

    Returns company's config values for specified keys as key-value map. For non-existent and not-allowed param keys
    it will return '''false''' as result. A different set of keys available for public API and for company

    administration API. See [[#Company_params|list of available keys]].

    • @param Array $keys
    • @return Array
  • getCancellationPolicy ()

    Returns cancellation policy rules.
    If cancellation policy custom feature is not activated, method returns null.

    • @return Array
  • getTimelineType ()

    Returns company timeline type

    • @return String
  • calculateEndTime ($startDateTime, $eventId, $unitId, $productIds)

    Returns end datetime if booking is available, else return false

    • @param String $startDateTime a date and time string in format 'Y-m-d H:i:s', eg. '2001-10-02 13:30:00'.
    • @param Integer $eventId
    • @param Integer $unitId
    • @param array $productIds
    • @return String
  • getWorkCalendar ($year, $month, $data)

    Returns company work schedule as array
    Eg.: {'2014-05-01': {'from': '09:00:00', 'to': '21:00:00', 'is_day_off': '0'}, '2014-05-02': ...}

    • @param Integer $year
    • @param Integer $month
    • @param Integer|array $data pass unit_group_id as integer for old version or structure for new version like {unit_group_id: int, event_id: int}
    • @return Object
  • getReservedTime ($from, $to, $eventId, $unitId, $count)

    Returns map of objects for each day in specified date range. The key of the result mps is a date string. The value
    is an array of two objects. Both objects contains list of time slots for type reserved_time and type

    not_worked_time. reserved_time type represents time slots working time but already booked
    by clients. Nobody knows what kind of data represented by not_worked_time type. Please don't use it.

    If [[Plugins#Google calendar sync plugin|Google calendar sync plugin]] enabled then object with
    reserved_time type will contain not empty list of time slots marked as busy in Google calendar. Call
    [[#isPluginActivated|isPluginActivated('google_calendar_export')]] API method to check if Google
    calendar sync plugin activated.


    Example:


    {
    "2016-02-05": [
    {
    "dd": [], // time slots from Google calendar
    "events": [ // reserved time slots
    { "from": "16:00", "to": "16:30" },
    { "from": "16:30", "to": "17:00" },
    ... ],
    "type": "reserved_time",
    },
    {
    "events": [
    { "from": "09:00", "to": "09:30" },
    { "from": "09:30", "to": "10:00" },
    ... ],
    "type": "not_worked_time"
    }],
    ...
    }

    • @param String $from
    • @param String $to
    • @param Integer $eventId
    • @param Integer $unitId
    • @param Integer $count
    • @return Object
  • getWorkDaysInfo ($from, $to, $unitId, $eventId, $count, $productIds)

    Returns an information about working hours and break times for specified service and performer for a period
    between two dates. If only service specified then information about performer (or performers) will be taken from

    service configuration. Method returns a list of objects for each date in specified period. Count of objects in
    list depends on break times. For example if performer works from 9:00 till 19:00 with one hour break at 13:00 method
    returns:


    {'2014-05-14' : [
    {'from': '09:00:00', 'to': '13:00:00'},
    {'from': '14:00:00', 'to': '19:00:00'}
    ] }


    Warning! Method can return a time string '24:00:00' as right edge of time range. This happens in case if time
    range finishes on midnight.

    • @param String $from
    • @param String $to
    • @param Integer $unitId (optional)
    • @param Integer $eventId (optional)
    • @param Integer $count (optional)
    • @param array $productIds (optional)
    • @return array
  • getFirstWorkingDay ($data)

    Returns first working date for unit

    • @param Integer|array $data pass unit_group_id as integer for old version or structure for new version like {unit_group_id: int, event_id: int}
    • @return String
  • getStartTimeMatrix ($from, $to, $eventId, $unitId, $count, $bookingId, $productIds)

    Returns available start time, taking into account breaktimes, start and end working time
    Eg.: {'2014-05-14': ['09:00:00', ...], ...}


    If locations plugin activated for company you should pass a list as $unitID parameter for filter results with
    units available only for selected location. See [[Plugins#Unit_location|Unit location]] plugin description for
    more details.

    • @param String $from
    • @param String $to
    • @param Integer $eventId
    • @param Mixed $unitId can be Integer or Array of Integers
    • @param Integer $count
    • @param int $bookingId
    • @param array $productIds
    • @return array
  • getCartesianStartTimeMatrix ($from, $to, $eventId, $unitId, $count, $bookingId, $productIds)

    Returns available start time, taking into account breaktimes, start and end working time.
    The difference between getStartTimeMatrix and getCartesianStartTimeMatrix is that getCartesianStartTimeMatrix

    provides time slots for each individual provider.
    Eg.: {"provider_id": 1, "service_id": 1, "timeslots": {"2014-05-14": ['09:00:00', ...], ...}, ...}

    If locations plugin activated for company you should pass a list as $unitID parameter for filter results with
    units available only for selected location. See [[Plugins#Unit_location|Unit location]] plugin description for
    more details.

    • @param String $from
    • @param String $to
    • @param Integer $eventId
    • @param Mixed $unitId can be Integer or Array of Integers
    • @param Integer $count
    • @param int $bookingId
    • @param array $productIds
    • @return array
  • getAvailableTimeIntervals ($dateFrom, $dateTo, $eventId, $unitId, $count)

    Returns available time intervals for all service providers for given period, taking into account breaktimes, start and end working time
    Eg.: {['2016-03-04': ['1': [['09:00:00','09:30:00'], ['11:15:00','14:45:00']] , ...], ...]}

    • @param String $dateFrom
    • @param String $dateTo
    • @param Integer $eventId
    • @param Mixed $unitId can be Integer or Array of Integers
    • @param Integer $count
    • @return Object
  • getServiceAvailableTimeIntervals ($dateFrom, $dateTo, $eventId, $unitId, $count)

    Returns available time intervals for all servics for given period, taking into account breaktimes, start and end working time
    Eg.: {['2016-03-04': ['1': [['09:00:00','09:30:00'], ['11:15:00','14:45:00']] , ...], ...]}

    • @param String $dateFrom
    • @param String $dateTo
    • @param Mixed $eventId can be Integer or Array of Integers
    • @param Integer $unitId
    • @param Integer $count
    • @return Object
  • getReservedTimeIntervals ($dateFrom, $dateTo, $eventId, $unitId, $count, $bookingId)

    Returns not available time
    Eg.: {'2014-05-14': [{'reserved_time': [{'from': '14:00', 'to': '16:30'}], 'type': "reserved_time"}, ...], ...}

    • @param String $dateFrom
    • @param String $dateTo
    • @param Integer $eventId
    • @param Integer|Array $unitId
    • @param Integer $count
    • @param int $bookingId
    • @return array
  • getAvailableUnits ($eventId, $dateTime, $count, $unitId, $productIds)

    Returns list of available unit ids for specified date and service or empty array if all units are not allowed.
    Eg.: [1, 2, 3]

    • @param Integer $eventId
    • @param String $dateTime a date and time string in format 'Y-m-d H:i:s'
    • @param int $count
    • @param int $unitId
    • @param array $productIds
    • @return array
    • @throws Exception
  • getAnyUnitData ()

    Returns information about [[Plugins#Any_Employee_selector|Any Employee selector plugin]] configuration. Returns
    null if plugin not enabled.


    Example:
    {
    "description" : "Select this option, if you want to find an available time with any of the employees",
    "hide_other_units" : 1, // 1 or 0
    "image" : null,
    "name" : "Any employee",
    "picture_path" : null,
    "random_selection" : 0 // 1 or 0
    }

    • @return Object
  • getAdditionalFields ($eventId)

    Return additional fields for certain event if [[Plugins#Additional_fields|Additional fields plugin]] is
    activated. Returns empty array otherwise. Call [[#isPluginActivated|isPluginActivated('event_field')]]

    API method to check if 'event_field' plugin activated.

    • @param Integer $eventId
    • @return Array
  • getTimeframe ()

    Returns company's timeframe configuration (in minutes). Timeframe can be either 5, 10, 15, 20, 30 or 60 minutes.
    You can find more details about timeframe [[Settings#Timeframe|here]].

    • @return Integer
  • isPluginActivated ($pluginName)

    Return plugin status true if status active, else false. $pluginName parameter is a plugin identifier.
    See [[Plugins|plugins]] page for full plugins description. See [[#Plugin's identifiers|list of available plugin's names]].

    • @param String $pluginName
    • @return Boolean
  • getPluginStatuses ($pluginNames)

    Return plugin status true if status active, else false. See [[#Plugin's identifiers|list of available plugin's names]].

    • @param Array $pluginNames
    • @return Array
  • getCompanyInfo ()

    Returns an object with detailed information about company. See [[#getCompanyInfo response|example of response]].

    • @return Object
  • createBatch ()

    Creates new booking batch record. Returns newly created batch id. You can use this id in [[#book|book]]
    API method.

    • @return Integer
  • getCountryPhoneCodes ()

    Returns country phone code list

    • @return Array
  • getPluginPromoInfoByCode ()

    Returns an object with detailed information about promotion by promotion code. You can get promotion code
    using [[Catalogue#getPromotionList|getPromotionList]] API method. If promotion record with specified

    code not found then method returns an empty array (an empty object). If [[Plugins#Simply Smart Promotions|Simply Smart Promotions plugin]]
    not enabled then method returns an error with code -32001 (Plugin is not activated). Use
    [[#isPluginActivated|isPluginActivated('promo')]] API method call to check if plugin enabled.


    See [[#getPromotionList response|example]] of getPromotionList API method response. Please note that
    response contains a list of services for wich promotion discount can be applied (service_ids key).

    • @param String
    • @return Array
  • getCompanyTimezoneOffset ()

    Returns company timezone offset and company timezone

    • @return array

URL сервиса  https://user-api.simplybook.me/admin

  • getUserPhoneValidationInfo ($userId, $number)

    Get user db data (id, phone, is_validated)

    • @param int $userId
    • @param string $number
  • saveConfigKeys ($data, $module, $plugin)

    Save configuration keys

    • @param array $data
    • @param string $module optional
    • @param string $plugin optional
    • @return array
  • getNotificationConfigStructure ($plugin)

    Get structure of SMS and Email notification config params

    • @param string $plugin optional
    • @return mixed
  • getBookings ()

    Returns list of bookings filtered by given params. Filter params represented as object with following fields:


    * '''date_from''' a date of booking in string format 'Y-m-d'
    * '''time_from''' a time string in format 'H:i:s'
    * '''date_to''' a date string in format 'Y-m-d'
    * '''time_to''' a time string in format 'H:i:s'
    * '''created_date_from''' a date string in format 'Y-m-d'
    * '''created_date_to''' a date string in format 'Y-m-d'
    * '''edited_date_from''' a date string in format 'Y-m-d'
    * '''edited_date_to''' a date string in format 'Y-m-d'
    * '''unit_group_id''' an integer. Use it to get bookings assigned for certain service provider.
    * '''event_id''' an integer. Use it to get bookings only for certain service.
    * '''is_confirmed''' 1 or 0. If [[Plugins#Approve booking|Approve booking]] plugin enabled then method will return confirmed bookings with approve status 'new'.
    * '''client_id''' an integer. Use it to get bookings only for certain client.
    * '''order''' string either 'record_date', 'date_start' or 'date_start_asc'. By default used 'date_start' value.
    * '''booking_type''' a string. Value of this field depends on Approve booking plugin status.
    * '''code''' booking code
    *: If plugin not active:
    ** '''all''' for all bookings (default value)
    ** '''cancelled''' alias to 'is_confirmed' equal to 0
    ** '''non_cancelled''' alias to 'is_confirmed' equal to 1
    *: If plugin active:
    ** '''all''' for all bookings (default value)
    ** '''cancelled''' returns bookings with 'is_confirmed' field equals to 0 and approve booking status equals to 'cancelled' (or booking does not have any approve status)
    ** '''non_cancelled''' returns bookings with either 'is_confirmed' field equals to 1 or approve booking status equals to 'new'
    ** '''cancelled_by_client''' returns bookings approved by admin but cancelled by client
    ** '''cancelled_by_admin''' returns bookings cancelled by admin
    ** '''non_approved_yet''' returns bookings with approve status 'new'
    ** '''approved''' returns bookings with either 'is_confirmed' field equals to 1 and approve booking status equals to 'approved' (or booking does not have any approve status)

    Example:
    {
    "date_from":"2015-12-29",
    "date_to":"2015-12-29",
    "booking_type":"cancelled",
    "event_id":"5",
    "order":"start_date"
    }

    • @param Array
    • @return Array
  • pluginZapierSubscribe ($url, $notificationType)

    'create', 'cancel', 'new_client', 'change', 'create_invoice'

    • @param string $url
    • @param string $notificationType
    • @return bool
  • getBookingDetailsZapierMock ()

    • @return array
  • getClientInfo ($clientId)

    Returns client data

    • @param int|string $clientId
    • @return array
  • getClientInfoZapier ($clientId)

    Returns client data

    • @param int|string $clientId
    • @return array
    • @throws \Exception
  • getClientInfoZapierMock ()

    Returns client data

    • @return array
    • @throws \Exception
  • getBookingsZapier ()

    Returns list of bookings filtered by given params

    • @return Array
  • getInvoiceDetailsMock ()

    • @return array
  • getBookingDetails ($id)

    Returns detailed bookings object by booking id. See [[#getBookingDetails_response|response example]].

    • @param integer $id booking id
    • @return Array
  • getWorkDaysTimes ($startDateTime, $endDateTime, $type)

    Return busy time by unit id by GoogleCalendar plugin if enabled.
    Please note that this method may return not actual data because data synchronization between server and

    Google Calendar may take some time and synchronized data are cached for 15 minutes.

    • @param string $startDateTime
    • @param string $endDateTime
    • @param string $type either 'unit_group' or 'event'. Default value is 'unit_group'.
    • @return array
  • getGoogleCalendarBusyTime ($startDateTime, $endDateTime, $unitId)

    Returns a list of objects represented a time intervals marked as busy in Google Calendar. Each object of result
    contains from and to properties with datetime string as value. This method only actual if

    [Plugins#Google calendar sync plugin|Google calendar sync plugin] enabled. If plugin not enabled an empty list will
    be returned. You should call [[#isPluginActivated|isPluginActivated('google_calendar_export')]] to
    check status of the plugin. Each object of result contains from and to properties with
    datetime string as value. Please note that this method may return not actual data because data synchronization
    between server and Google Calendar may take some time and synchronized data are cached for 15 minutes.


    Example:

    [
    {"from" : "2016-02-16 13:30:00",
    "to" : "2016-02-16 16:00:00"},
    ...
    ]

    • @param string $startDateTime a date and time string in format 'Y-m-d H:i:s'
    • @param string $endDateTime a date and time string in format 'Y-m-d H:i:s'. You can date string avoiding time in this parameter. In this case method will use time value '23:59:59'.
    • @param int $unitId
    • @return Array
  • getGoogleCalendarBusyTimeAvailableUnits ()

    Returns configured unit ids, allowed to sync busy time

    • @return Array
  • getBookingLimitUnavailableTimeInterval ($startDateTime, $endDateTime, $eventId)

    Returns time intervals not available for bookings because of configuration of [[Plugins#Limit bookings|Limit bookings]]
    plugin for period of time. Returns empty array if plugin not available.

    • @param string $startDateTime a date and time string in format 'Y-m-d H:i:s'
    • @param string $endDateTime a date and time string in format 'Y-m-d H:i:s'
    • @param int $eventId
    • @return Array
  • getUnitWorkingDurations ($dateStart, $dateEnd, $unitGroupId)

    Return working durations

    • @param string $dateStart
    • @param string $dateEnd
    • @param int $unitGroupId
    • @return Array
  • getWorkload ($dateStart, $dateEnd, $unitGroupId)

    Return workload data for units in period of time. Workload for each unit represented as array with work hours
    at index 0, confirmed booking hours as load at index 1 and cancelled bookings hours at index 2.


    Example:
    ['2015-10-21' : {
    5 : [
    10, // working hours
    10, // load hours (confirmed bookings hours)
    0 // cancelled bookings hours
    ] }]

    • @param string $dateStart
    • @param string $dateEnd
    • @param int $unitGroupId
    • @return Array
  • getBookingRevenue ($dateStart, $dateEnd, $unitGroupId, $serviceId)

    Return bookings count and revenue value for each date in specified period. Data grouped by unit id and
    represented as array with bookings count at index 0 and revenue amount at index 1. You can filter data either

    by unit or by service. Set $dateStart and $dateEnd to null to get data for current week.

    Example:
    ['2015-11-12' : {
    3 : [
    11, // bookings count
    128.53 // revenue
    ]}

    • @param string $dateStart a date string in format 'Y-m-d'.
    • @param string $dateEnd a date string in format 'Y-m-d'
    • @param int $unitGroupId
    • @param int $serviceId
    • @return Array
  • getUnitWorkdayInfo ($dateStart, $dateEnd, $unitGroupId)

    Return workday info (date_start and date_end)

    • @param string $dateStart
    • @param string $dateEnd
    • @param int $unitGroupId
    • @return array
  • cancelBooking ($id)

    Cancels booking. Returns true on success. Returns an error with code -32080 (Appointment couldn't be found) if
    no booking with specified id were found.

    • @param Integer $id
    • @return Boolean
  • cancelBatch ($id, $bookingIds)

    Cancel batch of bookings. Returns true on success. Returns an error with code -32080 (Appointment couldn't be found)
    if no booking with specified id were found. A booking with first id in $bookingIds list is used for

    information in notifications.

    • @param Integer $id identifier of batch. See <code>[[#createBatch|createBatch]]</code> API method.
    • @param Array $bookingIds ids of bookings included to batch.
    • @return bool
  • book ($eventId, $unitId, $clientId, $startDate, $startTime, $endDate, $endTime, $clientTimeOffset, $additional, $count, $batchId, $recurringData)

    Creates new booking record. Returns an object with appointment information or throw exception if booking time not
    available or any of required parameters missed. If appointment requires confirmation, in result object will be

    require_confirm = true. $startDate and $startTime specifies a date of
    booking and time slot. Time value should be multiple to 'timeframe' configuration of company (see
    [[#getTimeframe|getTimeframe]] API method). $endDate and $endTime parameters
    should be calculated according to service duration. However you can specify different values to make appointment
    longer or shorter then service configuration. Note that $endDate and $endTime should be
    later in time than $startDate and $startTime. If your clients located in different time
    zone you should specify 'client_time_offset' value in $clientData object as difference
    between client's time zone and company's time zone in minutes. For example if company located in city with time
    zone GMT+2 and customer located in city with GMT+3 then $clientTimeOffset will be 60 minutes.
    You can get information about company's
    time zone using [[#getCompanyInfo|getCompanyInfo]] API method. To create batch booking you can
    specify either count more then 1 or valid batchId (only one parameter can be
    specified). You should specify an $additionalFields parameter if service requires some additional
    fields (see [[Plugins#Additional fields|Additional fields plugin]]).

    To create a booking with promo code you should pass it as additional field. For example: {"promocode": "some code"}

    If [[Plugins#Unit location|Unit location]] enabled you need to pass locations ID parameter as additional field
    location_id. For example: {"location_id": "1"}. Use [[#isPluginActivated|isPluginActivated('location')]]
    to check if plugin active and [[#getLocationsList|getLocationsList()]] method to get list of
    available locations.

    See [[#book response|example]] of book API method response.

    • @see http://wiki.simplybook.me/index.php/Settings#Timeframe Timeframe information
    • @param Integer $eventId
    • @param Integer $unitId
    • @param Integer $clientId
    • @param string $startDate a date string in format 'Y-m-d'
    • @param string $startTime a time string in format 'H:i:s'
    • @param string $endDate a date string in format 'Y-m-d'
    • @param string $endTime a time string in format 'H:i:s'
    • @param Integer $clientTimeOffset
    • @param array|Object $additional additional params and fields.
    • @param Integer $count bookings count used to make group bookings batch. This parameter can't be less than 1. (optional)
    • @param Integer $batchId add booking to group bookings batch. You can't use $count and $batchId in one call. Please specify only one parameter. (optional)
    • @param Array $recurringData make booking recurrent. (optional)
    • @return Object
  • editBook ($shedulerId, $eventId, $unitId, $clientId, $startDate, $startTime, $endDate, $endTime, $clientTimeOffset, $additional)

    Edit existing booking record. See [[#book|book]] API method description for more details about date/time parameters,
    time zone handling and additional fields. Returns null if parameters not valid.

    • @param Integer $shedulerId an id of booking to edit. See <code>[[#book|book]]</code> or <code>[[#getBookings|getBookings]]</code> API methods.
    • @param Integer $eventId
    • @param Integer $unitId
    • @param Integer $clientId
    • @param String $startDate in Y-m-d format
    • @param String $startTime in H:i:s format
    • @param String $endDate in Y-m-d format
    • @param String $endTime in H:i:s format
    • @param Integer $clientTimeOffset
    • @param array|Object $additional additional params and fields.
    • @return Object
  • addClient ($clientData, $sendEmail)

    Adds new client with specified data. You can specify name, email, phone, address1, address2, city, zip,
    country_id.

    email, phone number or both of them can be mandatory fields. You should call
    getCompanyParam('require_fields') method to check which fields are required.

    Method returns an error:

    * -32061 Client name value is wrong
    * -32062 Client email value is wrong
    * -32063 Client phone value is wrong


    Example:

    {
    name: "Frances T. Perez",
    phone: "+1502-810-4521",
    email: "FrancesTPerez@teleworm.us",
    address1: "3872 Earnhardt Drive",
    address2: "Louisville, KY 40219",
    city: Louisville,
    zip: 3872
    }

    • @param Object $clientData
    • @param Boolean $sendEmail
    • @return Integer
  • editClient ($clientId, $clientData)

    Edits client's record. See [[#addClient|addClient]] method description for list of available fields.
    Method returns an id of client's record.

    • @param Integer $clientId
    • @param Object $clientData
    • @return Integer
  • changeClientPassword ($clientId, $password, $sendEmail)

    Change client password and send password email changing

    • @param Integer $clientId
    • @param String $password
    • @param Boolean $sendEmail
  • resetClientsPassword ($clientIds)

    Resets client password and send them emails

    • @param Array $clientIds
  • remindClientsPassword ($email)

    Sends remind email for client

    • @param String $email
    • @return Boolean
  • getClientList ($searchString, $limit)

    Returns list of clients associated with company. You can use either phone number, email address or name as value
    for $searchString. Pass an empty string for $searchString and null for $limit

    parameters to get all records. See [[#addClient|addClient]] API method for list of available fields
    of client data object.

    • @param String $searchString
    • @param Integer $limit
    • @return Array
  • getStatuses ()

    Returns list of available statuses or an empty list if [[Plugins#Status|Status plugin]] not enabled.

    • @return Array
  • getBookingStatus ($bookingId)

    Returns status of given booking (if status plugin is enabled)
    default status will be returned if bookingId does not exists

    • @param Integer $bookingId
    • @return Array
  • setStatus ($bookingId, $statusId)

    Sets specified status for booking. Returns an error with code -32020 if logged in user don't have access to edit
    bookings. This method does nothing if [[Plugins#Status|Status plugin]] not enabled.

    • @param Integer $bookingId
    • @param Integer $statusId
    • @return Boolean
  • getRecurringSettings ($eventId)

    Returns an object with recurring settings for an event. Returns false if specified event does not configured as
    recurring.

    • @see http://blog.simplybook.me/recurring-and-periodic-bookings/ Recurring services desription
    • @param Integer $eventId
    • @return Array
  • getTopServices ($dateStart, $dateEnd)

    Returns a list with statistics for services for a period of time. This data contains number of bookings and
    revenues value for each service.

    • @param String $dateStart
    • @param String $dateEnd
    • @return Array
  • getTopPerformers ()

    Returns a list with statistics for performers. This data contains number of bookings and revenues value for each performer.

    • @return Array
  • getRecurringDatetimes ($eventId, $unitId, $date, $time, $recurringData, $endDateTime, $productIds)

    Get list of dates for recurring booking

    • @param Integer $eventId
    • @param Integer $unitId
    • @param String $date
    • @param String $time
    • @param array $recurringData
    • @param String $endDateTime (optional)
    • @param array $productIds
    • @return array
  • getCountryList ()

    Get list of all countries

    • @return Array
  • getStates ()

    Get list of all country states

    • @return Array
  • getFeedbacks ($approvedOnly, $reviewsOnly, $lastOnly, $limit)

    Get list of feedbacks

    • @param Boolean $approvedOnly
    • @param Boolean $reviewsOnly
    • @param Boolean $lastOnly
    • @param Integer $limit
    • @return Array
  • getRecentActions ($lastOnly, $limit)

    Returns latest actions

    • @param Boolean $lastOnly
    • @param Integer $limit
    • @return Array
  • getWarnings ($lastObly)

    Returns a list of objects represented system warnings. Each warning contains warning_type and warning_text
    properties. warning_text property contains localized message. warning_type can be one of the values:


    * '''sms_limit''' – warning indicates low amount of SMS credits
    * '''sheduler_limit''' – warning indicates low amount of available bookings

    • @param Boolean $lastObly Default value is '''false'''.
    • @return Array
  • updateNotification ($type)

    Mark notifications as readed

    • @param String $type
  • getLastNotificationUpdate ($type)

    Returns last update datetime

    • @param String $type
    • @return String
  • getBookingCancellationsInfo ($dateStart, $dateEnd)

    Returns statistics about created bookings and cancellations for a time period. Data presented as array of hashes for
    each type of operation (created or cancelled booking) groped by clients. "type" field can be either

    "create", "cancel" or "nopayment_cancel". If "user_id" not specified then bookings where created or
    cancelled by admin or employee. Data with type "nopayment_cancel" represents bookings cancelled
    automatically by system.

    Example:
    3 bookings where created by admin or employee and 2 bookings where automatically cancelled by system.
    [{
    "cnt" : 3,
    "firstname" : null,
    "lastname" : null,
    "login" : null,
    "type" : "create",
    "user_id"" : null
    }, {
    "cnt" : 2,
    "firstname" : null,
    "lastname" : null,
    "login" : null,
    "type" : "nopayment_cancel",
    "user_id"" : null
    }]

    • @param String $dateStart a date string in format 'Y-m-d'. Pass null to get data from first day of current week.
    • @param String $dateEnd a date string in format 'Y-m-d'. Pass null to get data filtered to last day of current week.
    • @return Array
  • pluginApproveBookingApprove ($id)

    Sets approve booking status to 'approved' if [[Plugins#Approve booking|Approve booking]] plugin enabled and returns
    list of approved booking IDs. Returns false if plugin not enabled. Use [[#isPluginActivated|isPluginActivated('approve_booking')]]

    API method call to check if plugin enabled.

    • @param Integer $id
    • @return Array
  • pluginApproveBookingCancel ($id)

    Sets approve booking status to 'canceled' if [[Plugins#Approve booking|Approve booking]] plugin enabled and returns
    true. Returns false if plugin not enabled. Use [[#isPluginActivated|isPluginActivated('approve_booking')]]

    API method call to check if plugin enabled.

    • @param Integer $id
    • @return Boolean
  • pluginApproveGetPendingBookingsCount ()

    Returns count of bookings pending approval if [[Plugins#Approve booking|Approve booking]] plugin enabled. Returns
    0 if plugin not enabled. Use [[#isPluginActivated|isPluginActivated('approve_booking')]] API method

    call to check if plugin enabled.

    • @return Integer
  • pluginApproveGetPendingBookings ()

    Returns list of objects with information about bookings pending approval if [[Plugins#Approve booking|Approve booking]]
    plugin enabled. Returns empty list if plugin not enabled. Use [[#isPluginActivated|isPluginActivated('approve_booking')]]

    API method call to check if plugin enabled.

    • @return array
  • getPluginList ()

    Returns a list of all plugins associated with company with status.

    • @return Array
  • getBookingComment ($id)

    Returns booking comment

    • @param Integer $id
    • @return String
  • setBookingComment ($id, $comment)

    Set booking comment

    • @param Integer $id
    • @param String $comment
    • @return Integer
  • getCurrentTariffInfo ()

    Returns all information about current tariff (subscription). For example:

    {
    "name" : "gold",
    "expire_date" : "2016-02-11 12:32:00",
    "rest" : 41, // number of days until subscription expiration
    "color" : "#fcb322"
    }

    • @return Array
  • getRegistrations ($groupBy)

    Returns number of clients registrations by 'day', 'week' or 'month'. A time period depends on selected
    grouping parameter:


    * for 'day' methods returns statistics for last 31 days
    * for 'week' methods returns data last 10 weeks period
    * for 'month' time period is last 12 months

    • @param String $groupBy either 'day', 'week' or 'month'
    • @return Array
  • getBookingStats ($groupBy)

    Returns statistic about bookings count grouped by 'day', 'week' or 'month'. A time period depends on selected
    grouping parameter:


    * for 'day' methods returns statistics for last 31 days
    * for 'week' methods returns data last 10 weeks period
    * for 'month' time period is last 12 months

    • @param String $groupBy either 'day', 'week' or 'month'
    • @return Array
  • getVisitorStats ($groupBy)

    Returns statistics about page visits if plugin [[Plugins#Visitor Counter|Visitor Counter plugin]] enabled. Returns
    an empty list if plugin not enabled. Use [[#isPluginActivated|isPluginActivated('counter')]] API method

    call to check if plugin enabled. Results can be grouped by 'day', 'week' or 'month'. A time period depends on
    selected grouping parameter:

    * for 'day' methods returns statistics for last 31 days
    * for 'week' methods returns data last 10 weeks period
    * for 'month' time period is last 12 months

    • @param String $groupBy
    • @return Array
  • getSocialCounterStats ($provider)

    Returns social counters value for your domain

    • @param String $provider
    • @return Integer
  • getCompanyCurrency ()

    Returns company's currency as three chars code (ISO 4217).

    • @return String
  • getClientComments ($clientId, $shedulerId)

    Returns list of all comments for given client

    • @param Integer $clientId
    • @param Integer $shedulerId
    • @return Array
  • getClientSoapData ($clientId)

    Returns current SOAP information by client id

    • @param integer $clientId
    • @return array
  • getClientSoapHistory ($clientId)

    Returns SOAP history by client id

    • @param integer $clientId
    • @return array
  • getClientSoapCryptData ($clientId)

    Returns current SOAP (crypt) information by client id

    • @param integer $clientId
    • @return array
  • getClientSoapCryptHistory ($clientId)

    Returns SOAP (crypt) history by client id

    • @param integer $clientId
    • @return array
  • getCurrentUserDetails ()

    Returns an object with information about logged in user. Note: you are responsible for implementation of some
    access rights based on group property value. Most of API methods returns an error if user has low access

    rights but not all. There are 4 roles:

    * '''Administrator''' - have full access to the system
    * '''Senior Employee''' - have access to calendar, services and providers, and can modify bookings related with user
    * '''Junior Employee''' - can access caledar (but only to own bookings), services associated with user
    * '''Viewer''' - have only access to calendar and services in read only mode

    group property can be one of the values:

    * shop_user - "Senior Employee" access role
    * station_user - "Junior Employee" access role
    * admin - "Administrator" access role
    * viewer - "Viewer" access role
    * reseller_company_admin - reserved

    Example:

    {
    "id": 1,
    "login": admin,
    "email": "admin@mycoolcompany.com";
    "firstname": "Michail",
    "lastname": " ",
    "phone": "",
    "group": "admin",
    "is_blocked": 0,
    "last_access_time": "2016-06-06 17:55:51",
    "unit_group_id": null
    }

    • @return Array
  • getCategoriesList ($isPublic)

    Returns company categories list if [[Plugins#Service categories|Service categories plugin]] is activated. Returns
    an error with code -32001 if plugin is not activated. Use [[#isPluginActivated|isPluginActivated('event_category')]]

    API method to check if plugin activated.

    • @param Boolean $isPublic
    • @return Array
  • getLocationsList ($isPublic, $asArray)

    Returns available locations for company if plugin [[Plugins#Unit location|Unit location plugin]] is activated. Return
    an error with code -32001 if plugin is not activated. Use [[#isPluginActivated|isPluginActivated('location')]]

    API method to check if plugin activated.

    This method accepts two boolean flags as parameters. If '''isPublic''' flag is '''true''' then method returns only
    public locations. If '''asArray''' flag is '''true''' method returns list of objects. Otherwise method returns
    map of objects with object id as key. You can omit both parameters.

    • @param Boolean $isPublic Optional. Default value is '''false'''.
    • @param bool $asArray Optional. Default value is '''false'''.
    • @return Array
  • getMembership ($membershipId)

    Returns membership's data object.

    • @param int $membershipId
    • @return Array
  • getClientMembershipList ($clientId)

    Returns purchased membership list

    • @param Integer $clientId
    • @return Array
  • setWorkDayInfo ($info)

    Set work day schedule for company|service|provider for week_day|date


    Example:

    {
    "start_time":"10:00",
    "end_time":"18:00",
    "is_day_off":0,
    "breaktime":[{"start_time":"14:00","end_time":"15:00"}],
    "index":"1",
    "name":"Monday",
    "date":"",
    "unit_group_id":"",
    "event_id":""
    }


    index is 1-7 for Monday - Sunday (used for weekly settings)
    date is used to set worktime for special date
    unit_group_id is provider id
    event_id is service id
    if unit_group_id and event_id not passed then it set data for company

    • @param array $info
    • @return boolean true on success
  • deleteSpecialDay ($date, $params)

    Delete special date if set


    Example:

    {
    "unit_group_id":"",
    "event_id":""
    }

    • @param string $date 'Y-m-d'
    • @param array $params = null
    • @return boolean true on success
  • getCompanyWorkCalendarForYear ($year)

    Returns company special days and vacations

    • @param Integer $year
    • @return Object
  • getServiceWorkCalendarForYear ($year, $eventId)

    Returns special days and vacations, defined for given service (event)

    • @param Integer $year
    • @param Integer $eventId
    • @return Object
  • getCompanyVacations ()

    Get list of company vacations in format array(vacation_id => array())

    • @return array
  • getServiceVacations ($serviceId)

    Get list of service vacations

    • @param Integer $serviceId
    • @return array
  • getPerformerVacations ($performerId)

    Get list of performer vacations

    • @param Integer $performerId
    • @return array
  • getCompanyVacation ($vacationId)

    Get company vacation by id

    • @param Integer $vacationId
    • @return array vacation table row data
  • getServiceVacation ($vacationId, $serviceId)

    Get service vacation by id

    • @param Integer $vacationId
    • @param Integer $serviceId
    • @return array vacation table row data
  • getPerformerVacation ($vacationId, $performerId)

    Get service vacation by id

    • @param Integer $vacationId
    • @param Integer $performerId
    • @return array vacation table row data
  • saveCompanyVacation ($data)

    Save company vacation data
    (create or update table depending on 'id' param existing in $data)

    • @param array $data
    • @return Integer id of saved vacation
  • saveServiceVacation ($data, $serviceId)

    Save company vacation data
    (create or update table depending on 'id' param existing in $data)

    • @param array $data
    • @param Integer $serviceId
    • @return Integer id of saved vacation
  • savePerformerVacation ($data, $performerId)

    Save company vacation data
    (create or update table depending on 'id' param existing in $data)

    • @param array $data
    • @param Integer $performerId
    • @return Integer id of saved vacation
  • deleteCompanyVacation ($vacationId)

    Delete company vacation with all it's bindings
    (including created special days in work_day_special table)

    • @param Integer $vacationId
  • deleteServiceVacation ($vacationId, $serviceId)

    Delete service vacation with all it's bindings
    (including created special days in work_day_special table)

    • @param Integer $vacationId
    • @param Integer $serviceId
  • deletePerformerVacation ($vacationId, $unigGroupId)

    Delete performer vacation with all it's bindings
    (including created special days in work_day_special table)

    • @param Integer $vacationId
    • @param Integer $unigGroupId
  • getClassesList ($isVisibleOnly, $asArray)

    Returns company's classes list. If $asArray is false then method returns a map with event id as key
    and details object as value. If parameter set to true then method returns a list sorted by 'position' property of

    class's details object.

    • @param Boolean $isVisibleOnly
    • @param Boolean $asArray
    • @return Array
  • getProductList ($filter)

    Returns product list with filter.
    At this time filter can accept only service_id parameter

    • @param object $filter
    • @return array
  • getBookingReport ()

    Get paginated data for Booking report

    The following filters can be provided in request param:
    Date date_from, date_to, created_date_from, created_date_to
    Integer unit_group_id, client_id
    String code, promo_code
    String booking_type = 'approved' | 'not_approved_yet' | 'cancelled_by_admin' | 'cancelled_by_client' | 'non_cancelled' | 'cancelled' | 'all'

    Order can be one of the following values: record_date, date_start, date_start_asc

    Return data in the following format:
    array(
    'data' => $data,
    'metadata' => array(
    'items_count'
    'pages_count'
    'page'
    'on_page'
    )
    or Api_Service_Exception in error case

    • @todo : implement order by end_date, record_date
    • @param Api
    • @return array
  • getClientReport ()

    Get paginated data for Client report

    The following filters can be provided in request param:
    Date date_from, date_to
    Integer event_id, unit_group_id, client_id
    String client_search (search string, can contains client name, address, phone)
    String service_using_type = 'used_in_period' | 'not_used_in_period' | 'not_used_in_period_but_used_before'

    No custom ordering implemented yet

    Group data = 'client' | 'client_email_phone' | 'client_email' | 'client_phone'


    Return data in the following format:
    array(
    'data' => $data,
    'metadata' => array(
    'items_count'
    'pages_count'
    'page'
    'on_page'
    )
    or Api_Service_Exception in error case

    • @todo : implement order by send_date, sms_count
    • @param Api
    • @return array
  • getSmsReport ()

    Get paginated data for SMS report

    The following filters can be provided in request param:
    Date date_from, date_to
    Integer unit_group_id, client_id
    String phone, message

    No custom ordering implemented yet (always ordered by client name)

    Return data in the following format:
    array(
    'data' => $data,
    'metadata' => array(
    'items_count'
    'pages_count'
    'page'
    'on_page'
    )
    or Api_Service_Exception in error case

    • @todo : implement order by date
    • @param Api
    • @return array
  • getSmsGateways ()

    gets differend sms providers(transport) used by system

  • getEmailReport ()

    Get paginated data for email report



    Return data in the following format:
    array(
    'data' => $data,
    'metadata' => array(
    'items_count'
    'pages_count'
    'page'
    'on_page'
    )
    or Api_Service_Exception in error case

    • @param Api
    • @return array
  • getPosReport ()

    Get paginated data for Pos report



    Return data in the following format:
    array(
    'data' => $data,
    'metadata' => array(
    'items_count'
    'pages_count'
    'page'
    'on_page'
    )
    or Api_Service_Exception in error case

    • @param Api
    • @return array
  • getFeedbackReport ()

    Get paginated data for Feedback report

    The following filters can be provided in request param:
    Date date_from, date_to
    Integer from 1 to 5 rate_from, rate_to
    String name, subject, message

    Report can be ordered by one of the following fields:
    date, rate, name, message, subject, answer

    Return data in the following format:
    array(
    'data' => $data,
    'metadata' => array(
    'items_count'
    'pages_count'
    'page'
    'on_page'
    )
    or Api_Service_Exception in error case

    • @param Api
    • @return array
  • getPromotionList ($isVisibleOnly, $asArray, $promotionType)

    Get detailed list of promotions (new)

    • @param bool $isVisibleOnly
    • @param bool $asArray
    • @param string $promotionType = 'discount' / 'gift_card' / null
    • @return array
  • getPromotionInstanceList ($promotionType, $asArray)

    Get all list of promotion instances

    • @param string $promotionType = 'gift_card' | 'discount'
    • @param bool $asArray
    • @return array
  • getPromotionDetails ($id)

    Return promotion detailed info

    • @param integer $id
    • @return array
  • getStaticPageList ()

    Get static page list

    • @return array
  • confirmInvoice ($id, $paymentSystem)

    Confirms invoice by id

    • @param integer $id
    • @param string $paymentSystem
    • @return array
    • @throws Api_Entity_Exception
  • applyPromoCode ($id, $code)

    Applies promo code to order (Coupons & Gift Cards custom feature)

    • @param integer $id
    • @param string $code
    • @return array
    • @throws Api_Entity_Exception
  • applyTip ($id, $percent, $amount)

    Applies tip to order (Tips custom feature)
    You can apply tip by percent or by amount

    • @param integer $id
    • @param integer $percent
    • @param integer $amount
    • @return array
    • @throws Api_Entity_Exception
  • getCountByShedulerChannels ($startDate, $endDate)

    • @param string $startDate
    • @param string $endDate
    • @return array
  • getCompanyParam ($key)

    Returns company config value for key. A different set of keys available for public API and for company
    administration API. Method return 'invalid params' error (code -32602) in case if access to specified key not

    allowed. See [[#Company_params|list of available keys]].

    • @param String $key
    • @return mixed
  • getCompanyParams ($keys)

    Returns company's config values for specified keys as key-value map. For non-existent and not-allowed param keys
    it will return '''false''' as result. A different set of keys available for public API and for company

    administration API. See [[#Company_params|list of available keys]].

    • @param Array $keys
    • @return Array
  • getCancellationPolicy ()

    Returns cancellation policy rules.
    If cancellation policy custom feature is not activated, method returns null.

    • @return Array
  • getTimelineType ()

    Returns company timeline type

    • @return String
  • getEventList ($isVisibleOnly, $asArray, $handleClasses, $searchString)

    Returns company's events list. If $asArray is false then method returns a map with event id as key
    and details object as value. If parameter set to true then method returns a list sorted by 'position' property of

    event's details object.

    • @param Boolean $isVisibleOnly
    • @param Boolean $asArray
    • @param integer $handleClasses 1 - classes only, -1 without classes, null - skip classes check
    • @param string $searchString part of name (used for comboboxes)
    • @return Array
  • getUnitList ($isVisibleOnly, $asArray, $handleClasses, $searchString)

    Returns list of service performers. If $asArray is false then method returns a map with event id as
    key and details object as value. If parameter set to true then method returns a list sorted by 'position' property

    of event's details object.

    • @param Boolean $isVisibleOnly
    • @param Boolean $asArray
    • @param integer $handleClasses 1 - classes only, -1 without classes, null - skip classes check
    • @param string $searchString part of name (used for comboboxes)
    • @return Array
  • calculateEndTime ($startDateTime, $eventId, $unitId, $productIds)

    Returns end datetime if booking is available, else return false

    • @param String $startDateTime a date and time string in format 'Y-m-d H:i:s', eg. '2001-10-02 13:30:00'.
    • @param Integer $eventId
    • @param Integer $unitId
    • @param array $productIds
    • @return String
  • getWorkCalendar ($year, $month, $data)

    Returns company work schedule as array
    Eg.: {'2014-05-01': {'from': '09:00:00', 'to': '21:00:00', 'is_day_off': '0'}, '2014-05-02': ...}

    • @param Integer $year
    • @param Integer $month
    • @param Integer|array $data pass unit_group_id as integer for old version or structure for new version like {unit_group_id: int, event_id: int}
    • @return Object
  • getReservedTime ($from, $to, $eventId, $unitId, $count)

    Returns map of objects for each day in specified date range. The key of the result mps is a date string. The value
    is an array of two objects. Both objects contains list of time slots for type reserved_time and type

    not_worked_time. reserved_time type represents time slots working time but already booked
    by clients. Nobody knows what kind of data represented by not_worked_time type. Please don't use it.

    If [[Plugins#Google calendar sync plugin|Google calendar sync plugin]] enabled then object with
    reserved_time type will contain not empty list of time slots marked as busy in Google calendar. Call
    [[#isPluginActivated|isPluginActivated('google_calendar_export')]] API method to check if Google
    calendar sync plugin activated.


    Example:


    {
    "2016-02-05": [
    {
    "dd": [], // time slots from Google calendar
    "events": [ // reserved time slots
    { "from": "16:00", "to": "16:30" },
    { "from": "16:30", "to": "17:00" },
    ... ],
    "type": "reserved_time",
    },
    {
    "events": [
    { "from": "09:00", "to": "09:30" },
    { "from": "09:30", "to": "10:00" },
    ... ],
    "type": "not_worked_time"
    }],
    ...
    }

    • @param String $from
    • @param String $to
    • @param Integer $eventId
    • @param Integer $unitId
    • @param Integer $count
    • @return Object
  • getWorkDaysInfo ($from, $to, $unitId, $eventId, $count, $productIds)

    Returns an information about working hours and break times for specified service and performer for a period
    between two dates. If only service specified then information about performer (or performers) will be taken from

    service configuration. Method returns a list of objects for each date in specified period. Count of objects in
    list depends on break times. For example if performer works from 9:00 till 19:00 with one hour break at 13:00 method
    returns:


    {'2014-05-14' : [
    {'from': '09:00:00', 'to': '13:00:00'},
    {'from': '14:00:00', 'to': '19:00:00'}
    ] }


    Warning! Method can return a time string '24:00:00' as right edge of time range. This happens in case if time
    range finishes on midnight.

    • @param String $from
    • @param String $to
    • @param Integer $unitId (optional)
    • @param Integer $eventId (optional)
    • @param Integer $count (optional)
    • @param array $productIds (optional)
    • @return array
  • getFirstWorkingDay ($data)

    Returns first working date for unit

    • @param Integer|array $data pass unit_group_id as integer for old version or structure for new version like {unit_group_id: int, event_id: int}
    • @return String
  • getStartTimeMatrix ($from, $to, $eventId, $unitId, $count, $bookingId, $productIds)

    Returns available start time, taking into account breaktimes, start and end working time
    Eg.: {'2014-05-14': ['09:00:00', ...], ...}


    If locations plugin activated for company you should pass a list as $unitID parameter for filter results with
    units available only for selected location. See [[Plugins#Unit_location|Unit location]] plugin description for
    more details.

    • @param String $from
    • @param String $to
    • @param Integer $eventId
    • @param Mixed $unitId can be Integer or Array of Integers
    • @param Integer $count
    • @param int $bookingId
    • @param array $productIds
    • @return array
  • getCartesianStartTimeMatrix ($from, $to, $eventId, $unitId, $count, $bookingId, $productIds)

    Returns available start time, taking into account breaktimes, start and end working time.
    The difference between getStartTimeMatrix and getCartesianStartTimeMatrix is that getCartesianStartTimeMatrix

    provides time slots for each individual provider.
    Eg.: {"provider_id": 1, "service_id": 1, "timeslots": {"2014-05-14": ['09:00:00', ...], ...}, ...}

    If locations plugin activated for company you should pass a list as $unitID parameter for filter results with
    units available only for selected location. See [[Plugins#Unit_location|Unit location]] plugin description for
    more details.

    • @param String $from
    • @param String $to
    • @param Integer $eventId
    • @param Mixed $unitId can be Integer or Array of Integers
    • @param Integer $count
    • @param int $bookingId
    • @param array $productIds
    • @return array
  • getAvailableTimeIntervals ($dateFrom, $dateTo, $eventId, $unitId, $count)

    Returns available time intervals for all service providers for given period, taking into account breaktimes, start and end working time
    Eg.: {['2016-03-04': ['1': [['09:00:00','09:30:00'], ['11:15:00','14:45:00']] , ...], ...]}

    • @param String $dateFrom
    • @param String $dateTo
    • @param Integer $eventId
    • @param Mixed $unitId can be Integer or Array of Integers
    • @param Integer $count
    • @return Object
  • getServiceAvailableTimeIntervals ($dateFrom, $dateTo, $eventId, $unitId, $count)

    Returns available time intervals for all servics for given period, taking into account breaktimes, start and end working time
    Eg.: {['2016-03-04': ['1': [['09:00:00','09:30:00'], ['11:15:00','14:45:00']] , ...], ...]}

    • @param String $dateFrom
    • @param String $dateTo
    • @param Mixed $eventId can be Integer or Array of Integers
    • @param Integer $unitId
    • @param Integer $count
    • @return Object
  • getReservedTimeIntervals ($dateFrom, $dateTo, $eventId, $unitId, $count, $bookingId)

    Returns not available time
    Eg.: {'2014-05-14': [{'reserved_time': [{'from': '14:00', 'to': '16:30'}], 'type': "reserved_time"}, ...], ...}

    • @param String $dateFrom
    • @param String $dateTo
    • @param Integer $eventId
    • @param Integer|Array $unitId
    • @param Integer $count
    • @param int $bookingId
    • @return array
  • getAvailableUnits ($eventId, $dateTime, $count, $unitId, $productIds)

    Returns list of available unit ids for specified date and service or empty array if all units are not allowed.
    Eg.: [1, 2, 3]

    • @param Integer $eventId
    • @param String $dateTime a date and time string in format 'Y-m-d H:i:s'
    • @param int $count
    • @param int $unitId
    • @param array $productIds
    • @return array
    • @throws Exception
  • getAnyUnitData ()

    Returns information about [[Plugins#Any_Employee_selector|Any Employee selector plugin]] configuration. Returns
    null if plugin not enabled.


    Example:
    {
    "description" : "Select this option, if you want to find an available time with any of the employees",
    "hide_other_units" : 1, // 1 or 0
    "image" : null,
    "name" : "Any employee",
    "picture_path" : null,
    "random_selection" : 0 // 1 or 0
    }

    • @return Object
  • getAdditionalFields ($eventId)

    Return additional fields for certain event if [[Plugins#Additional_fields|Additional fields plugin]] is
    activated. Returns empty array otherwise. Call [[#isPluginActivated|isPluginActivated('event_field')]]

    API method to check if 'event_field' plugin activated.

    • @param Integer $eventId
    • @return Array
  • getTimeframe ()

    Returns company's timeframe configuration (in minutes). Timeframe can be either 5, 10, 15, 20, 30 or 60 minutes.
    You can find more details about timeframe [[Settings#Timeframe|here]].

    • @return Integer
  • isPluginActivated ($pluginName)

    Return plugin status true if status active, else false. $pluginName parameter is a plugin identifier.
    See [[Plugins|plugins]] page for full plugins description. See [[#Plugin's identifiers|list of available plugin's names]].

    • @param String $pluginName
    • @return Boolean
  • getPluginStatuses ($pluginNames)

    Return plugin status true if status active, else false. See [[#Plugin's identifiers|list of available plugin's names]].

    • @param Array $pluginNames
    • @return Array
  • getCompanyInfo ()

    Returns an object with detailed information about company. See [[#getCompanyInfo response|example of response]].

    • @return Object
  • createBatch ()

    Creates new booking batch record. Returns newly created batch id. You can use this id in [[#book|book]]
    API method.

    • @return Integer
  • getCountryPhoneCodes ()

    Returns country phone code list

    • @return Array
  • getPluginPromoInfoByCode ()

    Returns an object with detailed information about promotion by promotion code. You can get promotion code
    using [[Catalogue#getPromotionList|getPromotionList]] API method. If promotion record with specified

    code not found then method returns an empty array (an empty object). If [[Plugins#Simply Smart Promotions|Simply Smart Promotions plugin]]
    not enabled then method returns an error with code -32001 (Plugin is not activated). Use
    [[#isPluginActivated|isPluginActivated('promo')]] API method call to check if plugin enabled.


    See [[#getPromotionList response|example]] of getPromotionList API method response. Please note that
    response contains a list of services for wich promotion discount can be applied (service_ids key).

    • @param String
    • @return Array
  • getCompanyTimezoneOffset ()

    Returns company timezone offset and company timezone

    • @return array

URL сервиса  https://user-api.simplybook.me/catalog

  • getCompanyList ($filter, $from, $limit)

    Returns companies list

    $filter filter params. Object that contains following params


    'search_string': String,
    'service_name': String,
    'company_name': String,
    'company_address': String,
    'category_id': Integer,
    'tag_ids': [Integer, Integer, ...],
    'tags': String,
    'country_id': String,
    'city_id': String,
    'nearby': {
    'radius': Integer,
    'center': {
    'lat': Number,
    'lng': NUmber
    }
    }

    Use tag_ids OR tags

    • @param Object $filter filter object
    • @param Integer $from from position
    • @param Integer $limit rows limit
    • @return array
  • getPromotionList ($filter, $from, $limit)

    Returns active promotion list

    $filter filter params. Object that contains following params


    'search_string': String,
    'service_name': String,
    'company_name': String,
    'company_address': String,
    'tag_ids': [Integer, Integer, ...],
    'tags': String,
    'country_id': String,
    'city_id': String,
    'nearby': {
    'radius': Integer,
    'center': {
    'lat': Number,
    'lng': NUmber
    }
    }

    Use tag_ids OR tags

    • @param Object $filter filter object
    • @param Integer $from from position
    • @param Integer $limit rows limit
    • @return array
  • getPromotionListByIds ()

    Returns active promotion list

    • @param array
    • @return array
  • getCompanyCount ($filter)

    Returns total companies count with specified filter

    $filter filter params. Object that contains following params


    'search_string': String,
    'service_name': String,
    'company_name': String,
    'company_address': String,
    'tag_ids': [Integer, Integer, ...],
    'tags': String,
    'country_id': String,
    'city_id': String,
    'nearby': {
    'radius': Integer,
    'center': {
    'lat': Number,
    'lng': NUmber
    }
    }

    Use tag_ids OR tags

    • @param Object $filter filter object
    • @return array
  • getPromotionCount ($filter)

    Returns total active promotions count with specified filter

    $filter filter params. Object that contains following params


    'search_string': String,
    'service_name': String,
    'company_name': String,
    'company_address': String,
    'tag_ids': [Integer, Integer, ...],
    'tags': String,
    'country_id': String,
    'city_id': String,
    'nearby': {
    'radius': Integer,
    'center': {
    'lat': Number,
    'lng': NUmber
    }
    }

    Use tag_ids OR tags

    • @param Object $filter filter object
    • @return array
  • getTopCountries ()

    Returns country list as Array order by company count in country

    • @return Array [{'id': ..., 'country': ...., 'count': ....}, ...]
  • getTopCities ()

    Returns city list as Array order by company count in city

    • @return Array [{'id': ..., 'city': ...., 'country_id': ...., 'count': .....}, ....]
  • getCountries ()

    Returns a list of objects with just two properties each: id and country. An id
    is a two character string with ISO 3166-1 country code.

    • @return Array [{'id': ..., 'country': ...., 'count': ....}, ...]
  • getCities ($country, $withActiveCompany)

    Returns a list of objects. If $country parametr specified then method returns only cities of this
    country. Each object in list has 4 properties:


    * id - number. A unique identificator of city. You should use it as filter options in methods getCompanyList.
    * city - string. A city name.
    * count_id - string. Two chars ISO 3166-1 country code.
    * count - number.

    Example:


    [{
    "cnt" : 7,
    "country_id"" : "GB",
    "id" : 4607,
    "name" : "Uxbridge"
    },
    ...]

    • @param String $country Optional. A two character ISO 3166-1 country code.
    • @param bool $withActiveCompany
    • @return Array [{'id': ..., 'city': ...., 'country_id': ...., 'count': .....}, ....]
  • getTags ($filter)

    Returns tags list

    $filter filter params. Object that contains following params


    'tag_ids': [Integer, Integer, ...],
    'tags': String,
    'country_id': String,
    'city_id': String

    Use tag_ids OR tags

    • @param Object $filter filter object
    • @return Array [{'id': ..., 'tag': ...}, ....]
  • getCompanyInfo ($login)

    Returns company information by company login

    • @param String $login
    • @return Object
  • getPromotionInfo ($id, $feedbackFrom, $feedbackCount)

    Returns promotion information by id

    • @param Integer $id
    • @param Integer $feedbackFrom = 0
    • @param Integer $feedbackCount = 100
    • @return Object
  • getRelatedPromotions ($id, $count)

    Returns related promotions by given promotion id

    • @param Integer $id
    • @param Integer $count = 10
    • @return Array
  • getCompanyReviews ($login, $count, $offset)

    Returns a list of company's review objects.


    [{
    "company_id" : 86409,
    "domain" : "simplybook.me",
    "feedback_datetime" : "2015-10-27 13:06:57",
    "feedback_id" : 4623,
    "feedback_link" : "",
    "id" : 17384,
    "image" : "http://graph.facebook.com/1020443689023222/picture",
    "link" : "https://www.facebook.com/app_scoped_user_id/1020443689023222/",
    "message" : "Brilliant!",
    "name" : "Simply Booker",
    "provider" : "",
    "provider_data" : "...", // String. An object encoded with PHP's serialize method.
    "rate" : 5, // 0 to 5 rate
    "status" : "approved", // 'new' or 'approved'
    "subject" : "Good",
    "with_comment" : 1
    },
    ...]

    • @see http://php.net/serialize
    • @param String $login
    • @param Integer $count
    • @param Integer $offset
    • @return Object
  • getCompanyReviewsCount ($login)

    Returns company's reviews count

    • @param String $login
    • @return Integer
  • getCompanyReview ($login, $reviewId)

    Returns a company's review objects.

    • @param String $login
    • @param Integer $reviewId
    • @return Object
  • getClientReviewsLikes ($clientId, $clientProvider)

    Returns a list of company's review likes.

    • @param String $clientId
    • @param String $clientProvider
    • @return Object
  • addCompanyReview ($login, $subject, $message, $rate, $provider, $accessToken)

    Adds company review

    • @param String $login
    • @param String $subject
    • @param String $message
    • @param Integer $rate
    • @param String $provider
    • @param String $accessToken
    • @return Boolean
  • addPromotionReview ($promotionId, $subject, $message, $rate, $provider, $accessToken)

    Add promotion review

    • @param Integer $promotionId
    • @param String $subject
    • @param String $message
    • @param Integer $rate
    • @param String $provider
    • @param String $accessToken
    • @return Boolean
  • getPromotionReviews ($promotionId)

    Returns promotion reviews list

    • @param Integer $promotionId
    • @return Object
  • getRecentPromotions ($count)

    Returns list of promotions ordered by date DESC

    • @param Integer $count
    • @return Array
  • getRecentFeedbacks ($count)

    Returns list of feedbacs ordered by date DESC

    • @param Integer $count
    • @return Array
  • getRecentCompanies ($count)

    Returns list of companies ordered by date DESC

    • @param Integer $count
    • @return Array
  • getCategories ()

    Returns all categories as list of objects. Each category can have a subcategories. Each subcategory contains parent
    category id in company_category_id field. For top level categories this field is null and

    is_header field is true.


    Example:


    [{
    "company_category_id": null,
    "id": "1",
    "image": "/common/images/category_icons/car.png",
    "is_active": "1",
    "is_header": "1",
    "name": "Cars",
    },
    {
    "company_category_id": "1",
    "id" = 11;
    "image": null,
    "is_active": "1",
    "is_header": "0",
    "name": "Car wash",
    },
    ...]

    • @return Array
  • getFeedbackList ()

    Get list of ALL simplybook feedbacks

    • @return Array
  • getCompanyPromotionList ($promotionCompanyLogin, $count)

    Returns a list of promotions objects associated with specified company. If company doesn't have any promotions or
    [[Plugins#Simply_Smart_Promotions|Simply Smart Promotions plugin]] not active for this company method returns an

    empty list.

    • @param String $promotionCompanyLogin
    • @param Integer $count Optional. Maximum amount of objects in response. Default value is 100.
    • @return Array
  • getUserLocation ($ip)

    Returns user location info

    • @param String $ip optional
    • @return Object
  • getAutocompleete ($filter, )

    Returns suggestions for autocompeter

    $filter filter params. Object that contains following params


    'search_string': String,
    'service_name': String,
    'company_name': String,
    'company_address': String,
    'category_id': Integer,
    'tag_ids': [Integer, Integer, ...],
    'tags': String,
    'country_id': String,
    'city_id': String,
    'nearby': {
    'radius': Integer,
    'center': {
    'lat': Number,
    'lng': NUmber
    }
    }

    Use tag_ids OR tags

    • @param Object $filter filter object
    • @param Boolean
    • @return array
  • deleteClientFeedbacks ($gdprDataSerialized)

    Anonymize client feedbacks and feedback likes
    according to GDPR client's right to be forgotten

    • @param array $gdprDataSerialized
  • deleteClientPromotionFeedbacks ($gdprDataSerialized)

    Delete promotion_feedbak and promotion_feedback_response data
    according to GDPR client's right to be forgotten

    • @param array $gdprDataSerialized
    • @return mixed
    • @throws Gdpr_Exception

Методы

    Дополнительные поля

  • Get additional fields list

    Return intake forms fields. (intake forms custom feature)
    Please note that result is wrapped into paginated result.
    In GET parameters you can pass filter (see http example) with following parameters:
    service_id - return fields for this service
    Конечная точка:
    /admin/additional-fields
    Метод:
    GET
    Параметры запроса:
    object filter - filter object
    Возврат:
    Пример HTTP-запроса:
    GET https://user-api-v2.simplybook.me/admin/additional-fields?filter[service_id]=1
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Аутентификация

  • Authentication

    Authentication process. Return auth token info (TokenEntity)
    Accepts AdminLoginEntity data as body of request.
    Throws BadRequest error in case invalid data was provided with detailed errors per field.
    Конечная точка:
    /admin/auth
    Метод:
    POST
    Параметры запроса:
    AdminLoginEntity body - authentication data
    Возврат:
    Вывод:
    AccessDenied
    BadRequest
    Пример HTTP-запроса:
    POST https://user-api-v2.simplybook.me/admin/auth
    Content-Type: application/json
    
    {
      "company": "<insert your company login>",
      "login": "<insert your user login>",
      "password": "<insert your user password>"
    }
  • Second factory authentication

    Second factory authentication process. Return auth token info (TokenEntity). Required in case 2FA authentication is enabled.
    Pass session from authentication step. In case you use SMS as 2fa provider you need to call /admin/auth/sms to receive SMS with code.
    Accepts AdminLogin2FAEntity data as body of request.
    Throws BadRequest error in case invalid data was provided with detailed errors per field.
    Throws AccessDenied error in case user does not have access to perform this action.
    Конечная точка:
    /admin/auth/2fa
    Метод:
    POST
    Параметры запроса:
    AdminLogin2FAEntity body - second factory authentication data
    Возврат:
    Вывод:
    AccessDenied
    BadRequest
    Пример HTTP-запроса:
    POST https://user-api-v2.simplybook.me/admin/auth/2fa
    Content-Type: application/json
    
    {
      "company": "<insert your company login>",
      "session_id": "<insert session_id value from auth request>",
      "code": "<insert 2FA code>",
      "type": "<insert 2FA type (ga/sms)>"
    }
  • Get SMS code

    Send SMS to user phone number. Returns empty response.
    Throws BadRequest error in case invalid data was provided.
    Throws AccessDenied error in case user does not have access to perform this action.
    Конечная точка:
    /admin/auth/sms
    Метод:
    GET
    Параметры запроса:
    string company - company login
    string session_id - company login
    Вывод:
    AccessDenied
    BadRequest
    Пример HTTP-запроса:
    GET https://user-api-v2.simplybook.me/admin/auth/sms?company=<insert your company login>&session_id=<insert session_id value from auth request>
    Content-Type: application/json
  • Renew token with refresh token

    Renew token with refresh token with refresh token, that was received on authentication step. Return TokenEntity.
    Accepts RefreshTokenEntity data as body of request.
    Throws BadRequest error in case invalid data was provided.
    Throws AccessDenied error in case user does not have access to perform this action.
    Конечная точка:
    /admin/auth/refresh-token
    Метод:
    POST
    Параметры запроса:
    RefreshTokenEntity body - refresh token data
    Вывод:
    AccessDenied
    BadRequest
    Пример HTTP-запроса:
    POST https://user-api-v2.simplybook.me/admin/auth/refresh-token
    Content-Type: application/json
    
    {
      "company": "<insert your company login>",
      "refresh_token": "<insert refresh_token from auth step>"
    }
  • Logout and revoke token

    Revoke token that was received on authentication.
    Accepts AdminLogoutEntity data as body of request.
    Throws BadRequest error in case invalid data was provided.
    Throws AccessDenied error in case user does not have access to perform this action.
    Конечная точка:
    /admin/auth/logout
    Метод:
    POST
    Параметры запроса:
    AdminLogoutEntity body - logout data
    Вывод:
    AccessDenied
    BadRequest
    Пример HTTP-запроса:
    POST https://user-api-v2.simplybook.me/admin/auth/logout
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
    
    {
      "auth_token": "<insert your token from auth step>"
    }
  • Бронирования

  • Make new booking

    Make new booking and return booking result (BookingResultEntity).
    Accepts AdminBookingBuildEntity data as body of request.
    Throws AccessDenied error in case user does not have access to booking.
    Throws BadRequest error in case invalid data was provided with detailed errors per field.
    Конечная точка:
    /admin/bookings
    Метод:
    POST
    Параметры запроса:
    AdminBookingBuildEntity body - booking data
    Возврат:
    Вывод:
    AccessDenied
    BadRequest
    Пример HTTP-запроса:
    POST https://user-api-v2.simplybook.me/admin/bookings
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
    
    {
      "count": 1,
      "start_datetime": "2020-12-02 09:30:00",
      "location_id": 2,
      "category_id": 2,
      "provider_id": 4,
      "service_id": 3,
      "client_id": 10,
      "additional_fields": [
        {
          "field": "e5a1d0e5312b9515874406a89c986765",
          "value": "test"
        },
        {
          "field": "3adae019f9183fcfb7b02fcef54b094d",
          "value": "Option 1"
        },
        {
          "field": "9c3ce1fc22bd50cbb21bdfcfd2f850bf",
          "value": "988"
        },
        {
          "field": "1a2e4bdc78b9fd4593d8924b25f38244",
          "value": "Select 2"
        }
      ]
    }
  • Edit booking

    Modify booking and return booking result (BookingResultEntity).
    Accepts AdminBookingBuildEntity data as body of request.
    Throws AccessDenied error in case user does not have access to booking.
    Throws BadRequest error in case invalid data was provided with detailed errors per field.
    Throws NotFound error in case booking is not found.
    Конечная точка:
    /admin/bookings/{id}
    Метод:
    PUT
    Параметры запроса:
    int id - booking id
    AdminBookingBuildEntity body - booking data
    Возврат:
    Вывод:
    AccessDenied
    BadRequest
    NotFound
    Пример HTTP-запроса:
    PUT https://user-api-v2.simplybook.me/admin/bookings/1
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
    
    {
      "count": 1,
      "start_datetime": "2020-12-02 09:30:00",
      "location_id": 2,
      "category_id": 2,
      "provider_id": 4,
      "service_id": 3,
      "client_id": 10,
      "additional_fields": [
        {
          "field": "e5a1d0e5312b9515874406a89c986765",
          "value": "test"
        },
        {
          "field": "3adae019f9183fcfb7b02fcef54b094d",
          "value": "Option 1"
        },
        {
          "field": "9c3ce1fc22bd50cbb21bdfcfd2f850bf",
          "value": "988"
        },
        {
          "field": "1a2e4bdc78b9fd4593d8924b25f38244",
          "value": "Select 2"
        },
        {
          "field": "b90b2d238ffc2a7a782c6a81a8e60bb1",
          "value": "test"
        }
      ]
    }
  • Get booking details

    Return booking item entity by booking id. (AdminBookingDetailsEntity)
    Throws AccessDenied error in case user does not have access to booking.
    Throws NotFound error in case booking is not found.
    Конечная точка:
    /admin/bookings/{id}
    Метод:
    GET
    Параметры запроса:
    int id - booking id
    Возврат:
    Вывод:
    AccessDenied
    NotFound
    Пример HTTP-запроса:
    GET https://user-api-v2.simplybook.me/admin/bookings/1
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Cancel booking

    Cancel booking by booking id and return booking that was canceled (AdminBookingDetailsEntity).
    Throws AccessDenied error in case user does not have access to booking.
    Throws NotFound error in case booking is not found.
    Конечная точка:
    /admin/bookings/{id}
    Метод:
    DELETE
    Параметры запроса:
    int id - booking id
    Возврат:
    Вывод:
    AccessDenied
    BadRequest
    Пример HTTP-запроса:
    DELETE https://user-api-v2.simplybook.me/admin/bookings/1
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Approve booking with approve booking custom feature

    Approve booking by booking id and return booking details (AdminBookingDetailsEntity).
    Throws AccessDenied error in case user does not have access to booking.
    Throws BadRequest error in case booking can not be approved.
    Throws NotFound error in case booking is not found.
    Конечная точка:
    /admin/bookings/{id}/approve
    Метод:
    PUT
    Параметры запроса:
    int id - booking id
    Возврат:
    Вывод:
    AccessDenied
    BadRequest
    Пример HTTP-запроса:
    PUT https://user-api-v2.simplybook.me/admin/bookings/1/approve
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Apply status with status custom feature

    Apply booking status booking by booking id and return booking details (AdminBookingDetailsEntity).
    Throws AccessDenied error in case user does not have access to booking.
    Throws NotFound error in case booking is not found.
    Конечная точка:
    /admin/bookings/{id}/status
    Метод:
    PUT
    Параметры запроса:
    int id - booking id
    Возврат:
    Вывод:
    AccessDenied
    NotFound
    Пример HTTP-запроса:
    PUT https://user-api-v2.simplybook.me/admin/bookings/1/status
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
    
    {
      "status_id": 1
    }
  • Set comment for booking

    Set booking comment by booking id and return booking details (AdminBookingDetailsEntity).
    Throws AccessDenied error in case user does not have access to booking.
    Throws NotFound error in case booking is not found.
    Конечная точка:
    /admin/bookings/{id}/comment
    Метод:
    PUT
    Параметры запроса:
    int id - booking id
    Возврат:
    Вывод:
    AccessDenied
    NotFound
    Пример HTTP-запроса:
    PUT https://user-api-v2.simplybook.me/admin/bookings/1/comment
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
    
    {
      "comment": "This is booking comment."
    }
  • Get schedule

    Return array of day schedule info objects for selected service, provider and dates
    Конечная точка:
    /admin/schedule
    Метод:
    GET
    Параметры запроса:
    int service_id - selected service id
    int provider_id - selected provider id
    string date_from - date from
    string date_to - date to
    Возврат:
    Пример HTTP-запроса:
    GET https://user-api-v2.simplybook.me/admin/schedule?date_from=2020-08-25&date_to=2020-08-27&provider_id=2&service_id=1
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Get slots

    Return array of available slots to book as admin.
    It just returns schedule of day divided by slots.
    Конечная точка:
    /admin/schedule/slots
    Метод:
    GET
    Параметры запроса:
    int service_id - selected service id
    int provider_id - selected provider id
    string date - selected date
    Возврат:
    Пример HTTP-запроса:
    GET https://user-api-v2.simplybook.me/admin/schedule/slots?date=2020-08-28&provider_id=1&service_id=5
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Get available slots

    Return array of available slots to book.
    Конечная точка:
    /admin/schedule/available-slots
    Метод:
    GET
    Параметры запроса:
    int service_id - selected service id
    int provider_id - selected provider id
    string date - selected date
    int count - group booking count
    array|int[] products - array of selected addons
    Возврат:
    Пример HTTP-запроса:
    GET https://user-api-v2.simplybook.me/admin/schedule/available-slots?date=2020-08-27&provider_id=1&service_id=5
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Get first available slot

    Return first available slot for selected service/provider/date
    It can return slot for different date in case all slots are busy for selected date.
    Конечная точка:
    /admin/schedule/first-available-slot
    Метод:
    GET
    Параметры запроса:
    int service_id - selected service id
    int provider_id - selected provider id
    string date - selected date
    int count - group booking count
    Возврат:
    Пример HTTP-запроса:
    GET https://user-api-v2.simplybook.me/admin/schedule/first-available-slot?date=2020-08-30&provider_id=1&service_id=5
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Get slots timeline

    Return data for slots timeline per date.
    Конечная точка:
    /admin/timeline/slots
    Метод:
    GET
    Параметры запроса:
    int service_id - selected service id
    int provider_id - selected provider id
    string date_from - date from
    int count - bookings count
    bool with_available_slots - to calculate available slots count (Display Remaining Spaces custom feature required)
    int booking_id - timeline for edit booking
    int[]|array product_ids - array of selected service addons ids
    bool skip_min_max_restriction - to skip min and max restriction
    Возврат:
    Пример HTTP-запроса:
    GET https://user-api-v2.simplybook.me/admin/timeline/slots?date_from=2020-09-25&date_to=2020-09-25&provider_id=1&service_id=1&with_available_slots=1
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Get bookings list

    Return bookings list.
    Please note that result is wrapped into paginated result.
    Throws AccessDenied error in case user does not have access to bookings report.
    In GET parameters you can pass page, on_page and filter with following parameters:
    upcoming_only - return upcomming bookings only
    status - booking status (can be confirmed/confirmed_pending/pending/canceled)
    services - array of service ids to filter by services
    providers - array of provider ids to filter by providers
    client_id - client id. to filter by client id
    date - filter by date
    search - search string (by code, client data)
    additional_fields - search by additional fields (&filter[additional_fields][field] = value)
    Конечная точка:
    /admin/bookings
    Метод:
    GET
    Параметры запроса:
    int page - page in list
    int on_page - items per page
    object filter - filter object
    Возврат:
    array|AdminReportBookingEntity[]
    Пример HTTP-запроса:
    GET https://user-api-v2.simplybook.me/admin/bookings?filter[upcoming_only]=1
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Get calendar data

    Return calendar data with bookings, notes and break times.
    Throws AccessDenied error in case user does not have access to bookings report.
    In GET parameters you can pass mode (day, week, provider or service) and filter with following parameters:
    upcoming_only - return upcomming bookings only
    status - booking status (can be confirmed/confirmed_pending/pending/canceled)
    services - array of service ids to filter by services
    providers - array of provider ids to filter by providers
    client_id - client id. to filter by client id
    date_from - filter by date from
    date_to - filter by date to
    search - search string (by code, client data)
    additional_fields - search by additional fields (&filter[additional_fields][field] = value)
    Конечная точка:
    /admin/calendar
    Метод:
    GET
    Параметры запроса:
    int page - page in list
    int on_page - items per page
    object filter - filter object
    Возврат:
    Пример HTTP-запроса:
    GET https://user-api-v2.simplybook.me/admin/calendar?mode=provider&filter[status]=confirmed_pending&filter[date_from]=2020-08-26&filter[date_to]=2020-08-26
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Generate new detailed report task

    In POST parameters you can pass filter (see http example) with following parameters:
    code Booking code
    created_date_from Created date to
    created_date_to Created date from
    date_from Date to
    date_to Date from
    event_id Service
    unit_group_id Service provider
    client_id Client
    booking_type cancelled or non_cancelled
    Конечная точка:
    /admin/detailed-report
    Метод:
    POST
    Параметры запроса:
    object filter - filter object
    object export_columns - export_columns object
    string order_direction
    string order_field
    Возврат:
    array
    Вывод:
    AccessDenied
    BadRequest
    Пример HTTP-запроса:
    POST https://user-api-v2.simplybook.me/admin/detailed-report
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
    
    {
      "filter": {
        "created_date_from": "2021-01-01",
        "created_date_to": "2021-03-31",
        "date_from": "2021-01-02",
        "date_to": "2021-03-29",
        "event_id": "2",
        "unit_group_id": "7",
        "client_id": "12",
        "booking_type": "non_cancelled"
      },
      "export_columns": [
      ],
      "order_direction": "asc",
      "order_field": "record_date"
    }
    
  • Get report by id

    Return report info by id.
    Throws AccessDenied error in case user does not have access to report.
    Throws NotFound error in case report is not found.
    Конечная точка:
    /admin/detailed-report/{id}
    Метод:
    GET
    Параметры запроса:
    string id - report id
    Возврат:
    array
    Вывод:
    AccessDenied
    NotFound
    Пример HTTP-запроса:
    GET https://user-api-v2.simplybook.me/admin/detailed-report/193
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Set medical test status for booking

    Конечная точка:
    /admin/medical-test/status/{id}
    Метод:
    PUT
    Параметры запроса:
    int id - booking id
    string status - status
    Вывод:
    AccessDenied
    NotFound
    BadRequest
    Пример HTTP-запроса:
    PUT https://user-api-v2.simplybook.me/admin/medical-test/status/1
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
    
    {
      "status": "negative"
    }
  • Клиенты

  • Get clients list

    Return clients list.
    Please note that result is wrapped into paginated result.
    In GET parameters you can pass page, on_page and filter with following parameters:
    search - search string
    Конечная точка:
    /admin/clients
    Метод:
    GET
    Параметры запроса:
    int page - page in list
    int on_page - items per page
    object filter - filter object
    Возврат:
    array|ClientEntity[]
    Пример HTTP-запроса:
    GET https://user-api-v2.simplybook.me/admin/clients?page=1&on_page=10&filter[search]=al
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Get client

    Return client item item by id.
    Throws AccessDenied error in case user does not have access to perform this action.
    Throws NotFound error in case client is not found.
    Конечная точка:
    /admin/clients/{id}
    Метод:
    GET
    Параметры запроса:
    int id - client id
    Возврат:
    Вывод:
    AccessDenied
    NotFound
    Пример HTTP-запроса:
    GET https://user-api-v2.simplybook.me/admin/clients/1
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Create client

    Create new client and return it.
    Throws AccessDenied error in case user does not have access to perform this action.
    Throws BadRequest error in case invalid data was provided with detailed errors per field.
    Throws NotFound error in case client is not found.
    Конечная точка:
    /admin/clients
    Метод:
    POST
    Параметры запроса:
    ClientEntity body - client data
    Возврат:
    Вывод:
    AccessDenied
    BadRequest
    NotFound
    Пример HTTP-запроса:
    POST https://user-api-v2.simplybook.me/admin/clients
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
    
    {
      "name": "Mike",
      "email": "mikeemail@gmail.com",
      "phone": "+123456789987"
    }
  • Edit client

    Modify client by id and return it.
    Throws AccessDenied error in case user does not have access to perform this action.
    Throws BadRequest error in case invalid data was provided with detailed errors per field.
    Throws NotFound error in case client is not found.
    Конечная точка:
    /admin/clients/{id}
    Метод:
    PUT
    Параметры запроса:
    ClientEntity body - client data
    int id - client id
    Возврат:
    Вывод:
    AccessDenied
    BadRequest
    NotFound
    Пример HTTP-запроса:
    PUT https://user-api-v2.simplybook.me/admin/clients/1
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
    
    {
      "name": "Mike",
      "email": "mikeemail@gmail.com",
      "phone": "+123456789987"
    }
  • Delete client

    Delete client by id. Return empty response
    Throws AccessDenied error in case user does not have access to perform this action.
    Throws NotFound error in case booking is not found.
    Конечная точка:
    /admin/clients/{id}
    Метод:
    DELETE
    Параметры запроса:
    int id - client id
    Вывод:
    AccessDenied
    NotFound
    Пример HTTP-запроса:
    DELETE https://user-api-v2.simplybook.me/admin/clients/1000
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Get client memberships list

    Return client membership list.
    Please note that result is wrapped into paginated result.
    In GET parameters you can pass page, on_page and filter with following parameters:
    client_id - client id
    service_id - service id
    service_start_date - booking start date (to filter actual memberships only)
    count - group bookings count
    active_only - active memberships only
    search - search string
    Конечная точка:
    /admin/clients/memberships
    Метод:
    GET
    Параметры запроса:
    int page - page in list
    int on_page - items per page
    object filter - filter object
    Возврат:
    Пример HTTP-запроса:
    GET https://user-api-v2.simplybook.me/admin/clients/memberships?page=1&on_page=10&filter[client_id]=78&filter[service_id]=8&filter[service_start_date]=2020-08-20
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Get client fields list

    Returns client fields list, including name, email, phone and address fields.
    Конечная точка:
    /admin/clients/fields
    Метод:
    GET
    Возврат:
    Пример HTTP-запроса:
    GET https://user-api-v2.simplybook.me/admin/clients/fields
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Get client fields values

    Returns client fields values list, including name, email, phone and address fields.
    Throws AccessDenied error in case user does not have access to perform this action.
    Throws NotFound error in case client is not found.
    Конечная точка:
    /admin/clients/field-values/{id}
    Метод:
    GET
    Параметры запроса:
    int id - client id
    Возврат:
    Вывод:
    AccessDenied
    NotFound
    Пример HTTP-запроса:
    GET https://user-api-v2.simplybook.me/admin/clients/field-values/2
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Edit client with fields

    Modify client data from fields list.
    Returns client fields list, including name, email and phone field.
    Throws AccessDenied error in case user does not have access to perform this action.
    Throws NotFound error in case client is not found.
    Throws BadRequest error in case invalid data was provided with detailed errors per field.
    Конечная точка:
    /admin/clients/field-values/{id}
    Метод:
    PUT
    Параметры запроса:
    int id - client id
    Client_DetailsEntity body - client data
    Возврат:
    Вывод:
    AccessDenied
    BadRequest
    NotFound
    Пример HTTP-запроса:
    PUT https://user-api-v2.simplybook.me/admin/clients/field-values/7
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
    
    {
      "id": 7,
      "fields":
      [
        {
          "id": "name",
          "value": "test"
        },
        {
          "id": "email",
          "value": "test@gmail.com"
        },
        {
          "id": "phone",
          "value": "38099999999999"
        },
        {
          "id": "de3b235b9e42131c9a86b5449acca9dd",
          "value": 12
        }
      ]
    }
  • Make client with fields

    Makes new client from fields list.
    Returns client fields list, including name, email and phone field.
    Throws AccessDenied error in case user does not have access to perform this action.
    Throws BadRequest error in case invalid data was provided with detailed errors per field.
    Конечная точка:
    /admin/clients/field-values
    Метод:
    POST
    Параметры запроса:
    Client_DetailsEntity body - client data
    Возврат:
    Вывод:
    BadRequest
    AccessDenied
    Пример HTTP-запроса:
    POST https://user-api-v2.simplybook.me/admin/clients/field-values
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
    
    {
      "id": null,
      "fields":
      [
        {
          "id": "name",
          "value": "test"
        },
        {
          "id": "email",
          "value": "test@gmail.com"
        },
        {
          "id": "phone",
          "value": "38099999999999"
        },
        {
          "id": "de3b235b9e42131c9a86b5449acca9dd",
          "value": 12
        }
      ]
    }
  • membership_module

  • Make membership instance

    Конечная точка:
    /admin/memberships/make-membership-instance
    Метод:
    POST
    Параметры запроса:
    MakeMembershipInstanceRequestEntity membership - instance data
    Вывод:
    AccessDenied
    NotFound
    Пример HTTP-запроса:
    POST https://user-api-v2.simplybook.me/admin/memberships/make-membership-instance
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
    
    {
      "membership_id": "1",
      "period_start": "2021-08-26",
      "is_invoice_needed": 1,
      "payment_processor": "cash",
      "auto_confirm_prolonging": 1,
      "repeat_count": 5,
      "clients": [
        "42"
      ]
    }
  • Cancel membership

    Конечная точка:
    /admin/memberships/cancel-client-membership/{id}
    Метод:
    DELETE
    Параметры запроса:
    int id - client membership id
    Вывод:
    AccessDenied
    NotFound
  • Заметки и блокировка времени

  • Get notes list

    Return notes list.
    Please note that result is wrapped into paginated result.
    In GET parameters you can pass page, on_page and filter with following parameters:
    providers - filter by providers. array of providers ids
    services - filter by services. array of services ids
    types - filter by note types. array of types ids
    search - search string
    date_from - date from
    date_to - date to
    Конечная точка:
    /admin/calendar-notes
    Метод:
    GET
    Параметры запроса:
    int page - page in list
    int on_page - items per page
    object filter - filter object
    Возврат:
    Пример HTTP-запроса:
    GET https://user-api-v2.simplybook.me/admin/calendar-notes?page=1&filter[services][]=1&filter[services][]=2&filter[date_from]=2020-08-01&filter[date_to]=2020-08-10
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Get note details

    Return note details by id
    Throws AccessDenied error in case user does not have access to the calendar note.
    Throws NotFound error in case the calendar note is not found.
    Конечная точка:
    /admin/calendar-notes/{id}
    Метод:
    GET
    Параметры запроса:
    int id - calendar note id
    Возврат:
    Вывод:
    AccessDenied
    NotFound
    Пример HTTP-запроса:
    GET https://user-api-v2.simplybook.me/admin/calendar-notes/1
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Create new note

    Create new note and return it.
    Throws AccessDenied error in case user does not have access to the calendar note.
    Throws NotFound error in case the calendar note is not found.
    Throws BadRequest error in case invalid data was provided with detailed errors per field.
    Конечная точка:
    /admin/calendar-notes
    Метод:
    POST
    Параметры запроса:
    CalendarNoteEntity body - calendar note
    Возврат:
    Вывод:
    AccessDenied
    NotFound
    BadRequest
    Пример HTTP-запроса:
    POST https://user-api-v2.simplybook.me/admin/calendar-notes
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
    
    {
      "provider_id": 1,
      "service_id": null,
      "start_date_time": "2020-09-06 15:00:00",
      "end_date_time": "2020-09-06 15:30:00",
      "note_type_id": "1",
      "note": "note body",
      "mode": "provider",
      "time_blocked": true
    }
    
  • Modify note

    Edit note and return it.
    Throws AccessDenied error in case user does not have access to the calendar note.
    Throws NotFound error in case the calendar note is not found.
    Throws BadRequest error in case invalid data was provided with detailed errors per field.
    Конечная точка:
    /admin/calendar-notes/{id}
    Метод:
    POST
    Параметры запроса:
    int id - calendar note id
    CalendarNoteEntity body - calendar note
    Возврат:
    Вывод:
    AccessDenied
    NotFound
    BadRequest
    Пример HTTP-запроса:
    PUT https://user-api-v2.simplybook.me/admin/calendar-notes/1
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
    
    {
      "provider_id": 2,
      "service_id": null,
      "start_date_time": "2020-09-06 15:00:00",
      "end_date_time": "2020-09-06 15:30:00",
      "note_type_id": "1",
      "note": "note body",
      "mode": "provider",
      "time_blocked": true
    }
    
  • Delete calendar note

    Delete calendar note by id. Return empty response
    Throws AccessDenied error in case user does not have access to booking.
    Throws NotFound error in case booking is not found.
    Конечная точка:
    /admin/calendar-notes/{id}
    Метод:
    DELETE
    Параметры запроса:
    int id - calendar note id
    Вывод:
    AccessDenied
    NotFound
    Пример HTTP-запроса:
    DELETE https://user-api-v2.simplybook.me/admin/calendar-notes/1
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Get note types list

    Return array of not types
    Конечная точка:
    /admin/calendar-notes/types
    Метод:
    GET
    Возврат:
    Пример HTTP-запроса:
    GET https://user-api-v2.simplybook.me/admin/calendar-notes/types
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Get default note type

    Return default note type object
    Конечная точка:
    /admin/calendar-notes/types/default
    Метод:
    GET
    Возврат:
    Пример HTTP-запроса:
    GET https://user-api-v2.simplybook.me/admin/calendar-notes/types/default
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Платежи

  • Get orders/invoices list

    Return orders and invoices list.
    Note that not all data can be presented in list result. To get full info you need to get separate item.
    Please note that result is wrapped into paginated result.
    In GET parameters you can pass page, on_page and filter with following parameters:
    client_id - client id
    datetime_from - order/invoice date and time from
    datetime_to - order/invoice date and time to
    status - order/invoice status
    booking_code - filter by booking code
    Конечная точка:
    /admin/invoices
    Метод:
    GET
    Параметры запроса:
    int page - page in list
    int on_page - items per page
    object filter - filter object
    Возврат:
    Пример HTTP-запроса:
    GET https://user-api-v2.simplybook.me/admin/invoices?filter[booking_code]=0z2ohjmy
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Get order/invoice item

    Return order/invoice item by id
    Конечная точка:
    /admin/invoices/{id}
    Метод:
    GET
    Параметры запроса:
    int id - invoice/order id
    Возврат:
    Вывод:
    AccessDenied
    NotFound
    Пример HTTP-запроса:
    GET https://user-api-v2.simplybook.me/admin/invoices/1
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Accept payment

    Manual accept payment. The order will be marked as payed with provided payment processor.
    You can pass payment_processor as GET parameter and in body of request.
    Throws AccessDenied error in case user does not have access to order.
    Throws BadRequest error in case invalid data was provided with detailed errors.
    Throws NotFound error in case order/invoice is not found.
    Конечная точка:
    /admin/invoices/{id}/accept-payment
    Метод:
    PUT
    Параметры запроса:
    int id - order id
    string payment_processor - payment processor
    Возврат:
    Вывод:
    AccessDenied
    BadRequest
    NotFound
    Пример HTTP-запроса:
    PUT https://user-api-v2.simplybook.me/admin/invoices/1/accept-payment
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
    
    {
      "payment_processor": "manual"
    }
  • Accept payment with saved payment method

    Accept payment with client saved payment method.
    The order will be marked as payed only after confirmation from payment system.
    You have to pass payment_method_id as GET parameter and in body of request.
    Throws AccessDenied error in case user does not have access to order.
    Throws BadRequest error in case invalid data was provided with detailed errors.
    Throws NotFound error in case order/invoice is not found.
    Конечная точка:
    /admin/invoices/{id}/rebill
    Метод:
    PUT
    Параметры запроса:
    int id - order id
    int payment_method_id - payment method id
    Возврат:
    Вывод:
    AccessDenied
    BadRequest
    NotFound
    Пример HTTP-запроса:
    PUT https://user-api-v2.simplybook.me/admin/invoices/1/rebill
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
    
    {
      "payment_method_id": 1
    }
  • Apply promo code

    Apply promo code. Coupons & Gift Cards custom feature.
    You can apply promo code only to pending and new orders.
    You can pass code as GET parameter and in body of request.
    Throws AccessDenied error in case user does not have access to order.
    Throws BadRequest error in case invalid data was provided with detailed errors.
    Throws NotFound error in case order/invoice is not found.
    Конечная точка:
    /admin/invoices/{id}/apply-promo-code
    Метод:
    PUT
    Параметры запроса:
    int id - order id
    string code - promo code
    Возврат:
    Вывод:
    AccessDenied
    BadRequest
    NotFound
    Пример HTTP-запроса:
    PUT https://user-api-v2.simplybook.me/admin/invoices/1/apply-promo-code
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
    
    {
      "code": "tapyjuju"
    }
  • Remove applied promo code

    Remove applied promo code. Coupons & Gift Cards custom feature.
    You can remove promo code only from pending and new orders.
    You can pass code as GET parameter and in body of request.
    Throws AccessDenied error in case user does not have access to order.
    Throws BadRequest error in case invalid data was provided with detailed errors.
    Throws NotFound error in case order/invoice is not found.
    Конечная точка:
    /admin/invoices/{id}/promo-code/{instanceId}
    Метод:
    PUT
    Параметры запроса:
    int id - order id
    int instanceId - promo code instance id
    Возврат:
    Вывод:
    AccessDenied
    BadRequest
    NotFound
    Пример HTTP-запроса:
    DELETE https://user-api-v2.simplybook.me/admin/invoices/1/promo-code/3
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Apply tip

    Apply tip. Tips custom feature.
    You can apply tip only to pending and new orders.
    You can pass percent or amount as GET parameter and in body of request.
    Throws AccessDenied error in case user does not have access to order.
    Throws BadRequest error in case invalid data was provided with detailed errors.
    Throws NotFound error in case order/invoice is not found.
    Конечная точка:
    /admin/invoices/{id}/tip
    Метод:
    PUT
    Параметры запроса:
    int id - order id
    int percent - tip percent
    float amount - tip amount
    Возврат:
    Вывод:
    AccessDenied
    BadRequest
    NotFound
  • Remove applied tip

    Remove applied tip. Tips custom feature.
    You can remove tip only from pending and new orders.
    Throws AccessDenied error in case user does not have access to order.
    Throws BadRequest error in case invalid data was provided with detailed errors.
    Throws NotFound error in case order/invoice is not found.
    Конечная точка:
    /admin/invoices/{id}/tip
    Метод:
    DELETE
    Возврат:
    Вывод:
    AccessDenied
    BadRequest
    NotFound
  • Make payment with terminal

    Конечная точка:
    /admin/invoices/{id}/make-terminal-payment
    Метод:
    POST
    Параметры запроса:
    int id - order id
    string paymentSystem - payment system
    string|null readerId - reader id
    Пример HTTP-запроса:
    POST https://user-api-v2.simplybook.me/admin/invoices/571/make-terminal-payment
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
    
    {
      "paymentSystem": "stripe"
    }
    
    ###
    
    GET https://user-api-v2.simplybook.me/admin/invoices/terminal/reader/list
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
    
    ###
    
    POST https://user-api-v2.simplybook.me/admin/invoices/terminal/stripe-connection-token
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
    
    ###
    
    GET https://user-api-v2.simplybook.me/admin/invoices/terminal/stripe-config-location
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Get terminal readers cross payment systems

    Конечная точка:
    /admin/invoices/terminal/reader/list
    Метод:
    GET
    Пример HTTP-запроса:
    POST https://user-api-v2.simplybook.me/admin/invoices/571/make-terminal-payment
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
    
    {
      "paymentSystem": "stripe"
    }
    
    ###
    
    GET https://user-api-v2.simplybook.me/admin/invoices/terminal/reader/list
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
    
    ###
    
    POST https://user-api-v2.simplybook.me/admin/invoices/terminal/stripe-connection-token
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
    
    ###
    
    GET https://user-api-v2.simplybook.me/admin/invoices/terminal/stripe-config-location
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Create stripe connection token

    Конечная точка:
    /admin/invoices/terminal/stripe-connection-token
    Метод:
    POST
    Пример HTTP-запроса:
    POST https://user-api-v2.simplybook.me/admin/invoices/571/make-terminal-payment
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
    
    {
      "paymentSystem": "stripe"
    }
    
    ###
    
    GET https://user-api-v2.simplybook.me/admin/invoices/terminal/reader/list
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
    
    ###
    
    POST https://user-api-v2.simplybook.me/admin/invoices/terminal/stripe-connection-token
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
    
    ###
    
    GET https://user-api-v2.simplybook.me/admin/invoices/terminal/stripe-config-location
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Get stripe terminal location from config

    Конечная точка:
    /admin/invoices/terminal/stripe-config-location
    Метод:
    GET
    Пример HTTP-запроса:
    POST https://user-api-v2.simplybook.me/admin/invoices/571/make-terminal-payment
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
    
    {
      "paymentSystem": "stripe"
    }
    
    ###
    
    GET https://user-api-v2.simplybook.me/admin/invoices/terminal/reader/list
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
    
    ###
    
    POST https://user-api-v2.simplybook.me/admin/invoices/terminal/stripe-connection-token
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
    
    ###
    
    GET https://user-api-v2.simplybook.me/admin/invoices/terminal/stripe-config-location
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Get client saved payment methods list

    Returns array of client saved payment methods
    The id is client id and it is required.
    Конечная точка:
    /admin/payment-methods/{id}
    Метод:
    GET
    Параметры запроса:
    int id - client id
    Возврат:
    array|PaymentMethodEntity[]
    Пример HTTP-запроса:
    GET https://user-api-v2.simplybook.me/admin/payment-methods/1
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Товары/приложения к сервису

  • Get products/attributes list

    Return products/attributes list. (products/service addons custom features)
    Please note that result is wrapped into paginated result.
    In GET parameters you can pass filter (see http example) with following parameters:
    service_id - return products/attributes for selected service
    search - search string
    type - product type. can be 'product' or 'attribute'
    visible_only - visible products only
    Конечная точка:
    /admin/products
    Метод:
    GET
    Параметры запроса:
    object filter - filter object
    Возврат:
    Пример HTTP-запроса:
    GET https://user-api-v2.simplybook.me/admin/products?filter[search]=cofee&filter[service_id]=1
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Get product/attribute item

    Return product/attribute item by id.
    Конечная точка:
    /admin/products/{id}
    Метод:
    GET
    Возврат:
    Вывод:
    AccessDenied
    NotFound
    Пример HTTP-запроса:
    GET https://user-api-v2.simplybook.me/admin/products/1
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Купоны и подарочные карты

  • Get promotions list

    Return promotions list. (Coupons & Gift cards custom feature)
    Please note that result is wrapped into paginated result.
    In GET parameters you can pass filter (see http example) with following parameters:
    service_id - filter by service
    visible_only - visible only promotions
    promotion_type - gift_card/discount
    Конечная точка:
    /admin/promotions
    Метод:
    GET
    Параметры запроса:
    object filter - filter object
    Возврат:
    Пример HTTP-запроса:
    GET https://user-api-v2.simplybook.me/admin/promotions?filter[service_id]=1&filter[promotion_type]=gift_card
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Get gift cards list

    Return promotion instances list. (Coupons & Gift cards custom feature)
    Please note that result is wrapped into paginated result.
    In GET parameters you can pass filter (see http example) with following parameters:
    purchased_by_client_id - filter by client who purchased gift card
    used_by_client_id - filter by client who used gift card
    service_id - filter by service
    user_id - user, who issued gift card
    duration - duration
    duration_type - duration type
    price_from - gift card price from
    price_to - gift card price to
    status - filter by status (outdated, used, disabled, valid)
    expired_date_from - expired date from
    expired_date_to - expired date to
    start_date_from - start date from
    start_date_to - start date to
    discount_from - discount from
    discount_to - discount to
    used_amount_from - used amount from
    used_amount_to - used amount to
    code - filter by code
    Конечная точка:
    /admin/promotions/gift-cards
    Метод:
    GET
    Параметры запроса:
    object filter - filter object
    Возврат:
    Пример HTTP-запроса:
    GET https://user-api-v2.simplybook.me/admin/promotions/gift-cards?filter[start_date_from]=2021-08-30&filter[status]=active&filter[service_id]=1
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Get coupons list

    Return promotion instances list. (Coupons & Gift cards custom feature)
    Please note that result is wrapped into paginated result.
    In GET parameters you can pass filter (see http example) with following parameters:
    used_by_client_id - filter by client who used coupon
    service_id - filter by service
    user_id - user, who issued coupon
    duration - duration
    duration_type - duration type
    status - filter by status (outdated, used, disabled, valid)
    expired_date_from - expired date from
    expired_date_to - expired date to
    start_date_from - start date from
    start_date_to - start date to
    discount_from - discount from
    discount_to - discount to
    code - filter by code
    Конечная точка:
    /admin/promotions/coupons
    Метод:
    GET
    Параметры запроса:
    object filter - filter object
    Возврат:
    Пример HTTP-запроса:
    GET https://user-api-v2.simplybook.me/admin/promotions/coupons?filter[start_date_from]=2021-08-30&filter[status]=active
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Issue gift card

    Конечная точка:
    /admin/promotions/issue-gift-cards
    Метод:
    POST
    Параметры запроса:
    AdminPromotionIssueGiftCardEntity body - issue gift card request
    Возврат:
    Пример HTTP-запроса:
    ### issue non-personalized gift cards
    POST https://user-api-v2.simplybook.me/admin/promotions/issue-gift-card
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
    
    {
      "promotion_id": 1,
      "start_date": "2021-08-30",
      "personalized": false,
      "count": 10
    }
    
    ### issue personalized gift cards
    POST https://user-api-v2.simplybook.me/admin/promotions/issue-gift-card
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
    
    {
      "promotion_id": 1,
      "start_date": "2021-08-30",
      "personalized": true,
      "clients": [1],
      "send_email": true,
      "email_body": "Your gift card code: [code]",
      "email_subject": "Your gift card!"
    }
  • Сотрудники

  • Get providers list

    Return providers list.
    Please note that result is wrapped into paginated result.
    In GET parameters you can pass filter (see http example) with following parameters:
    search - search string
    service_id - filter providers by service (only providers that can provide this service)
    Конечная точка:
    /admin/providers
    Метод:
    GET
    Параметры запроса:
    object filter - filter object
    Возврат:
    Пример HTTP-запроса:
    GET https://user-api-v2.simplybook.me/admin/providers?filter[search]=mike&filter[service_id]=1
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Get provider

    Return provider item by id.
    Throws AccessDenied error in case user does not have access to provider.
    Throws NotFound error in case provider is not found.
    Конечная точка:
    /admin/providers/{id}
    Метод:
    GET
    Параметры запроса:
    int id - provider id
    Возврат:
    Вывод:
    AccessDenied
    NotFound
    Пример HTTP-запроса:
    GET https://user-api-v2.simplybook.me/admin/providers/1
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Get provider locations list

    Return list of locations. (locations custom feature)
    Please note that result is wrapped into paginated result.
    Конечная точка:
    /admin/locations
    Метод:
    GET
    Возврат:
    Пример HTTP-запроса:
    GET https://user-api-v2.simplybook.me/admin/locations
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Сервисы

  • Get services list

    Return services list.
    Please note that result is wrapped into paginated result.
    In GET parameters you can pass filter (see http example) with following parameters:
    search - search string
    Конечная точка:
    /admin/services
    Метод:
    GET
    Параметры запроса:
    object filter - filter object
    Возврат:
    Пример HTTP-запроса:
    GET https://user-api-v2.simplybook.me/admin/services?filter[search]=massage
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Get service

    Return service item by id.
    Throws AccessDenied error in case user does not have access to service.
    Throws NotFound error in case service is not found.
    Конечная точка:
    /admin/services/{id}
    Метод:
    GET
    Параметры запроса:
    int id - service id
    Возврат:
    Вывод:
    AccessDenied
    NotFound
    Пример HTTP-запроса:
    GET https://user-api-v2.simplybook.me/admin/services/1
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Get products for service

    Return list of products with default qty for selected service
    In GET parameters you can pass filter (see http example) with following parameters:
    service_id - service id
    type - type. can be 'product'/'attribute'
    Конечная точка:
    /admin/services/products
    Метод:
    GET
    Возврат:
    Пример HTTP-запроса:
    GET https://user-api-v2.simplybook.me/admin/services/products?filter[service_id]=1
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Get service categories list

    Return list of categories. (categories custom feature)
    Please note that result is wrapped into paginated result.
    Конечная точка:
    /admin/categories
    Метод:
    GET
    Возврат:
    Пример HTTP-запроса:
    GET https://user-api-v2.simplybook.me/admin/categories
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Status

  • Get statuses list

    Return user statuses list (status custom feature)
    Конечная точка:
    /admin/statuses
    Метод:
    GET
    Возврат:
    array|StatusEntity[]
    Пример HTTP-запроса:
    GET https://user-api-v2.simplybook.me/admin/statuses
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Билеты

  • Get ticket info by code

    Return ticket info by code.
    Throws AccessDenied error in case user does not have access to ticket.
    Throws NotFound error in case ticket is not found.
    Конечная точка:
    /admin/tickets/{code}
    Метод:
    GET
    Параметры запроса:
    string code - ticket code
    Возврат:
    Вывод:
    AccessDenied
    NotFound
    Пример HTTP-запроса:
    GET https://user-api-v2.simplybook.me/admin/tickets/0z2ph7e716b88
    Content-Type: application/json
    X-Company-Login: <insert your company login>
    X-Token: <insert your token from auth step>
  • Check in ticket

    Check in ticket by code and return the ticket info.
    Please note that the reason of unavailable check in will be in ticket object.
    Throws AccessDenied error in case user does not have access to ticket.
    Throws NotFound error in case ticket is not found.
    Конечная точка:
    /admin/tickets/{code}/check-in
    Метод:
    PUT
    Параметры запроса:
    string code - ticket code
    Возврат:
    Вывод:
    AccessDenied
    NotFound

    Типы

  • AdminLoginEntity

    Entity that contains admin login information (input only)
    Имя Тип Описание
    company string Company name
    login string User login
    password string User password
  • AdminLogin2FAEntity

    Entity that contains admin login information for 2 FA (input only)
    Имя Тип Описание
    company string Company name
  • AdminLogoutEntity

    Entity that contains logout info
    Имя Тип Описание
    auth_token string Auth token
  • TokenEntity

    Entity that contains token information
    Имя Тип Описание
    token string Auth token
    company string Company login
    login string User login
    refresh_token string|null Refresh token (use it to get new access token when old expired)
    domain string|null Company domain
    require2fa bool Required two factor authorisation (token and refresh will be empty)
    allowed2fa_providers array|string[] Allowed providers (sms/ga)
    auth_session_id string Authentication session id (pass it with 2FA request)
  • RefreshTokenEntity

    Entity that contains refresh token information
    Имя Тип Описание
    company string Company login
    refresh_token string Refresh token
    device_token string|null Device token
  • AdminBookingBuildEntity

    Entity that contains information to make booking from admin side
    Имя Тип Описание
    start_datetime string Booking start datetime
    end_datetime string Booking end datetime
    location_id int Location id
    category_id int Category id
    service_id int Service id
    provider_id int Provider id
    client_id int Client id
    count int Group booking count. You can use either count or recurringSettings
    recurring_settings Booking_RecurringSettingsEntity Recurring settings. You can use either count or recurringSettings
    additional_fields array|Booking_AdditionalFieldValueEntity[] Array of additional fields values. Booking_AdditionalFieldValueEntity[]
    products array|ProductQtyEntity[] Array of products (addons). ProductQtyEntity[]
    client_membership_id int Client membership instance id.
    skip_membership bool Do not use membership for this booking
    user_status_id int Users status id
    accept_payment bool Set true to make payment order for booking
    payment_processor string|null Payment accepted by payment processor
  • BookingResultEntity

    Entity that contains booking result information.
    Readonly entity
    Имя Тип Описание
    bookings array|BookingEntity[] Array of bookings, that were booked.
    batch BookingBatchEntity|null Booking batch
  • BookingEntity

    Entity that contains booking information
    Имя Тип Описание
    id int Booking id. Auto-generated value.
    code string Booking code. Auto-generated value.
    is_confirmed bool Booking is confirmed
    start_datetime string Booking start datetime
    end_datetime string Booking end datetime
    location_id int Location id
    category_id int Category id
    service_id int Service id
    provider_id int Provider id
    client_id int Client id
    duration int Duration in minutes
  • BookingBatchEntity

    Entity that contains booking batch information
    Имя Тип Описание
    id int Batch id. Auto-generated value.
    type string Batch type. Can be 'recurring', 'multiple', 'group'.
    is_closed bool Flag that indicates that user has finished booking.
  • Booking_RecurringSettingsEntity

    Entity that contains booking recurring information.
    Имя Тип Описание
    days int Repeat days. Use each $days day for 'fixed' type and mask of week days for 'weekly' type.
    repeat_count int Repeat count
    type string Type of repeat. Can be 'fixed', 'weekly'
    'weekly' means repeat every week day, that set in $days mask.
    'fixed' means repeat every $days day.
    mode string Mode when it is impossible to book appointment on some date. Can be: 'skip', 'book_available', 'book_and_move'.
    'skip' - Skip all bookings
    'book_available' - book only on available dates
    'book_and_move' - move to next date in case some date is not available
  • Booking_AdditionalFieldValueEntity

    Entity that contains additional field value
    Имя Тип Описание
    id int Additional field id
    field string Additional field name.
    value mixed Additional field value
    file_hash string Cloud field file hash
  • ProductQtyEntity

    Entity that contains product qty information
    Имя Тип Описание
    product_id int Product id
    qty int Product qty
  • AdminBookingDetailsEntity

    Detailed booking info. allowed only for admin API.
    Имя Тип Описание
    id int Booking id. Auto-generated value.
    code string Booking code. Auto-generated value.
    is_confirmed bool Booking is confirmed
    start_datetime string Booking start datetime
    end_datetime string Booking end datetime
    location_id int|null Provider location id
    category_id int|null Service category id
    service_id int Service id
    provider_id int Provider id
    client_id int Client id
    duration int Duration in minutes
    provider ProviderEntity Booking provider details entity
    service ServiceEntity Booking service details entity
    client ClientEntity Client details entity
    status string Booking status - confirmed/pending/canceled (depending on approve booking status and accept payment)
    membership_id int|null Client membership id
    invoice_id int|null Invoice id
    invoice_status string|null Booking payment status ('deleted', 'new', 'pending', 'cancelled', 'cancelled_by_timeout', 'error', 'paid')
    invoice_payment_received bool|null Payment was received
    invoice_number string|null Invoice number
    invoice_datetime string|null Invoice datetime
    invoice_payment_processor string|null Payment processor key
    ticket_code string|null Booking ticket code
    ticket_validation_datetime string|null Booking ticket validation date and time
    ticket_is_used bool|null Ticket was already validated
    testing_status string|null Medical testing status (positive/negative/inconclusive/pending or null)
    user_status_id int|null Status custom feature id
    category CategoryEntity|null Service category entity
    location LocationEntity|null Provider location entity
    can_be_edited bool Can this booking be edited by user
    can_be_canceled bool Can this booking be canceled by user
    log array|Booking_LogEntity[] Booking edit log
    additional_fields array|Booking_AdditionalFieldValueEntity[] Booking intake form details
    products array|Booking_DetailedProductQtyEntity[] Booking detailed products list
    attributes array|Booking_DetailedProductQtyEntity[] Booking detailed attributes list
    invoice AdminInvoiceEntity|null Invoice entity
    membership ClientMembershipPaymentEntity|null Client membership object
    user_status StatusEntity|null User status entity
    comment string Booking comment
    resources array|ResourceEntity[] Booking resources list
  • AdminReportBookingEntity

    Admin booking list info entity
    Class AdminReportBookingEntity
    Имя Тип Описание
    id int Booking id. Auto-generated value.
    code string Booking code. Auto-generated value.
    is_confirmed bool Booking is confirmed
    start_datetime string Booking start datetime
    end_datetime string Booking end datetime
    location_id int|null Provider location id
    category_id int|null Service category id
    service_id int Service id
    provider_id int Provider id
    client_id int Client id
    duration int Duration in minutes
    provider ProviderEntity Booking provider details entity
    service ServiceEntity Booking service details entity
    client ClientEntity Client details entity
    status string Booking status - confirmed/pending/canceled (depending on approve booking status and accept payment)
    membership_id int|null Client membership id
    invoice_id int|null Invoice id
    invoice_status string|null Booking payment status ('deleted', 'new', 'pending', 'cancelled', 'cancelled_by_timeout', 'error', 'paid')
    invoice_payment_received bool|null Payment was received
    invoice_number string|null Invoice number
    invoice_datetime string|null Invoice datetime
    invoice_payment_processor string|null Payment processor key
    ticket_code string|null Booking ticket code
    ticket_validation_datetime string|null Booking ticket validation date and time
    ticket_is_used bool|null Ticket was already validated
    testing_status string|null Medical testing status (positive/negative/inconclusive/pending or null)
    user_status_id int|null Status custom feature id
    category CategoryEntity|null Service category entity
    location LocationEntity|null Provider location entity
    can_be_edited bool Can this booking be edited by user
    can_be_canceled bool Can this booking be canceled by user
  • Booking_DetailedProductQtyEntity

    Booking product details info. Read only object
    Имя Тип Описание
    product_id int Product id
    qty int Product qty
    product ProductEntity Product entity
  • Booking_LogEntity

    Entity that contains booking log information. Readonly object
    Имя Тип Описание
    id int Id
    datetime string Log datetime
    type string Event type
    user_login string|null User login
    user_name string|null User name
  • WorkDayEntity

    Entity that contains work day information
    Имя Тип Описание
    date string Work day date
    time_from string Work day time from
    time_to string Work day time to
    is_day_off bool Is day off
  • TimeSlotEntity

    Entity that contains time slot information
    Имя Тип Описание
    date string Time slot date
    time string Time slot time
  • Timeline_SlotsDateEntity

    Entity for daily timeline
    Имя Тип Описание
    date string Date
    slots Timeline_SlotEntity[] Slots
  • Timeline_SlotEntity

    Entity for daily timeline slot
    Имя Тип Описание
    time string Time
    available_count int Available slots count
    total_count int Total slots count
  • LocationEntity

    Entity that contains location information
    Имя Тип Описание
    id int Location id. Auto-generated value.
    name string Location name
    description string|null Location description
    picture string Picture file name
    picture_preview string Path to preview picture
    providers array|int[] Location providers (list of ids)
    address1 string|null Location address 1
    address2 string|null Location address 2
    phone string|null Phone number
    city string|null Location city
    zip string|null Location zip code
    country_id string|null Location country id
    is_visible bool If location is visible on public side
  • CategoryEntity

    Entity that contains event category information
    Имя Тип Описание
    id int Category id. Auto-generated value.
    name string Category name
    services array|int[] Category services (list of ids)
    is_visible bool If category is visible on public side
  • ProviderEntity

    Entity that contains provider information
    Имя Тип Описание
    id int Provider id. Auto-generated value.
    name string Provider name
    qty int Provider capacity
    email string Provider email
    description string Provider description
    phone string Provider phone
    picture string Picture file name
    picture_preview string Path to preview picture
    color string Provider color
    is_active bool If provider is active
    is_visible bool If provider is visible on public site
    services array|int[] Array of ids of services where this provider connected.
  • ServiceEntity

    Entity that contains service information
    Имя Тип Описание
    id int Service id. Auto-generated value.
    name string Service name
    description string Promotion description
    price float Service price
    currency string Service price currency
    tax_id int Tax id
    tax TaxEntity Tax information
    duration int Duration in minutes
    buffer_time_after int Buffer time after in minutes
    recurring_settings Booking_RecurringSettingsEntity|null Service recurring settings (in case it is recurring service)
    memberships array|int[] Array of ids of memberships where this service presents.
    providers array|int[] Array of ids of providers where this service connected.
    picture string Picture file name
    picture_preview string Path to preview picture
    is_active bool If service is active
    is_visible bool If service is visible on public side
    limit_booking int Limit bookings value.
    Will be null in case "Limit bookings" is turned off.
    Will take common value from config in case this value is empty or 0 for event.
    min_group_booking int Min group booking value.
    Will be null in case "Group booking" is turned off.
  • Service_ProductEntity

    Product information for service (with default qty info)
    Имя Тип Описание
    product ProductEntity Product
    qty int Qty
  • StatusEntity

    User status entity
    Имя Тип Описание
    id int Status id. Auto-generated value.
    name string Status name.
    description string Status description.
    color string Status color
    is_default bool Is status default
  • ResourceEntity

    Resource info
    Имя Тип Описание
    id int Resource id
    name string Resource name
  • ClientEntity

    Entity that contains client information
    Имя Тип Описание
    id int Client id. Auto-generated value.
    name string Client name
    email string Client email
    phone string Client phone
  • Client_FieldDetailsEntity

    Client field details info
    Имя Тип Описание
    id string Field id
    title string Field title
    default_value mixed Default field value
    values array|Client_FieldSelectOptionEntity[] Array of available values for select field
    is_visible bool Field is visible on public site
    is_optional bool Field is optional
    type string Field type
  • Client_DetailsEntity

    Client data each field value is in separate [[Client_FieldValueEntity]] object.
    Имя Тип Описание
    id int Id of client
    fields array|Client_FieldValueEntity[] Array of fields with values
  • Client_FieldSelectOptionEntity

    Option data for select client field
    Имя Тип Описание
    value string Option value
    is_default bool Is default value
    position int Position
  • Client_FieldValueEntity

    Client field value object
    Имя Тип Описание
    id string Field id
    field Client_FieldDetailsEntity Field object. Read only (you do not need to pass it on save)
    value mixed Field value
  • UserEntity

    Entity that contains user information.
    This entity will be returned only by admin API
    Имя Тип Описание
    id int User id. Auto-generated value.
    login string User login
    firstname string User first name
    lastname string User last name
    email string User email
    phone string User phone
    company CompanyEntity User company
  • CompanyEntity

    Entity that contains company information.
    This entity will be returned only by admin API
    Имя Тип Описание
    login string Company login
    name string Company name
    dashboard_url string Dashboard company url
    public_url string Public company url
  • AdditionalFieldEntity

    Intake forms field information
    Имя Тип Описание
    id int Field id
    name string Unique field name
    field_name string Field label
    field_type string Field type
    field_options array Field options
    default_value mixed Default field value
    optional bool Is optional field
    is_visible bool Is visible on public site
    show_for_all_services bool Show field for all services
  • ProductEntity

    Entity that contains product information
    Имя Тип Описание
    id int Product id. Auto-generated value.
    name string Product name
    barcode string Product barcode
    description string Product description
    type string Product type. It can be 'product' or 'attribute'
    price float Product price
    currency string Product currency
    tax_id int Tax id
    tax TaxEntity Tax information
    duration int Product duration
  • AdminInvoiceEntity

    Extended invoice entity with client information and
    other information that available only for admin
    Имя Тип Описание
    id int Invoice id. Auto-generated value.
    number string Invoice number. Auto-generated value.
    datetime string Invoice datetime. Readonly
    due_datetime string Invoice due date. By default current datetime + payment timeout
    payment_datetime string|null Payment payment date
    refund_datetime string|null Refund payment date
    amount float Invoice amount. Readonly
    recurring_amount float Invoice recurring amount. Readonly
    deposit float Invoice deposit. Readonly
    rest_amount float Invoice rest amount. Readonly
    taxes array|TaxEntity">Invoice_TaxEntity[] Array of invoice taxes
    discount float Invoice discount amount. Readonly
    currency string Invoice currency code. ISO 4217
    client_id int Client id
    description string Invoice description
    payment_received bool Payment was received by company
    payment_processor string Payment processor key
    lines array Array of lines. The line can be one of the following types:
    Invoice_BookingLineEntity, Invoice_ProductLineEntity, Invoice_MembershipLineEntity, Invoice_PackageLineEntity, Invoice_PromotionLineEntity, Invoice_DepositLineEntity
    promotion_instances array|PromotionInstanceEntity[] Array of PromotionInstanceEntity. Promotion instances used in invoice
    package_instances array|PackageInstanceEntity[] Array of PackageInstanceEntity. Package instances used in invoice
    status string Current invoice status
    support_recurring_payment bool True in case this invoice can be payed with recurring payment method
    require_recurring_payment bool True in case this invoice can be payed only with recurring payment method
    recurring_profile_id int Recurring profile id, linked to this invoice
    client AdminClientEntity Client
    created_by_user_id int User ID that created invoice
    created_by_user UserEntity User object that created invoice
    approved_by_user_id int User ID that receive payment (for manual and delay payments)
    approved_by_user UserEntity User object that receive payment (for manual and delay payments)
    refunded_by_user_id int User ID that refunded payment
    refunded_by_user UserEntity User object that refunded payment
  • Invoice_BookingLineEntity

    Entity that contains invoice line information with bookings
    Имя Тип Описание
    id int Invoice line id. Auto-generated value.
    invoice_id int Invoice id
    name string Invoice line name
    type string Invoice line type. Can be booking, product, membership, custom
    discount_ratio float Invoice line discount ratio
    discount_amount float Invoice line discount fixed amount
    discount float Invoice line discount
    price float Invoice line price
    final_price float Invoice line final price (including tax and discount)
    qty float Invoice line qty
    package_qty float Invoice line qty, that was purchased by using package
    tax TaxEntity Tax entity related to this invoice line
    Note: Use tax_rate in calculations as rate in this object can be different.
    tax_ratio float Invoice line tax ratio
    tax_amount float Invoice line tax amount
    amount float Invoice line amount
    deposit float Invoice line deposit
    rest_amount float Invoice line rest amount
    booking_ids array Booking ids, that were purchased. It can have multiple ids in case
    recurring booking and group booking. In case recurring booking qty will be equal 1,
    because client pays for session.
    In case group booking qty will be equal count of group booking.
    bookings array|BookingEntity[] Bookings, that were purchased
  • Invoice_ProductLineEntity

    Entity that contains invoice line information with product
    Имя Тип Описание
    id int Invoice line id. Auto-generated value.
    invoice_id int Invoice id
    name string Invoice line name
    type string Invoice line type. Can be booking, product, membership, custom
    discount_ratio float Invoice line discount ratio
    discount_amount float Invoice line discount fixed amount
    discount float Invoice line discount
    price float Invoice line price
    final_price float Invoice line final price (including tax and discount)
    qty float Invoice line qty
    package_qty float Invoice line qty, that was purchased by using package
    tax TaxEntity Tax entity related to this invoice line
    Note: Use tax_rate in calculations as rate in this object can be different.
    tax_ratio float Invoice line tax ratio
    tax_amount float Invoice line tax amount
    amount float Invoice line amount
    deposit float Invoice line deposit
    rest_amount float Invoice line rest amount
    product_id int Product id, that was purchased
    booking_id int Related booking id
    product ProductEntity Product, that was purchased
  • Invoice_MembershipLineEntity

    Entity that contains invoice line information with membership
    Имя Тип Описание
    id int Invoice line id. Auto-generated value.
    invoice_id int Invoice id
    name string Invoice line name
    type string Invoice line type. Can be booking, product, membership, custom
    discount_ratio float Invoice line discount ratio
    discount_amount float Invoice line discount fixed amount
    discount float Invoice line discount
    price float Invoice line price
    final_price float Invoice line final price (including tax and discount)
    qty float Invoice line qty
    package_qty float Invoice line qty, that was purchased by using package
    tax TaxEntity Tax entity related to this invoice line
    Note: Use tax_rate in calculations as rate in this object can be different.
    tax_ratio float Invoice line tax ratio
    tax_amount float Invoice line tax amount
    amount float Invoice line amount
    deposit float Invoice line deposit
    rest_amount float Invoice line rest amount
    membership_id int Membership entity object id
    membership MembershipEntity Membership data
    period_start string Optional period start of membership
    membership_payment_id int Membership payment id, that was initialized by client
  • Invoice_PackageLineEntity

    Entity that contains invoice line information with package
    Имя Тип Описание
    id int Invoice line id. Auto-generated value.
    invoice_id int Invoice id
    name string Invoice line name
    type string Invoice line type. Can be booking, product, membership, custom
    discount_ratio float Invoice line discount ratio
    discount_amount float Invoice line discount fixed amount
    discount float Invoice line discount
    price float Invoice line price
    final_price float Invoice line final price (including tax and discount)
    qty float Invoice line qty
    package_qty float Invoice line qty, that was purchased by using package
    tax TaxEntity Tax entity related to this invoice line
    Note: Use tax_rate in calculations as rate in this object can be different.
    tax_ratio float Invoice line tax ratio
    tax_amount float Invoice line tax amount
    amount float Invoice line amount
    deposit float Invoice line deposit
    rest_amount float Invoice line rest amount
    package_id int Package entity object id
    package PackageEntity Package data
    period_start string Optional period start of membership
    package_instance_id int Membership payment id, that was initialized by client
  • Invoice_PromotionLineEntity

    Entity that contains invoice line information with gift card
    Имя Тип Описание
    id int Invoice line id. Auto-generated value.
    invoice_id int Invoice id
    name string Invoice line name
    type string Invoice line type. Can be booking, product, membership, custom
    discount_ratio float Invoice line discount ratio
    discount_amount float Invoice line discount fixed amount
    discount float Invoice line discount
    price float Invoice line price
    final_price float Invoice line final price (including tax and discount)
    qty float Invoice line qty
    package_qty float Invoice line qty, that was purchased by using package
    tax TaxEntity Tax entity related to this invoice line
    Note: Use tax_rate in calculations as rate in this object can be different.
    tax_ratio float Invoice line tax ratio
    tax_amount float Invoice line tax amount
    amount float Invoice line amount
    deposit float Invoice line deposit
    rest_amount float Invoice line rest amount
    promotion_id int Gift card id
    promotion_instance_id int Gift card instance id
    promotion PromotionEntity Gift card
  • Invoice_DepositLineEntity

    Entity that contains invoice line information with bookings
    Имя Тип Описание
    id int Invoice line id. Auto-generated value.
    invoice_id int Invoice id
    name string Invoice line name
    type string Invoice line type. Can be booking, product, membership, custom
    discount_ratio float Invoice line discount ratio
    discount_amount float Invoice line discount fixed amount
    discount float Invoice line discount
    price float Invoice line price
    final_price float Invoice line final price (including tax and discount)
    qty float Invoice line qty
    package_qty float Invoice line qty, that was purchased by using package
    tax TaxEntity Tax entity related to this invoice line
    Note: Use tax_rate in calculations as rate in this object can be different.
    tax_ratio float Invoice line tax ratio
    tax_amount float Invoice line tax amount
    amount float Invoice line amount
    deposit float Invoice line deposit
    rest_amount float Invoice line rest amount
    booking_ids array Booking ids, that were purchased. It can have multiple ids in case
    recurring booking and group booking. In case recurring booking qty will be equal 1,
    because client pays for session.
    In case group booking qty will be equal count of group booking.
    bookings array|BookingEntity[] Bookings, that were purchased
  • Invoice_TaxEntity

    Entity that contains invoice tax amount information
    Имя Тип Описание
    id int Tax id. Auto-generated value.
    name string Tax name
    ratio float Tax ratio
    is_default bool Is default tax
    amount float Tax amount
  • ClientMembershipPaymentEntity

    Entity that contains client membership payment information. When this membership starts, ends, rest of bookings, etc.
    Имя Тип Описание
    id int Membership payment id. Auto-generated value.
    client_id int Client id
    period_start string Membership start date
    period_end string Membership end date
    created string Membership payment created date
    membership_id int Membership id
    membership MembershipEntity Membership object
    rest int Membership rest
    simultaneous_rest int Membership simultaneous rest
    count int Used bookings from membership
    can_be_used bool Membership start date
    is_expired bool Is membership expired
    invoice_id int Invoice id, where this membership was purchased
    invoice_number string Invoice number, where this membership was purchased
    invoice_datetime string Invoice datetime, where this membership was purchased
    recurring_profile_id int Recurring profile id for invoice with this membership
    recurring_profile_status string Recurring profile status for invoice with this membership
    status string Current client membership status
    bookings array|BookingEntity[]|null Membership bookings array
  • PromotionInstanceEntity

    Entity that contains promotion instance information
    Имя Тип Описание
    id int Promotion instance id. Auto-generated value.
    promotion PromotionEntity Promotion information
    start_date string Promotion instance start date
    expired_date string Promotion instance expire date
    is_used bool Returns true if this promotion was used already
    can_be_used bool Returns true if this promotion was used already
    can_be_used_count int Returns how many times left. In case this value is -1 then can be used unlimited times.
    code string Promotion instance code
    client_id int Client id
  • PackageInstanceEntity

    Entity that contains package instance information
    Имя Тип Описание
    id int Package instance id. Auto-generated value.
    client_id int Client id
    created string Package instance created date
    period_start string Package start date
    period_end string Package end date
    status string Package status
    can_be_used bool If package can be used
    is_used bool If package was totally used
    package_id int Package id
    package PackageEntity Package object
    services array|Package_PackageServiceEntity[] Warning!
    This is used services for invoice package instances or
    rest of services in the package instance for package instance details
    products array|Package_PackageProductEntity[] Warning!
    This is used products for invoice package instances or
    rest of products in the package instance for package instance details
    paid_attributes array|Package_PackageProductEntity[] Warning!
    This is used attributes for invoice package instances or
    rest of attributes in the package instance for package instance details
    count_used_package_instance int How many times packages used
  • PackageEntity

    Entity that contains package information
    Имя Тип Описание
    id int Package id. Auto-generated value.
    name string Package name
    description string Package description
    position int Package position
    file_id int Image file id
    picture string Picture file name
    picture_path string Picture path
    picture_preview string Path to preview picture
    picture_large string Path to large picture
    price float Package price
    currency string Package price currency
    tax_id int Tax id
    tax TaxEntity Tax information
    duration int Package duration
    duration_type string Package duration type
    sales_limit int Package sales limit
    sold int Sold packages count
    can_be_purchased bool If client can purchase this package
    is_active bool Is package active
    is_visible bool Is package visible on public site
    services array|Package_PackageServiceEntity[] Array of connected services (Package_PackageServiceEntity[])
    products array|Package_PackageProductEntity[] Array of connected products (Package_PackageProductEntity[])
    paid_attributes array|Package_PackageProductEntity[] Array of connected paid attributes (Package_PackageProductEntity[])
    has_instances bool If package has generated instances already
    is_use_package_limit bool Is use package limit
    package_limit int Package limit
  • Package_PackageServiceEntity

    Package service qty into
    Имя Тип Описание
    id int Package service entity id. Auto-generated value.
    service_id int Service id
    qty int Qty in package
    name string Service name
    is_visible bool Is visible
  • Package_PackageProductEntity

    Package product qty into
    Имя Тип Описание
    id int Package service entity id. Auto-generated value.
    product_id int Product id
    qty int Qty in package
    name string Name of product
    is_visible bool Is visible
  • PromotionEntity

    Entity that contains promotion information
    Имя Тип Описание
    id int Promotion id. Auto-generated value.
    name string Promotion name
    description string Promotion description
    file_id int Image file id
    picture_preview string Path to preview picture
    picture_large string Path to large picture
    is_visible bool Is promotion visible on public site
    is_active bool Is promotion active
    position int Promotion position
    price float Promotion price to purchase (gift card)
    currency string Promotion price currency to purchase (gift card)
    tax TaxEntity Promotion tax
    promotion_type string Promotion type. Can be 'gift_card', 'discount'
    discount_type string Discount type. Can be 'fixed_amount', 'percentage'
    fixed_amount is discount for fixed amount.
    percentage is percentage discount.
    discount float Discount value (amount value or percentage value)
    duration_type string Duration type for gift cards ('year', 'month', 'week', 'day')
    duration int Duration length
    client_type string Client type can be 'new' or 'all'
    allow_usage_count int Limit of usage count
    is_unlimited bool Is unlimited
    affect_services bool Is it possible to apply this promotion to services?
    affect_products bool Is it possible to apply this promotion to products?
    affect_paid_attributes bool Is it possible to apply this promotion to paid attribute?
    affect_memberships bool Is it possible to apply this promotion to memberships?
    affect_packages bool Is it possible to apply this promotion to packages?
    service_restrictions array|int[] Array of services ids to which you can apply promotion
    booking_restrictions array|Promotion_BookingRestrictionEntity[] Array of Promotion_BookingRestrictionEntity
    product_restrictions array|int[] Array of product ids to which you can apply promotion
    paid_attribute_restrictions array|int[] Array of paid attributes ids to which you can apply promotion
    memberships_restrictions array|int[] Array of memberships ids to which you can apply promotion
    package_restrictions array|int[] Array of packages ids to which you can apply promotion
  • Promotion_BookingRestrictionEntity

    Booking promotion restrictions info
    Имя Тип Описание
    id int Restriction id. Auto-generated value.
    start_date string Start date when promotion affects booking
    end_date string End date when promotion affects booking
    start_time string Start time when promotion affects booking
    end_time string End time when promotion affects booking
  • TaxEntity

    Entity that contains tax information
    Имя Тип Описание
    id int Tax id. Auto-generated value.
    name string Tax name
    ratio float Tax ratio
    is_default bool Is default tax
  • MembershipEntity

    Entity that contains membership information
    Имя Тип Описание
    id int Membership id. Auto-generated value.
    name string Membership name
    description string Membership description
    file_id int Image file id
    picture_preview string Path to preview picture
    picture_large string Path to large picture
    first_price float Price that client will when he first time buys membership
    recurring_price float Price that client will when he buy membership not first time
    currency string Membership price currency
    is_recurring bool Is membership supporting recurring payment
    tax_id int Tax id
    tax TaxEntity Tax information
    duration int Membership duration
    duration_type string Membership duration type
    limit int How many booking in this membership (0 - unlimited)
    simultaneous_limit int Maximum number of active future bookings per client
    is_unlimited bool Has unlimited bookings
    is_active bool Is membership active
    is_visible bool Is membership visible on public site
  • CalendarNoteEntity

    Calendar note info
    Имя Тип Описание
    id int Calendar note id
    provider_id int Provider id (optional)
    service_id int Service id (optional)
    provider ProviderEntity Provider data (optional). Read only.
    service ServiceEntity Service data (optional). Read only.
    start_date_time string Note start date and time
    end_date_time string Note end date and time
    note_type_id int Note type id
    note_type CalendarNoteTypeEntity Note type object. Read only.
    note string Note body
    mode string Note mode (service/provider/all)
    time_blocked bool Time is blocked
  • CalendarNoteTypeEntity

    Calendar note type oject
    Имя Тип Описание
    id int Note type id
    name string Note type name
    color string Note type color
    is_default bool Type is default
    position int Note type position
  • AdminTicketEntity

    Detailed ticket information object
    Имя Тип Описание
    id int Ticket identifier
    created string When ticket was created
    is_used bool Is ticket already used
    used_datetime string Ticket checked in datetime
    code string ticket code
    booking_id int Booking id
    booking AdminBookingDetailsEntity Booking details
    client_id int Client id
    template_id int Ticket template id
    is_active bool Ticket is active
    check_in_allowed bool Check in is allowed
    processed bool Ticket has been processed within this request
    unavailable_check_in_reason string In case check in is unavailable the reason can be
    'ticket_error_too_early', 'ticket_error_too_late', 'ticket_error_validated', 'ticket_error_inactive'
    check_in_date_time_from string Allowed checkin datetime from
    check_in_date_time_to string Allowed checkin datetime to
  • Calendar_DataEntity

    Calendar info object
    Имя Тип Описание
    from string Work day from time
    to string Work day to time
    columns array|Calendar_ColumnEntity[] Columns array
  • Calendar_ColumnEntity

    Calendar column data
    Имя Тип Описание
    id int Column object id
    name string Column name
    date string Column date
    type string Column type
    from string Column work time from
    to string Column work time to
    is_day_off bool Is day off for this day
    is_special_day bool Is special day
    breaktimes array|Calendar_TimePeriodEntity[] Breaktimes array
    blocked array|Calendar_TimePeriodEntity[] Blocked time array
    bookings array|Calendar_BookingEntity[] Calendar events array
    notes array|Calendar_NoteEntity[] Calendar notes array
  • Calendar_TimePeriodEntity

    Time period object
    Имя Тип Описание
    from string Time from
    to string Time to
  • Calendar_BookingEntity

    Calendar booking info
    Имя Тип Описание
    id int Booking object id
    service_name string Service name
    service_id int Service id
    provider_name string Provider name
    provider_color string Provider color
    provider_id int Provider id
    client_name string Client name
    client_email string Client email
    client_phone string Client phone
    client_id int Client id
    from string Booking datetime from
    to string Booking datetime to
    status string Booking status
    invoice_id int Invoice id
    invoice_status string Invoice status
    invoice_payment_received bool Payment was received
    user_status StatusEntity User status
    duration int Duration in minutes
  • Calendar_NoteEntity

    Note calendar info
    Имя Тип Описание
    id int Note object id
    note string Note
    note_type CalendarNoteTypeEntity Note type
    time_blocked bool Time is blocked
    service_name string Service name
    service_id int Service id
    provider_name string Provider name
    provider_id int Provider id
    from string Note datetime from
    to string Note datetime to
  • AdminPromotionIssueGiftCardEntity

    Request to issue gift cards
    Имя Тип Описание
    promotion_id int Gift card id
    start_date string Gift card start date
    personalized bool Gift card type personalized/non-personalized
    send_email bool|null Send email (for personalized cards only)
    send_sms bool|null Send sms (for personalized cards only)
    email_subject null|string Email subject (for personalized cards only)
    email_body null|string Email body (for personalized cards only)
    sms_body null|string SMS body (for personalized cards only)
    clients array|int[] Client ids (for personalized cards only)
    count null|int Count of non-personalized gift cards

Почему тысячи пользователей выбирают SimplyBook.me API?

Ясный и простой интерфейс. Беспроблемная разработка собственного сервиса бронирования

Вы легко можете встроить весь необходимый Вам функционал

Бронирование в реальном времени - Ваши клиенты могут записываться к Вам где угодно, когда угодно 24/7

Наше приложение предоставляет Вам множество других полезных функций. Нажмите здесь, чтобы узнать о наших функциях больше.

API

Дайте возможность Вашим клиентам бронировать сервисы, не покидая Ваше приложение!

Сделайте Ваш сайт или приложение более соответствующим Вашим требованиям, привлекательным и прибыльным, предоставляя услуги для местных компаний. Наш API позволит Вам добавить кнопку 'Забронировать' на Вашу страницу, чтобы Ваши клиенты могли круглосуточно записываться на сервисы в реальном времени.

Наш API даёт доступ ко всем регистрационным данным, которые Вам нужны для разработки и внедрения системы бронирования для Вашей клиентской аудитории.

Связывая клиента с Вашим расписанием, мы предлагаем полностью новый подход к ведению бизнеса. Мы верим, что бронирование сервиса напрямую с помощью Вашего приложения или сайта, позволяет предоставлять услуги адресно для Ваших клиентов.