0% found this document useful (0 votes)
117 views22 pages

Smart Office APIDocumentation

The Smart Office API Documentation provides detailed specifications for various web APIs related to biometric devices, including functionalities such as adding, deleting, and managing users and devices. It outlines the required request and response formats, authentication methods, and error handling for each API endpoint. The document also includes prerequisites for accessing the API and support contact information.

Uploaded by

Hiren Patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
117 views22 pages

Smart Office APIDocumentation

The Smart Office API Documentation provides detailed specifications for various web APIs related to biometric devices, including functionalities such as adding, deleting, and managing users and devices. It outlines the required request and response formats, authentication methods, and error handling for each API endpoint. The document also includes prerequisites for accessing the API and support contact information.

Uploaded by

Hiren Patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

SMARTOFFICE 1.0.

Smart Office API Documentation


Version 1.0.4
SMARTOFFICE 1.0.3

Apr , 05 2022

CONTENTS

1. Overview
a. Prerequisites
b. Support
2. Interface Specifications
a. API Request
b. API Response
c. API Exception
3. Web API’s
a. Add Biometric Device
b. Delete Biometric Device
c. Fetch Biometric Logs
d. Upload Users in Biometric
e. Delete User in Biometric
f. Fetch Live Users from Biometric
g. Set User Expiration
h. Fetch Biometric Commands
i. Photo Registration
j. Block/ unblock Users
k. ClearAllLogsFromDeviceByTime(Only Supported in Speed Face)
l. TriggerUserOnlineEnrollment
SMARTOFFICE 1.0.3

OVERVIEW
a) All the api is published on postman at the below link
SmartOffice API (getpostman.com)

b) Prerequisites
Below are the following details required to access Smart Office API’s.
 Smart Office Web Application.
 Smart Office database.

This can be used in variety of Languages to access REST API’s like .Net, JAVA etc.

c) Support
In case for any clarifications, Please get in touch with the API Support
with Time Sheet team
SMARTOFFICE 1.0.3

SPECIFICATIONS
The API uses Http Requests to receive data and send responses in JSON format.

a) API Request:
An API request lets you contact a server with API endpoints that you want to
reach and perform some action. Those actions are HTTP methods.

b) API Response:
An API response consists of the body, headers, and the status code.

c) API Exception:
if there is an exception during the processing of the request then the
application will send the response in the following
SMARTOFFICE 1.0.3

WEB API’S
This Section describes various web service methods available for Biometric communication

a) Add Biometric Device

POST /api/v2/WebAPI/AddBiometric
Add new Biometric Device to Smart Office

Request JSON Object


 APIKey (String): Authentication -token key.
 DeviceName (String): Name of the device.
 SerialNumber (String): A unique identity Id of the biometric.

Response:

 Message: “Device Added Successfully.”

Other Response Messages:

 "Device Name is already exists" : Device with the Name given is already exists in
the database

 "Device SerialNumber is already exists": Device with the Serial Number given is
already exists in the database
SMARTOFFICE 1.0.3

b) Delete Biometric Device

GET /api/ v2/WebAPI/DeleteBiometric


To Delete Biometric Device from Smart Office

Request JSON Object


 APIKey (String): Authentication-token key.
 SerialNumber (String): A unique identity Id of the biometric.

Response:

 Message: “Biometric Deleted Successfully.”

Error Messages –

 "Device Is Not Exists." – if the mention Device Serial Number is wrong


 "Device Logs exists for this device, You can not delete" – if the Punch Records for
the Device is exists
SMARTOFFICE 1.0.3

c) Fetch Biometric Logs Data

GET /api/v2/WebAPI/ GetDeviceLogs


To get Biometric log data from Smart Office database.

Request JSON Object


 APIKey (String): Authentication-token key.
 FromDate (DateTime): from when the logs to be send.
 ToDate (DateTime): until when the logs to be send.

Response JSON data:


[
{

"EmployeeCode": “5 ",
"LogDate": “2019-09-16 13:45:29 ",
"SerialNumber": ""
“PunchDirection”:” in”
“Temperature”:97.4
“TemperatureState”:”Normal”
}
]

Other Biometric Response: {


"status": false,
"message": "Serial Number does not exist."
}
{
status: false,
message: “Invalid API Key.”
}
SMARTOFFICE 1.0.3

d) Upload Users to Biometric Device

POST /api/v2/WebAPI/UploadUser
To upload User into Biometric Device from Smart Office

Request JSON Object


 APIKey (String): Authentication-token key.
 EmployeeName (String): Name of the Employee/User.
 EmployeeCode (String): Biometric Code of the Employee/User.
 CardNumber (String): Card Number of user.
 SerialNumber (String): To which Biometric device Serial Number User has to
