User API guide/sv: Difference between revisions

Created page with "= '''KLIENT-API ([https://simplybook.me/api/doc#/admin FÖRETAGETS OFFENTLIGA TJÄNST]) AUTORISERING''' = <br><br> == '''Auktorisering från klientens kod''' == <br><br> '''Hämta token-nyckeln'''. <br><br> <nowiki>var loginClient = new JSONRpcClient({ 'url': 'https://user-api.simplybook.me' + '/login', 'onerror': function (error) {}, }); var token = loginClient.getToken(YOUR_COMPANY_LOGIN, YOUR_API_KEY);</nowiki> <br><br> '''Initialisering av JSON-RPC-klient.''' <br>..."
Tags: Mobile edit Mobile web edit
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
 
(2 intermediate revisions by the same user not shown)
Line 254: Line 254:




<div lang="en" dir="ltr" class="mw-content-ltr">
Om någon anpassad funktion för val av anställd är aktiverad [https://simplybook.me/en/api/doc#isPluginActivated isPluginActivated("any_unit")] och ingen särskild varaktighet är angiven för paret tjänsteleverantör-tjänsteutförare i matrisen "unit_map", ska användaren kunna välja alternativet Valfri leverantör eller välja leverantör manuellt. Manuell val av tjänsteutförare ska dock inte vara möjligt om [https://simplybook.me/en/api/doc#getCompanyParam getCompanyParam("any_unit__hide_other_units")] är aktiverat.
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">
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>