bookingtime/lib-phpsdk-module

php SDK for bt3.0 App-API

v1.0.6 2024-03-15 16:50 UTC

This package is auto-updated.

Last update: 2024-05-15 17:16:40 UTC


README

php SDK for bookingtime module-API

logo php

Requirements

  • PHP >= 7.3
  • A PSR-4 implementation

How To Install

The recommended way to install the SDK is through Composer.

composer require bookingtime/lib-phpsdk-module

see: https://packagist.org/packages/bookingtime/lib-phpsdk-module

Getting Started

<?php
use bookingtime\phpsdkmodule\Sdk;

//create SDK
$sdk=new Sdk(
   '<CLIENT_ID>',
   '',
   ['locale'=>'en','timeout'=>15,'mock'=>FALSE]
);

//load moduleConfig for submitted organizationId/moduleConfigId
$moduleConfig=$sdk->moduleConfig_show([
   'organizationId'=>'f6xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
   'moduleConfigId'=>'5fxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
]);

//list all available bookingTemplates
$bookingTemplateArray=$sdk->bookingTemplate_list([
   'organizationId'=>'f6xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
]);

//get list of possible bookingSlots for selected bookingTemplate and week
$bookingSlotArray=$sdk->bookingSlot_listWeek([
   'organizationId'=>'f6xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
   'bookingTemplateId'=>'fcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
   'year'=>'2023',
   'week'=>'39',
]);

//book a new appointment
$appointment=$sdk->appointment_add([
   'organizationId'=>'f6xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
],[
   'bookingSlotId'=>'brxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
   'notes'=>'My first appointment',
   'customer'=>[
      'gender'=>'MALE',
      'firstName'=>'Max',
      'lastName'=>'Mustermann',
      'email'=>'m.mustermann@bookingtime.com',
   ],
]);

Help and docs

Security

If you discover a security vulnerability within this package, please send an email to support@bookingtime.com or create a ticket on https://developer.bookingtime.com/hc/en-us/requests/new. All security vulnerabilities will be promptly addressed.

License

This SDK is distributed under the MIT License, see LICENSE file for more information.

Copyright 2014 bookingtime GmbH. All Rights Reserved.

Made with 💙 by © bookingtime

logo