ClickBook Homepage
spacer
spacer

Client Registration

API 1.2+


Herein we refer to the end customer of a business as a "Client" and any staff member registered under a business account as a "Service Provider".

Below are the two ways by which to register end-customers (clients) which you may choose to implement in your app. One is from the perspective of a business ("Service Provider") and the other is from the perspective of an end-customer of a business ("Client").

The first procedure creates a Client File in a service provider's account and invites the client to register on clickbook. A Client File is an independent record that exists in the business's database and is linked to a User Registration if the Client is invited, and they accept the invitation by registering their own account on ClickBook. Updates from either can flow into the other depending on account preferences.

The second way is for an end-customer (client) to register themselves. Once they are registered, they can use methods to search for a provider and add them to their list of providers, among many other functions that you may choose to implement in your app.


Registering new Clients from the perspective of a Service Provider

The NewClientFile schema is intended for the creation and invitation of new clients by the logged-in Service Provider.
  1. Sign in as a Service Provider (example) if not already signed in. Confirm that you are signed in by checking that the model variable returned by the function contains model.user which is a string. If this does not then you have not logged in - check your error handling.
  2. Provide an interface to collect basic client details as per the schema.
  3. Register a Client File using the example also on the same page above. This will send an INVITATION to the client via email. Once they accept it, their credentials will be active.

Only the registered client can sign in as themselves since they create a new password as part of the invitation acceptance. If you intend to provide an interface for end customers, and not just service provider staff, you will need to provide a login procedure to accomplish this.


Registration process for new clients (self service)

Two endpoints are used in this process. ClickBookPublic and ClickBookAdmin.

The NewUserRegistration schema is intended for end-customers registering themselves from your app. You can see an example of how this works by registering as a new user with our live widget. It is recommended that a developer tool like Firebug be used in order to example the background API calls.

The procedure is as follows:
  1. Use the GETTIMEZONEINFO method of the ClickBookPublic endpoint to get a list of valid timezone values. The user interface should present the user with a selection of timezones as part of the registration, unless the interface implements automatic timezone selection.
  2. Collect vital registration info as per the mandatory schema items of NewUserRegistration.
  3. Submit user registration details using the SetUserFields method of the Public endpoint. If there are no validation errors, an item called "INFO" is returned which contains a Registration StubID. This is a reference to the user being registered. In order to complete the registration, the StubID must be submitted to the Administration API (Step 4 - next step).
  4. Using the StubID from step 3, connect to the ClickBookAdmin endpoint and submit the StubID using the PROCESSREGSTUB method.

If successful, a success code is returned (301).

At this point, your app can sign the user in since it has their entered email address and password (example). Once the user is signed-in, many functions in the ClickBookPrivate endpoint can be used if you choose to implement them in your app (eg searching for providers, adding providers, removing providers & updating personal details).




Disclaimer  Privacy Policy  Terms & Conditions  Contact Us  Search 
All Rights reserved - ClickBook.net