Type 1 Integration
Table of Contents
Use Case for Integration
This integration is normally used when a client already have its own website, and wants to automate granting of accesses
Example: Say you own company called as acme, acme has its own website. When a user joins acme company, the hr has to go to the acme website create user and then go to Spintly website and add user, imagine if there were 1000 users, this can be cumbersome for the Hr. To solve this problem, ACME can integrate using Spintly apis, where in whenever a new user is created, ACME software can call Spintly apis to create user. Also the admin can mark certain doors as default doors which whenever a user is added, he will get the door permission by default without the admin manual intervention. Same thing can be done with update and delete. So during month end , the admin can go to the Spintly dashboard and download all kinds of user reports which can help the efficiency of the organisation
Live example:
This solution is already live and implemented by a client called as ff21. More about FF21 below
FF21 offers best-in-class co-living spaces with a strong focus on experience design, community and technology. We currently operate over a 1000+ beds in Bangalore. At the core of FF21, is to create safe and fun spaces for the young millenials who are new to the city and provide the right environment Where Friends Become Family. The FF21 brand, is wholly owned and operated by Sherwood Longstay Pvt Ltd.
So with this solution ff21 has automated granting of access and has made life easier for the ff21 staff.
The features to be offered in this integration
Features | Available |
SPINTLY SAAMS API | YES |
SPINTLY ACCESS SDK | NO |
SPINTLY SAAMS APP | YES |
SPINTLY SAAMS WEBSITE | YES |
SPINTLY PARTNER WEBSITE/APP | YES |
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
- Spintly Smart access app: with this app the user will be able to access the doors
- 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
Simple example ono how to do changes in your backend/cloud is shown here
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