be uploaded, Use Comma (,) to separate multiple serial numbers.
VerifyMode (String): To Allow dual verification mode -(face+card) – This
will add face & card verification mode
IsFaceUpload – Pass it as true if you want to upload the face
IsFPUpload – pass it true if you want to upload Fingerprint
IsCardUpload – pass true if you want to upload password
IsBioPasswordUpload – pass true if you want to upload password

Response:

 Message: “Command Send Successfully."

Other Response Messages

 Device is not exists.


 API key is not correct
SMARTOFFICE 1.0.3

e) Delete Users from Biometric Device

POST /api/v2/WebAPI/DeleteUser
To Delete User from Biometric Device using Smart Office

Request JSON Object


 APIKey (String): Authentication-token key.
 EmployeeCode (String): Biometric Code of the Employee/User.
 SerialNumber (String): To which Biometric device Serial Number User has to
be deleted, Use Comma (,) to separate multiple serial numbers.

Response:

 Message: “Delete Command Send Successfully."

Other Response Messages

 Device is not exists.


 API key is not correct
SMARTOFFICE 1.0.3

f) Fetch Live Users from Biometric

GET /api/v2/WebAPI/FetchLiveUsersFromBiometric
To fetch live Users from Biometric Device using Smart Office

Request JSON Object


 APIKey (String): Authentication-token key.
 SerialNumber (String): To which Biometric device Serial Number live User
has to be fetched.

Response:

[
{
"EmployeeCode": "01",
"FPCount": "1",
"Privilege": "USER"
}
]

Other Response Messages

 Device is not exists.


 API key is not correct

g) Set User Expiration

GET /api/v2/WebAPI/SetUserExpiration
To set the expiration rule of the Biometric User in Device using Smart Office

Request JSON Object


 APIKey (String): Authentication-token key.
 SerialNumber (String): Biometric Serial Number, If Set as 0 then it will
execute all on Biometric devices.
 EmployeeCode (String): Biometric Code of the Employee/User.
 ExpirationDate (String): Expiration date of the User and the Format will be
(yyyy-MM-dd).
SMARTOFFICE 1.0.3

Response:

 Message: “Command Send Successfully."

Other Response Messages

 Device is not exists.


 API key is not correct

h) Fetch Biometric Commands

GET /api/WebAPI/GetDeviceCommands
To get and check the status of the commands issued by the user in the device.

Request Query String


 APIKey (String): Authentication-token key.
 FromDate (DateTime): From when the commands need to fetched.
 ToDate(DateTime): Till when the commands need to be fetched.
SerialNumbers : this is optional parameters if you want to get the records of
the specific devices then pass the comma separated serial number for
example C2688C21CB2D172711,ADZV213760072

Response:
{

"status": "success",
"message": "",
"records": [
{
"Title": "Get All Users from Biometric -MUM_BKC",
SMARTOFFICE 1.0.3

"DeviceCode": "MUM_BKC",
"SerialNumber": "C2689C47030A2334",
"CreationDate": "2020-11-05 15:08",
"ExecutionDate": "1900-01-01 00:00",
"Status": "Pending",
"Response": ""
}],
"result": true
}

Other Response Messages

 From Date cannot be greater than To Date.


{
"status": "failure",
"message": "From Date [05-Nov-2020] cannot be greater than To Date [01-Nov-2020],
"records": [],
"result": false
}
SMARTOFFICE 1.0.3

i) Photo Registration

POST /api/WebAPI/PhotoUploadInBiometric
To register user using base64 image into the biometric.

Request JSON Object


 APIKey (String): Authentication-token key.
 SerialNumber (string): Serial Number of the Biometric.
 EmployeeName(string): Name of the Employee.
 EmployeeCode(string): Employee Biometric Code from which the user need
to be get registered.
 Base64String(string): base64 data of the registration image.

Response:

 Message: “Upload Command Send Successfully."

Other Response Messages

 Serial Number cannot be blank.


 EmployeeCode cannot be blank.
 EmployeeName cannot be blank.
 Base64String cannot be blank.
 API key is not correct
SMARTOFFICE 1.0.3

j) Block/unblock Users

GET /api/WebAPI/BlockUserinBiometric
To register user using base64 image into the biometric.

Request JSON Object


 APIKey (String): Authentication-token key.
 EmployeeCode(string): Employee Biometric Code from which the user need
to be block/unblock.
 SerialNumber (string): Serial Number of the Biometric.
 BlockUser (int): 0 – to block the user, 1 – to unblock the user.

