User API guide/fr: Difference between revisions

Created page with "'''Exemple de code pour la réservation d'un service et sa confirmation à l'aide d'une clé API secrète''' <br><br> <nowiki>$additionalFields = array( '6740d3bce747107ddb9a789cbb78abf3' => 'value1', 'b0657bafaec7a2c9800b923f959f8163' => 'value2' ); $clientData = array( 'name' => 'Nom du client', 'email' => 'client@email.com', 'phone' => '+13152108338' ); $bookingsInfo = $client->book($eventId, $unitId, $date, $time, $clientData, $additionalF..."
Tags: Mobile edit Mobile web edit
Created page with "'''Exemple de code pour obtenir les formulaires d'inscription''' <br><br> <nowiki>$fields = $client->getAdditionalFields($eventId); // renvoie - array(array( // 'name' => 'b0657bafaec7a2c9800b923f959f8163', - nom du champ // 'title' => 'Test digits', - titre du champ // 'type' => 'digits', - type de champ // 'values' => null, - valeurs disponibles pour le type de champ de sélection // 'default' => null, - valeur par défaut pour le champ // 'is_..."
 
(4 intermediate revisions by the same user not shown)
Line 247: Line 247:




<div lang="en" dir="ltr" class="mw-content-ltr">
Vérifiez si la fonctionnalité personnalisée Catégories de services est activée par [https://simplybook.me/en/api/doc#isPluginActivated isPluginActivated("event_category")]. Si oui, affichez la liste des catégories [https://simplybook.me/en/api/doc#getCategoriesList getCategoriesList()].
Check if Service categories Custom Feature is activated by [https://simplybook.me/en/api/doc#isPluginActivated isPluginActivated("event_category")] if yes then display list of categories [https://simplybook.me/en/api/doc#getCategoriesList getCategoriesList()].
</div>




<div lang="en" dir="ltr" class="mw-content-ltr">
Obtenir la liste des services (événements) et des prestataires (unités) à l'aide des fonctions [https://simplybook.me/en/api/doc#getEventList getEventList()] et [https://simplybook.me/en/api/doc#getUnitList getUnitList()]. Si le tableau « unit_map » est disponible pour un service, cela signifie que ce service ne peut être fourni que par les prestataires indiqués.
Get list of services (events) and performers (units) using [https://simplybook.me/en/api/doc#getEventList getEventList()] and [https://simplybook.me/en/api/doc#getUnitList getUnitList()] functions. If "unit_map" array is available for service it means this service can be provided by given performers only.
</div>






<div lang="en" dir="ltr" class="mw-content-ltr">
Si la fonctionnalité personnalisée Any Employee Selector est activée [https://simplybook.me/en/api/doc#isPluginActivated isPluginActivated("any_unit")] et qu'aucune durée particulière n'est définie pour la paire service-prestataire dans le tableau « unit_map », l'utilisateur doit pouvoir sélectionner l'option Any provider (Tout prestataire) ou choisir manuellement un prestataire. Cependant, la sélection manuelle des prestataires ne doit pas être possible si [https://simplybook.me/en/api/doc#getCompanyParam getCompanyParam("any_unit__hide_other_units")] est activé.
If Any Employee Selector Custom Feature is activated [https://simplybook.me/en/api/doc#isPluginActivated isPluginActivated("any_unit")] and no special duration is set for service-performer pair in "unit_map" array then user should be allowed to select Any provider option or choose provider manually. But manual selection of performers should not be possible if [https://simplybook.me/en/api/doc#getCompanyParam getCompanyParam("any_unit__hide_other_units")] is enabled.
</div>




<div lang="en" dir="ltr" class="mw-content-ltr">
Utilisez [https://simplybook.me/en/api/doc#getStartTimeMatrix getStartTimeMatrix ($from comme date actuelle, $to comme date actuelle, $eventId, $unitId, $count comme valeur des participants sélectionnés)] pour obtenir les créneaux horaires disponibles pour une date donnée. '''$unitId''' doit être nul si l'option « Tout employé » est sélectionnée.
Use [https://simplybook.me/en/api/doc#getStartTimeMatrix getStartTimeMatrix ($from as current date, $to as current date, $eventId, $unitId, $count as selected participants value )] to get available timeslots for given date. '''$unitId''' should be null if Any employee option is selected.
</div>




<div lang="en" dir="ltr" class="mw-content-ltr">
Si le sélecteur « Any Employee » (Tout employé) est actif et qu'un employé a été sélectionné, appelez [https://simplybook.me/en/api/doc#getAvailableUnits getAvailableUnits($eventId, $dateTime, $count)] pour obtenir le $unitId disponible
If Any Employee selector is active and Any employee was selected call [https://simplybook.me/en/api/doc#getAvailableUnits getAvailableUnits($eventId, $dateTime, $count)] to get available $unitId
</div>






<div lang="en" dir="ltr" class="mw-content-ltr">
Si la fonctionnalité personnalisée des formulaires de saisie est activée, [https://simplybook.me/en/api/doc#isPluginActivated isPluginActivated("event_field")] appelle la fonction [https://simplybook.me/en/api/doc#getAdditionalFields getAdditionalFields($eventId)] pour obtenir la liste des champs à remplir par le client.
If Intake Forms Custom Feature is activated [https://simplybook.me/en/api/doc#isPluginActivated isPluginActivated("event_field")] call [https://simplybook.me/en/api/doc#getAdditionalFields getAdditionalFields($eventId)] function to get list of fields for client to fill.
</div>




<div lang="en" dir="ltr" class="mw-content-ltr">
Appelez [https://simplybook.me/en/api/doc#book book($eventId, $unitId, $date, $time, $clientData, $additional, $count, $batchId)] pour effectuer une réservation.
Call [https://simplybook.me/en/api/doc#book book($eventId, $unitId, $date, $time, $clientData, $additional, $count, $batchId)] to make a booking.
</div>


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