User API guide/sv: Difference between revisions

Created page with "'''Kodexempel på bokning av tjänst och bekräftelse med hjälp av hemlig API-nyckel''' <br><br> <nowiki>$additionalFields = array( '6740d3bce747107ddb9a789cbb78abf3' => 'value1', 'b0657bafaec7a2c9800b923f959f8163' => 'value2' ); $clientData = array( 'name' => 'Kundnamn', 'email' => 'client@email.com', 'phone' => '+13152108338' ); $bookingsInfo = $client->book($eventId, $unitId, $date, $time, $clientData, $additionalFields);"
Created page with "'''Initialisering av JSON-RPC-klient'''. <br><br> <nowiki>this.client = new JSONRpcClient({ 'url': 'https://user-api.simplybook.me' + '/admin/', 'headers': { 'X-Company-Login': YOUR_COMPANY_LOGIN, 'X-User-Token': token }, 'onerror': function (error) {} });</nowiki> <br><br>"
Tags: Mobile edit Mobile web edit
 
(One intermediate revision by the same user not shown)
Line 257: Line 257:




<div lang="en" dir="ltr" class="mw-content-ltr">
Använd [https://simplybook.me/en/api/doc#getStartTimeMatrix getStartTimeMatrix ($from som aktuellt datum, $to som aktuellt datum, $eventId, $unitId, $count som valt deltagarantal)] för att få tillgängliga tidsluckor för ett visst datum. '''$unitId''' ska vara null om alternativet Alla anställda är valt.
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">
Om valet "Alla anställda" är aktivt och någon anställd har valts, anropa [https://simplybook.me/en/api/doc#getAvailableUnits getAvailableUnits($eventId, $dateTime, $count)] för att hämta tillgängliga $unitId
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">
Om den anpassade funktionen Intake Forms är aktiverad, anropa [https://simplybook.me/en/api/doc#isPluginActivated isPluginActivated("event_field")] och funktionen [https://simplybook.me/en/api/doc#getAdditionalFields getAdditionalFields($eventId)] för att hämta listan över fält som kunden ska fylla i.
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">
Ring [https://simplybook.me/en/api/doc#book bokning($eventId, $unitId, $date, $time, $clientData, $additional, $count, $batchId)] för att göra en bokning.
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>