Response:

 Message: “Command Send Successfully.

Other Response Messages

 Biometric device not exist with the Serial Number


 API key is not correct


Note - There are very few models which support this command, make sure to cross check whether
respective models supports this command or not from the seller.






SMARTOFFICE 1.0.3


k) Add/Update Employee

GET /api/v2/WebAPI/AddEmployee
To add/update Employee details in the application .

Request JSON Object


{
"StaffCode":"12121",
"StaffName":"abc",
"Gender":"Male",
"Status":"Working",
"CompanySName":"Default",
"DepartmentSName":"Default",
"Location":"Default",
"Designation":"Default",
"Grade":"Default",
"Team":"Default",
"DOJ":"2021-04-28",
"DOC":"2021-09-15",
"DOB":"1987-06-01",
"DOR":"3000-01-01"
}
Note - All the Date format like DOJ,DOC,DOB,DOR should be in yyyy-MM-dd
format

Response:
{
"Message":"Employee Added Succesfully",
"Result":true
}
SMARTOFFICE 1.0.3

l) Delete Employee

GET /api/v2/WebAPI/DeleteEmployee
To delete the existing employee from the application.

Request JSON Object


 EmployeeCode (string): Employee Code to delete.

Response:
{
"Message":"Employee Deleteed Succesfully",
"Result":true
}

{
"Message": "Employee Not exists.",
"Result": false
}
SMARTOFFICE 1.0.3

J) Add Company

GET /api/v2/WebAPI/AddCompany
To delete the existing employee from the application.

Request JSON Object


{
"BranchAddress":"648, 2nd Floor, Sri Janardhan Towers 5th Main, 1st Cross Rd, RBI Lay
out, JP Nagar 7th Phase, Naagarabhaavi, Bengaluru, Karnataka 560078",
"BranchFullName":"SmartOffice payroll & Biometrics Solutions pvt ltd",
"BranchShortName":"SmartOffice payroll & Biometrics Solutions pvt ltd",
"BrancheMail":"[email protected]",
"BranchWebsite":"www.smartofficepayroll.com"
}
 

K) Add Department

Request Json
{

"DepartmentFName":"Software Developement",
"DepartmentSName":"Software Developement",
"DepartmenteMail":"[email protected]",
"Description":"Software Developement PAN india"
}
SMARTOFFICE 1.0.3

L) Add Location
URL - 45.118.183.175:86//api/v2/WebAPI/AddLocation?APIKey=521714042205
Request Json
{

"LocationName":"Bangalore1",
"LocationCode":"Bangalore1",
"eMail":"[email protected]",
"LocationLattitude":"12.9337623",
"LocationLongitude":"77.5828713",
"Radius":"500",
"LocationFullAddress":"482,JPNagar - 560078"
}
SMARTOFFICE 1.0.3

M) Add Designation
Request JSON –
{

"DesignationsName":"Senior Software Developer",


"DesignationCode":"Senior Software Developer"
}

URL - 45.118.183.175:86//api/v2/WebAPI/AddDesignation?APIKey=521714042205
SMARTOFFICE 1.0.3

N) Add Grade
Request JSON –
{

"GradeCode":"Grade A",
"GradeName":"Grade A"
}

URL – 45.118.183.175:86//api/v2/WebAPI/AddGrade?APIKey=521714042205

O)Add Team

Requested JSON –
{

"TeamCode":"Developement Team",
"TeamName":"Developement Team"
}

URL - 45.118.183.175:86//api/v2/WebAPI/AddTeam?APIKey=521714042205
SMARTOFFICE 1.0.3

P) ClearAllLogsFromDevice – This api will clear all the Attendance Log


Records from Device

URL - 45.118.183.175:86//api/v2/WebAPI/ ClearAllLogsFromDevice?APIKey=521714042205&


SerialNumber= C261185157361E2C

Q)ClearLogsFromDeviceByTime - This api will clear all the Attendance Log


Records from Device by specific time. This api only supported in Speed
Face Model

URL - 45.118.183.175:86//api/v2/WebAPI/ClearLogsFromDeviceByTime?APIKey=521714042205&
SerialNumber=C261185157361E2C&StartTime=2022-05-09 09:00&EndTime=2022-05-09 07:00
SMARTOFFICE 1.0.3

R) TriggerUserOnlineEnrollment- This api will Trigger the Online


Enrollment command

URL -
207.148.121.63:86/api/v2/WebAPI/TriggerUserOnlineEnrollment?APIKey=593910012317&SerialNumber=042
6134400988&EmployeeCode=447789&EmployeeName=ritesh singh&backup_number=1

You might also like