Type 2 integrations
Table of Contents
Note
Make sure you have gone through the Spintly Integration Overview section, as that section will help you understanding the spintly platform and the types of integration
Use Case for Integration
This integration is normally used when a client already has it own app and the client wants the Spintly SDK to be in its own app rather then using spintly app to give access, with this approach the end customer thinks the client has implemented the access control functionality, it also prevents the end customer from using two apps ie client app for client facilities and spintly app for access, thus enabling seamless experience to the end customer
Live example:
This solution is already live and implemented by lot of our indian customers namely, smartworks, cowrks, anarock, nucleus etc
The features to be offered in this integration
Features | Available |
SPINTLY SAAMS API | YES |
SPINTLY ACCESS SDK | YES |
SPINTLY SAAMS APP | NO |
SPINTLY SAAMS WEBSITE | YES |
SPINTLY PARTNER WEBSITE/APP | NO |
SPINTLY PARTNER SDK/API | NO |
Entities involved in this integration
As you can see in the below diagram, for type 3 integration to work the following entities will be needed, below are the entities needed
- Spintly Cloud: here different apis will be exposed which the client can use
- Client Cloud: here the backend of the client will be hosted this backend will be reponsible for talking to the spintly cloud as well as client mobile app
- Spintly SDK: Here the spintly access sdk will be given to the client, client must include the sdk in its app, the SDK will be exposing different
functions which the client app can use to access the doors - Client app: This will be front facing app for the customer, apart from access client will be exposing different services to the client
- Spintly Reader: Once the user is logged in the client app, he can tap on the reader and open the door
Steps to get up and running
Please refer the following link to get up and running along with type 6 integration
Simple example ono how to do changes in your backend/cloud is shown here
Mobile SDK
Please refer the following link to know in depth how to integrate the spintly access sdk
Spintly Apis
Spintly provides different apis so that another software can seamlessly integrate with spintly
Following are the apis spintly provides
- Ouath token api
- Get sites
- Get Access points
- Get organisation roles
- Create a new user
- Update a user
- Deactivate a user
- Activate a user
- Delete a user
- Get organisation user list
- Get user permissions
- Get all users who have permission assigned to a door
- Modify permissions of a user
- Ouath Api
Spintly uses oauth 2.0 client credential flow for authorization purpose, here in the api the client just has to put a clientid and clientSecret to get an access token, this access token can then be used to access other apis of Spintly.
2) Get Sites
This api is responsible for getting all the sites belonging to the organisation, As you can see in the diagram,If there multiple site, spintly provides pagination support also
2) Get Access points
This api is responsible for getting all the access points(doors), that belong to a particular site, like the previous site apis, Spintly provides pagination support if there multiple sites, also Spintly will provide filter support where user can search by access point names
2) Get Organisation roles
Before creating a user, you need to all the roles belonging to the organisations, Spintly has different roles
- Spintly user
- Site admin
- Super admin
- Front Desk role(if visitor management module is enabled)
- Manager role(if attendance module is enabled)
2) Create User
This api is responsible for creating a user in Spintly, when creating the user, you can specify what kind of roles the user gets, what kind of door permissions the user gets, what kind of mode of access the user can have etc. Once the user is created Spintly returns the id of the user
2) Update User
This api is responsible for creating a user in Spintly, when creating the user, you can specify what kind of roles the user gets, what kind of door permissions the user gets, what kind of mode of access the user can have etc. Once the user is created Spintly returns the id of the user
2) Delete User
This api is responsible for deleting the user in Spintly, here the id which was returned when the user was created needs to be specified if u want to delete a particular user
2) Get User Permissions
This api is responsible getting the permissions of a user, it returns 3 things
1) permissionAssigned: this are permissions currently assigned to the user
2) permissionNotAssigned: this are permissions not assigned to the user
3) pendingPermissions: this are permissions which users have but not reached to the device yet
2) Update user permissions
This api is responsible for assigning and unassigning permissions of a user
2) Card Assignment
This api is responsible for assigning a card to a user
2) Card Unassignment
This api is responsible for unassigning a card to a user