Web Api V2.0
Web Api V2.0
User Guide
User Guide
Documentation Disclaimer
Matrix Comsec reserves the right to make changes in the design or components of the product as engineering and
manufacturing may warrant. Specifications are subject to change without notice.
This is a general documentation for all variants of the product. The product may not support all the features and
facilities described in the documentation.
Information in this documentation may change from time to time. Matrix Comsec reserves the right to revise
information in this publication for any reason without prior notice. Matrix Comsec makes no warranties with respect
to this documentation and disclaims any implied warranties. While every precaution has been taken in the
preparation of this system manual, Matrix Comsec assumes no responsibility for errors or omissions. Neither is any
liability assumed for damages resulting from the use of the information contained herein.
Neither Matrix Comsec nor its affiliates shall be liable to the buyer of this product or third parties for damages,
losses, costs or expenses incurred by the buyer or third parties as a result of: accident, misuse or abuse of this
product or unauthorized modifications, repairs or alterations to this product or failure to strictly comply with Matrix
Comsec operating and maintenance instructions.
Copyright
All rights reserved. No part of this system manual may be copied or reproduced in any form or by any means
without the prior written consent of Matrix Comsec.
Version 27
Release date: March 28, 2023
Contents
List of Tables ........................................................................................................................................................ i
API Overview................................................................................................................................................... 3
Devices .......................................................................................................................................................... 19
Getting a Device List ......................................................................................................................................... 20
Assigning Users to Device ................................................................................................................................ 23
Revoking Users from Device ............................................................................................................................. 26
Adding a New Device ........................................................................................................................................ 28
Deleting a Device .............................................................................................................................................. 33
Obtaining Device List with Status ...................................................................................................................... 35
Updating Device Configuration ......................................................................................................................... 37
Getting a Device Group ..................................................................................................................................... 42
Adding a New Device Group ............................................................................................................................. 44
Sites ............................................................................................................................................................... 45
Obtaining Data on Existing Sites ....................................................................................................................... 46
Adding a New Site ............................................................................................................................................. 48
Updating a Site .................................................................................................................................................. 49
Users ............................................................................................................................................................. 51
Accessing User Data ......................................................................................................................................... 53
Adding/Editing a User ....................................................................................................................................... 65
Adding User Photograph ................................................................................................................................... 83
Deleting a User ................................................................................................................................................. 85
Enrolling a User ................................................................................................................................................. 87
Setting Credentials on Device ........................................................................................................................... 89
Deleting Credentials from Device ...................................................................................................................... 91
Searching a User .............................................................................................................................................. 93
Fetching Reporting Group Members ................................................................................................................. 99
Password..................................................................................................................................................... 379
Welcome to the COSEC Web API User Guide. This document will provide you a comprehensive overview and
complete user-guidance for COSEC Web APIs. You can learn more about COSEC Web APIs, browse through
detailed descriptions of individual APIs and test them using sample scenarios.
Document Conventions
This API User Guide will follow a set of document conventions to make it consistent and easier for you to read.
These are as follows:
For e.g. To learn more about APIs, please refer to section API Overview (or, See “API Overview” on
page 3.).
2. The term device used in this document, will refer to all COSEC Panels and Door Controllers.
4. Text within angle brackets (e.g. “<request-type>”) denotes content in URL syntax and should be replaced
with either a value or a string. The angle brackets should be ommitted in all instances except those used to
denote “tags” within XML responses (e.g. “<name></name>”).
5. Arguments in a request URL, along with their corresponding values, will be separated by a ‘semi-colon’ (‘;’)
from other arguments. “?” will be allowed as a separator between the request-type and an argument.
Special characters (&, ‘, “, <, > and ;) will not be allowed for any arguments and its value.
Important: to indicate something that requires your special attention or to remind you of
something you might need to do when you are using the system.
Caution: to indicate an action or condition that is likely to result in malfunction or damage to the
system or your property.
Warning: to indicate a hazard or an action that will cause damage to the system and or cause
bodily harm to the user.
Tip: to indicate a helpful hint giving you an alternative way to operate the system or carry out a
procedure, or use a feature more efficiently.
Document Organization
Chapters 1 and 2 will provide a general understanding of COSEC APIs and the basic interface communication.
Chapters 3 to 34 provide a chapter-wise discussion of API groups with detailed explanation of individual APIs. The
following information has been provided on each request type:
COSEC enables third party developers to access some of its important functionality via APIs. Integrate your
application with COSEC and remotely execute functions such as retrieval of device, user and attendance data,
sending and updating configurations on the COSEC database, applying and approving applications, leave
management, cafeteria management and so on.
How It Works
A COSEC Web API is an interface that interacts with client applications, enabling them to invoke or push data from
and to the COSEC database, using the COSEC Web server. This can be processed by sending a simple HTTP/
HTTPs request to the COSEC server. The server then returns an appropriate response which the remote
application can subsequently process on its own, without the need to launch the COSEC Web application.
Consider an example where an organization (say, ABC) is using COSEC for time and attendance monitoring and
management. However, ABC has its independent Payroll application which requires the input of monthly
attendance data of all employees to process their salaries every month. In such a scenario, the application can be
integrated with COSEC via HTTP/HTTPs to raise a request for the relevant employee records in a specific format.
Thus, COSEC APIs are communicative interfaces that provide effective back-end support, making integration
possible from any corner of the world. This also cuts down on an organization’s needs to invest both time and
resources in manual data-handling and data errors, promoting speed, precision and efficiency in resource
management.
General Features
All COSEC APIs -
• Support some predefined parameters and their corresponding values for each action. Each parameter will
either be mandatory or bear a system-defined default value (when no value is specified).
• Use a mandatory parameter action universally, which takes simple HTTP/HTTPs actions (such as GET,
SET, DELETE etc.) as values, and specifies the action to be requested.
• XML/JSON
Prerequisite
In order to use a COSEC API, the user will require:
• API access enabled for the API user on the COSEC Web server.
To learn about system requirements, please refer to the COSEC Manual in your software setup.
The COSEC server will require Basic Authentication using the login user’s credentials.
API access rights for login user will depend on the following criteria:
• System Account users (e.g. system administrator, system engineer etc.) - These users have login rights to
the COSEC Web application and their page access rights will depend on their role configuration. API
• ESS users (e.g. An employee) - These users have login rights only on the ESS application. ESS users can
be distinguished into Reporting In-charge and Reporting Group members, based on hierarchy. Page
access rights of an ESS user will depend on whether he is a Reporting In-charge or a Reporting Group
member. Users with activated ESS accounts and the ESS module license are enabled for API access by
default.
For ESS users linked with a System Account (e.g. a reporting in-charge who is also a system administrator), the
ESS/System Account credentials can be provided depending on the required API user rights.
License Type
To invoke an API, the user must have the necessary module license for relevant pages on the COSEC Web
Application. For e.g., to retrieve attendance data for a specified month, the login user must have a Time and
Attendance module license.
For more information on the COSEC application modules and licenses, please refer to the COSEC Manual
in your software installation kit. For license requirement of each API, See “Supported APIs” on page 15.
Login users must have access rights on the appropriate pages of the COSEC Web Application to use related APIs.
For e.g., to apply for a leave, the user must have rights on the following page:
For System Account User: Leave Management > Application/Approval > Leave Application
For ESS User: ESS > Leave Management > Leave Application
To view page access rights for an API, refer to the User Rights section for the particular API.
Device-wise Rights
Device-wise rights will be required for all APIs which involve COSEC devices in the request to be sent. For the
action=get method, only those device records will be returned on which the login user has device rights. However,
all Event APIs will be exceptions for this verification.
Communication Flow
The communication takes place in the following manner:
3. The server parses the request for the action to be taken. For e.g. for the action=get argument, the server
fetches specified data from the COSEC database.
4. In case of an error (invalid syntax, invalid authentication etc.), the request is denied and an error response
is returned. Else, the requested data is returned as a response. The Response Codes defined by Matrix
will remain constant. For the response format of COSEC Web APIs, See “API Response” on page 585.
All HTTP/HTTPs Requests follow a generic message format. It consists of the following components:
3 Empty Line This is an empty line separating headers from the message body.
Example:
Response Format
An HTTP/HTTPs response is a collection of lines sent by the server to the client. A generic HTTP/HTTPs response
format will resemble the following:
Example
When the server gets a request, it will respond with a standard HTTP/HTTPs status code as illustrated in the
following sample response:
HTTP/1.0 200 OK
Date: Sat, 15 Jan 2000 14:37:12 GMT
Server: Microsoft-IIS/2.0
Content-Type: text/HTML
Content-Length: 1245
Last-Modified: Fri, 14 Jan 2000 08:25:13
GMT
HTTP/HTTPs Status Codes: Status codes are 3-digit numeric codes returned in HTTP/HTTPs responses
that enable recipients to understand the successful or failed status of the request issued. In general, codes
in the 1xx range indicate an informational message only, 2xx codes indicate a successful request, 3xx
codes indicate an incomplete request that requires further action, 4xx codes point at client-side errors
while 5xx codes point at server-side errors.
URL Syntax
All COSEC APIs follow a common HTTP/HTTPs query syntax for the third party to generate a request. The generic
URL is stated below.
Syntax
http://<servername>/api.svc/v2/<request-type>?action=<value>;<argument>=<value>...
https://<servername>/api.svc/v2/<request-type>?action=<value>;<argument>=<value>...
Example: http://192.168.104.12/cosec/api.svc/v2/user?action=get;id=101;
or
https://192.168.104.12/cosec/api.svc/v2/user?action=get;id=101;
The current API version requires an additional version parameter (mandatory) to be mentioned in the
request URL. To know more, See “API Versions” on page 15.
Note:
• All HTTP commands are in plain text, and almost all HTTP requests are sent
http:// using TCP port 80, though any port can be used.
https://
• When SSL encryption is being used, use the “HTTPS” element in the URL.
Default port for SSL communication is 443. However, if any other port is used
(say, “3012”), it must be mentioned in the URL following the IP address or
domain name, separated by a “colon”, as shown below:
https://192.168.1.1:3012/cosec/api.svc/v2/...
This describes the server location where the COSEC Web is installed. It could be an IP
address or a domain name.
For eg. let’s say the IP address for COSEC Web is 192.168.1.1/cosec. Then a generic
HTTP query would look like:
<servername>
http://192.168.1.1/cosec/api.svc/v2/...
Note: This document commonly uses the domain name “matrixserver” for all its
examples.
This specifies the type of API request. For the mandatory request types, please refer to the
<request-type>
individual API descriptions.
These are argument values that determine the response. Requests may allow single or
<value>
multiple (‘comma’ separated) values for an argument, depending on the API called.
Let us assume that the COSEC Web has been installed on a location named “matrixserver”. The user wants to
retrieve a list of all panel devices defined on the COSEC database. In this case, a sample request would resemble
the following:
Sample Request:
http://matrixserver/api.svc/v2/device?action=get;type=panel
https://matrixserver/api.svc/v2/device?action=get;type=panel
Sample Response:
id|name|siteid
p_1|Panel-1|
<EOT>
In this case, the query uses an action=get argument which is commonly used to retrieve information from a server.
This action takes an argument type which in this case, defines the device type (“panel”) and takes the value panel.
• Text
• XML
• JSON
The expected response format can be specified using a common argument: format. When no format is specified,
the response is returned in text format, by default.
Example
Sample Request:
http://matrixserver/api.svc/v2/device?action=get;type=door;format=text
Sample Response:
id|name|siteid
d_1|direct door|1
d_3|NGT Door|1
d_6|5453|1
d_2|NGTDoor1|1
<EOT>
http://matrixserver/api.svc/v2/device?action=get;type=door;format=xml
Sample Response:
Syntax
http://<servername>/api.svc/v2/schema/<request-type>?<argument>=<value>;<argument>=<value>...
https://<servername>/api.svc/v2/schema/<request-type>?<argument>=<value>;<argument>=<value>...
The valid arguments for this request are action and format.
Example
Sample Request:
http://matrixserver/api.svc/v2/schema/user?action=get;format=xml
Example
In this sample request, the user requests a list of all paneldoors on the COSEC database with their respective
names and IDs.
Sample Request:
http://matrixserver/api.svc/v2/device?action=get;type=paneldoor;field-name=name,id
Sample Response:
name|id
Main Entry 1|p_3
CDC PD HO|p_3
Acct-Purch|p_4
Production 1|p_4
QC|p_4
Production- 2|p_4
Factory Admin|p_4
Factory Store|p_4
Factory Support|p_4
<EOT>
Multi-Language Support
• N - Multi-Language characters are not allowed
• Y (Set 1) - Multi-Language characters allowed except Set 1 (` ~ # % ^ * = { } | \ ; " ' < > ?)
• Y (Set 2) - Multi-Language characters allowed except Set 1 (` ~ # % ^ & * = + { } [ ] | \ : ; " ' < > ? /)
• Y (Set 3) - Multi-Language characters allowed except Set 1 (` ~ # % ^ * = + { } | \ : ; " < > ?)
• Y (NA) - Multi-Language characters allowed except the ones that are restricted in API interface.
Additional Information
• If an argument-value pair is mentioned multiple times in a request, the last value will be considered.
Example:
http://matrixserver/user?action=get;id=1234;id=5678;format=xml
• For all the API’s the response for date parameters will be in the following format: mm/dd/yyyy HH:MM
• For all APIs using the set/update methods, sending null (or blank) values will be allowed for non-
mandatory fields. Based on the corresponding page behavior, the API behavior will differ as follows:
i. If null value is allowed for an argument, then it will be stored as null (or blank).
Example: “http://....;reason= “ will overwrite existing value for reason and set it as null (or blank)
ii. If a default value is defined internally, then that default value will be stored for the parameter
Example: http://....;gender= “ will overwrite existing value for gender and set it as “na” (because “na” is
default value for gender)
• Special characters (&, ‘, “, <, > and ;) for any arguments and its value are not allowed.
• To support special characters used in existing parameters, an option to Encode URL is provided. Third
party apps can encode the URL using standard encoding functions such as :
• JAVA : URLEncoder.encode(url,"UTF-8")
• JavaScript : encodeURIComponent(url)
• ASP .NET : System.Web.HttpUtility.UrlEncode(url)
Example: http://matrixserver/cosec/api.svc/v2/encode?/<request
type>?<argument>=<value>;<argument>=<value>...
COSEC APIs use basic authentication and can be tested on any standard Web browser. Enter the request
URL in the address field of your browser and press the ‘Enter’ key to send query to the server. Enter the
authentication credentials when prompted. The response will be displayed on your browser in the specified
format.
0 : Blank
1: COSEC Mobile Apps
To specify the source for the API
api-source 2 : PIM - 0
request.
3 : Third Party App
4 : Device
If you have enabled/disabled GDPR in COSEC Web Server > Admin > System Configuration > Global Policy >
Basic then, whenever any API request is hit to the server, while the GDPR process is ongoing, the server will
respond with the below mentioned response code.
Supported APIs
The remaining chapters in this User Guide shall list and describe all APIs supported by COSEC. These interfaces
have been organized into chapters based on license requirements as well as functionality, for the convenience of
understanding.
API Versions
For COSEC Web APIs, different versions are maintained to differentiate among existing APIs being used by third-
party applications, and any changes or revisions made. The current version is COSEC Web API Version 2.0 and
supports additional features and functions as compared to COSEC Web API Version 1.0.
* This API is no longer supported V2.0 onwards. If this API is called, the response will simply return the original group names.
To use the APIs supported in Version 2.0, it is mandatory to mention the version number in the request URL.
Example:
http://<servername>/api.svc/v2/<request-type>?action=<value>;<argument>=<value>...
The Devices interface lets you access and modify device data on the COSEC server. The HTTP query syntax to
access device data from the COSEC server is as follows:
Syntax
http://<servername>/api.svc/v2/device?action=<method>;<argument>=<value>...
• Deleting a Device
Device Group
User Rights
User Rights
ESS Enabled if user has ESS rights enabled (for action=get only).
This COSEC API allows the user to obtain a list of available devices on the COSEC database. For instance, an
organization may have 100 panels and 200 direct door devices enlisted via COSEC. The user can obtain a list of all
the 300 devices or a list for an individual device type using this command.
Action
action=get
Syntax
http://<servername>/api.svc/v2/device?action=get;<argument>=<value>...
Parameters
Records will be fetched only for those devices on which the login user has device rights.
Response Fields
0 = Panel
1 = Door V1
2 = Panel Lite
3 = Door V2
4 = NGT Direct Door
5 = Wireless Direct Door
6 = Path Controller
7 = PVR Direct Door
Device Type device-type 8 = Panel200 This is the device type.
9 = Vega Controller
11 = ARC Controller
12 = Door V3
15 = Door FMX
19 = Door V4
17= ARC DC200
20 = ARGO
21 = ARGO FACE
For Panels:0
1-255 (device-type=8) For Direct Doors:1
Door ID did
0-99 (All Others) For Panel Doors: As
Configured
IP Address ip - -
Example
This example presents a sample request and response case when accessing “matrixserver”, for obtaining a list of
all available devices:
Sample Request:
http://matrixserver/api.svc/v2/device?action=get
Sample Response:
id|name|siteid|type|device-type|application-type
d_6|RnD 1st Flr|1|door|1|0
d_8|RnD 3rd Flr|1|door|1|0
d_11|Rnd Basement V2|1|door|3|0
d_12|RnD 2nd Flr V2|1|door|3|0
d_16|Canteen HO|1|door|3|2
p_3|HO Panel Lite||panel|2|
p_4|Factory Panel||panel|0|
p_6|vega panel lite||panel|8|
p_7|vega panel lite||panel|8|
p_3|CDC PD HO|1|paneldoor|2|
p_3|Main Entry 1|2|paneldoor|2|
<EOT>
Sample Request:
For type=door,
http://matrixserver/api.svc/v2/device?action=get;type=door
Sample Response:
id|name|siteid|type|device-type|application-type
d_6|RnD 1st Flr|1|door|1|0
d_8|RnD 3rd Flr|1|door|1|0
d_11|Rnd Basement V2|1|door|3|0
d_12|RnD 2nd Flr V2|1|door|3|0
d_16|Canteen HO|1|door|3|2
d_17|RnD 4th Flr|1|door|3|0
<EOT>
Sample Request:
http://matrixserver/api.svc/v2/device?action=get;type=group;format=xml
Sample Response:
This function helps assign a user to all or specific Panels, Direct Doors or Device Groups pre-defined on the
COSEC system.
Action
action=assign
Syntax
http://<servername>/api.svc/v2/device?action=assign;<argument>=<value>...
Parameters
Multiple devices (either panels or doors) of the same type can be specified, each value separated by a ‘comma’
(For eg. device=p_1,p_2,p_3,p_4,d_1,d_2,d_3,d_4,…). User can also define a range of devices (eg.
device=p_1-p_50). However, only a single group can be assigned to a user. The same should also be applicable
for id values.
Example
Sample Request:
http://matrixserver/api.svc/v2/device?action=assign;device=g_1,g_2
Sample Response:
failed: <response code> : Invalid command : device=g_1,g_2 only single group against a user
http://matrixserver/api.svc/v2/device?action=assign
Sample Response:
Sample Request:
http://matrixserver/api.svc/v2/device?action=assign;device=p_1;id=1
Sample Response:
Sample Request:
http://matrixserver/api.svc/v2/device?action=assign;device=p_1,d_1,g_1
Sample Response:
The purpose of this function is to revoke a user from all or specific devices defined on the COSEC system. This can
be performed for a single device type, multiple device types or for a specific device group.
Action
action= revoke
Syntax
http://<servername>/api.svc/v2/device?action=revoke;<argument>=<value>...
Parameters
1 to 999999 (for all the Note: System should allow more than
ranges except all & one group against a user.
user)
If argument range is not mentioned and
Max 15 alphanumeric individual argument ID is specified,
Id Yes -
characters (for user) then User id should be considered.
A to Z
a to z Argument ID can have multiple ids as
0 to 9 value separated with comma.
/_\\.@: For example Id=1,2,…..999
Note: If any device is un-assigned against any user via API, then allow the deletion of that door/ device group. But
if the device(s) or a device belonging to any device group is selected for deletion and is a part of the Access Rule
which is assigned to that user, then that door(s) must be retained against that User.
Example
This example presents a sample request and response when accessing “matrixserver”.
Sample Request:
http://matrixserver/api.svc/v2/device?action=revoke
Sample Response:
Sample Request:
http://matrixserver/api.svc/v2/device?action=revoke;device=p_1;id=1
Sample Response:
Sample Request:
For “device=p_1,d_1,g_1”.
http://matrixserver/api.svc/v2/device?action=revoke;device=p_1,d_1,g_1
Sample Response:
This function enables you to define a new biometric device on the COSEC database and set certain configurations
depending on the device type. The device can be assigned to a specified device group and site and configured
based on site requirements.
Action
action= set
Syntax
http://<servername>/api.svc/v2/device?action=set;<argument>=<value>...
Parameters
Here,
0 = Panel,
1 = Door V1,
2 = Panel Lite
3 = Door V2,
4 = NGT Direct Door,
0,1,2,3,4,5,6,7,8,9,11,12,14,15,
device-type Yes - 5 = Wireless Direct Door
19,17,20, 21
6 = Path Controller
7 = PVR Direct Door
8 = Panel200
9 = Vega Controller
11 = ARC Controller
12 = Door V3
14 = ARC IO800
15 = Door FMX
20 = ARGO
21 = ARGO FACE
0= none
1= emprox reader This is the internal card reader
2= hidprox reader type.
card-reader-type No 1 (emprox reader)
3= mifare reader
4= hid iclass u-reader Not applicable for ARC Controller.
5= hid iclass w-reader
0= none
1= em prox reader
2= hid prox reader
This will determine the external
3= mifare reader
reader IO type.
4=hid iclass u reader
5= finger reader
For device type=1 (direct door
6= hid icalss w-reader
V1), er-types (8,9,10) are not
8= uhf reader
er-type No 0 (none) applicable.
9= combo exit reader
10= mifare w reader
er-type=5 is not applicable to
11=PIN - W reader
PVR door type.
13=CB - U Reader
14=CB - W Reader
Not applicable for ARC Controller.
15=ATOM RD300
16=ATOM RD200
17=ATOM RD100
0 = none
rg1-wiegand 1 (Short-Range
1 = Short-Range Reader No
Reader)
2 = Long-Range Reader
0 = None
1 = EM Prox Reader
2 = HID Prox Reader
3 = MiFare Reader
4 = HID iClass-U Reader 1
rg1-rs485 No
5 = Combo Reader (EM Prox Reader)
13=CB - U Reader
15=ATOM RD300
16=ATOM RD200
17=ATOM RD100
rg1-mode 0 = entry
No 0 (entry)
1 = exit
0 = Card
1 = Finger
4 = Card + Finger
6 = Any
rg1-access-mode No 6 (Any)
12 = Finger Then Card
14= None
Applicable for ARC Controller
19=BLE
only.
20= Card then Biometrics
For other device types, these
0 = none
1 (Short-Range parameters will not be applicable.
rg2-wiegand 1 = Short-Range Reader No
Reader)
2 = Long-Range Reader
0 = none
1 = EM Prox Reader
2 = HID Prox Reader
3 = MiFare Reader
4 = HID iClass-U Reader 1 (EM Prox
rg2-rs485 No
5 = Combo Reader Reader)
13=CB - U Reader
15=ATOM RD300
16=ATOM RD200
17=ATOM RD100
0 = entry
rg2-mode No 0 (entry)
1 = exit
0 = Card
1 = Finger
4 = Card + Finger
6 = Any
rg2-access-mode No 6 (Any)
12 = Finger Then Card
14= None
19=BLE
20= Card then Biometrics
To update device configurations for the above parameters, See “Updating Device Configuration” on
page 37.
Example
The following is an example of a successful request sent to “matrixserver” with the following values:
• device-type=0
• device-id=1
• name=panel
• mac=00:01:23:45:67:89
• device-group=Research
Sample Request:
http://matrixserver/api.svc/v2/device?action=set;device-type=0;device-
id=1;name=panel;mac=00:01:23:45:67:89;device-group=Research
Sample Response:
This Devices function allows you to delete a biometric device from the COSEC database. Specify the device type
and device ID to send a ‘delete’ command.
Action
action=delete
Syntax
http://<servername>/api.svc/v2/device?action=delete;<argument>=<value>...
Parameters
Here,
0 = Panel,
1 = Door V1,
2 = Panel Lite
3 = Door V2,
4 = NGT Direct Door,
5 = Wireless Direct Door
0,1,2,3,4,5,6,7,8,9,11,
device-type Yes - 6 = Path Controller
12,14,15,19,17,20, 21
7 = PVR Direct Door
8 = Panel200
9 = Vega Controller
11 = ARC Controller
12 = Door V3
14 = ARC IO 800
15 = Door FMX
19 = Door V4
17 = ARC DC 200
20 = ARGO
21 = ARGO FACE
Example
The following example illustrates how to delete a direct door device with a device identification number 1:
Sample Request:
http://matrixserver/api.svc/v2/device?action=delete;device-type=1;device-id=1
This function enables the user to obtain the connection status of devices. The user can obtain a list of devices from
the COSEC server based on the device status. The device status can be either ‘connected’ or ‘disconnected’.
Action
action= list
Syntax
http://<servername>/api.svc/v2/device?action=list;<argument>=<value>......
Parameters
all, connected,
disconnected,
To specify the devices to be listed on
status online,offline,unknown No all
the basis of their status.
(Applicable to Panel
Doors only)
Response Fields
0 = Panel,
1 = Direct Door,
2 = Panel Lite
3 = Direct Door V2,
4 = NGT Direct Door,
5 = Wireless Direct Door
6 = Compact Direct Door
7 = PVR Direct Door
8= Panel200
Enum - 13 is reserved for
Device Type device-type 9= Vega Controller
COSEC SAMAY Door V3.
11 = Arc Controller
12 = Door V3
14 = ARC IO 800
15 = Door FMX
18 = MODE
19 = Door V4
17 = ARC DC 200
20 = ARGO
21 = ARGO FACE
For Panels : 0
1-255 (device-type = 8) For Direct Doors : 1
Door ID did For Panel Doors : As
0-99 (All Others) configured
0: Inactive
Active active
1: active
Device IP ip
Panel/Direct Doors:
disconnected (0)
connected (1)
Panel Doors:
status status
If Panel's status=0: Unknown
Else: offline (0), online (1/3)
upgrading (2)
unknown (4)
Example
Sample Request:
http://matrixserver/api.svc/v2/device?action=list;status=connected
Sample Response:
Sample Request:
When “status=all”,
http://matrixserver/api.svc/v2/device?action=list;status=all
Sample Response:
device-type|device-id|name|active|ip|mac|status|connect-time|disconnect-time
0|1|Panel-1|1||00:4f:4e:67:89:08|disconnected||10/3/2013 9:00:19 AM
1|1|door|1|192.168.103.50|00:01:23:45:67:89|disconnected|10/3/2011 10:19:55 AM|10/3/2013 9:00:19 AM
4|2|NGTDoor1|1||00:3f:4e:67:89:08|disconnected||10/3/2013 9:00:19 AM
3|3|NGT Door|1||00:1b:09:90:76:00|disconnected||10/3/2013 9:00:19 AM
3|6|5453|1||00:1b:09:90:76:06|disconnected||10/3/2013 9:00:19 AM
<EOT>
Specify a device ID and device type and edit the configuration for this device as saved on the COSEC database.
Parameters that can be updated are specified in the argument-value table below.
Action
action= update
Syntax
http://<servername>/api.svc/v2/device?action=update;<argument>=<value>......
Parameters
Here,
0 = Panel,
1 = Direct Door,
2 = Panel Lite
3 = Direct Door V2,
4 = NGT Direct Door,
5 = Wireless Direct Door
6 = Compact Direct Door
0,1,2,3,4,5,6,7,8,9,11,12,14,15, 7 = PVR Direct Door
device-type Yes -
19,17,20,21 8= Panel-lite V2
9= Vega Controller
11 = Arc Controller
12 = Door V3
14 = ARC IO 800
15 = Door FMX
16=Path V2
18 = MODE
19 = Door V4
17 = ARC DC 200
20 = ARGO
21 = ARGO FACE
0 = none
1 = emprox reader This is the internal card reader
2 = hidprox reader type.
card-reader-type No
3 = mifare reader
4 = hid iclass u-reader
5 = hid iclass w-reader
0= none
1= em prox reader
This will determine the external
2= hid prox reader
reader IO type.
3= mifare reader
4= hid iclass u reader
For device type=1 (direct door
5= finger reader
V1), er-types (8,9,10) are not
6= hid iclass w-reader
applicable.
8= uhf reader
er-type No
9= combo exit reader
er-type=5 is not applicable to
10= mifare w reader
PVR device type and Door FMX
11= PIN - W Reader
13= CB - U Reader
er-type 5 not applicable to ARGO
14= CB - W Reader
Door when value passed in finger-
15= ATOM RD300
reader-type = 2.
16= ATOM RD200
17= ATOM RD100
0 = none
1 = Short - Range Reader
rg1-wiegand
2 = Long - Range Reader
11 = PIN - W Reader
14 = CB - W Reader
0 = None
1 = EM Prox Reader
2 = HID Prox Reader
3 = MiFare Reader
4 = HID iClass-U Reader
rg1-rs485 No
5 = Combo Reader
13 = CB - U Reader
15 = ATOM RD300
16 = ATOM RD200
17 = ATOM RD100
rg1-mode 0 = entry
No
1 = exit
0 = Card
1 = Finger
2 = Card + PIN
3 = Biomertric + PIN
4 = Card + Finger
5 = Biometric + Card + PIN
6 = Any
rg1-access-mode No
12 = Finger Then Card
14 = None
19 = BLE
20 = Card then Biometrics
15 = Face
16 = Card + Face
18 = Biometric + Face
0 = none
1= Short - Range Reader
rg2-wiegand 2 = Long - Range Reader No
11 = PIN - W Reader
14 = CB - W Reader
0 = none
1 = EM Prox Reader
2 = HID Prox Reader
3 = MiFare Reader
4 = HID iClass- U Reader
rg2-rs485 No
5 = Combo Reader
13 = CB - U Reader
15 = ATOM RD300
16 = ATOM RD200
17 = ATOM RD100
0 = entry
rg2-mode No
1 = exit
0 = Card
1 = Finger
2 = Card + PIN
3 = Biomertric + PIN
4 = Card + Finger
5 = Biometric + Card + PIN
6 = Any
rg2-access-mode No
12 = Finger Then Card
14 = None
19 = BLE
20 = Card then Biometrics
15 = Face
16 = Card + Face
18 = Biometric + Face
The Login User must have rights on the device which is to be updated.
Action = update not applicable to Panel Doors.
Example
Sample Request:
http://matrixserver/api.svc/v2/device?action=update;device-id=11;device-type=3;name=RndBasementV2
Sample Response:
Sample Request:
When the specified MAC address is already associated with another device. Failed Request.
http://matrixserver/api.svc/v2/device?action=update;device-id=33;device-
type=9;mac=23:56:66:33:33:23;device-group=RnD
Sample Response:
This API allows the user to obtain a list of devices assigned to a specific device group.
Action
action=get
Syntax
http://<servername>/api.svc/v2/device-group?action=get;<argument>=<value>...
User Rights
User Rights
ESS Disabled
Parameters
0: all
range No all -
1: Individual
A-Z
a-z To select multiple group names, each
Name 0-9 - - separated by ", (comma)"
()_-. e.g.:"DG1,DG2,…"
[space]
Note 1 : (For range= individual)If valid Id and Name both are specified, then priority should be given to ID and it
should fetch device details as per entered Id.
Note 2 : (For range= individual) If provided Id or Name both contain valid values/arguments, return messages as
specified for Id only.
Note 3: (For range= individual)If either Id or Name contains valid values, it should fetch device details as per
entered valid argument and values. e.g., If invalid Id has been entered, but valid name is mentioned, then it should
fetch devices as per entered name.
0 = Panel,
1 = Direct Door,
2 = Panel Lite
3 = Direct Door V2,
4 = NGT Direct Door,
5 = Wireless Direct Door
6 = Compact Direct Door
7 = PVR Direct Door
8= Panel200
Device Type device-type
9= Vega Controller
11 = Arc Controller
12 = Door V3
14 = ARC IO 800
15 = Door FMX
18 = MODE
17 = ARC DC 200
20 = ARGO
21 = ARGO FACE
For Panels : 0
1-255 (device-type = 8)
For Direct Doors : 1
Door ID did
For Panel Doors : As
0-99 (All Others)
configured
1: active
Active active
0: Inactive
Device IP ip
Panel/Direct Doors:
disconnected (0)
connected (1)
Panel Doors:
status status If Panel's status=0: Unknown
Else: offline (0), online (1/3)
upgrading (2)
unknown (4)
This API allows the user to set a list of device group/super group.The device can be assigned to a specified device
group and configured based on site requirements.
Action
action=set
Syntax
http://<servername>/api.svc/v2/device-group?action=set;<argument>=<value>...
Parameters
A-Z
a-z
0-9 This is the name of group to be
Name ()_-. Yes - created.
[space]
Max. 30 characters
A Site is a work area or unit defined on the COSEC system to which one or more COSEC devices are assigned. A
site can be defined by an administrator based on requirements. For e.g.: The organization ABC could have multiple
sites defined, such as ABCheadoffice, ABCfactory, ABCwarehouse and so on. This COSEC API allows users to
access and add information about specific sites using COSEC. The http query to access site data from the COSEC
server should resemble the following syntax:
Syntax
http://<servername>/api.svc/v2/site?action=<method>;<argument>=<value>...
• Updating a Site
User Rights
User Rights
ESS Disabled
This function allows the user to access data about existing sites. This includes the Site ID, Site Name and a Default
site.
Action
action=get
Syntax
http://<servername>/api.svc/v2/site?action=get;<argument>=<value>...
Parameters
Response Fields
Example
Sample Request:
http://matrixserver/api.svc/v2/site?action=get
Sample Response:
Id|Name|Default
1|Site-1|1
2|h|0
<EOT>
Sample Request:
http://matrixserver/api.svc/v2/site?action=get
Action
action=set
Syntax
http://<servername>/api.svc/v2/site?action=set;<argument>=<value>...
Parameters
maximum 30
name alphanumeric Yes - The Site Name
characters
Example
Sample Request:
http://matrixserver/api.svc/v2/site?action=set;id=1;name=Site-1
Sample Response:
success : successful
This function can be used to update the configuration of an existing site on the COSEC database.
Action
action=update
Syntax
http://<servername>/api.svc/v2/site?action=update;<argument>=<value>...
Parameters
maximum 30
name alphanumeric Yes - The Site Name
characters
This API allows the access and modification of user data from the COSEC database. The Users APIs allows you to
perform the following functions:
Action=get
• Accessing User Data
Action=set
• Adding/Editing a User
Action=setphoto
• Adding User Photograph
Action=delete
• Deleting a User
Action=enroll
• Enrolling a User
Action=set-credential
• Setting Credentials on Device
Action=del-credential
• Deleting Credentials from Device
Action=get
• Searching a User
Action=get
• Fetching Reporting Group Members
User Rights
User Rights
Enabled.
User Configuration > ESS > Settings > Edit Basic Details
This function allows you to retrieve specific data for a single user or multiple users. For instance, this method can
be used to retrieve an employee’s name, date-of-birth, joining date, blood-group, Passport Number etc.
Action
action=get
Syntax
http://<servername>/api.svc/v2/user?action=get;<argument>=<value>...
Parameters
0 : if user is not a
worker
Cwm-enabled No
1: if user is worker
Default value = 0.
Conditions:
1.Argument mentioned, but value not
specified, then ignore this parameter.
Response Fields
Allowed Characters
A-Z
Id id max 15 characters a-z
0-9
/_\\.@:
Allowed Characters
A-Z
User Name name max 45 alphanumeric characters a-z
0-9
-_. ()[]
1 : Active
Active active 0 : Inactive -
2 : Inactive and Revoke Devices
na
Gender gender male -
female
na,a+,a-,b+,b-,ab+,ab-,o+,o-,A1–
Blood Group blood-group ,A1+,A1B-,A1B+,A2-,A2+,A2B– -
,A2B+,B1+
married
Marital Status marital-status unmarried -
na
1 : enabled
ESS Login ess-login -
0 : disabled
1 : editing allowed
ESS Detail Edit ess-detail-edit -
0 : editing not allowed
1 : enabled
Attendance via ESS attendance-via-ess -
0 : disabled
1 : enabled
Active Directory Login active-directory-login -
0 : disabled
1 : enabled
Attendance Calculation attendance-calc -
0 : disabled
1 – enable bypass
Bypass Fingerprint/Palm bypass-finpalm -
0 – disable bypass
1 – enable bypass
Bypass Finger bypass-finger -
0 – disable bypass
1 – enable bypass
Bypass Palm bypass-palm -
0 – disable bypass
1 – access allowed
Shift based access shiftbased-access -
0 – access denied
1 - allowed
Allow e-Canteen allow-ecanteen -
0 – not allowed
1 - postpaid
Account Type account-type -
0 - prepaid
0: Pending
IMEI Authorized or not imei-authorized 1: Authorized -
2: Rejected
Valid Characters :
A-Z
Max 100 characters a-z
Custom Field 1 -10 field1-10
ddmmyyyy 0-9
space
[]().-_/
0 : Disabled
Punch Marking Via API punch-api -
1 : Enabled
0 : Disabled
Auto-Punch Marking auto-attendance -
1 : Enabled
0 : Disabled
Manual Punch Marking manual-punch -
1 : Enabled
0 : None
Location Data Mandatory from
location-mandatory 1 : Any Location -
Apps
2 : Configured Locations
0 : Disabled
Door Access Through API door-access-api -
1 : Enabled
0 : Disabled
FVM Flag FVM-enable -
1 : Enabled
0: None
Job Assignment Type job-assignment-type 1: Fixed -
2: Device Based
0: Not Blacklisted
Blacklisted blacklisted -
1: Blacklisted
Allowed Characters
A-Z
Custom Group 1 Name customgroup1_name 45 Characters a-z
0-9
-_. ()[]
Allowed Characters
A-Z
Custom Group 2 Name customgroup2_name 45 Characters a-z
0-9
-_. ()[]
Allowed Characters
A-Z
Custom Group 3 Name customgroup3_name 45 Characters a-z
0-9
-_. ()[]
Allowed Characters
A -Z
a-z
0-9
()
[]
_ (underscore)
- (Hyphen)
. (full Stop)
Full Name full-name max 200 alphanumeric characters
/
&
, (comma)
@
' (single quote)
[Space]
0 : For Attendance
Enable Face Recognition For enable-fr-for 1 : For Access Control
2 : Both
0: Disabled
Enable Self Enrollment FR enable-fr-self-enroll
1: Enabled
1 - enable bypass
Bypass Face bypass-face Bypass Face
0 - disable bypass
If Enable FR/Punch
0 : None
Marking Via API/Manual
1 : Attendance
Punch Marking is disabled
Face Mandatory For Punch face-mandatory 2 : Access Control
for a user, face-mandatory
3 : Both
tag will be available only
for value 0 : None
Max 50 chars
Valid Values :
A-Z
a-z
Blacklisted reason Blacklisted-reason
0-9
[space]
!@$*()_-+\[],.:
12: driving-license
13: passport-no Uploaded document tag is
14: pan added for checking the
16: pf-no status of uploaded images
18: esi-no for respective field.
21: field1 Multiple values are
22: field2 possible in this field.
Uploaded-doc uploaded-doc 23: field3
24: field4 If documents/images are
41: field5 present in field1,2 and 5
42: field6 then uploaded-doc should
43: field7 contain value of field1,
44: field8 field 2 and 5 be provided in
respective field.
45: field9
46: field10
1: Checked
Authorized Host User Flag Authorized-Host-User
0: Unchecked
0= None
Enable Offline-Transaction enable-offline-transaction 1= Allow Without Discount
2= Allow With Discount
1-4294967292 = Job
Reference ID
corresponding to
respective Job Codes
Assigned Job assigned_job
4294967293 = Job
Reference ID selected =
Continue Job
4294967294 = Job
Reference ID selected =
Default Job
4294967295 = Job
Reference ID selected =
None
1 : enabled
Capture Photo capture-photo 0 : disabled
Sample Request: A sample request for fetching employee data with specific fields.
http://192.168.104.16/cosec/api.svc/v2/user?action=get;id=836,837,838,840;field-name=id,name,reference-
code,active,gender,marital-status,blood-group,nationality
Sample Response:
id|name|reference-code|active|gender|marital-status|blood-group|nationality
836|RAJUBHAI VANKAR|836|1|male|married|b+|Indian
837|SHIRIN Y PATEL|837|1|female|unmarried|a-|Indian
838|VIPUL B SOLANKI|838|1|male|unmarried|o+|Indian
840|KANTIBHAI VASAVA|840|1|male|na|a+|Indian
<EOT>
Example2
Sample Request: A sample request for fetching all the data of an employee.
http://192.168.104.12/cosec/api.svc/v2/user?action=get;id=101;
Sample Response:
id|reference-code|name|short-name|active|module|date-of-birth|joining-date|confirmation-date|leaving-
date|reason-for-leaving|pf-no|vehicle-reg-no|visa-no|visa-expiry|driving-license|pan|esi-no|passport-
no|aadhar-no|uan|voter-id|height|weight|gender|blood-group|marital-status|nationality|father-spouse-
name|qualification|experience|medical-history|local-address1|local-address2|local-street|local-
city|local-pincode|local-state|local-country|permanent-address1|permanent-address2|permanent-
street|permanent-city|permanent-pincode|permanent-state|permanent-country|personal-phone|personal-
cell|personal-email|official-phone|official-extension|official-cell|official-email|pin|card-1|card-
2|access-validity-date|active-directory-login|active-directory-username|active-directory-
domain|integration-
reference|organization|branch|department|designation|section|category|grade|leave_group|reporting-
incharge|attendance-policy|latein-policy|earlyout-policy|overtime-policy|absentee-policy|coff-
policy|device-group|device-group-id|smart-access-route|max-route-level|employment-profile|employment-
type|award-penalty|work-profile|roster-policy|roster-attendance-policy|hour-exception|access-
level|bypass-finger|bypass-palm|shiftbased-access|shift-schedule|start-shift|holiday-
schedule|attendance-calc|max-personal-hrs|bus-route|bypass-finpalm|ess-login|ess-detail-
edit|attendance-via-ess|allow-ecanteen|discount-level|account-type|max-allowed-limit|max-usage-
limit|organization_code|branch_code|department_code|designation_code|section_code|category_code|grade_c
ode|field1|field2|field3|field4|week-off-group|location-mandatory|punch-api|auto-attendance|manual-
punch|allow-offline-punch|door-access-api|fvm-enable|blacklisted|job-assignment-
type|device|pvr_group|enrolled_fingers|enrolled_palms|rg_id|rg_name|rg_incharge_1|rg_incharge_2|imei|im
ei-authorized|suprema-proprietary-count|suprema-iso-count|lumidigm-iso-count|organization-name|branch-
name|department-name|category-name|grade-name|designation-name|section-name|restrict-half-
day|customgroup1ID|customgroup2ID|customgroup3ID|customgroup1_code|customgroup2_code|customgroup3_code|
customgroup1_name|customgroup2_name|customgroup3_name|cafeteria-usage-policy|show-atd-details|full-
name|approval-policy|approval-policy-name
101|101|Khushbu|Khushbu|1|U|||||||||||||||||||NA|NA|NA||||||||||||||||||||||[email protected]|
|||||0|0||0||||1|1|1|1|1|1|1|1||1|1|1|1|1|1|DG1|1||75||||||||8|0|0|0|1|1|1|1|||0|1|1||0|0|0|0.00|0.00|O
RG1|BRC1|DPT1|DSG1|SEC1|CTG1|GRD1||||||0|1|0|0|0|0|0||0|p_4,d_2,d_4,d_9,d_12,p_3,d_10,d_8,d_5,d_6|2|1|1
|||||||1|0|0|Organization-1|Branch-1|Department-1|Category-1|Grade-1|Designation-1|Section-
1|0|1|1|1|CG1|CG2|CG3|Custom Group 1|Custom Group 2|Custom Group 3||1|Khushbu||
<EOT>
This API will allow you to define a new user, as well as add/edit specific data for an existing user on the COSEC
database (only single user at a time). For instance, this process can be used to add information such as an
employee’s name, date-of-birth, joining date, blood-group, Passport Number etc.
Action
action=set
If the action=set request is sent for an existing user, the new values sent will overwrite the existing values,
if any.
Syntax
http://<servername>/api.svc/v2/user?action=set;<argument>=<value>...
Parameters
A -Z
a-z
0-9
()
[]
_ (underscore)
- (Hyphen) Either "name" or "full-name" is a
. (full Stop) Yes (if name mandatory field to be mentioned in API.
full-name -
/ not mentioned) I.e. if "name" tag is mentioned than "full-
& name" is optional and vice versa.
, (comma)
@
'(single quote)
[Space]
Max 30 Alphanumeric
pf-no ** No - This is the PF Number of the user.
Characters
Max 30 Alphanumeric
driving-license ** No - This is the driving license of the user.
Characters
Max 30 Alphanumeric
pan ** No - This is the PAN of the user.
Characters
Max 30 Alphanumeric
esi-no ** No - This is the ESI Number of the
Characters
max 10 alphanumeric
voter-id ** No - This is the Voter ID of the user.
characters
na,
gender ** No NA This is the gender of the user.
male,female
NA,A+,A-,B+,B-,AB+,AB-,o+,o-
,A1–,A1+, A1B-,
blood-group ** No NA This is the blood group of the user.
A1B+,A2-,A2+,A2B–
,A2B+,B1+
Max 20 alphanumeric
nationality ** No - This is the nationality of the user.
characters
Max 50 Alphanumeric
qualification ** No - This is the qualification of the user.
Characters
max 50 alphanumeric
experience ** No - This is the work experience of the user.
characters
max 30 alphanumeric
local-address1 ** No - This is the local address 1 of the user.
characters
max 30 alphanumeric
local-address2 ** No - This is the local address 2 of the user.
characters
max 30 alphanumeric
local-street ** No - This is the street for local address 1.
characters
max 40 alphanumeric
local-city ** No - This is the city for local address 1.
characters
max 40 alphanumeric
local-state ** No - This is the state for local address 1.
characters
max 20 alphanumeric
local-country ** No - This is the country for local address 1.
characters
official-extension
max 10 numeric characters No - This is the extension of the user.
**
Default
organization of
respective
system account
user who is
creating/
updating user
organization 1 to 999999 No This is the ‘Organization’ of the user.
OR
Default
organization
defined in
Enterprise
structure
Default Branch
of respective
system account
user who is
creating/
updating user
branch 1 to 999999 No This is the ‘Branch’ of the user.
OR
Default branch
defined in
Enterprise
structure
Default
Department of
respective
system account
user who is
creating/
updating user
department 1 to 999999 No This is the ‘Department’ of the user.
OR
Default
department
defined in
Enterprise
structure
Default Section
of respective
system account
user who is
creating/
updating user
section 1 to 999999 No This is the ‘Section’ of the user.
OR
Default section
defined in
Enterprise
structure
Default
Category of
respective
system account
user who is
creating/
updating user
category 1 to 999999 No This is the ‘Category’ of the user.
OR
Default
category
defined in
Enterprise
structure
Default Grade
of respective
system account
user who is
creating/
updating user
grade 1 to 999999 No This is the ‘Grade’ of the user.
OR
Default grade
defined in
Enterprise
structure
Default
designation of
respective
system account
user who is
creating/
updating user
designation 1 to 999999 No This is the ‘Designation’ of the user.
OR
Default
designation
defined in
Enterprise
structure
Default
employment- max 4 alphanumeric Employment This is the roster user’s Employment
No
profile characters contract defined contract.
in Roster
Default
employment- max 4 alphanumeric Employment This is the roster user’s Employment
No
type characters type defined in type.
Roster
Default Award
max 4 alphanumeric and Penalty This is the award and penalty assigned
award-penalty No
characters defined in to the roster user.
Roster
Default Work
max 4 alphanumeric This is the work profile assigned to the
work-profile No Profile defined
characters roster user.
in Roster
Default General
max 4 alphanumeric This is the general rules assigned to the
roster-policy No Rules defined in
characters roster user.
Roster
Default
Attendance
attendance- Policy defined This is the ‘Attendance policy’ of the
1 to 99 No
policy in Time & user.
Attendance/
Policies
Default Late In
This is the ‘Late-In policy’ of the user.
Policy defined
lateIn-policy 1 to 99 No in Time &
For a user the policy can be updated
Attendance/
99999 times.
Policies
Default Early
This is the ‘Early-out policy’ of the user.
Out Policy
earlyOut-policy 1 to 99 No defined in Time
For a user the policy can be updated
& Attendance/
99999 times.
Policies
Default
This is the ‘Absentee policy’ of the user.
Absentee Policy
absentee-policy 1 to 99 No defined in Time
For a user the policy can be updated
& Attendance/
99999 times.
Policies
Default COFF
This is the ‘COFF policy’ of the user.
Policy defined
coff-policy 1 to 99 No in Time &
For a user the policy can be updated
Attendance/
99999 times.
Policies
The selected
max 2 alphanumeric The user should define the start shift for
start-shift No schedule’s first
characters the selected shift schedule.
shift
Default
organization
code of
respective
system account
user who is
creating/
organization_co max 6 alphanumeric updating user Organization ID and Organization Code
No
de characters cannot be specified together.
OR
Default
organization
code defined in
Enterprise
structure
Default branch
code of
respective
system account
user who is
creating/
max 6 alphanumeric updating user Branch ID and Branch Code cannot be
branch_code No
characters specified together.
OR
Default branch
code defined in
Enterprise
structure
Default
department
code of
respective
system account
user who is
creating/
department_cod max 6 alphanumeric updating user Department ID and Department Code
No
e characters cannot be specified together.
OR
Default
department
code defined in
Enterprise
structure
Default
category code
of respective
system account
user who is
creating/
updating user
max 6 alphanumeric Category ID and Category Code cannot
category_code No
characters be specified together.
OR
Default
category code
defined in
Enterprise
structure
Default grade
code of
respective
system account
user who is
creating/
max 6 alphanumeric updating user Grade ID and Grade Code cannot be
grade_code No
characters specified together.
OR
Default grade
code defined in
Enterprise
structure
Default
designation
code of
respective
system account
user who is
creating/
designation_cod max 6 alphanumeric updating user Designation ID and Designation Code
No
e characters cannot be specified together.
OR
Default
designation
code defined in
Enterprise
structure
Default section
code of
respective
system account
user who is
creating/
max 6 alphanumeric updating user Section ID and Section Code cannot be
section_code No
characters specified together.
OR
Default section
code defined in
Enterprise
structure
numeric
week-off-group No - To assign a week-off group to the user
1-99
0 : Disabled
punch-api Punch Marking Via API
1 : Enabled No 1
0 : None
job-assignment-
1 : Fixed 0 If value other than 0, 1, 2 added, return
type
2 : Device Based message for Invalid Argument Value
0 : Disabled
'Restrict Half Day Considerations' flag.
restrict-half-day OR 0
1 : Enabled
Default
customgroup1I
D of respective
system account
user who is
creating/
updating user
This is the ID of 'Custom Group 1' of the
customgroup1ID 1-999999 No
user.
OR
Default
customgroup1I
D defined in
Enterprise
structure
Default
customgroup2I
D of respective
system account
user who is
creating/
updating user
This is the ID of 'Custom Group 2' of the
customgroup2ID 1-999999 No
user.
OR
Default
customgroup2I
D defined in
Enterprise
structure
Default
customgroup3I
D of respective
system account
user who is
creating/
updating user
This is the ID of 'Custom Group 3' of the
customgroup3ID 1-999999 No
user.
OR
Default
customgroup3I
D defined in
Enterprise
structure
Default
customgroup1
code of
respective
system account
user who is
creating/
When this code is specified, the system
customgroup1_c max 6 alphanumeric updating user
No will get the code's corresponding id and
ode characters
apply this id to the user.
OR
Default
customgroup1
code defined in
Enterprise
structure
Default
customgroup2
code of
respective
system account
user who is
creating/
When this code is specified, the system
customgroup2_c max 6 alphanumeric updating user
No will get the code's corresponding id and
ode characters
apply this id to the user.
OR
Default
customgroup2
code defined in
Enterprise
structure
Default cus-
tomgroup3 code
of respective
system account
user who is cre-
ating/updating
user When this code is specified, the system
customgroup3_c max 6 alphanumeric
No will get the code's corresponding id and
ode characters
OR apply this id to the user.
Default cus-
tomgroup3 code
defined in
Enterprise
structure
Max 15 alphanumeric
If Id is mentioned, ignore this
prefix characters
parameter.
A-Z
No The Prefix tag shows the fixed text
a-z
which is to be used while creating new
0-9
User Id's
/_ .@:
driving-license-
This is the date of expiry of Driving
expiry ddmmyyyy No -
License
passport-expiry
ddmmyyyy No - This is the date of expiry of Passport.
Max 50 Chars
A-Z
Blacklisted-
a-z This specifies the reason for being
reason No -
0-9 blacklist.
[space]
!@$*()_-+\[],.:
ddmmyyyy
visitor-device-
Max 600 Varcharacters No - This is the ID of the visitor device group.
group-id
0= None
This is a field that allows to configure
enable-offline- 1= Allow Without Discount
No 0 the transaction type to be allowed when
transaction 2= Allow With Discount
device is offline.
When "device-group-id" (Device Group ID) & "device-group" (Device Group Name) both are supplied with
an API request, "device-group-id" will be considered first. But If "Device-group-id" is supplied with blank or
empty value & "device-group" is supplied with valid value, in this case device group with supplied valid
device group name will be assigned.
If maximum limit in case of IDs is reached, for e.g., if auto - generation serial length=2 and zero-padding
=1, and all IDs from 00 to 99 are already existing, then message returns: " failed: Maximum limit reached
for this configuration for ID creation. "
Example1
The following examples illustrate sample requests for adding or editing users.
Sample Request:
To add a user named “Sam”, whose user ID is “202” (activated for the Time and Attendance module license) -
http://192.168.104.16/cosec/api.svc/v2/user?action=set;id=202;name=sam;module=U
Sample Response:
Example2
Sample Request:
To add details such as date of birth, gender, nationality and blood group for the user Sam.
http://192.168.104.16/cosec/api.svc/v2/user?action=set;id=202;date-of-
birth=22061978;gender=male;nationality=indian;blood-group=b+
Sample Response:
Example3
Sample Request:
http://matrixserver/api.svc/v2/user?action=set;id=202;name=Samuel Jackson
Sample Response:
Example4
Sample Request:
Sample Response:
Update the user photograph in a user’s configured profile on COSEC using this request.
Action
action=setphoto
Syntax
http://<servername>/api.svc/v2/user?action=setphoto;<argument>=<value>...
Parameters
Max 15 alphanumeric
userid Yes - This is the unique User Id.
characters
Example
This sample request illustrates how to set a photograph for the user ID 202, when the source image file image.jpg
is located in the following FTP location: ftp://abc/xyz/image.jpg
Sample Request:
http://matrixserver/api.svc/v2/user?action=setphoto;id=202;path=ftp://abc/xyz/
image.jpg;ftpusername=sam;ftppassword=1234
This function can be used to delete an existing user from the COSEC database permanently. Only a single user can
be deleted at a time using this method.
Action
action=delete
Syntax
http://<servername>/api.svc/v2/user?action=delete;<argument>=<value>...
Parameters
Example
This example illustrates how to delete the user Samuel (id=202) from the COSEC database:
Sample Request:
http://matrixserver/api.svc/v2/user?action=delete;id=202
This API can be used to generate an enrollment request for a user on a specific device. Only a single user can be
enrolled at a time using this action.
Action
action=enroll
Syntax
http://<servername>/api.svc/v2/user?action=enroll;<argument>=<value>...
Parameters
Max 15 alphanumeric
id Yes - This is the unique User ID.
characters
Yes. Only if
device type =
1 to 255 (device- This is the Panel Door identification
Panel (0),
panel-door-id type=8) - number, in case a panel is selected for
Panel-Lite
1 to 99 (all others) device-type.
(2), or
Panel200(8)
1 to 10 (for enroll-
This is the count for the enroll type
type=fp)
(finger print, card or palm) to be
1,2 (for enroll-
enrolled for the respective user id.
type=card)
enroll-count Yes -
1 to 10 (for enroll-
If user tries to enroll more than two
type=palm)
duress fingers, then as per existing, the
1,2 (for enroll-
user will be restricted from device side.
type=duressfp)
Example
This example demonstrates a typical request URL for enrolling 2 fingers for a user on a Direct Door V1:
Sample Request:
http://matrixserver/api.svc/v2/user?action=enroll;id=1;device-type=1;device-id=1;enroll-type=fp;enroll-
count=2
Sample Response:
Send a user’s credentials to all the available panel or direct door devices on COSEC. There are two types of
credentials that can be set for a user - fingerprint (fp) and card.
Action
action=set-credential
Syntax
http://<servername>/api.svc/v2/user?action=set-credential;<argument>=<value>...
Parameters
Max 15 alphanumeric
id Yes - This is the unique User Id.
characters
Max 20 numeric
Characters (for card)
max 21 characters= 20
This is the data of respective credential
numeric + comma (for
type, which is to be stored at given
data card) Yes -
index number for the respective user
ID.
Note: - For credential
type = finger print, user
should send finger
print templates into
hexadecimal.
0 = normal Finger
duress N 0= normal Finger
1 = duress Finger
Example
The following example illustrates how to add user credentials with the given set of values:
• id=1
• credential-type=card
• data=12345678901234567890 (card number)
Sample request:
http://matrixserver/api.svc/v2/user?action=set-credential;id=1;credential-
type=card;data=12345678901234567890
Delete a user’s credentials from all the available panel or direct door devices on COSEC.
Action
action=del-credential
Syntax
http://<servername>/api.svc/v2/user?action=del-credential;<argument>=<value>...
Parameters
This example demonstrates a sample request to delete fingerprint credentials for a user with user ID “1” from all
devices on the COSEC database.
Sample Request:
http://matrixserver/api.svc/v2/user?action=del-credential;id=1;credential-type=fp
Sample Response:
This shall be used to search for a particular user based on parameters like user ID, user name or reference code.
This API will help third party applications to fetch user IDs based on username or reference code associated with a
user. This user ID can then be used by the application.
Action
action=get
Syntax
http://<servername>/api.svc/v2/search-user?action=get;<argument>=<value>…
User Rights
User Rights
ESS Enabled. ESS user can fetch details for any other ESS user.
Only those records will be fetched on which the login user has rights.
Parameters
1: User ID
2: User Name
3: Reference Code
4: Integration Reference
5: Vehicle Registration No
6: Organization Name
7 : Branch Name
This specifies the criteria on which the
search-criteria 8 : Department Name Yes -
search will be based.
9 : Designation Name
10: Section Name
11: Category Name
12: Grade Name
13: Custom Group 1 Name
14: Custom Group 2 Name
15: Custom Group 3 Name
For search-criteria=1
Allowed Characters:
A-Z
a-z
0-9
/_\\.@:
For search-criteria=2
Allowed Characters:
A-Z
a-z
0-9
-_. ()[]
For search-criteria=3
if search-criteria=2 (i.e. for
1 to 99999999 (max 8 numeric digits)
user-name) minimum three
characters.
search-string Yes - For search-criteria=4
For other options, minimum
max 20 alphanumeric characters
one character.
For search-criteria=5
For search-criteria=6 to 15
A-Z
a-z
0-9
()[ ]_-
.(full stop)
/&
,(comma)
@
'(single Quote)
[space]
max 45 characters
Default value = 0.
Conditions:
0 : All 1.Argument mentioned, but value not
filter 1 : Active Users No 0 specified, then ignore this parameter.
2 : Inactive Users
2.If filter=0 is specified, return all users
configured in the system.
Response Fields
Allowed Characters
A-Z
User ID user-id upto 15 characters a-z
0-9
/_\\.@:
Allowed Characters
A-Z
User Name user-name upto 45 characters a-z
0-9
-_. ()[]
1 : Active
Active active -
0 : Inactive
male,
Gender gender female, -
na
Official Extension
official-extension - -
In-Charge 1 ID rg_incharge_1 - -
In-Charge 1 Name
rg_incharge_1_name - -
In-Charge 2 ID rg_incharge_2 - -
In-Charge 2 Name
rg_incharge_2_name - -
In-Charge 3 ID rg_incharge_3 - -
In-Charge 3 Name
rg_incharge_3_name - -
In-Charge 4 ID rg_incharge_4 - -
In-Charge 4 Name
rg_incharge_4_name - -
In-Charge 5 ID rg_incharge_5 - -
In-Charge 5 Name
rg_incharge_5_name - -
Example
Sample Request:
http://192.168.104.12/cosec/api.svc/v2/search-user?action=get;search-criteria=1;search-string=1
Sample Response:
user-id|user-name|short-
name|active|organization|branch|designation|section|department|category|grade|gender|blood-
group|official-cell|official-phone|official-extension|official-email|personal-cell|personal-
phone|personal-
email|rg_id|rg_name|rg_incharge_1|rg_incharge_1_name|rg_incharge_2|rg_incharge_2_name|vehicle-reg-
no|reference-code|organization-name|branch-name|designation-name|section-name|department-name|category-
name|grade-
name|customgroup1_code|customgroup1_name|customgroup2_code|customgroup2_name|customgroup3_code|customgr
oup3_name|approval-policy|approval-policy-name
1|Chirag|Chirag|1|ORG1|BRC1|DSG1|SEC1|DPT1|CTG1|GRD1|NA|NA||||||||1|QA
Group|101|Khushbu||||1|Organization-1|Branch-1|Designation-1|Section-1|Department-1|Category-1|Grade-
1|CG1|Custom Group 1|CG2|Custom Group 2|CG3|Custom Group 3||
101|Khushbu|Khushbu|1|ORG1|BRC1|DSG1|SEC1|DPT1|CTG1|GRD1|NA|NA|||||||[email protected]||||||||
101|Organization-1|Branch-1|Designation-1|Section-1|Department-1|Category-1|Grade-1|CG1|Custom Group
1|CG2|Custom Group 2|CG3|Custom Group 3||
102|Shruti Patki|Shruti
Patki|1|ORG1|BRC1|DSG1|SEC1|DPT1|CTG1|GRD1|NA|NA|||||||||||||||1689|Organization-1|Branch-
1|Designation-1|Section-1|Department-1|Category-1|Grade-1|CG1|Custom Group 1|CG2|Custom Group
2|CG3|Custom Group 3||
1687|Aditi Ajay Gupta_Ahmedabad|Aditi Ajay
Gupt|1|ORG1|BRC1|DSG1|SEC1|DPT1|CTG1|GRD1|NA|NA|919429063421||||919687624826||[email protected]|
1|QA Group|101|Khushbu||||1687|Organization-1|Branch-1|Designation-1|Section-1|Department-1|Category-
1|Grade-1|CG1|Custom Group 1|CG2|Custom Group 2|CG3|Custom Group 3||
JPC1|Darshna|Darshna|1|ORG1|BRC1|DSG1|SEC1|DPT1|CTG1|GRD1|NA|NA||||||||1|QA
Group|101|Khushbu||||102|Organization-1|Branch-1|Designation-1|Section-1|Department-1|Category-1|Grade-
1|CG1|Custom Group 1|CG2|Custom Group 2|CG3|Custom Group 3||
<EOT>
This API can get a list of all the members assigned to the logged-in user’s reporting group. The login user must be
a reporting in-charge to call this API.
Action
action=get
Syntax
http://<servername>/api.svc/v2/group-members?action=get;<argument>=<value>...
User Rights
User Rights
ESS Enabled
Parameters
Default value = 0.
Conditions:
Response Fields
Allowed characters
A-Z
User ID user-id upto 15 characters a-z
0-9
/_\\.@:
Allowed Characters
A-Z
User Name user-name upto 45 characters a-z
0-9
-_. ()[]
The system will allow all the configured RIC’s in the Reporting Group for fetching the information.
The Enterprise Structure APIs allow the user to retrieve, set, as well as update data related to various groups as
per the requirements of an enterprise. COSEC identifies the following enterprise groups:
• Organization
• Branch
• Department
• Designation
• Section
• Category
• Grade
The generic syntax for all Enterprise Structure API requests is stated below.
Syntax
http://<servername>/api.svc/v2/<enterprise-group>?action=<value>;<argument>=<value>...
Here, the request-type (<enterprise-group>) will depend on the enterprise group for which the API is being called.
For e.g.:
http://<servername>/api.svc/v2/organization?action=<value>;<argument>=<value>...
http://<servername>/api.svc/v2/branch?action=<value>;<argument>=<value>...
For each of the Enterprise Groups, COSEC supports the following APIs:
User Rights
User Rights
Enabled.
User must have rights on the following pages, depending on the type of enterprise group to
be accessed (COSEC Web Application):
User can fetch the details of an enterprise group by specifying the group name in the <enterprise-group> part of the
URL and specifying the group ID. For example, for an organization, the group ID will be the Organization ID.
Action
action=get
Syntax
http://<servername>/api.svc/v2/<enterprise-group>?action=get;<argument>=<value>...
Parameters
Response Fields
ID id 1-999999 -
Allowed Characters
A-Z
Code code 6 characters. (max) a-z
0-9
_
Allowed Characters
A-Z
Name name upto 45 characters a-z
0-9
-_. ()[]
Allowed Characters
A-Z
Short Name short-name 15 characters a-z
0-9
-_. ()
Allowed Characters
A-Z
Description description 250 characters (max). a-z
0-9
_.,()[]:@!$*+/\-
0 : not default
default default -
1 : set as default
Example
Sample Request:
http://matrixserver/api.svc/v2/organization?action=get;id=7
Sample Response:
id|code|name|short-name|description|default
7|APEX|Apex Industries Pvt. Ltd.|Apex Industries||0
<EOT>
User can add a new Organization, Branch, Department etc. and set its configuration on the COSEC system.
Action
action=set
Syntax
http://<servername>/api.svc/v2/<enterprise-group>?action=set;<argument>=<value>...
Parameters
6 Characters. (max)
Duplicate Code is not
allowed
Allowed Characters
code Yes - The Enterprise Group Code.
A-Z
a-z
0-9
_
45 characters
Allowed Characters
The Enterprise Group name. If valid
A-Z
name Yes - characters are more than 45; then it will
a-z
be ignored.
0-9
-_. ()[]
15 characters
Allowed Characters
By default, first 15 For short-name. If these characters
A-Z
short-name No characters of Name contain “[]”, the short-name becomes
a-z
will be considered. invalid.
0-9
-_. ()
Send a request to update the configuration for an existing Organization, Branch, Department etc. on the COSEC
database.
Action
action=update
Syntax
http://<servername>/api.svc/v2/<enterprise-group>?action=update;<argument>=<value>...
Parameters
6 Characters. (max)
Duplicate Code is not
allowed
Allowed Characters
code Yes - The Enterprise Group Code.
A-Z
a-z
0-9
_
45 characters
Allowed Characters The Enterprise Group name. If valid
A-Z characters are more than 45; then it will
name Yes -
a-z be ignored.
0-9
-_. ()[]
15 characters
Allowed Characters
By default, first 15 For short-name. If these characters
A-Z
short-name No characters of Name contain “[]”, the short-name becomes
a-z
will be considered. invalid.
0-9
-_. ()
This API is used to fetch the list of custom enterprise group’s ID and its name. You can get the details of Custom
Group1, Custom Group2, Custom Group3.
Action
action= get
Syntax
http://<servername>/api.svc/v2/custom-group-1?action=get;<argument>=<value>...
For Custom group2 and Custom group3 update the syntax with custom-group-2 and custom group-3 respec-
tively.
Parameters
Response Fields
ID id 1-999999 -
Allowed Characters
A-Z
Code code 6 characters. (max) a-z
0-9
_
Allowed Characters
A-Z
Name name 45 Characters a-z
0-9
-_. ()[]
Allowed Characters
A-Z
Short Name short-name 15 Characters a-z
0-9
-_. ()[]
Allowed Characters
A-Z
Description description 250 characters (max). a-z
0-9
_.,()[]:@!$*+/-
0 : not default
default default -
1 : set as default
This API is used to add the custom enterprise group. You can add Custom Group1, Custom Group2 and Custom
Group3.
Action
action= set
Syntax
http://<servername>/api.svc/v2/custom-group-1?action=set;<argument>=<value>...
For Custom group2 and Custom group3 update the syntax with custom-group-2 and custom group-3
respectively.
Parameters
45 characters
Allowed Characters
A-Z
name Yes - The Custom Enterprise Group name.
a-z
0-9
-_. ()[] [space]
6 Characters. (max)
Duplicate Code is not
allowed
Allowed Characters
code Yes - The Custom Enterprise Group Code.
A-Z
a-z
0-9
_
15 characters
Allowed Characters
By default, first 15 For short-name. If these characters
A-Z
short-name No characters of Name contain “[]”, the short-name becomes
a-z
will be considered. invalid.
0-9
-_. ()
This API is used to update the custom enterprise group. You can get the details of Custom Group1, Custom
Group2, Custom Group3.
Action
action= update
Syntax
http://<servername>/api.svc/v2/custom-group-1?action=update;<argument>=<value>...
For Custom group2 and Custom group3 update the syntax with custom-group-2 and custom group-3
respectively.
Parameters
This section covers all APIs pertaining to Time and Attendance data of COSEC users. These are as follows:
Get APIs
• Getting Daily Attendance Data
• In/Out Reasons
Set APIs
• Authorizing Events
• Authorizing Overtime/C-OFF
• Overtime Approval
Update API
Delete API
Command API
This API allows the user to fetch daily attendance data for employees over a specified time duration and for specific
user groups.
Action
action=get
Syntax
http://<servername>/api.svc/v2/attendance-daily?action=get;<argument>=<value>...
User Rights
User Rights
ESS Enabled
Parameters
all
organization
branch
department
designation All, if range is not
System support mentioned ranges.
section mentioned, then
range
category consider it to be "all"
grade by default.
custom-group-1
custom-group-2
custom-group-3
user
0 : inactive
Active Return users as per their active flag
1: active No 1
status.
2:all
0
0 = Process Date If parameter is not
filter-date-by 1 = Process Date No mentioned the
Updated response will be as per
existing system.
Response Fields
M : Male
Gender GENDER F: Female -
NA : Not available
M : Married
Marital Status MRTLSTAT U : Unmarried -
NA : Not available
1=Official In,
2=Official Out,
3=ShortLeave In,
4=ShortLeave Out,
5=Regular In,
Special Function 1 SPFID1 1-10
6=Regular Out,
7=Lunch In,
8=Lunch Out,
9=Overtime In,
10=Overtime Out
PR : Present
AB : Absent
WO : Week Off
PH : Public Holiday <Leave Codes> as
First Half FIRSTHALF
FB : Field Break configured in COSEC
RD : Rest Day
IN : Official In
<Leave Codes>
PR : Present
AB : Absent
WO : Week Off
PH : Public Holiday <Leave Codes> as
Second Half SECONDHALF
FB : Field Break configured in COSEC
RD : Rest Day
IN : Official In
<Leave Codes>
MANUALOVERTIME_CREDIT
Manual OT Credit HH:MM -
_HHMM
MANUALOVERTIME_DEBIT_
Manual OT Debit HH:MM -
HHMM
OVERTIMEAUTHORIZATION
OT Authorization Date dd/mm/yyyy -
DATE
MANUALCOFF_CREDIT_HH
Manual C-Off Credit HH:MM -
MM
MANUALCOFF_DEBIT_HHM
Manual C-Off Debit HH:MM -
M
0 : Normal
Shift Type SHIFTTYPE 0,1,2 1 : Field Break
2 : Rest Day
0 : WO
1 : PH
Day Status DAYSTATUS -
2 : WO/PH
3 : Normal
Return If available.Else
blank. From V10R2,
In/Out Reason for Punch 1 punch_reason1 30 alphanumeric characters
Manually entered reasons
will also be considered.
Value of authorized
Authorized OT for OT1 AUTHOT1 minutes
overtime
Value of authorized
Authorized OT for OT2 AUTHOT2 minutes
overtime
Value of authorized
Authorized OT for OT3 AUTHOT3 minutes
overtime
Value of authorized
Authorized OT for OT4 AUTHOT4 minutes
overtime
Value of authorized
Authorized OT for OT5 AUTHOT5 minutes
overtime
Valid Characters :
A-Z
a-z
Custom Field 1-10 field1-10 upto 100 characters
0-9
space
[]().-_
Allowed Characters
A-Z
Organization Name organization_name 40 Characters a-z
0-9
-_. ()[]
Allowed Characters
A-Z
Branch Name branch_name 40 Characters a-z
0-9
-_. ()[]
Allowed Characters
A-Z
Designation Name designation_name 30 Characters a-z
0-9
-_. ()[]
Allowed Characters
A-Z
Section Name section_name 30 Characters a-z
0-9
-_. ()[]
Allowed Characters
A-Z
Department Name department_name 30 Characters a-z
0-9
-_. ()[]
Allowed Characters
A-Z
Category Name category_name 30 Characters a-z
0-9
-_. ()[]
Allowed Characters
A-Z
Grade Name grade_name 30 Characters a-z
0-9
-_. ()[]
Allowed Characters
A-Z
Custom Group 1 Name CustomGroup1_Name 45 Characters a-z
0-9
-_. ()[]
Allowed Characters
A-Z
Custom Group 2 Name CustomGroup2_Name 45 Characters a-z
0-9
-_. ()[]
Allowed Characters
A-Z
Custom Group 3 Name CustomGroup3_Name 45 Characters a-z
0-9
-_. ()[]
Allowed Characters
A -Z
a-z
0-9
()
[]
_ (underscore)
- (Hyphen)
For Panels : 0
1-255 (device-type = 8)
For Direct Doors : 1
Door ID for Punch1 DID1
For Panel Doors : As
0-99 (All Others)
configured
5 numeric digits
Master Controller ID for
MID1 Device mid
Punch1
1-65535
0 =Panel,
1 =Direct Door,
2 =Panel Lite
3 =Direct Door V2,
4 =NGT Direct Door,
5 =Wireless Direct Door
6 =Compact Direct Door
7 =PVR Direct Door
Device Type for Punch1 DTYPE1 2 numeric digits
8 =Panel-lite V2
9 =Vega Controller
11 =Arc Controller
12 =Door V3
15 =Door FMX
16 =Path V2
18 =MODE
19 =Door V4
17 =ARC DC 200
20 =ARGO
21=ARGO FACE
For Panels : 0
1-255 (device-type = 8)
For Direct Doors : 1
Door ID for Punch2 DID2
For Panel Doors : As
0-99 (All Others)
configured
5 numeric digits
Master Controller ID for
MID2 Device mid
Punch2
1-65535
0 =Panel,
1 =Direct Door,
2 =Panel Lite
3 =Direct Door V2,
4 =NGT Direct Door,
5 =Wireless Direct Door
6 =Compact Direct Door
7 =PVR Direct Door
Device Type for Punch2 DTYPE2 2 numeric digits
8 =Panel-lite V2
9 =Vega Controller
11 =Arc Controller
12 =Door V3
15 =Door FMX
16 =Path V2
18 =MODE
19 =Door V4
17 =ARC DC 200
20 =ARGO
21 =ARGO FACE
For Panels : 0
1-255 (device-type = 8)
For Direct Doors : 1
Door ID for Punch3 DID3
For Panel Doors : As
0-99 (All Others)
configured
5 numeric digits
Master Controller ID for
MID3 Device mid
Punch3
1-65535
0 =Panel,
1 =Direct Door,
2 =Panel Lite
3 =Direct Door V2,
4 =NGT Direct Door,
5 =Wireless Direct Door
6 =Compact Direct Door
7 =PVR Direct Door
Device Type for Punch3 DTYPE3 2 numeric digits
8 =Panel-lite V2
9 =Vega Controller
11 =Arc Controller
12 =Door V3
15 =Door FMX
16 =Path V2
18 =MODE
19 =Door V4
17 =ARC DC 200
20 =ARGO
21 =ARGO FACE
For Panels : 0
1-255 (device-type = 8)
For Direct Doors : 1
Door ID for Punch4 DID4
For Panel Doors : As
0-99 (All Others)
configured
5 numeric digits
Master Controller ID for
MID4 Device mid
Punch4
1-65535
0 =Panel,
1 =Direct Door,
2 =Panel Lite
3 =Direct Door V2,
4 =NGT Direct Door,
5 =Wireless Direct Door
6 =Compact Direct Door
7 =PVR Direct Door
Device Type for Punch4 DTYPE4 2 numeric digits
8 =Panel-lite V2
9 =Vega Controller
11 =Arc Controller
12 =Door V3
15 =Door FMX
16 =Path V2
18 =MODE
19 =Door V4
17 =ARC DC 200
20 =ARGO
21 =ARGO FACE
For Panels : 0
1-255 (device-type = 8)
For Direct Doors : 1
Door ID for Punch5 DID5
For Panel Doors : As
0-99 (All Others)
configured
5 numeric digits
Master Controller ID for
MID5 Device mid
Punch5
1-65535
0 =Panel,
1 =Direct Door,
2 =Panel Lite
3 =Direct Door V2,
4 =NGT Direct Door,
5 =Wireless Direct Door
6 =Compact Direct Door
7 =PVR Direct Door
Device Type for Punch5 DTYPE5 2 numeric digits
8 =Panel-lite V2
9 =Vega Controller
11 =Arc Controller
12 =Door V3
15 =Door FMX
16 =Path V2
18 =MODE
19 =Door V4
17 =ARC DC 200
20 =ARGO
21 =ARGO FACE
For Panels : 0
1-255 (device-type = 8)
For Direct Doors : 1
Door ID for Punch6 DID6
For Panel Doors : As
0-99 (All Others)
configured
5 numeric digits
Master Controller ID for
MID6 Device mid
Punch6
1-65535
0 =Panel,
1 =Direct Door,
2 =Panel Lite
3 =Direct Door V2,
4 =NGT Direct Door,
5 =Wireless Direct Door
6 =Compact Direct Door
7 =PVR Direct Door
Device Type for Punch6 DTYPE6 2 numeric digits
8 =Panel-lite V2
9 =Vega Controller
11 =Arc Controller
12 =Door V3
15 =Door FMX
16 =Path V2
18 =MODE
19 =Door V4
17 =ARC DC 200
20 =ARGO
21 =ARGO FACE
For Panels : 0
1-255 (device-type = 8)
For Direct Doors : 1
Door ID for Punch7 DID7
For Panel Doors : As
0-99 (All Others)
configured
5 numeric digits
Master Controller ID for
MID7 Device mid
Punch7
1-65535
0 =Panel,
1 =Direct Door,
2 =Panel Lite
3 =Direct Door V2,
4 =NGT Direct Door,
5 =Wireless Direct Door
6 =Compact Direct Door
7 =PVR Direct Door
Device Type for Punch7 DTYPE7 2 numeric digits
8 =Panel-lite V2
9 =Vega Controller
11 =Arc Controller
12 =Door V3
15 =Door FMX
16 =Path V2
18 =MODE
19 =Door V4
17 =ARC DC 200
20 =ARGO
21 =ARGO FACE
For Panels : 0
1-255 (device-type = 8)
For Direct Doors : 1
Door ID for Punch8 DID8
For Panel Doors : As
0-99 (All Others)
configured
5 numeric digits
Master Controller ID for
MID8 Device mid
Punch8
1-65535
0 =Panel,
1 =Direct Door,
2 =Panel Lite
3 =Direct Door V2,
4 =NGT Direct Door,
5 =Wireless Direct Door
6 =Compact Direct Door
7 =PVR Direct Door
Device Type for Punch8 DTYPE8 2 numeric digits
8 =Panel-lite V2
9 =Vega Controller
11 =Arc Controller
12 =Door V3
15 =Door FMX
16 =Path V2
18 =MODE
19 =Door V4
17 =ARC DC 200
20 =ARGO
21 =ARGO FACE
For Panels : 0
1-255 (device-type = 8)
For Direct Doors : 1
Door ID for Punch9 DID9
For Panel Doors : As
0-99 (All Others)
configured
5 numeric digits
Master Controller ID for
MID9 Device mid
Punch9
1-65535
0 =Panel,
1 =Direct Door,
2 =Panel Lite
3 =Direct Door V2,
4 =NGT Direct Door,
5 =Wireless Direct Door
6 =Compact Direct Door
7 =PVR Direct Door
Device Type for Punch9 DTYPE9 2 numeric digits
8 =Panel-lite V2
9 =Vega Controller
11 =Arc Controller
12 =Door V3
15 =Door FMX
16 =Path V2
18 =MODE
19 =Door V4
17 =ARC DC 200
20 =ARGO
21 =ARGO FACE
For Panels : 0
1-255 (device-type = 8)
For Direct Doors : 1
Door ID for Punch10 DID10
For Panel Doors : As
0-99 (All Others)
configured
5 numeric digits
Master Controller ID for
MID10 Device mid
Punch10
1-65535
0 =Panel,
1 =Direct Door,
2 =Panel Lite
3 =Direct Door V2,
4 =NGT Direct Door,
5 =Wireless Direct Door
6 =Compact Direct Door
7 =PVR Direct Door
Device Type for Punch10 DTYPE10 2 numeric digits
8 =Panel-lite V2
9 =Vega Controller
11 =Arc Controller
12 =Door V3
15 =Door FMX
16 =Path V2
18 =MODE
19 =Door V4
17 =ARC DC 200
20 =ARGO
21 =ARGO FACE
For Panels : 0
1-255 (device-type = 8)
For Direct Doors : 1
Door ID for Punch11 DID11
For Panel Doors : As
0-99 (All Others)
configured
5 numeric digits
Master Controller ID for
MID11 Device mid
Punch11
1-65535
0 =Panel,
1 =Direct Door,
2 =Panel Lite
3 =Direct Door V2,
4 =NGT Direct Door,
5 =Wireless Direct Door
6 =Compact Direct Door
7 =PVR Direct Door
Device Type for Punch11 DTYPE11 2 numeric digits
8 =Panel-lite V2
9 =Vega Controller
11 =Arc Controller
12 =Door V3
15 =Door FMX
16 =Path V2
18 =MODE
19 =Door V4
17 =ARC DC 200
20 =ARGO
21 =ARGO FACE
For Panels : 0
1-255 (device-type = 8)
For Direct Doors : 1
Door ID for Punch12 DID12
For Panel Doors : As
0-99 (All Others)
configured
5 numeric digits
Master Controller ID for
MID12 Device mid
Punch12
1-65535
0 =Panel,
1 =Direct Door,
2 =Panel Lite
3 =Direct Door V2,
4 =NGT Direct Door,
5 =Wireless Direct Door
6 =Compact Direct Door
7 =PVR Direct Door
Device Type for Punch12 DTYPE12 2 numeric digits
8 =Panel-lite V2
9 =Vega Controller
11 =Arc Controller
12 =Door V3
15 =Door FMX
16 =Path V2
18 =MODE
19 =Door V4
17 =ARC DC 200
20 =ARGO
21 =ARGO FACE
Example1
Following are some sample cases for this API:
Sample Request:
http://192.168.104.13/cosec/api.svc/v2/attendance-daily?action=get;
Sample Response:
Example2
Sample Request:
To fetch daily-attendance records for a specified date-range and for a particular user..
http://192.168.104.11/cosec/api.svc/v2/attendance-daily?action=get;date-range=01102016-
05102016;range=user;Id=1690
UserID|UserName|Punch1|Punch2|ProcessDate|WorkingShift|LateIn|EarlyOut|Overtime|WorkTime|CustomGroup1_Name|Cust
omGroup2_Name|CustomGroup3_Name
1690|Priyank Bora|||01/10/2016||0|0|0|0|Custom Group 1|Custom Group 2|custom grp 3.2
1690|Priyank Bora|||02/10/2016||0|0|0|0|Custom Group 1|Custom Group 2|custom grp 3.2
1690|Priyank Bora|||03/10/2016||0|0|0|0|Custom Group 1|Custom Group 2|custom grp 3.2
1690|Priyank Bora|||04/10/2016||0|0|0|0|Custom Group 1|Custom Group 2|custom grp 3.2
1690|Priyank Bora|||05/10/2016||0|0|0|0|Custom Group 1|Custom Group 2|custom grp 3.2
<EOT>
Example3
Sample Request:
http://matrixserver/api.svc/v2/attendance-daily?action=get;field-name=userid,firsthalf,secondhalf;date-
range=01012013-02012013
Sample Response:
UserID|firsthalf|secondhalf
1|WO|WO
10|WO|WO
1001|AB|AB
1002|AB|AB
1003|AB|PR
1004|AB|AB
1007|AB|AB
1008|AB|AB
1009|AB|AB
1010|AB|AB
1011|AB|AB
1012|AB|AB
1015|AB|AB
1016|PR|PR
102|AB|AB
1020|AB|AB
1022|AB|AB
1028|PR|PR
1030|AB|AB
<EOT>
This API allows the user to obtain attendance data for employees for a specific month and for specific user groups
in a specific format.
Action
action=get
Syntax
http://<servername>/api.svc/v2/attendance-monthly?action=get;<argument>=<value>...
User Rights
Parameters
the format shall be Current Month and The Month and Year for which the data
month-year No
mmyyyy Current Year is to be fetched.
all
organization
branch
department
designation Range of users for whom data is to be
section fetched.
range No All
category
grade
custom-group-1
custom-group-2
custom-group-3
user
0 : inactive
Active Return users as per their active flag
1: active No 1
status.
2:all
Response Fields
Allowed Characters
: 15 alphanumeric
Char.
A to Z
User ID USERID 15 characters.
a to z
0 to 9
/ _ \\ . @ : ? , - ~ ! $ `
*+
M : Male
Gender GENDER F: Female -
NA : Not available
M : Married
Marital Status MRTLSTAT U : Unmarried -
NA : Not available
Valid Characters :
A-Z
a-z
Custom Field 1-10 field1-10 upto 30 characters
0-9
space
[]().-_
Availed Official
Official Hours official_hours HH:MM
Duration
Maximum Allowed
Max Short Leave Count max_short_leave_count 0-99
Short Leave Count
Maximum Allowed
Max Short Leave Hours max_short_leave_hours HHHH:MM Short Leave
Duration
Availed Late IN
Late In Count late_in_count 0-99
Count
Maximum Allowed
Max Late In Count max_late_in_count 0-99
Late IN Count
Availed Late IN
Late In Duration late_in_duration minutes
Duration
Availed Late IN
Late In Duration late_in_duration_HHMM HHH:MM
Duration HHH:MM
Maximum Allowed
Max Late In Duration max_late_in_duration minutes
Late IN Duration
Maximum Allowed
Max Late In Duration max_late_in_duration_HHMM HHH:MM Late IN Duration
HHH:MM
Maximum Allowed
Max Early Out Count max_early_out_count 0-99
Early Out Count
Maximum Allowed
Max Early Out Duration max_early_out_duration minutes
Early OUT Duration
Maximum Allowed
Max Early Out Duration max_early_out_duration_HHMM HHH:MM Early OUT Duration
HHH:MM
Maximum Allowed
Max Late-IN-Early Out Count max_late_in_early_out_count 0-99 Late IN- Early Out
Count (Combined)
Availed Late IN
Late-IN-Early Out Duration late_in_early_out_duration minutes
Duration HHH:MM
Maximum Allowed
Max Late-IN-Early Out Duration max_late_in_early_out_duration minutes Late IN- Early Out
Duration
Maximum Allowed
max_late_in_early_out_duration_
Max Late-IN-Early Out Duration HHH:MM Late IN- Early Out
HHMM
Duration HHH:MM
Maximum Allowed
Max Less Work Hours Duration max_less_work_hours_duration minutes Less Work Hours
Duration
Maximum Allowed
max_less_work_hours_duration_
Max Less Work Hours Duration HHH:MM Less Work Hours
HHMM
Duration HHH:MM
Allowed Characters
A -Z
a-z
0-9
()
[]
_ (underscore)
- (Hyphen)
. (full Stop)
Full Name full-name max 200 alphanumeric characters
/
&
, (comma)
@
' (single quote)
[Space]
When Multi
Language is On,
Invalid Character set
= Set3
Allowed Chars
Job Allowance Job_Allowance
0-9
Example
This example presents a case where monthly-attendance records are to be fetched for Organization ID ‘1’.
Sample Request:
http:/matrixserver/api.svc/v2/attendance-monthly?action=get;range=organization;id=1
Sample Response:
UserID|UserName|PYear|PMonth|PRDays|ABDays|WorkTime_HHMM|PLDays|TRDays
007|ANAND RATHOD|2015|1|0.0|23.0|000:00|0.0|0.0
1053|JINU SAM|2015|1|19.5|0.5|197:20|2.0|0.0
1054|PARSHV SHAH|2015|1|19.0|1.0|217:27|1.0|0.0
1059|PRATIK PATEL|2015|1|0.0|21.0|000:00|0.0|0.0
1062|MANTHAN PATEL|2015|1|22.0|0.0|199:25|0.0|0.0
1110|Nishit Gandhi|2015|1|20.0|0.0|191:31|2.0|0.0
1256|Arvind|2015|1|0.0|21.0|000:00|0.0|0.0
1309|KAMAL TALUKDAR|2015|1|26.0|0.0|000:00|0.0|0.0
1311|PANKIL GANDA|2015|1|17.5|2.0|160:21|1.5|0.0
<EOT>
COSEC provides the option for manual correction of attendance data if required. ESS users can apply for
attendance correction in exceptional cases (e.g. a missed OUT punch), and these applications shall require
authorization by either:
a. Any System Account user with rights enabled for attendance correction authorization.
b. Any ESS user with reporting in-charge rights over the applicant.
Based on the status of approval, an Attendance Correction application on COSEC falls in one of the three
categories - Pending, Approved or Rejected.
This API enables the user to fetch the details of all existing attendance correction applications on the COSEC
database as per the specified parameters.
Action
action=get
Syntax
http://<servername>/api.svc/v2/attendance-correction?action=get;<argument>=<value>...
User Rights
User Rights
ESS Enabled.
0: All
1: Pending The status of Attendance Correction
status No 0 (All)
2: Approved application
3: Rejected
Response Fields
Allowed characters: 15
alphanumeric char
A-Z
User ID user-id 15 characters
a-z
0-9
/ _ \\ . @ : ? , - ~ ! $ ` * +
Allowed characters:
A-Z
User Name user-name 40 characters a-z
0-9
-_.()[]
Max. 15 alphanumeric
Short Name short-name -
characters
1: pending
Application Status status 2: approved -
3: rejected
Allowed Characters
A-Z Reason for applying an
a-z Attendance Correction
Reason reason
0-9 Application as an ESS
! @ $ & ( ) _ -+ [ ] / : . , $ & User
<Space>
Max 15 chars
Allowed Characters
Final RIC ID final-ric A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Final RIC Name final-ric-name a-z
0-9
-_. ()[]
1: pending
Provides status of
Final RIC Verdict final-ric-verdict 2: approved
application.
3: rejected
Max 30 chars
Allowed Characters
A-Z
Final RIC Remark final-ric-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Non-Final RIC ID nonfinal-ric A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC Name nonfinal-ric-name
a-z
0-9
-_. ()[]
1: pending
Non-Final RIC Verdict nonfinal-ric -verdict 2: approved
3: rejected
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC Remark nonfinal-ric-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Non-Final RIC2 ID nonfinal-ric2 A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC2 Name nonfinal-ric2-name
a-z
0-9
-_. ()[]
1: pending
Non-Final RIC2 Verdict nonfinal-ric2-verdict 2: approved
3: rejected
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC2 Remark nonfinal-ric2-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Non-Final RIC3 ID nonfinal-ric3 A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC3 Name nonfinal-ric3-name
a-z
0-9
-_. ()[]
1: pending
Non-Final RIC3 Verdict nonfinal-ric3-verdict 2: approved
3: rejected
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC3 Remark nonfinal-ric3-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Non-Final RIC4 ID nonfinal-ric4 A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC4 Name nonfinal-ric4-name
a-z
0-9
-_. ()[]
1: pending
Non-Final RIC4 Verdict nonfinal-ric4 -verdict 2: approved
3: rejected
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC4 Remark nonfinal-ric4-remark
a-z
0-9
_.,()[]:@!#$*+/\
Action
action=set
Syntax
http://<servername>/api.svc/v2/attendance-correction?action=set;<argument>=<value>...
User Rights
Parameters
15 alphanumeric
Char. (for user)
A to Z
Login User must have necessary rights
userid a to z Yes -
on this user.
0 to 9
/ _ \\ . @ : ? , - ~ ! $ ` *
+
punch1-datetime
punch2-datetime
punch3-datetime
punch4-datetime
HHMM implies that time should be in
punch5-datetime 24-hours format only.
punch6-datetime
Note: Punch Date mentioned in the
ddmmyyyyHHMM No -
punch7-datetime request can be 1 date prior to Process
Date or 2 subsequent dates from the
punch8-datetime process date. Punch date outside this
range will not be allowed.
punch9-datetime
punch10-datetime
punch11-datetime
punch12-datetime
shift two characters Yes - This will contain the configured shift ID.
If ‘wo’ is
If ph=1, day status is PH. If both wo=1
mentioned,
ph 0, 1 - and ph=1 day status is WO
then ‘ph’ is
mandatory.
Max 50 chars.
Allowed Characters
A-Z
a-z
reason No Personal
0-9
! @ # $ & ( ) _ -+ [ ] / \ :
. , * <Space>
Punch Date mentioned in the request can be 1 date prior to Process Date or 2 subsequent dates from the
process date.
Example
Sample Request:
http://matrixserver/api.svc/v2/attendance-correction?action=set;userid=92;process-date=07032014;punch2-
datetime=070320142146;shift=GS
This enables the user to delete existing Attendance Correction Applications from the COSEC database by
specifying the Application ID.
Action
action=delete
Syntax
http://<servername>/api.svc/v2/attendance-correction?action=set;<argument>=<value>...
User Rights
Parameters
This shall be used to approve/reject attendance correction applications submitted to a particular user.
Action
action=set
Syntax
http://<servername>/api.svc/v2/attendance-correction-approval?action=set;<argument>=<value>…
User Rights
User Rights
Enabled if User is a reporting group in-charge and has permissions on page: Attendance
ESS
Correction
Parameters
If you select Anyone as Authorization Mode, the Reporting Group In-charges will be able to view and
approve the application. Whichever request come first, will be considered and used to mark the verdict on
the application.
This API can be used to fetch details of all Short Leave/Official IN-OUT Entries submitted on the COSEC system.
Action
action=get
Syntax
http://<servername>/api.svc/v2/short-leave-entry?action=get;<argument>=<value>...
User Rights
User Rights
Enabled.
System Account User must have rights on following pages (COSEC Web Application):
Enabled.
Parameter
If entry-type = 2,
Only those records will be returned for
which special function is of type: short-
leave in/short-leave out.
1: Official
entry-type No 2 (Short Leave)
2: Short Leave
If entry-type = 1,
Only those records will be returned for
which special function is of type: official
in/official out.
Response Fields
Allowed Characters : 15
alphanumeric Char.
A to Z
User ID user-id 15 characters
a to z
0 to 9
/ _ \\ . @ : ? , - ~ ! $ ` * +
Allowed characters:
A-Z
User Name user-name 45 characters a-z
0-9
-_.()[]
Max. 15 alphanumeric
Short Name short-name -
characters
1: Official
Entry Type entry-type -
2: Short Leave
PR : Present
AB : Absent
WO : Week Off
PH : Public Holiday <Leave Codes>as
First Half firsthalf
FB : Field Break configured in COSEC
RD : Rest Day
IN : Official In
<Leave Codes>
PR : Present
AB : Absent
WO : Week Off
<Leave Codes>as
PH : Public Holiday
Second Half secondhalf configured in COSEC
FB : Field Break
RD : Rest Day
IN : Official In
<Leave Codes>
0: Status is not WO
Week-Off wo -
1: Status is WO
0: Status is not PH
Public Holiday ph -
1: Status is PH
Applicable in case of
short leave/official in-out
1 : Pending
authorization by a
Authorization Status authorization-status 2 : Approved
Reporting in-charge,
3 : Rejected
where member’s entries
need to be fetched.
DD/MM/YYYY
Applied On application-date
HH:MM
Max 15 chars
Allowed Characters
Final RIC ID final-ric A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Final RIC Name final-ric-name
a-z
0-9
-_. ()[]
MM/DD/YYYY
Final RIC Verdict Date Time final-ric-verdict-date
HH:MM
1: pending
Provides status of
Final RIC Verdict final-ric-verdict 2: approved
application.
3: rejected
Max 30 chars
Allowed Characters
A-Z
Final RIC Remark final-ric-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Non-Final RIC ID nonfinal-ric A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC Name nonfinal-ric-name
a-z
0-9
-_. ()[]
1: pending
Non-Final RIC Verdict nonfinal-ric -verdict 2: approved
3: rejected
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC Remark nonfinal-ric-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Non-Final RIC2 ID nonfinal-ric2 A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC2 Name nonfinal-ric2-name
a-z
0-9
-_. ()[]
1: pending
Non-Final RIC2 Verdict nonfinal -ric2-verdict 2: approved
3: rejected
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC2 Remark nonfinal-ric2-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Non-Final RIC3 ID nonfinal-ric3 A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC3 Name nonfinal-ric3-name
a-z
0-9
-_. ()[]
1: pending
Non-Final RIC3 Verdict nonfinal-ric3-verdict 2: approved
3: rejected
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC3 Remark nonfinal-ric3-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Non-Final RIC4 ID nonfinal-ric4 A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC4 Name nonfinal-ric4-name
a-z
0-9
-_. ()[]
1: pending
Non-Final RIC4 Verdict nonfinal-ric4-verdict 2: approved
3: rejected
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC4 Remark nonfinal-ric4-remark
a-z
0-9
_.,()[]:@!#$*+/\
This can be used to submit Short Leave/Official In-Out Entries to Reporting In-charge for authorization.
Action
action=set
Syntax
http://<servername>/api.svc/v2/short-leave-entry?action=<set>;<argument>=<value>.. .
User Rights
Parameters
15 alphanumeric char.
(for user)
A to Z
The login user must have appropriate
userid a to z Yes -
rights on this User ID.
0 to 9
/ _ \\ . @ : ? , - ~ ! $ ` *
+
spfid1
spfid2
spfid3
spfid4
spfid5
Entry markings for punches 1 to 12.
spfid6 0: No Special function
Entry for a punch will be submitted
1: Official No N/A
successfully only if the punch is
spfid7 2: Short Leave
available.
spfid8
spfid9
spfid10
spfid11
spfid12
The entry application will submit only the special function value: short-leave or official.
In or Out will depend on the punch-system (2-Punch / 4-Punch / N-Punch etc.) applicable to the user and
shall be determined on the server side.
This API can be used to approve or reject all Short-Leave/Official IN-OUT applications submitted to the Reporting
In-charge.
Action
action=set
Syntax
http://<servername>/api.svc/v2/short-leave-authorization?action=set;<argument>=<value>…
User Rights
User Rights
Enabled.
System Account User must have rights on following pages (COSEC Web Application):
Enabled.
ESS User must be a reporting in-charge with rights on the following ESS pages:
Parameters
Max 50 chars
Allowed Characters
A-Z
remark No -
a-z
0-9
<Space>
This can be used to fetch the attendance records of a single user or multiple users based on a specified date range
and the specified authorization status (i.e. pending or authorized). These records can then be authorized by the
respective supervisors.
Action
action=get
Syntax
http://<servername>/api.svc/v2/attendance-authorization?action=get;<argument>=<value>…
User Rights
User Rights
Enabled.
System Account User must have rights on following pages (COSEC Web Application):
Enabled.
ESS User must be a reporting in-charge with rights on the following ESS pages:
Parameters
Allowed Characters : 15
alphanumeric Char.
A to Z
User ID user-id 15 characters
a to z
0 to 9
/ _ \\ . @ : ? , - ~ ! $ ` * +
Allowed characters:
A-Z
User Name user-name 45 characters a-z
0-9
-_.()[]
Max. 15 alphanumeric
Short Name short-name -
characters
PR : Present
AB : Absent
WO : Week Off
PH : Public Holiday <Leave Codes>as
First Half firsthalf
FB : Field Break configured in COSEC
RD : Rest Day
IN : Official In
<Leave Codes>
PR : Present
AB : Absent
WO : Week Off
<Leave Codes>as
PH : Public Holiday
Second Half secondhalf configured in COSEC
FB : Field Break
RD : Rest Day
IN : Official In
<Leave Codes>
0: Status is not WO
Week-Off wo -
1: Status is WO
0: Status is not PH
Public Holiday ph -
1: Status is PH
1 : Pending Authorization
Authorization Status authorized 2 : Authorized -
A-Z
a-z It displays the Remark
Remark remark 0-9 given while authorization
_.,()[]:@!#$*+/\ of application.
Max 15 chars
Allowed Characters
Final RIC ID final-ric A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Final RIC Name final-ric-name
a-z
0-9
-_. ()[]
MM/DD/YYYY
Final RIC Verdict Date Time final-ric-verdict-date HH:MM
Max 15 chars
Allowed Characters
Non-Final RIC ID nonfinal-ric A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC Name nonfinal-ric-name
a-z
0-9
-_. ()[]
1: pending
Non-Final RIC Verdict nonfinal-ric-verdict
2: authorized
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC Remark nonfinal-ric-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Non-Final RIC2 ID nonfinal-ric2 A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC2 Name nonfinal-ric2-name
a-z
0-9
-_. ()[]
1: pending
Non-Final RIC2 Verdict nonfinal-ric2-verdict
2: authorized
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC2 Remark nonfinal-ric2-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Non-Final RIC3 ID nonfinal-ric3 A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC3 Name nonfinal-ric3-name
a-z
0-9
-_. ()[]
1: pending
Non-Final RIC3 Verdict nonfinal -ric3-verdict
2: authorized
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC3 Remark nonfinal-ric3-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Non-Final RIC4 ID nonfinal-ric4 A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC4 Name nonfinal-ric4-name
a-z
0-9
-_. ()[]
1: pending
Non-Final RIC4 Verdict nonfinal-ric4 -verdict
2: authorized
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC4 Remark nonfinal-ric4-remark
a-z
0-9
_.,()[]:@!#$*+/\
Action
action=set
Syntax
http://<servername>/api.svc/v2/attendance-authorization?action=set;<argument>=<value>…
User Rights
Parameters
Max 50 chars
Allowed Characters
A-Z If remark not entered then default value
remark No -
a-z as per the verdict will be applied.
0-9
<Space>
This can be used to fetch the event records of a single user or multiple users based on a specified date range and
the specified authorization status (i.e. pending or authorized). These records can then be authorized by the
reporting in-charge and system administrator.
Action
action=get
Syntax
http://<servername>/api.svc/v2/event-authorization?action=get;<argument>=<value>…
User Rights
User Rights
Enabled.
System Account
User must have rights on following pages (COSEC Web Application):
Time and Attendance > Authorization/Approval> Event Authorization
Enabled.
ESS User must be a reporting in-charge with rights on the following ESS pages:
Parameters
0: All
Event authorization- Fetch event records based on their
1: Pending No 0 (Pending)
status authorization status.
2: Authorized
Allowed characters:
A-Z
User ID user-id 15 characters a-z
0-9
/_\\.@:
Allowed characters:
A-Z
User Name user-name 45 characters a-z
0-9
-_.()[]
0=controller
1=USB
Source
2=ESS This will indicate the
event_src 3=SMS event source to the
4=PIM COSEC software.
5=Others
6=APP
50 characters for
“Loc_name” tag
0 : Pending Authorization
Status is displayed w.r.t
Authorization Status Auth_status 1: Authorized
logged in user.
Max 50 alphanumaric
characters.
Max 15 chars
Allowed Characters
Final RIC ID final-ric A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Final RIC Name final-ric-name
a-z
0-9
-_. ()[]
MM/DD/YYYY
Final RIC Verdict Date Time final-ric-verdict-date HH:MM
1: pending
Provides status of
Final RIC Verdict final-ric-verdict 2: authorized
application.
Max 30 chars
Allowed Characters
A-Z
Final RIC Remark final-ric-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Non-Final RIC ID nonfinal-ric A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC Name nonfinal-ric-name
a-z
0-9
-_. ()[]
0: pending
Non-Final RIC Verdict nonfinal-ric-verdict
1: authorized
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC Remark nonfinal-ric-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Non-Final RIC2 ID nonfinal-ric2 A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC2 Name nonfinal-ric2-name
a-z
0-9
-_. ()[]
0: pending
Non-Final RIC2 Verdict nonfinal-ric2-verdict
1: authorized
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC2 Remark nonfinal-ric2-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Non-Final RIC3 ID nonfinal-ric3 A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC3 Name nonfinal-ric3-name
a-z
0-9
-_. ()[]
0: pending
Non-Final RIC3 Verdict nonfinal-ric3-verdict
1: authorized
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC3 Remark nonfinal-ric3-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Non-Final RIC4 ID nonfinal-ric4 A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC4 Name nonfinal-ric4-name
a-z
0-9
-_. ()[]
0: pending
Non-Final RIC4 Verdict nonfinal-ric4-verdict
1: authorized
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC4 Remark nonfinal-ric4-remark
a-z
0-9
_.,()[]:@!#$*+/\
4294967295 = Job
Reference ID selected =
None
Allowed Characters
A-Z,
Job Code job-code 15 Characters a-z
0-9
.-_()
Allowed Characters
A-Z
Job Name job-name 30 Characters a-z
0-9
-_.()[]
Action
action=set
Syntax
http://<servername>/api.svc/v2/event-authorization?action=set;<argument>=<value>…
User Rights
Parameters
1: authorize
This is the verdict to be applied to an
verdict Yes -
event record pending for authorization.
Max 50 chars
Allowed Characters
A-Z If remark not entered then default value
remark No -
a-z as per the verdict will be applied.
0-9
<Space>
If any RIC/SA tries to authorize an already authorized application, “Authorizing this event is not allowed”
message will be displayed.
Action
action=get
Syntax
http://<servername>/api.svc/v2/ot-coff-authorization?action=get;<argument>=<value>…
User Rights
User Rights
Enabled.
System Account User must have rights on following pages (COSEC Web Application):
Enabled.
ESS User must be a reporting in-charge with rights on the following ESS pages:
Parameters
0: Pending
To fetch records based on their
Authorization-status 1: Authorized No 0 (Pending)
authorization status.
Response Fields
Allowed characters:
A-Z
User ID user-id 15 characters a-z
0-9
/_\\.@:
Allowed characters:
A-Z
User Name user-name 45 characters a-z
0-9
-_.()[]
Max. 15 alphanumeric
Short Name short-name -
characters
Return blank if
Actual OT1 ot1 HHHHHH:MM
unavailable.
Return blank if
Actual OT2 ot2 HHHHHH:MM
unavailable.
Return blank if
Actual OT3 ot3 HHHHHH:MM
unavailable.
Return blank if
Actual OT4 ot4 HHHHHH:MM
unavailable.
Return blank if
Actual OT5 ot5 HHHHHH:MM
unavailable.
Return blank if
Authorized OT1 authorized-ot1 HHHHHH:MM
unavailable.
Return blank if
Authorized OT2 authorized-ot2 HHHHHH:MM
unavailable.
Return blank if
Authorized OT3 authorized-ot3 HHHHHH:MM
unavailable.
Return blank if
Authorized OT4 authorized-ot4 HHHHHH:MM
unavailable.
Return blank if
Authorized OT5 authorized-ot5 HHHHHH:MM
unavailable.
Return blank if
unavailable.
Return blank if
unavailable.
Return blank if
unavailable.
Return blank if
unavailable.
Return blank if
unavailable.
Return blank if
unavailable.
Return blank if
unavailable.
Return blank if
unavailable.
Return blank if
unavailable.
Return blank if
unavailable.
Return blank if
unavailable.
Return blank if
unavailable.
Return blank if
unavailable.
Return blank if
unavailable.
Return blank if
unavailable.
Return blank if
unavailable.
Return blank if
unavailable.
Return blank if
unavailable.
Return blank if
unavailable.
Return blank if
unavailable.
Return blank if
unavailable.
Return blank if
unavailable.
Return blank if
unavailable.
Return blank if
unavailable.
Return blank if
unavailable.
Return blank if
Total Authorized OT total-authorized-ot HHH:MM
unavailable.
Return blank if
Total Authorized C-Off authorized-coff HHH:MM
unavailable.
Return blank if
Gross Work Hours gross-workhours HH:MM
unavailable.
Return blank if
Extra Work Hours extra-workhours HH:MM
unavailable.
Return blank if
Net Work Hours net-workhours HHHHHHH:MM
unavailable.
PR : Present
AB : Absent
WO : Week Off
PH : Public Holiday <Leave Codes>as
First Half firsthalf
FB : Field Break configured in COSEC
RD : Rest Day
IN : Official In
<Leave Codes>
PR : Present
AB : Absent
WO : Week Off
<Leave Codes>as
PH : Public Holiday
Second Half secondhalf configured in COSEC
FB : Field Break
RD : Rest Day
IN : Official In
<Leave Codes>
Return blank if
10 Characters unavailable
Application Date adv-application-date
DD/MM/YYYY Should be displayed for
Period=0
Return blank if
5 characters unavailable
Applied OT Hours adv-applied-othours
HH:MM Should be displayed for
Period=0
Return blank if
5 characters unavailable
Approved OT Hours adv-approved-othours
HH:MM Should be displayed for
Period=0
Return blank if
unavailable
Approved By adv-approvedby 15 characters
Should be displayed for
Period=0
Return blank if
unavailable
Remarks remark 30 characters
Should be displayed for
Period=0
Max 15 chars
Allowed Characters
Final RIC ID final-ric-type1 A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Final RIC Name final-ric-name-type1
a-z
0-9
-_. ()[]
0: pending
Provides status of
Final RIC Verdict-type1 final-verdict-type1 1: authorized
application.
Max 30 chars
Allowed Characters
A-Z
Final RIC Remark-type1 final-remark-type1
a-z
0-9
_.,()[]:@!#$*+/\
0: pending
Provides status of
Final RIC Verdict-type2 final-verdict-type2 1: authorized
application.
Max 30 chars
Allowed Characters
A-Z
Final RIC Remark-type2 final-remark-type2
a-z
0-9
_.,()[]:@!#$*+/\
0: pending
Provides status of
Final RIC Verdict-type3 final-verdict-type3 1: authorized
application.
Max 30 chars
Allowed Characters
A-Z
Final RIC Remark-type3 final-remark-type3
a-z
0-9
_.,()[]:@!#$*+/\
0: pending
Provides status of
Final RIC Verdict-type4 final-verdict-type4 1: authorized
application.
Max 30 chars
Allowed Characters
A-Z
Final RIC Remark-type4 final-remark-type4
a-z
0-9
_.,()[]:@!#$*+/\
0: pending
Provides status of
Final RIC Verdict-type5 final-verdict-type5 1: authorized
application.
Max 30 chars
Allowed Characters
A-Z
Final RIC Remark-type5 final-remark-type5
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Non-Final RIC1 ID nonfinal-ric1-type1 A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC1 Name nonfinal-ric1-name-type1
a-z
0-9
-_. ()[]
0: pending
Non-Final RIC1 Verdict-type1 nonfinal1-verdict-type1
1: authorized
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC1 Remark-type1 nonfinal1-remark-type1
a-z
0-9
_.,()[]:@!#$*+/\
0: pending
Non-Final RIC1 Verdict-type2 nonfinal1-verdict-type2
1: authorized
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC1 Remark-type2 nonfinal1-remark-type2
a-z
0-9
_.,()[]:@!#$*+/\
0: pending
Non-Final RIC1 Verdict-type3 nonfinal1-verdict-type3
1: authorized
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC1 Remark-type3 nonfinal1-remark-type3
a-z
0-9
_.,()[]:@!#$*+/\
0: pending
Non-Final RIC1 Verdict-type4 nonfinal1-verdict-type4
1: authorized
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC1 Remark-type4 nonfinal1-remark-type4
a-z
0-9
_.,()[]:@!#$*+/\
0: pending
Non-Final RIC1 Verdict-type5 nonfinal1-verdict-type5
1: authorized
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC1 Remark-type5 nonfinal1-remark-type5
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Non-Final RIC2 ID nonfinal-ric2-type2 A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC2 Name nonfinal-ric2-name-type2
a-z
0-9
-_. ()[]
0: pending
Non-Final RIC2 Verdict-type1 nonfinal2-verdict-type1
1: authorized
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC2 Remark-type1 nonfinal2-remark-type1
a-z
0-9
_.,()[]:@!#$*+/\
0: pending
Non-Final RIC2 Verdict-type2 nonfinal2-verdict-type2
1: authorized
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC2 Remark-type2 nonfinal2-remark-type2
a-z
0-9
_.,()[]:@!#$*+/\
0: pending
Non-Final RIC2 Verdict-type3 nonfinal2-verdict-type3
1: authorized
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC2 Remark-type3 nonfinal2-remark-type3
a-z
0-9
_.,()[]:@!#$*+/\
0: pending
Non-Final RIC2 Verdict-type4 nonfinal2-verdict-type4
1: authorized
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC2 Remark-type4 nonfinal2-remark-type4
a-z
0-9
_.,()[]:@!#$*+/\
0: pending
Non-Final RIC2 Verdict-type5 nonfinal2-verdict-type5
1: authorized
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC2 Remark-type5 nonfinal2-remark-type5
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Non-Final RIC3 ID nonfinal-ric3-type A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC3 Name nonfinal-ric3-name
a-z
0-9
-_. ()[]
0: pending
Non-Final RIC3 Verdict-type1 nonfinal3-verdict-type1
1: authorized
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC3 Remark-type1 nonfinal3-remark-type1
a-z
0-9
_.,()[]:@!#$*+/\
0: pending
Non-Final RIC3 Verdict-type2 nonfinal3-verdict-type2
1: authorized
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC3 Remark-type2 nonfinal3-remark-type2
a-z
0-9
_.,()[]:@!#$*+/\
0: pending
Non-Final RIC3 Verdict-type3 nonfinal3-verdict-type3
1: authorized
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC3 Remark-type3 nonfinal3-remark-type3
a-z
0-9
_.,()[]:@!#$*+/\
0: pending
Non-Final RIC3 Verdict-type4 nonfinal3-verdict-type4
1: authorized
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC3 Remark-type4 nonfinal3-remark-type4
a-z
0-9
_.,()[]:@!#$*+/\
0: pending
Non-Final RIC3 Verdict-type5 nonfinal3-verdict-type5
1: authorized
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC3 Remark-type5 nonfinal3-remark-type5
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Non-Final RIC4 ID nonfinal-ric4 A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC4 Name nonfinal-ric4-name
a-z
0-9
-_. ()[]
0: pending
Non-Final RIC4 Verdict-type1 nonfinal4-verdict-type1
1: authorized
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC4 Remark-type1 nonfinal4-remark-type1
a-z
0-9
_.,()[]:@!#$*+/\
0: pending
Non-Final RIC4 Verdict-type2 nonfinal4-verdict-type2
1: authorized
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC4 Remark-type2 nonfinal4-remark-type2
a-z
0-9
_.,()[]:@!#$*+/\
0: pending
Non-Final RIC4 Verdict-type3 nonfinal4-verdict-type3
1: authorized
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC4 Remark-type3 nonfinal4-remark-type3
a-z
0-9
_.,()[]:@!#$*+/\
0: pending
Non-Final RIC4 Verdict-type4 nonfinal4 -verdict-type4
1: authorized
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC4 Remark-type4 nonfinal4-remark-type4
a-z
0-9
_.,()[]:@!#$*+/\
0: pending
Non-Final RIC4 Verdict-type5 nonfinal4-verdict-type5
1: authorized
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC4 Remark-type5 nonfinal4-remark--type5
a-z
0-9
_.,()[]:@!#$*+/\
Action
action=set
Syntax
http://<servername>/api.svc/v2/ot-coff-authorization?action=set;<argument>=<value>…
User Rights
Parameters
Yes
Date ddmmyyyy for daily - The date for authorization.
period
Yes
If Monthly period is selected, then
Month-year mmyyyy for monthly -
specify month-year
period
authorized-ot1 HHH:MM
authorized-coff1 HHH:MM
The
authorized-ot2 HHH:MM ‘authorized-
ot’ or
authorized-coff2 HHH:MM ‘authorized- Hours authorized as an Overtime type
coff’ must be (OT1-OT5) and
authorized-ot3 HHH:MM
mentioned for Part of the actual OT component (OT1-
-
atleast one of OT5), authorized as C-Off.
authorized-coff3 HHH:MM
the OT
authorized-ot4 HHH:MM components
(OT1-OT5)
authorized-coff4 HHH:MM for
authorization.
authorized-ot5 HHH:MM
authorized-coff5 HHH:MM
remark1
remark2
Authorization Remarks for individual
remark3 50 characters No N/A
OT components.
remark4
remark5
Example1
Sample Request:
http://192.168.104.12/cosec/api.svc/v2/ot-coff-authorization?action=set;userid =3;Period=0;Date
=02072018;authorized-ot1 =001:00
Sample Response:
On COSEC, some attendance parameters for a user are updated only when the monthly attendance data is
manually processed. This monthly attendance process can be executed through API. This API shall be used to
process the monthly attendance for a particular user.
Action
action=command
Syntax
http://<servername>/api.svc/v2/monthly-process?action=command;<argument>=<value>…
User Rights
User Rights
Parameters
Current month and The month and year for which the
month-year mmyyyy No
year. attendance process is to be run.
In/Out Reasons are reasons configured on the COSEC Server Application, to be used for submitting Short Leave
or Official IN/OUT entries for approval. Use this API to fetch all In/Out Reasons configured on COSEC.
Action
action=get
Syntax
http://<servername>/api.svc/v2/in-out-reasons?action=get;<argument>=<value>…
User Rights
User Rights
ESS Enabled
Response Fields
0: In
Type of Reason reason-type -
1: Out
Example
Sample Request:
http://matrixserver/api.svc/v2/in-out-reasons?action=get
Sample Response:
reason-id|reason|reason-type
1|Sickness|1
2|Personal Work|0
3|Meeting with Client|0
4|Meeting with Client - OUT|1
<EOT>
This shall be used to get shift wise counts of users as per their punches or day's status. This will return count of
scheduled, reported, not reported, on leave/tour, etc.
Action
action=get
Syntax
http://<servername>/api.svc/v2/shift-wise-count?action=<get>;<argument>=<value>...
User Rights
User Rights
Parameters
Example
Sample Request:
http://matrix-server/api.svc/v2/shift-wise-count?action=get;attendance-date=01012016;range=all;
This shall be used to get site wise counts of users as per their events. This will return IN count, OUT count and
who’s IN Count users. The http query to access site data from the COSEC server should resemble the following
syntax:
Action
action= get
Syntax
http://<servername>/api.svc/v2/site-wise-count?action=<get>;<argument>=<value>..]
The Site Wise Count API allows you to perform the following function:
User Rights
User Rights
ESS Enabled only for ESS – Reporting In charge user. Only member users should be
considered in this case.
Parameters
all
organization
branch
department
System support mentioned ranges.
designation
If range & Id, both are not mentioned, then
section
Range No consider it to be “all” by default.
category
If range is not passed but Id passed, consider
grade
range=user.
user
customgroup1ID
customgroup2ID
customgroup3ID
1-999
Each range (except all) shall have specific id.
(for all the ranges except all
System should allow user to select multiple id,
& user)
each separated by “, (comma)” e.g.:”1, 3, 7,
15 Char. (for user)
Id Yes 9…”
Note: This is the min to max
Or
range. In case of a system
Select a range of id
with only 1-50 id defined then
E.g.”1-50”.
valid range shall be 1-50.
Response Fields
IN Count in numeric
Example
http://matrix-server/api.svc/v2/site-wise-count?action=get;time-range=18032016080000-18032016200000;range=all;
This API is used to get site wise counts of reported users against each shift as per their punches or day's status.
Action
action= get
Syntax
http://<servername>/api.svc/v2/shift-site-wise-count?action=<get>;<argument>=<value>...
User Rights
User Rights
Parameters
Response Fields
This API is used to get site wise users details as per their IN OUT events. This will return user’s date-time detail of
IN, OUT for sites.The http query to access site data from the COSEC server should resemble the following syntax:
Action
action= get
Syntax
http://<servername>/api.svc/v2/site-wise-user-details?action=<get>;<argument>=<value>..]
User Rights
User Rights
ESS
Enabled only for ESS – Reporting In charge user. Only member users
should be considered in this case.
Parameters
All
organization
branch
department
System support mentioned ranges.
designation
If range & Id, both are not mentioned, then
section
Range No consider it to be “all” by default.
category
If range is not passed but Id passed, consider
grade
range=user.
user
customgroup1ID
customgroup2ID
customgroup3ID
1-999999
(for all the ranges except all
& user)
15 alphanumeric Char.(for
Each range (except all) shall have specific id.
user)
System should allow user to select multiple id,
A to Z
each separated by “, (comma)” e.g.:”1, 3, 7,
a to z
Id Yes 9…”
0 to 9
Or
/_\\.@:
Select a range of id
E.g.”1-50”.
Note: This is the min to max
range. In case of a system
with only 1-50 id defined then
valid range shall be 1-50.
Response Fields
Example
http://matrix-server/api.svc/v2/site-wise-user-details?action=get;time-range=11082020080000-
11082020180000;range=all;
This shall be used to get the user’s overtime application data for the specific date period, and to submit new
overtime applications.
Action
action= get
Syntax
http://<servername>/api.svc/v2/overtime-application?action=<get/set/update/delete>;<argument>=<value>...]
User Rights
User Rights
Parameters
0= individual
user-filter No -
1= group
ddmmyyyy-ddmmyyyy
Valid Values:
date-range dd (Date): 01-31 No -
mm (Month): 01-12
yyyy (Year)
0: all
1: pending
application-status No -
2: approved
3: rejected
Response Fields
Allowed Characters : 15
alphanumeric Char.
A to Z
User ID user-id 15 characters
a to z
0 to 9
/_\\.@:
Allowed Characters
A-Z
User Name user-name 45 characters a-z
0-9
-_. ()[]
Same as form-number.
TID (form no.) tid 10 digits Auto Generated on saving
leave application.
Allowed Characters
A-Z
Address address Max 30 chars. a-z
0-9
_.,()[]:@!#$*+/\
1: pending
Provides status of
Application Status application-status 2: approved
application.
3: rejected
Allowed Characters
A-Z
Application Reason application –reason 50 characters a-z
0-9
_.,()[]:@!#$*+/\
Max 30 chars
Allowed Characters
Not mandatory. If not
A-Z
Application Approval Remark application-remark supplied, this field remains
a-z
blank.
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Final RIC ID final-ric A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Final RIC Name final-ric-name
a-z
0-9
-_. ()[]
1: pending
Provides status of
Final RIC Verdict final-ric-verdict 2: approved
application.
3: rejected
Max 15 chars
Allowed Characters
Non-Final RIC ID nonfinal-ric A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC Name nonfinal-ric-name
a-z
0-9
-_. ()[]
1: pending
Non-Final RIC Verdict nonfinal-ric-verdict 2: approved
3: rejected
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC Remark nonfinal-ric-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Non-Final RIC2 ID nonfinal-ric2 A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC2 Name nonfinal-ric2-name
a-z
0-9
-_. ()[]
1: pending
Non-Final RIC2 Verdict nonfinal-ric2-verdict 2: approved
3: rejected
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC2 Remark nonfinal-ric2-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Non-Final RIC3 ID nonfinal-ric3 A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC3 Name nonfinal-ric3-name
a-z
0-9
-_. ()[]
1: pending
Non-Final RIC3 Verdict nonfinal-ric3-verdict 2: approved
3: rejected
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC3 Remark nonfinal-ric3-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Non-Final RIC4 ID nonfinal-ric4 A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC4 Name nonfinal-ric4-name
a-z
0-9
-_. ()[]
1: pending
Non-Final RIC4 Verdict nonfinal-ric4-verdict 2: approved
3: rejected
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC4 Remark nonfinal-ric4-remark
a-z
0-9
_.,()[]:@!#$*+/\
This shall be used to set the user’s overtime application data for the specific date period.
Action
action= set
Parameters
Multi-
Language Default
Argument Valid Values Description
Character Value
set
8 characters
Format: ddmmyyyy
dd(Date): 01-31
OT-date mm(Month): 01-12 NA NA Mandatory field.
yyyy: Year
4 characters
50 characters
Allowed Characters:
reason A-Z NA Overtime Not Mandatory.
a-z
0-9
_.,()[]:@!#$*+/\
30 characters
Allowed Characters:
20 Digits
Valid Values:
contact NA Blank Not Mandatory.
0–9
-+()
This shall be used to update user’s overtime application data for the specific date period.
Action
action= update
Parameters
15 alphanumeric Char.
A to Z
userid a to z Mandatory field.
0 to 9
/_\\.@:
8 characters
Format: ddmmyyyy
dd(Date): 01-31
OT-date mm(Month): 01-12 Not a mandatory field.
yyyy: Year
4 characters
Max 50 characters
Allowed Characters:
reason A-Z Not a mandatory field.
a-z
0-9
_.,()[]:@!#$*+/\
30 characters
Allowed Characters:
This shall be used to delete the user’s overtime application data for the specific date period.
Action
action= delete
Parameters
15 alphanumeric Char.
A to Z
userid a to z Mandatory field.
0 to 9
/_\\.@:
This shall be used to set the approval for user’s overtime application.
Action
action= set
Parameters
Multi-
Language
Argument Valid Values Default Value Description
Character
set
1: approve
approved - - Mandatory field.
2: reject
4 characters
This chapter lists all APIs related to leave management. Applying and Retrieving leave configurations and leave
balance data from the COSEC server and send, modify, as well as approve leave applications.
The login user requires Time and Attendance module license for these APIs.
Get APIs
• Getting Leave Balance Details
Set APIs
• Setting Leave Balance
Update API
• Updating an Applied Leave
Delete API
• Deleting a Pending Application
Set API
• Approving/Rejecting Leaves
Get APIs
• Getting C-OFF Balance Details
This API can be used to fetch leave balance data for one or more users for a specified time period.
Action
action=get
Syntax
http://<servername>/api.svc/v2/leave-balance?action=get;<argument>=<value>...
User Rights
User Rights
ESS Enabled.
Parameters
All leaves (except Tour To specify the leave code for any pre-
leave-code Two characters No and C-OFF type configured leaves on the COSEC
leaves) Server.
All
In this argument only single value
Organization
should be allowed
Branch
Department
If argument range's value is specified
Designation
as "All", ids of all the users that login
Section User (If argument
Range No user has rights over will return.
Category Range is not specified)
Grade
In case user-id /user-id & user-filter are
User
provided along with id/id & range,
Custom-group-1
priority should always be given to user-
Custom-group-2
id /user-id & user-filter. Value of id/id &
custom-group-3
range to be ignored in that case.
Response fields
Allowed characters:
A-Z
User ID user-id 15 characters a-z
0-9
/_\\.@:
Allowed characters:
A-Z
User Name user-name 40 characters a-z
0-9
-_.()[]
Allowed characters:
A-Z
Leave Name leave-name 30 alphanumeric characters a-z
0-9
-_.()[]
0: Paid
1: Unpaid
The type of leave for
2: Lay Off
Leave Type leave-type which balance was
3: Restricted Holiday
requested.
4: Compensatory Off
5: Tour
Example1
This sample request obtains the Leave balance for a user. It shows the leave priority as well.
Sample Request:
http://192.168.104.12/cosec/api.svc/v2/leave-group?action=get;userid=1
Sample Response:
user-id|user-name|short-name|group-id|group-name|leave-code|leave-name|leave-type|minimum-
allowed|maximum-allowed|medical-certificate-required|balance-check-enabled|half-day-required|full-day-
required|priority
1|Chirag|Chirag|1|Leave Group-1|CL|Casual Leave|1|0.0|99.0|0|0|||3
1|Chirag|Chirag|1|Leave Group-1|PL|Paid Leave|0|1.0|99.0|0|1|||2
1|Chirag|Chirag|1|Leave Group-1|SL|Sick Leave|0|0.0|99.0|0|1|||1
<EOT>
Specify a user ID to request details of the leave group assigned to this user on the COSEC server.
Action
action=get
Syntax
http://<servername>/api.svc/v2/leave-group?action=get;<argument>=<value>...
User Rights
User Rights
ESS Enabled.
Parameters
Response Fields
Allowed characters:
A-Z
User ID user-id upto 15 characters a-z
0-9
/_\\.@:
Allowed characters:
A-Z
User Name user-name upto 40 characters a-z
0-9
-_.()[]
Allowed characters:
A-Z
upto 30 alphanumeric a-z
Leave Group Name group-name
characters 0-9
-_.()[]
upto 30 alphanumeric
Leave Name leave-name Specifies the leave name
characters
0: Paid
1: Unpaid
2: Lay Off
The type of leave for
3: Restricted Holiday
Leave Type leave-type which balance was
4: Compensatory Off
requested.
5: Tour
6:Hourly Paid
7:Hourly Unpaid
Specifies whether
Medical Certificae is
0=disabled required for the leave.
Medical Certficate Required medical-certificate-required 1=ensure availability Parameter should be 0
2=upload document for leave types:
Restricted Holiday, Lay
off, Tour
Parameter should be 0
for leave types: Paid,
0=disabled Unpaid, Restricted
Tour Document Requirement tour-doc-required 1=ensure availability Holiday, Compensatory
2=upload document Off, Hourly Paid Leave,
Hourly Unpaid Leave,
Lay off.
Specifies whether
0 = disabled
Balance Check Enabled balance-check-enabled balance check is enabled
1 = enabled
for the leave
Parameter should be 0
Min Leave For Certification 0.5-99(for cer-dur-unit=0) for leave types:
min-dur-certificatecompulsion
Compulsion 1-59999(for cer-dur-unit=1) Restricted Holiday, Lay
off, Tour.
Parameter should be 0
for leave types: Paid,
Unpaid, Restricted
Min tour Days For Document 0.5-99(for cer-dur-unit=0)
min-day-tourcompulsion Holiday, Compensatory
Compulsion 1-59999(for cer-dur-unit=1)
Off, Hourly Paid Leave,
Hourly Unpaid Leave,
Lay off.
Parameter should be 0
for leave types: Paid,
Unpaid, Restricted
0=Days (1-99)
Document Duration Unit doc-dur-unit Holiday, Compensatory
1=Mins (1-59,999)
Off, Hourly Paid Leave,
Hourly Unpaid Leave,
Lay off.
Specify the two-character code (CL, PL, SL etc.) for a pre-defined leave, to retrieve its details from the COSEC
database.
Action
action=get
Syntax
http://<servername>/api.svc/v2/leave-details?action=get;<argument>=<value>...
User Rights
User Rights
ESS Enabled
Parameters
Response Fields
0: Paid
1: Unpaid
2: Lay Off
The type of leave for
3: Restricted Holiday
Leave Type leave-type which balance was
4: Compensatory Off
requested.
5: Tour
6:Hourly Paid
7: Hourly Unpaid
Specifies whether
Medical Certificate is
0 = disabled
required for the leave.
1 = ensure availability
Medical Certificate Required medical-certificate-required Parameter should be 0
2 = upload document
for leave types:
Restricted Holiday, Lay
off, Tour.
Parameter should be 0
for leave types: Paid,
0=disabled Unpaid, Restricted
Tour Document Required tour-doc-required 1=ensure availability Holiday, Compensatory
2=upload document Off, Hourly Paid Leave,
Hourly Unpaid Leave,
Lay off.
Specifies whether
0 = disabled
Balance Check Enabled balance-check-enabled balance check is enabled
1 = enabled
for the leave
Parameter should be 0
Min Leave For Certification 0.5-99(for cer-dur-unit=0) for leave types:
min-dur-certificatecompulsion
Compulsion 1-59999(for cer-dur-unit=1) Restricted Holiday, Lay
off, Tour.
Parameter should be 0
for leave types: Paid,
Unpaid, Restricted
Min tour Days For Document 0.5-99(for cer-dur-unit=0)
min-day-tourcompulsion Holiday, Compensatory
Compulsion 1-59999(for cer-dur-unit=1)
Off, Hourly Paid Leave,
Hourly Unpaid Leave,
Lay off.
Example
The following request gets details for Sick Leave (SL) as configured on COSEC.
Sample Request:
http://matrixserver/api.svc/v2/leave-details?action=get;leave-code=SL
Sample Response:
leave-code|leave-name|leave-type|minimum-allowed|maximum-allowed|medical-certificate-required|balance-check-enabled
SL|SICK LEAVE|0|0.0|99.0|0|1
<EOT>
Specify leave/tour application parameters such as leave type, user details, application status etc. to filter details of
all relevant applications in the response.
Action
action=get
Syntax
http://<servername>/api.svc/v2/leave-application?action=get;<argument>=<value>...
User Rights
User Rights
ESS Enabled.
Parameters
0: all
1: leave To specify whether the application
leave-type No 0 (all)
2: tour type is leave, tour or C-OFF
3: C-OFF
0: all
1: pending To filter applications by their
application-status No all
2: approved approval status.
3: rejected
Response Fields
Allowed characters:
A-Z
User ID user-id 15 characters a-z
0-9
/_\\.@:
Allowed characters:
A-Z
User Name user-name 40 characters a-z
0-9
-_.()[]
1: leave
Leave Type leave-type 2: tour The type of application.
3: C-OFF
Same as form-number.
TID (form no.) tid 10 digits Auto generated on saving
leave application.
mm/dd/yyyy
Applied Date and Time applied-date The date of application
HH:MM:SS
1: leave pending
2: cancellation pending
The approval status of
Application State application-state 3: modification pending
application
4: approved
5: rejected
1: Both
The half day
2: First Half Only
Consideration In Terms Of half-consideration consideration for leave
3: Second Half Only
application
4: Hourly
1: full day
2: first half The status of leave on
Day status on Start Date start-day
3: second half the starting day.
4: Hourly
1: full day
The status of leave on
Day status on End Date end-day 2: first half
the ending date.
3: second half
Allowed characters:
A-Z
Address address Max. 30 characters a-z
0-9
_.,()[]:@!#$*+/\
0: pending
This is the approval
Application Status application-status 1: approved
status of the application
2: rejected
mm/dd/yyyy
Application Verdict Date verdict-date blank if date not available
HH:MM:SS
Allowed characters:
A-Z
Application Reason application-reason upto 50 characters a-z
0-9
_.,()[]:@!#$*+/\
Allowed characters:
Application Approval Remark application-remark Max. 30 characters
A-Z
a-z
0-9
_.,()[]:@!#$*+/\
mm/dd/yyyy
Cancellation Application Date cancellation-applied-date blank if date not available
HH:MM:SS
mm/dd/yyyy
Cancellation Verdict Date cancellation-verdict-date blank if date not available
HH:MM:SS
Allowed characters:
A-Z
Cancellation Reason cancellation-reason upto 50 characters a-z
0-9
_.,()[]:@!#$*+/\
mm/dd/yyyy
Modification Application Date modification-applied-date blank if date not available
HH:MM:SS
1: Both
Modification Half Day 2: First Half Only The modification of half
modified-half-consideration
Consideration 3: Second Half Only day leave application
4:Hourly
Modified Day status on End modified-end-day 1: full day The status of modified
Date 2: first half leave on the ending date.
Number of modified
Modified Applied Days modified-applied-days 1 to 999 (multiples of 0.5)
applied days
Number of modified
Modified Posted Days modified-posted-days 1 to 999 (multiples of 0.5)
posted days
mm/dd/yyyy
Modification Verdict Date modification-verdict-date blank if date not available
HH:MM:SS
Allowed characters:
A-Z
Modification Reason modification-reason upto 50 characters a-z
0-9
_.,()[]:@!#$*+/\
Allowed characters:
A-Z
a-z
Modification Approval Remark modification-remark Max. 30 characters 0-9
_.,()[]:@!#$*+/\
6 alpha-numeric
characters.
Location Code location-code -
Blank if not available
Allowed Characters
50 characters
A-Z
Location Name
location-name a-z
Blank if not available
0-9
-_. ()[]
11 characters (max.)
GPS Latitude gps-latitude -90.0000 to +90.0000
Blank if not available
11 characters (max.)
GPS Longitude gps-longitude -180.0000 to +180.0000
Blank if not available
11 characters (max.)
GSM Longitude gsm-longitude -180.0000 to +180.0000
Blank if not available
1 - 999
Site ID site-id 1 - 999
Blank if not available
Max 30 alphanumeric
Site Name Site-name Max 30 alphanumeric character characters
Blank if not available
Indicates whether
0= Not available
Medical Certificate Available med-cert-available medical certificate is
1= Available
available or not.
Display Status of
0=unchecked
Modified Medical Certificate modified-medical-certi Modified Medical
1=checked
Certificate checkbox.
Indicates whether
Modified Medical Certificate 0= Not available
modified- Med-cert-available medical certificate is
Available 1= Available
available or not.
Allowed Characters
A-Z
Modified Address modified-address a-z Max 30 chars.
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Final RIC ID final-ric A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Final RIC Name final-ric-name a-z
0-9
-_. ()[]
DD/MM/YYYY
Final RIC Verdict Date Time final-ric-verdict-date HH:MM
1: pending
Provides status of
Final RIC Verdict final-ric-verdict 2: approved
application.
3: rejected
Max 30 chars
Allowed Characters
A-Z
Final RIC Remark final-ric-remark a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
A-Z
Non-Final RIC ID nonfinal-ric
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC Name nonfinal-ric-name
a-z
0-9
-_. ()[]
MM/DD/YYYY
Non-Final RIC Verdict Date
nonfinal-ric-verdict-date HH:MM
Time
1: pending
Non-Final RIC Verdict nonfinal-ric-verdict 2: approved
3: rejected
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC Remark nonfinal-ric-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
A-Z
Non-Final RIC2 ID nonfinal-ric2
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC2 Name nonfinal-ric2-name
a-z
0-9
-_. ()[]
MM/DD/YYYY
Non-Final RIC2 Verdict Date
nonfinal-ric2-verdict-date HH:MM
Time
1: pending
Non-Final RIC2 Verdict nonfinal-ric2-verdict 2: approved
3: rejected
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC2 Remark nonfinal-ric2-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
A-Z
Non-Final RIC3 ID nonfinal-ric3
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC3 Name nonfinal-ric3-name
a-z
0-9
-_. ()[]
MM/DD/YYYY
Non-Final RIC3 Verdict Date
nonfinal-ric3-verdict-date HH:MM
Time
1: pending
Non-Final RIC3 Verdict nonfinal-ric3-verdict 2: approved
3: rejected
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC3 Remark nonfinal-ric3-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
A-Z
Non-Final RIC4 ID nonfinal-ric4
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC4 Name nonfinal-ric4-name
a-z
0-9
-_. ()[]
MM/DD/YYYY
Non-Final RIC4 Verdict Date
nonfinal-ric4-verdict-date HH:MM
Time
1: pending
Non-Final RIC4 Verdict nonfinal-ric4-verdict 2: approved
3: rejected
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC4 Remark nonfinal-ric4-remark
a-z
0-9
_.,()[]:@!#$*+/\
Use the action=set parameter to set leave balance via this API.
Action
action=set
User Rights
Parameters
entry-type 0: Credit
1: Debit
2: Encashment Yes 0 -
3: Reuse
4: Discard
credit-mode 0: Fixed No 0 -
1: Using Accrual Policy
encashment-mode 0: Defined No 0 -
1: Available
Use the action=set parameter to submit a new leave application via this API.
Action
action=set
Syntax
http://<servername>/api.svc/v2/leave-application?action=set;<argument>=<value>...
User Rights
If the login user is System Account user, a new application will always get automatically approved on
submission.
Parameters
both, if not
1: both supplied. If supplied
2: first Half Only and other than The half day consideration of
half-consideration No
3: second half only ‘both’ option, ignore leave application
4: hourly arguments: ‘start
day’ and ‘end- day’
Allowed characters:
If not supplied this
reason Max. 50 characters No A-Z
field remains blank
a-z
0-9
_.,()[]:@!#$*+/\
Allowed characters:
If not supplied this
address Max. 30 characters No A-Z
field remains blank
a-z
0-9
_.,()[]:@!#$*+/\
Example
Sample Request:
To apply for leave application for a user from system account login mentioning the requirement of authorization for
the leave:
http://192.168.104.12/cosec/api.svc/v2/leave-application?action=set;userid=1;start-date=08022018;end-
date=08022018;leave-code=PL;authorization-required=1
Sample Response:
This API can be used to edit a leave application or to modify/cancel an already approved leave application.
Action
action=update
Syntax
http://<servername>/api.svc/v2/leave-application?action=update;<argument>=<value>...
User Rights
Parameters
max 10 numeric
Tid Yes - This is the Transaction ID.
characters
15 alphanumeric
Char. (for user)
A to Z An application will be identified, based
userid Yes -
a to z on TID and User ID.
0 to 9
/_\\.@:
Allowed Characters
reason Max 50 chars. No Blank, if not supplied.
A-Z
a-z
0-9
_.,()[]:@!#$*+/\
Address of applicant.
Applicable only when
request-type=0
Yes (only if
the particular
leave type
requires
Medical certificate status. Applicable
0: not attached mandatory
Medical-certi 0 (not attached) only when
1: attached medical
request-type=0
certificate
submission.
For e.g.
A Sick Leave)
This API can be used to delete an existing leave application from the COSEC database.
Action
action=delete
Syntax
http://<servername>/api.svc/v2/leave-application?action=delete;<argument>=<value>...
User Rights
Parameters
max 10 numeric
tid Yes - This is the transaction ID.
characters
15 alphanumeric
Char. (for user) An application will be identified, based
A to Z on TID and User ID.
userid Yes -
a to z Login user must have appropriate
0 to 9 rights on this User ID.
/_\\.@:
This API can be used to approve or reject leave applications pending for approval. All leave applications submitted
by a System Account user will be pre-approved. Leave applications submitted by an ESS user can be approved
both by System Account users with approval rights as well as the respective reporting group in-charges.
Action
action=set
Syntax
http://<servername>/api.svc/v2/leave-approval?action=set;<argument>=<value>...
User Rights
User Rights
Enabled.
Enabled if User is Reporting Group In-charge and has permissions defined in:
COSEC Web > Users > Reporting Group > In-Charge Permissions
• Leave Approval
• Tour Approval
• C-Off Approval
Parameters
Max 30 chars
Allowed Characters
A-Z To add a remark for the approval or
remark No Blank, if not supplied
a-z rejection.
0-9
_.,()[]:@!#$*+/\
This can be used to retrieve a user’s available balance for Compensatory-Off (C-OFF) type of leaves and the
validity period for this balance as per the applied C-OFF policy on COSEC.
Action
action=get
Syntax
http://<servername>/api.svc/v2/coff-balance?action=get;<argument>=<value>...
User Rights
User Rights
Enabled.
System Account User must have rights on following pages (COSEC Web Application):
Enabled.
Parameters
15 Char.
This is the user identification number.
Allowed Characters
Multiple values can be selected, each
A-Z
userid Yes - separated by a ‘comma’
a-z
e.g.:”1, 3, 7, 9…”
0-9
/_\\.@:
Response Fields
Allowed Characters
A-Z
User ID user-id upto 15 characters a-z
0-9
/_\\.@:
Allowed Characters
A-Z
User Name user-name upto 45 characters a-z
0-9
-_. ()[]
This shall be used to get the user’s C-OFF balance data for the specific date period. Details like opening, closing,
credit, debit, availed, encashed, overflow leaves will be returned in the response.
Action
action=get
Syntax
http://<servername>/api.svc/v2/coff-details?action=get;<argument>=<value>...
User Rights
User Rights
ESS Enabled
Parameters
Response Fields
Allowed Characters
A-Z
User ID user-id upto 15 characters a-z
0-9
/_\\.@:
Allowed Characters
A-Z
User name user-name upto 45 characters a-z
0-9
-_. ()[]
The Access Control APIs primarily support the retrieval of access route data, as configured on the COSEC server.
An Access Route on COSEC is a configured sequence in which a user is allowed access on Doors assigned to a
particular Panel device, or based on the access policy defined on a Smart Card. Access Routes can be of two types
- Panel-based access routes and Smart Card-based access routes.
The Access Control APIs enable the user to perform the following functions:
This API allows the user to fetch a list of all existing access routes configured on COSEC and the respective
number of group members assigned to each route.
Action
action=get
Syntax
http://<servername>/api.svc/v2/accessroutemaster?action=get;<argument>=<value>...
User Rights
User Rights
ESS Disabled
Parameters
type smartcard, panel No smartcard This is the type of the access route.
Response Fields
1. For type=smartcard
1 : active
Active Active -
0 : inactive
1 : reset enabled
Reset On Lowest Level ResetOnLowestLevel -
0 : reset disabled
1 : enabled
Sequenced Route Sequencedroute -
0 : disabled
Count of configured
Group Members GroupMembers 0 - 75
members
1 : active
Active Active -
0 : inactive
1
Sequence Sequence -
0
1 : reset enabled
Reset On Lowest Level ResetOnLowestLevel -
0 : reset disabled
Example
Sample Request:
http://192.168.104.12/cosec/api.svc/v2/accessroutemaster?action=get;type=panel;route=1;panelno=4
Sample Response:
AccessRouteNumber|AccessRouteName|Active|Sequence|PanelName|ResetOnLowestLevel|GroupMembers
1|RnD Route|1|1|Panel200-Device-4|1|2
<EOT>
This API allows the user to request details of all or specific access routes configured on COSEC.
Action
action=get
Syntax
http://<servername>/api.svc/v2/accessroutedetails?action=get;<argument>=<value>...
User Rights
Parameters
type smartcard, panel No smartcard This is the type of the access route.
Response Fields
1. For type=smartcard
Level Level 1 - 75 -
2. For type=panel
1 - 75 (Panel/Panel Lite)
Member Number Member Number Member Number
1 - 255 (Panel200)
In seconds.
Example
Sample Request:
http://192.168.104.12/cosec/api.svc/v2/accessroutedetails?action=get;type=panel;route=1;panelno=4
Sample Response:
AccessRouteID|MemberNumber|DoorNumber|DoorName|Level
1|1|6|PVR as Panel door|1
1|2|7|Door V3 as Panel Door|2
<EOT>
The following APIs enable the user to perform actions related to Cafeteria Management -
Action
action=get
Syntax
http://<servername>/api.svc/v2/canteen-account-details?action=get;<argument>=<value>...
User Rights
User Rights
Enabled.
ESS The user must have rights on the following ESS pages:
Parameters
For this API, apply the following credentials in request header to authenticate response for the mentioned
User ID, irrespective of role rights/user rights:
username : MatrixAdmin
password : admin
Response Fields
Allowed Characters
A-Z
User ID user-id 15 characters a-z
0-9
/_\\.@:
Allowed Characters
A-Z
Username user-name 45 characters a-z
0-9
-_. ()[]
max 15 alphanumeric
Short Name short-name -
characters
0 : Prepaid
Account Type account-type As set by admin
1: Postpaid
0: Disabled
Status status -
1: Enabled
0 : none
1: discount level 1
Discount Level discount 2: discount level 2 -
3: discount level 3
4: discount level 4
Previous Recharge
Details:
Recharged on previous-recharge-date mm/dd/yyyy
Return blank if recharge
details are not available.
Allowed usage
Allowed usage allowed-usage 0.1 – 999999.9 Return blank if value is
not available.
Total
Total total-usage 0.1 – 999999.9 Return blank if value is
not available.
Previous Payment
details: Amount
Amount previous-amount 0.1 – 999999.9
Return blank if value is
not available.
Previous Payment
details: Payment on
Payment on previous-payment-date mm/dd/yyyy (Date)
Return blank if value is
not available.
Example
Sample Request:
http://matrixserver/api.svc/v2/canteen-account-details?action=get;userid=1234,100
Use this to fetch the cafeteria expenditure summary for a specific user.
Action
action=get
Syntax
http://<servername>/api.svc/v2/canteen-expenditure-summary?action=get;<argument>=<value>...
User Rights
User Rights
Enabled.
System Account The user must have rights on the following pages (COSEC Web Application):
Enabled.
ESS The user must have rights on the following ESS pages:
Parameters
Response Fields
Allowed Characters
A-Z
User ID user-id 15 characters a-z
0-9
/_\\.@:
Allowed Characters
A-Z
Username user-name 45 characters a-z
0-9
-_. ()[]
max 15 alphanumeric
Short Name short-name -
characters
Expense =
Amount spent – discount.
This can be used to fetch the details of a Cafeteria menu as configured on the COSEC server.
Action
action=get
Syntax
http://<servername>/api.svc/v2/canteen-menus?action=get;<argument>=<value>...
User Rights
User Rights
Enabled.
System Account The user must have rights on the following pages (COSEC Web Application):
Enabled.
ESS The user must have rights on the following ESS pages:
Parameters
Response Fields
15 alpha-numeric characters
Menu Name menu-name -
and space
0 : Inactive
Active active -
1: Active
Discount is applicable or
0 : Discount not applicable not.
Apply Discount discount
1: discount applicable Consider discount-level
only if apply-discount=1.
Example
Sample Request:
http://matrixserver/api.svc/v2/canteen-menus?action=get;id=1,2,3
Sample Response:
menu-id|menu-name|active|default-item|item-id|item-name|sequence-number|item-price|discount|discount1|discount2|discount3|discount4
1|Lunch HO|1|1|1|Lunch|1|40.00|1|20.00|30.00|0.00|0.00
2|Breakfast|1|1|2|Breakfast|1|10.00|1|5.00|7.50|0.00|0.00
3|Lunch Factory|1|1|3|Lunch Fac|1|38.00|1|28.50|19.00|0.00|0.00
<EOT>
This can be used to fetch the list of menus configured for the specified Cafeteria device.
Action
action=get
Syntax
http://<servername>/api.svc/v2/canteen-menus-schedule?action=get;<argument>=<value>...
User Rights
User Rights
Enabled.
System Account The user must have rights on the following pages (COSEC Web Application):
Enabled.
ESS The user must have rights on the following ESS pages:
Parameters
3 = Door V2,
4 = NGT Direct Door,
5 = Wireless Direct
Door
device-type 9 = Vega Controller Yes - This is the type of device.
12 = Door V3
15 = Door FMX
20= ARGO
21= ARGO FACE
Allowed Characters
A-Z
Device Name device-name 30 characters a-z
0-9
-_. ()
15 alpha-numeric characters
Menu Name menu-name -
and space
0 : Inactive
Active active -
1: Active
1: Sunday
2: Monday Days for which the menu
3: Tuesday is enabled.
Days days 4: Wednesday Return days in comma-
5: Thursday separated format: i.e.
6: Friday days=1,3,5
7:Saturday
Example
Sample Request:
http://matrixserver/api.svc/v2/canteen-menus-schedule?action=get;device-id=16;device-type=3
A Correction Application is a formal request submitted by a Cafeteria user for manual correction in Cafeteria
transaction records. This may be required in case there are errors in transaction records such as false punches,
incorrect debit or credit etc.
A submitted correction application requires approval from the respective Reporting In-charges or an authorized
COSEC System Account user before the corrections are updated in the COSEC database. This API can be used to
get a list of correction applications submitted by users by specifying user IDs and a date-range.
Action
action=get
Syntax
http://<servername>/api.svc/v2/canteen-correction-application?action=get;<argument>=<value>...
User Rights
User Rights
Enabled.
System Account The user must have rights on the following pages (COSEC Web Application):
Enabled.
ESS The user must have rights on the following ESS pages:
Parameters
Response Fields
ID of device on which
POS Device ID device-id 1-65535 transaction occurred
(MID)
3 = Door V2,
4 = NGT Direct Door,
5 = Wireless Direct Door
9 = Vega Controller
Device Type device-type 12 = Door V3 -
15 = Door FMX
19 = Door V4
20 = ARGO
21 = ARGO FACE
Allowed Characters
A-Z
Device Name device-name 30 characters a-z
0-9
-_. ()
Allowed Characters
A-Z
User ID user-id 15 chars. a-z
0-9
/_\\.@:
Allowed Characters
A-Z
Username user-name 45 characters a-z
0-9
-_. ()[]
max 15 alphanumeric
Short Name short-name -
characters
0: None
1: Pending
Status status -
2: Approved
3: Rejected
Allowed Characters
A-Z
Reason reason 100 characters a-z
0-9
_.,()[]:@!#$*+/\
Allowed Characters
A-Z
Remark remark 50 characters a-z
0-9
_.,()[]:@!#$*+/\
Response will contain records for only those devices on which the login user has rights assigned.
Action
action=set
Syntax
http://<servername>/api.svc/v2/canteen-correction-application?action=set;<argument>=<value>...
User Rights
Parameters
• Correction application on a particular event will be allowed only when there is application for that
event.
Use this to update any existing Correction Application on the COSEC Database.
Action
action=update
Syntax
http://<servername>/api.svc/v2/canteen-correction-application?action=update;<argument>=<value>...
User Rights
User rights are disabled for System Account Users for this action.
Parameters
Note: Canteen Correction Application API with action=update will only be applied for transactions that are being generated via device.
Use this to delete existing Correction Applications from the COSEC database.
Action
action=delete
Syntax
http://<servername>/api.svc/v2/canteen-correction-application?action=delete;<argument>=<value>...
User Rights
Parameters
Action
action=get
Syntax
http://<servername>/api.svc/v2/canteen-expenditure-details?action=get;<argument>=<value>…
User Rights
User Rights
Enabled.
System Account The user must have rights on the following pages (COSEC Web Application):
Enabled.
ESS The user must have rights on the following ESS pages:
Parameters
Expenditure for the The date for which the expense details
date ddmmyyyy No
current date. need to be fetched.
Response Fields
Allowed Characters
A-Z
User ID user-id 15 chars. a-z
0-9
/_\\.@:
Allowed Characters
A-Z
Username user-name 45 characters a-z
0-9
-_. ()[]
max 15 alphanumeric
Short Name short-name -
characters
ID of device on which
POS Device ID device-id 1-65535 transaction occurred
(MID)
3 = Door V2,
4 = NGT Direct Door,
5 = Wireless Direct Door
9 = Vega Controller
Device Type device-type 12 = Door V3 -
15 = Door FMX
19 = Door V4
20 = ARGO
21 = ARGO FACE
Payable =
Payable payable 0.0– 999999.9 (price*quantity) –
(discount*quantity)
0: None
1: Pending
Event Status status -
2: Approved
3: Rejected
Example
Sample Request:
http://matrixserver/api.svc/v2/canteen-expenditure-details?action=get;userid=1234;date=01012014
The Data Templates API allows users to define a sequence in which certain specified data fields can be imported/
exported from or to external modules, such as Payroll. This chapter lists COSEC APIs that allow users to retrieve
specific import/export template-related data. These are as follows.
COSEC helps users to create data templates that can carry certain data specified by the user. Using this API, a
user can obtain a list of all existing export templates configured on COSEC along with their IDs, names and types.
Action
action=get
Syntax
http://<servername>/api.svc/v2/template-list?action=get;<argument>=<value>...
User Rights
User Rights
Parameters
Response Fields
Template ID id 1-999 -
1: daily
2: monthly
Template-Type template-type 3: event-ta -
4: event-acs
5: user-details
Example
The following examples illustrate how template list is fetched with different template-type values:
http://matrixserver/api.svc/v2/template-list?action=get;template-type=0
Sample Response:
id|name
1|Daily Attendance Detail
2|Monthly Attendance Summary
3|Attendance Events
4|Access Control Events
101|Monthly Attendance Summary
102|Daily Attendance Detail
<EOT>
Sample Request:
http://matrixserver/api.svc/v2/template-list?action=get;template-type=1
Sample Response:
id|name|template-type|view-id
1|API_Template_Daily|1|9
2|API_Template_Monthly|2|8
3|API_Template_ATDEvents|3|7
4|API_Template_ACSEvents|4|6
101|MONTH ATTENDANCE|2|1
102|daily|1|2
<EOT>
This API allows the user to obtain the details such as fields, their type, length, name etc. for all or specified export
templates on the COSEC database.
Action
action=get
Syntax
http://<servername>/api.svc/v2/template-details?action=get;<argument>=<value>...
User Rights
Parameters
Response Fields
The response will contain a list of fields defined for the specified templates. For each field the following will be
provided:
0 : database field
Field type field-type 0, 1, 2 1: static field
2: custom field
0: not mandatory
Mandatory mandatory 0, 1
1: mandatory field
This API can be used to fetch a list of all templates configured on the COSEC Web Application for user data import
and event import (both Access Control and Attendance events table).
Action
action=get
Syntax
http://<servername>/api.svc/v2/import-template-list?action=get;<argument>=<value>...
User Rights
User Rights
ESS Enabled.
Response Fields
As configured in COSEC
Template Id TemplateId numeric
Web Application.
As configured in COSEC
Code code alpha-numeric
Web Application.
Example
Sample Request:
http://matrixserver/api.svc/v2/import-template-list?action=get
Sample Response:
TemplateID|Code
1|USER
2|EVENT
<EOT>
This API enables the user to fetch the internal table structure for the user master table and events table (both
Access Control and Time and Attendance events table), indicating the fields, its data type and field length.
Action
action=get
Syntax
http://<servername>/api.svc/v2/import-template-details?action=get;<argument>=<value>...
User Rights
Parameters
1 to 3
1=user template
schema
id No all This is the template id.
2=event template
schema
3=user_shift template
schema
Response Fields
This is a common API that can be used to retrieve the data for a specified template.
Action
action=get
Syntax
http://<servername>/api.svc/v2/template-data?action=get;<argument>=<value>...
User Rights
Parameters
1- 99 : API Templates
id 1-999 Yes -
101-999 : Custom Templates
category
Note: These parameters should not be
mentioned if userid is mentioned.
grade
0
0 = Process Date If parameter is not
filter-date-by 1 = Process Date No mentioned the
Updated response will be as per
existing system.
Response Fields
Allowed characters
A-Z
User ID user-id upto 15 characters a-z
0-9
/_\\.@:
Allowed Characters
A-Z
User Name user-name upto 45 characters a-z
0-9
-_. ()[]
For Panels :0
1-255 (device-type = 8) For Direct Doors :1
Door ID for Punch1 DID1
0-99 (All Others) For Panel Doors :As
configured
0 =Panel,
1 =Direct Door,
2 =Panel Lite
3 =Direct Door V2,
4 =NGT Direct Door,
5 =Wireless Direct Door
6 =Compact Direct Door
7 =PVR Direct Door
Device Type for Punch1 DTYPE1 2 numeric digits
8 =Panel-lite V2
9 =Vega Controller
11 =Arc Controller
12 =Door V3
15 =Door FMX
16 =Path V2
18 =MODE
19 =Door V4
17 =ARC DC 200
20 =ARGO
21 =ARGO FACE
For Panels :0
1-255 (device-type = 8) For Direct Doors :1
Door ID for Punch2 DID2
0-99 (All Others) For Panel Doors :As
configured
0 =Panel,
1 =Direct Door,
2 =Panel Lite
3 =Direct Door V2,
4 =NGT Direct Door,
5 =Wireless Direct Door
6 =Compact Direct Door
7 =PVR Direct Door
Device Type for Punch2 DTYPE2 2 numeric digits
8 =Panel-lite V2
9 =Vega Controller
11 =Arc Controller
12 =Door V3
15 =Door FMX
16 =Path V2
18 =MODE
19 =Door V4
17 =ARC DC 200
20 =ARGO
21 =ARGO FACE
For Panels :0
1-255 (device-type = 8) For Direct Doors :1
Door ID for Punch3 DID3
0-99 (All Others) For Panel Doors :As
configured
0 =Panel,
1 =Direct Door,
2 =Panel Lite
3 =Direct Door V2,
4 =NGT Direct Door,
5 =Wireless Direct Door
6 =Compact Direct Door
7 =PVR Direct Door
Device Type for Punch3 DTYPE3 2 numeric digits
8 =Panel-lite V2
9 =Vega Controller
11 =Arc Controller
12 =Door V3
15 =Door FMX
16 =Path V2
18 =MODE
19 =Door V4
17 =ARC DC 200
20 =ARGO
21 =ARGO FACE
For Panels :0
1-255 (device-type = 8) For Direct Doors :1
Door ID for Punch4 DID4
0-99 (All Others) For Panel Doors :As
configured
0 =Panel,
1 =Direct Door,
2 =Panel Lite
3 =Direct Door V2,
4 =NGT Direct Door,
5 =Wireless Direct Door
6 =Compact Direct Door
7 =PVR Direct Door
Device Type for Punch4 DTYPE4 2 numeric digits
8 =Panel-lite V2
9 =Vega Controller
11 =Arc Controller
12 =Door V3
15 =Door FMX
16 =Path V2
18 =MODE
19 =Door V4
17 =ARC DC 200
20 =ARGO
21 =ARGO FACE
For Panels :0
1-255 (device-type = 8) For Direct Doors :1
Door ID for Punch5 DID5
0-99 (All Others) For Panel Doors :As
configured
0 =Panel,
1 =Direct Door,
2 =Panel Lite
3 =Direct Door V2,
4 =NGT Direct Door,
5 =Wireless Direct Door
6 =Compact Direct Door
7 =PVR Direct Door
Device Type for Punch5 DTYPE5 2 numeric digits
8 =Panel-lite V2
9 =Vega Controller
11 =Arc Controller
12 =Door V3
15 =Door FMX
16 =Path V2
18 =MODE
19 =Door V4
17 =ARC DC 200
20 =ARGO
21 =ARGO FACE
For Panels :0
1-255 (device-type = 8) For Direct Doors :1
Door ID for Punch6 DID6
0-99 (All Others) For Panel Doors :As
configured
0 =Panel,
1 =Direct Door,
2 =Panel Lite
3 =Direct Door V2,
4 =NGT Direct Door,
5 =Wireless Direct Door
6 =Compact Direct Door
7 =PVR Direct Door
Device Type for Punch6 DTYPE6 2 numeric digits
8 =Panel-lite V2
9 =Vega Controller
11 =Arc Controller
12 =Door V3
15 =Door FMX
16 =Path V2
18 =MODE
19 =Door V4
17 =ARC DC 200
20 =ARGO
21 =ARGO FACE
For Panels :0
1-255 (device-type = 8) For Direct Doors :1
Door ID for Punch7 DID7
0-99 (All Others) For Panel Doors :As
configured
0 =Panel,
1 =Direct Door,
2 =Panel Lite
3 =Direct Door V2,
4 =NGT Direct Door,
5 =Wireless Direct Door
6 =Compact Direct Door
Device Type for Punch7 DTYPE7 2 numeric digits 7 =PVR Direct Door
8 =Panel-lite V2
9 =Vega Controller
11 =Arc Controller
12 =Door V3
15 =Door FMX
16 =Path V2
18 =MODE
19 =Door V4
17 =ARC DC 200
20 =ARGO
21 =ARGO FACE
0 =Panel,
1 =Direct Door,
2 =Panel Lite
3 =Direct Door V2,
4 =NGT Direct Door,
5 =Wireless Direct Door
6 =Compact Direct Door
7 =PVR Direct Door
Device Type for Punch8 DTYPE8
2 numeric digits 8 =Panel-lite V2
9 =Vega Controller
11 =Arc Controller
12 =Door V3
15 =Door FMX
16 =Path V2
18 =MODE
19 =Door V4
17 =ARC DC 200
20 =ARGO
21 =ARGO FACE
0 =Panel,
1 =Direct Door,
2 =Panel Lite
3 =Direct Door V2,
4 =NGT Direct Door,
5 =Wireless Direct Door
6 =Compact Direct Door
2 numeric digits 7 =PVR Direct Door
Device Type for Punch9 DTYPE9
8 =Panel-lite V2
9 =Vega Controller
11 =Arc Controller
12 =Door V3
15 =Door FMX
16 =Path V2
18 =MODE
19 =Door V4
17 =ARC DC 200
20 =ARGO
21 =ARGO FACE
0 =Panel,
1 =Direct Door,
2 =Panel Lite
3 =Direct Door V2,
4 =NGT Direct Door,
5 =Wireless Direct Door
6 =Compact Direct Door
7 =PVR Direct Door
Device Type for Punch10 DTYPE10
2 numeric digits 8 =Panel-lite V2
9 =Vega Controller
11 =Arc Controller
12 =Door V3
15 =Door FMX
16 =Path V2
18 =MODE
19 =Door V4
17 =ARC DC 200
20 =ARGO
21 =ARGO FACE
0 =Panel,
1 =Direct Door,
2 =Panel Lite
3 =Direct Door V2,
4 =NGT Direct Door,
5 =Wireless Direct Door
6 =Compact Direct Door
2 numeric digits 7 =PVR Direct Door
Device Type for Punch11 DTYPE11
8 =Panel-lite V2
9 =Vega Controller
11 =Arc Controller
12 =Door V3
15 =Door FMX
16 =Path V2
18 =MODE
19 =Door V4
17 =ARC DC 200
20 =ARGO
21 =ARGO FACE
0 =Panel,
1 =Direct Door,
2 =Panel Lite
3 =Direct Door V2,
4 =NGT Direct Door,
5 =Wireless Direct Door
6 =Compact Direct Door
2 numeric digits 7 =PVR Direct Door
Device Type for Punch12 DTYPE12
8 =Panel-lite V2
9 =Vega Controller
11 =Arc Controller
12 =Door V3
15 =Door FMX
16 =Path V2
18 =MODE
19 =Door V4
17 =ARC DC 200
20 =ARGO
21 =ARGO FACE
Example
Sample Request:
http://matrixserver/api.svc/v2/template-data?action=get;id=1;date-range=11022013-12022013
TEMPLATE-ID|USERID|USERNAME|UserID1|UserName1|ProcessDate|Punch1|Punch2|WorkingShift|LateIn|EarlyOut|Overtime|WorkTime
1|1|SALIM ANSARI|1|SALIM ANSARI|11/02/2013|11/02/2013 08:28:00|11/02/2013 12:06:00|23|0|0|0|534
1|10|RAJENDRA GOSWAMI|10|RAJENDRA GOSWAMI|11/02/2013|11/02/2013 08:25:00|11/02/2013 12:50:00|23|0|0|0|492
1|1001|ANKITKUMAR SOHLIYA|1001|ANKITKUMAR SOHLIYA|11/02/2013|11/02/2013 09:29:00|11/02/2013 19:08:00|GS|0|0|0|529
1|1002|MEGHA H SHUKLA|1002|MEGHA H SHUKLA|11/02/2013|11/02/2013 14:08:00|11/02/2013 19:35:00|GS|0|0|0|327
1|1003|UMESH M TALANPURI|1003|UMESH M TALANPURI|11/02/2013|11/02/2013 09:20:00|11/02/2013 18:54:00|GS|0|0|0|524
1|1004|DARSHAK B PATEL|1004|DARSHAK B PATEL|11/02/2013|11/02/2013 09:07:00|11/02/2013 19:06:00|GS|0|0|0|549
1|1007|DHAVAL I PATEL|1007|DHAVAL I PATEL|11/02/2013|11/02/2013 09:25:00|11/02/2013 20:27:00|GS|0|0|0|612
1|1008|MAYANK K KORAT|1008|MAYANK K KORAT|11/02/2013|11/02/2013 09:01:00|11/02/2013 20:26:00|GS|0|0|0|635
1|1009|DIPTI K RATHWA|1009|DIPTI K RATHWA|11/02/2013|||GS|0|0|0|0
1|1010|RAHUL S SHAH|1010|RAHUL S SHAH|11/02/2013|11/02/2013 09:17:00|11/02/2013 19:23:00|GS|0|0|0|556
1|1011|PARIKA S PANDEY|1011|PARIKA S PANDEY|11/02/2013|11/02/2013 09:18:00|11/02/2013 18:58:00|GS|0|0|0|530
1|1012|PARIKSHIT DAS|1012|PARIKSHIT DAS|11/02/2013|11/02/2013 09:25:00|11/02/2013 20:24:00|GS|0|0|0|609
1|1015|SUMEDHA A GAWARIKAR|1015|SUMEDHA A GAWARIKAR|11/02/2013|11/02/2013 09:21:00|11/02/2013 19:32:00|GS|0|0|0|561
1|1016|BALAJI A|1016|BALAJI A|11/02/2013|||GN|0|0|0|0
1|1|SALIM ANSARI|1|SALIM ANSARI|12/02/2013|12/02/2013 08:25:00|12/02/2013 09:48:00|23|0|0|0|476
1|10|RAJENDRA GOSWAMI|10|RAJENDRA GOSWAMI|12/02/2013|12/02/2013 08:23:00|12/02/2013 12:55:00|23|0|0|0|495
1|1001|ANKITKUMAR SOHLIYA|1001|ANKITKUMAR SOHLIYA|12/02/2013|12/02/2013 09:24:00|12/02/2013 19:22:00|GS|0|0|0|548
1|1002|MEGHA H SHUKLA|1002|MEGHA H SHUKLA|12/02/2013|12/02/2013 09:27:00|12/02/2013 19:40:00|GS|0|0|0|563
1|1003|UMESH M TALANPURI|1003|UMESH M TALANPURI|12/02/2013|12/02/2013 09:15:00|12/02/2013 18:55:00|GS|0|0|0|530
1|1004|DARSHAK B PATEL|1004|DARSHAK B PATEL|12/02/2013|12/02/2013 09:24:00|12/02/2013 19:27:00|GS|0|0|0|553
1|1007|DHAVAL I PATEL|1007|DHAVAL I PATEL|12/02/2013|12/02/2013 09:23:00|12/02/2013 20:14:00|GS|0|0|0|601
1|1008|MAYANK K KORAT|1008|MAYANK K KORAT|12/02/2013|||GS|0|0|0|0
1|1009|DIPTI K RATHWA|1009|DIPTI K RATHWA|12/02/2013|||GS|0|0|0|0
1|1010|RAHUL S SHAH|1010|RAHUL S SHAH|12/02/2013|12/02/2013 09:35:00|12/02/2013 19:46:00|GS|0|0|0|561
1|1011|PARIKA S PANDEY|1011|PARIKA S PANDEY|12/02/2013|12/02/2013 09:03:00|12/02/2013 18:51:00|GS|0|0|0|538
1|1012|PARIKSHIT DAS|1012|PARIKSHIT DAS|12/02/2013|12/02/2013 09:30:00|12/02/2013 19:11:00|GS|0|0|0|531
1|1015|SUMEDHA A GAWARIKAR|1015|SUMEDHA A GAWARIKAR|12/02/2013|12/02/2013 09:10:00|12/02/2013 19:04:00|GS|0|0|0|544
1|1016|BALAJI A|1016|BALAJI A|12/02/2013|||GN|0|0|0|0
<EOT>
The Data Transfer API enables the COSEC system to send a user’s image/finger print template/palm template/
medical certificate to a third party application. It also enables the system to receive the image/finger print template/
palm template for a user and save/update it in the COSEC database or delete it.
Only a single user’s data can be sent in one request. Also, only one image/template can be transferred at a time.
• Image - 250 KB
• FP Template (For finger-template-format = 0, 1) - 768 bytes
• FP Template (For finger-template-format=2) - 6 KB
• Palm template - 3 KB
• Medical Certificate - 500 KB
• Company Logo - 250 KB
• I-Card Authority Signature - 50 KB
• Visitor photo - 100 KB
• Visitor ID Proof - 100 KB
• Vehicle Photo - 100 KB
• Material Photo - 100 KB
• Enrolled Face - 50KB
• Driving license - 100 KB
• Passport no - 100 KB
• PAN - 100 KB
• Aadhar no - 100 KB
• PF no - 100 KB
• UAN - 100 KB
• ESI No - 100 KB
• Voter ID - 100 KB
• Visa No - 100 KB
• Field1 - 100 KB
• Field2 - 100 KB
• Field3 - 100 KB
• Field4 - 100 KB
• Service Tax No - 100 KB
• ESIC No - 100 KB
• License No - 100 KB
• Visitor Pass - 100 KB
• Group- FR - 15 MB
• Tour Document - 500 KB
• Modify Tour Document - 500 KB
• Capture Photo - 100 KB
Syntax
http://<servername>/api.svc/v2/datatransfer?action=<value>;<argument>=<value>...
User Rights
User Rights
Enabled.
For ESS Users, action= get/set/delete should be allowed only when type of data is ‘image’
or ‘medical certificate’ or icard authority signature(only get is allowed)
ESS
If ESS Login user attempts to fetch Face, return corresponding enrolled faces
If ESS Login user attempts to fetch or set FP/Palm template/, return invalid request
message.
If ESS Login user attempts to set Company logo/i-card issuing authority, return invalid
request message.
This functionality enables the third party to fetch user image/finger print template/palm templates from the COSEC
database.
Action
action=get
Syntax
http://<servername>/api.svc/v2/datatransfer?action=get;<argument>=<value>...
Parameters
0 = Host User / SA
user-type User/ESS User/
No 0 Specifies the type of user.
Worker
1 = Visitor
0: image
1: finger print template
2: palm template
3: medical certificate
4: company logo
5: icard authority
signature
7: visitor photo
8: visitor id proof
9: vehicle photo
10: material photo
11:enrolled face
12: driving-license
13: passport-no
14: pan
15: aadhar-no
16: pf-no
17: uan
18: esi-no
19: voter-id
20: visa-no
21: field1
22: field2
23: field3
The type of data being requested must
24: field4
be specified.
25: service-tax-no
26: esic-no
27: contractor-license- Type=25/ 26/ 27/28/29/31/32/33/34/35/
no 36/37/38/39/40 is applicable only for
28: contractor-pf-no Contractor
29: contractor-pan-no
30: visitor-pass Type =
31: con-field1 12,13,14,15,16,17,18,19,20,21,22,23,2
32: con-field2 4,30,31,32,33,34,35,36,37,38,39,
type 33: con-field3 Yes - 40,41,42,43,44,45,46,47,50,51,52,53,5
34: con-field4 4,55,56,57,58,59,60,61,62,63,64 is
35: con-field5 valid for SA user.
36: con-field6
37: con-field7 If “Upload” provision is disabled for type
38: con-field8 =21,22,23,24,31,32,33,34,35,36,37,38,
39: con-field9 39, 40,41,42,43,44,45,46,
40: con-field10 50,51,52,53,54,55,56,57,58,59,60,61,6
41: field5
2,63,64,65 and user tries to GET
42: field6
uploaded file, if any file is present, then
43: field7
that uploaded file must be displayed.
44: field8
45: field9
46: field10
49: modify-medical
certificate
50: Visit Field1
51: Visit Field2
52: Visit Field3
53: Visit Field4
54: Visit Field5
55: Visit Field6
56: Visit Field7
57: Visit Field8
58: Visit Field9
59: Visit Field10
60: Visitor Field1
61: Visitor Field2
62: Visitor Field3
63: Visitor Field4
64: Visitor Field5
65: capture-photo
66: tour-document
67: modify-tour-doc
0 : Suprema
Proprietary
Finger-template- 1: Suprema ISO
Yes for type=
format 2: Lumidigm ISO
1
3: Lumidigm
Proprietary
0-9 : if it is a palm
template.
0-39: if it is an enrolled
face
• The image/template shall be sent in API data and not in API arguments.
This API can be used by a third party application to send a user’s data to the COSEC database. This user data is
subsequently saved or updated in the database.
Action
action=set
Syntax
http://<servername>/api.svc/v2/datatransfer?action=set;<argument>=<value>...
Parameters
0: image
1: finger print template
2: palm template
3: medical certificate
4: company logo
5: icard authority signature
7: visitor photo
8: visitor id proof
9: vehicle photo
10: material photo
11:enrolled face
12: driving-license
13: passport-no
14: pan
15: aadhar-no
16: pf-no
17: uan
18: esi-no
19: voter-id
20: visa-no
The type of data being sent must be
21: field1
specified.
22: field2
23: field3
24: field4 Type =
25: service-tax-no 12,13,14,15,16,17,18,19,20,21,22,23,2
26: esic-no 4,41,42,43,44,45,46 is valid for ESS
27: contractor-license-no user/worker.
28: contractor-pf-no
29: contractor-pan-no Type=25/ 26/ 27/28/29 is applicable
30: visitor-pass only for Contractor
31: con-field1
32: con-field2 For successful image/pdf upload
33: con-field3 display message- File saved
type Yes -
34: con-field4 successfully
35: con-field5 For failure of upload of image/pdf
36: con-field6 display message- File not saved
37: con-field7
For any exception- Invalid File should
be displayed
38: con-field8
39: con-field9
Messages for image/pdf upload
40: con-field10
file deleted successfully.
41: field5
file not deleted.
42: field6
file not exist.
43: field7
Vehicle File is not available
44: field8 Material File is not available
45: field9
46: field10
48: grp-fr-pht
49: modify-medical certificate
50: Field1
51: Field2
52: Field3
53: Field4
54: Field5
55: Field6
56: Field7
57: Field8
58: Field9
59: Field10
60: Field1
61: Field2
62: Field3
63: Field4
64: Field5
65: Captured Photo
66: tour-document
67: modify-tour-doc
0 : Suprema Proprietary
Finger-template- Yes (Only for
1: Suprema ISO
format type=1) Value should be ignored if type != 48
2: Lumidigm ISO
3: Lumidigm Proprietary
Yes if type=3,
TID is mandatory if type=3, type= 49,
type=49,
TID max 10 numeric characters type=66, type=67. For others it will be
type=66,
ignored.
type=67
Supported data size limits for type= 48 is 15MB. Return image-id in response on successful API execution
if Type=48.
Below given table defines error codes for Enrolled faces SET and UPDATE request’s error codes and messages:
This API can be used by a third party application to delete a user’s image from the COSEC database.
Action
action=delete
Syntax
http://<servername>/api.svc/v2/datatransfer?action=delete;<argument>=<value>...
Parameters
0: image
1: finger print template
2: palm template
3: medical certificate
4: company logo
5: icard authority signature
7: visitor photo
8: visitor id proof
9: vehicle photo
10: material photo
11:enrolled face
12: driving-license
13: passport-no
14: pan
15: aadhar-no
16: pf-no
17: uan
18: esi-no
19: voter-id
20: visa-no
21: field1
22: field2
23: field3
24: field4
25: service-tax-no
26: esic-no
27: contractor-license-no
28: contractor-pf-no
29: contractor-pan-no Type =
30: visitor-pass 12,13,14,15,16,17,18,19,20,21,22,23,2
31: con-field1 4,41,42,43,44,45,46 is valid for ESS
32: con-field2 user/worker.
Type 33: con-field3 Yes -
34: con-field4 Type=25/ 26/ 27/28/29 is applicable
35: con-field5 only for Contractor.
36: con-field6
37: con-field7
For SA login and Type=25/ 26/ 27/28/
29/ 31/32/33/34/35/36/37/38/39/40
38: con-field8
39: con-field9
40: con-field10
41: field5
42: field6
43: field7
44: field8
45: field9
46: field10
48: grp-fr-pht
49: modify-medical certificate
50: Field1
51: Field2
52: Field3
53: Field4
54: Field5
55: Field6
56: Field7
57: Field8
58: Field9
59: Field10
60: Field1
61: Field2
62: Field3
63: Field4
64: Field5
65: Captured Photo
66: tour-document
67: modify-tour-doc
0 - 9: if it is a palm template
0 - 9: if it is a finger print
template
0 - 5: if it is a material photo
(Photos: 1 to 6)
Delete Command will be Applicable only to type = 0 (Image), 3 (Medical Certificate),7(visitor photo),
8(visitor id proof), 9(Vehicle Photo) & 10(Material Photo)./ 11 (Enrolled Face) / 12= driving-license/13=
passport-no/ 14=pan / 15=aadhar-no/ 16=pf-no / 17=uan / 18=esi-no /19=voter-id / 20=visa-no /21= field1 /
22= field2 / 23=field3 / 24=field4 /25= service-tax-no / 26=esic-no / 27=contractor-license-no/28=contrctor-
pf-no/29=contractor-pan-no/ 30: vistor-pass / 31: con-field1 / 32: con-field2 / 33: con-field3 / 34: con-field4 /
35: con-field5 / 36: con-field6 / 37: con-field7 / 38: con-field8 / 39: con-field9 / 40: con-field40 / 41: field5 /
42: field6 / 43: field7 / 44: field8 / 45: field9 / 46: field10/48:grp-fr-pht/49:Modify Medical-certificate.
• Adding an Event
Events arriving via Events API of COSEC v1 APIs, will not undergo Event authorization process. This feature is
applicable only for COSEC v2 APIs.
This API allows the user to add an event into COSEC for processing. This can include both time and attendance, as
well as access control events.
Action
action=set
Syntax
http://<servername>/api.svc/v2/events?action=set;<argument>=<value>...
User Rights
User Rights
Parameters
1 to 65535 (panel,
panel-lite) This specifies the device MID as set in
mid - 0
1 to 65535 (direct COSEC.
doors)
0 = Panel
1 = Door V1
2 = Panel Lite
3 = Door V2
4 = NGT Direct Door
5 = Wireless Direct Door
6 = Path Controller
7 = PVR Direct Door
8 = Panel200
dtype Numeric (1,0) - 0
9 = Vega Controller
11 = ARC Controller
12 = Door V3
15 = Door FMX
18 = MODE
19 = Door V4
17 = ARC DC 200
20 = ARGO
21 = ARGO FACE
None = 0,
PIN = 1,
Card = 2,
Card_PIN = 3,
FingerPrint = 4,
Finger_PIN = 5,
Finger_Card = 6,
Finger_Card_PIN = 7,
This will specify the credentials used
credentials Palm = 8, - 0
for the event.
Palm_PIN = 9,
Palm_Card = 10,
Palm_Card_PIN = 11,
Palm_Group = 24
Face=64
PIN_Face =65
Card_Face=66
FINGER_Face=68
0=Device
1=USB This will indicate the event source to
2=ESS the COSEC software.
3=SMS
event_src 5 (Others)
4=PIM Note : Specify event_src=6 when
5=Others Events are submitted using a Mobile
6=APP Application.
50 characters
0-9
comment A-Z - - -
a-z
!@$*()_-+[]\:,./
and space
0 = Job
Assignment
Type =
"Fixed" or
"None"
1-4294967292 = Job Reference ID
1-
corresponding to respective Job Codes
4294967294
10 characters = Job
4294967293 = Job Reference ID
Reference ID
JobID 0, - selected = Continue Job
correspondin
4294967295 g to
4294967294 = Job Reference ID
respective
selected = Default Job
Job Codes
4294967295
= Job
Reference ID
selected =
None
ble_code 0 to 9999 No - -
Max. 10 alphanumeric
characters
ble_name A-Z No -
a-z
0-9
0: Manual Punch
1: Manual Punch-FR
2: Auto Punch To send events with the mode used for
app-event-mode No -
3: Auto Punch-FR registering punch using APTA
4: Auto Punch - Face
Scan Mode
Max 50 alphanumaric
characters.
A-Z
punch-reason a-z No - Reason for the marked Punch
0-9
_-
<space>
()[].,/\+!@$:#*
Fahrenheit: 90.0 -
temperature 110.0 No - -
Celsius: 32.0 – 43.0
0: Fahrenheit
temperature-unit No - -
1: Celsius
50 chars
A-Z
a-z This field indicates a precise street
formatted_address No -
0-9 address
!*@$()_-+[]:,./
<Space>
50 chars
A-Z
a-z This field indicates a name of route
route No -
0-9 (such as" US 101")
!*@$()_-+[]:,./
<Space>
50 chars
A-Z
administrative_area_l a-z
No - This field indicates area name
evel_2 0-9
!*@$()_-+[]:,./
<Space>
50 chars
A-Z
administrative_area_l
a-z No - This field indicates area address
evel_1
0-9
!*@$()_-+[]:,./
<Space>
• If “Time and Attendance” license is not available when this request is called, all the parameters will
be saved in DB, but no process (i.e. Punch posting process, Attendance Calculation process etc.)
will be called.
• When event_src= 0 (Device), 1(USB) and 3(SMS) it is mandatory to specify the correct dtype, did
and mid.
Example1
Following are some sample cases for this API:
Sample Request:
http://192.168.104.12/cosec/api.svc/v2/events?action=set;event-datetime=21052018123000;userid=FVM1;in-
out=0;dtype=12;did=1;gps_latitude=+22.2563;gps_longitude=+073.1833;
Sample Response:
This can be used to fetch a specific number of Time and Attendance events in the required format.
Action
action=get
Syntax
http://<servername>/api.svc/v2/event-ta?action=get;<argument>=<value>...
User Rights
User Rights
Parameters
If “field-name” is not
mentioned, then
The list of valid fields is Multiple field-names can be selected,
system should
mentioned in the each separated by “, (comma)”
field-name No consider configured
“Response Fields” e.g.:”indexno, userid, username,
“field-name” for the
section. orgid…”
respective template in
‘API Data Template’.
If count is not
It’s the count up to which the data is
mentioned then
required. It shall be of 3 numeric digits.
system should send
e.g. index=50, and count=100, then
count numeric No 999 (maximum value
system should provide total 100 events,
of count) events from
starting from index =50 up to index
given start point i.e.
=149
index.
0 : inactive
Active Return users as per their active flag
1: active No 1
status.
2:all
All
In this argument only single value
Organization
should be allowed.
Branch
Department
If argument range's value is specified
Designation
as "All", ids of all the users that login
Section User (if If argument
Range No user has rights over will return.
Category Range is not specified)
Grade
In case userid is provided along with id/
User
id & range, priority should always be
Custom-group-1
given to userid. Value of id/id & range to
Custom-group-2
be ignored in that case.
Custom-group-3
0: Both
0 (when parameter is
event-status 1: allowed No
not provided)
2: denied
Response Fields
M : Male
Gender GENDER F: Female -
NA : Not available
M : Married
Marital Status MRTLSTAT U : Unmarried -
NA : Not available
0 : Entry
Entry/Exit Type ENTRYEXITTYPE -
1 : Exit
1-255
(PANEL_DOOR_TYPE=8)
Door Controller ID DOORCONTROLLERID -
1-75(All Others)
0 = Panel,
1 = Door V1,
2 = Panel Lite
3 = Door V2,
4 = NGT Direct Door,
5 = Wireless Direct Door
6 = Compact Direct Door
7 = PVR Direct Door
8 = Panel200 Enum 13 is reserved for
Panel/Door Type PANEL_DOOR_TYPE
9 = Vega Controller COSEC SAMAY Door V3
11 = ARC Controller
12 = Door V3
15 = Door FMX
18 = MODE
17 = ARC DC 200
19 = Door V4
20 = ARGO
21 = ARGO FACE
0=controller
1=USB
2=ESS This will indicate the event
Source event_src 3=SMS source to the COSEC
4=PIM software.
5=Others
6=APP
0 : denied
Access Allowed or Denied access_allowed -
1: allowed
When location is
calculated via GPS. This
GPS Latitude gps_ latitude 11 characters parameter will contain :
latitude
Example: -77.008112
When location is
calculated via GPS. This
GPS Longitude gps_ longitude 11 characters parameter will contain :
longitude
Example: 38.889723
When location is
calculated via GSM. This
GSM Latitude gsm_ latitude 11 characters
parameter will contain :
latitude
When location is
calculated via GSM. This
GSM Longitude gsm_ longitude 11 characters
parameter will contain :
longitude
When location is
calculated via Wi-Fi. This
MAC Address mac_address 17 characters
parameter will contain :
MAC Address of source
1 to 4294967292 = Job
Reference ID
corresponding to
respective Job Codes
4294967295 = Job
Reference ID selected =
None
Allowed Characters
A -Z
a-z
0-9
()
[]
_ (underscore)
- (Hyphen)
0 : Pending
Authorization Status Event_Auth_status
1 : Authorized
A-Z
a-z When Multi Language is
Reason punch-reason 0-9 On, Invalid Character set =
_- Set 1
<space>
()[].,/+!@$:*
Max 15 chars
Allowed Characters
Final RIC ID final-ric A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Final RIC Name final-ric-name
a-z
0-9
-_. ()[]
MM/DD/YYYY
Final RIC Verdict Date Time final -ric-verdict-date
HH:MM
1:pending
Final RIC Verdict final-ric-verdict
2:authorized
Max 30 chars
Allowed Characters
A-Z
Final RIC Remark final-ric-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Non-Final RIC ID nonfinal-ric A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC Name nonfinal-ric-name
a-z
0-9
-_. ()[]
1: pending
Non-Final RIC Verdict nonfinal-ric-verdict
2: authorized
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC Remark nonfinal-ric-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
nonfinal-ric2 A-Z
Non-Final RIC2 ID a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC2 Name nonfinal-ric2-name
a-z
0-9
-_. ()[]
1: pending
Non-Final RIC2 Verdict nonfinal -ric2 -verdict
2: authorized
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC2 Remark nonfinal-ric2-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Non-Final RIC3 ID nonfinal-ric3 A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC3 Name nonfinal-ric3-name
a-z
0-9
-_. ()[]
1: pending
Non-Final RIC3 Verdict nonfinal-ric3-verdict
2: authorized
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC3 Remark nonfinal-ric3-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Non-Final RIC4 ID nonfinal-ric4 A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC4 Name nonfinal-ric4-name
a-z
0-9
-_. ()[]
1: pending
Non-Final RIC4 Verdict nonfinal-ric4-verdict
2: authorized
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC4 Remark nonfinal-ric4-remark
a-z
0-9
_.,()[]:@!#$*+/\
Allowed Characters
A-Z,
Job Code job-code 15 Characters a-z
0-9
.-_()
Allowed Characters
A-Z
Job Name job-name 30 Characters a-z
0-9
-_.()[]
Example
Sample Request:
http://matrixserver/api.svc/v2/event-ta?action=get
Sample Response:
IndexNo|UserID|UserName|EventDateTime|EntryExitType|MasterControllerID|DoorControllerID|SpecialFunctionID|LeaveDT|IDateTime
33|1|sam|01/10/2011 17:31:18|0|1|1|0||10/01/2011 17:31:21
34|1|sam|03/10/2011 09:28:48|0|1|1|0||10/03/2011 09:28:55
35|2|hardik|03/10/2011 09:54:00|0|1|1|0||10/03/2011 09:54:07
36|3|shwetang|03/10/2011 09:54:10|0|1|1|0||10/03/2011 09:54:17
37|9|home|26/07/2012 16:08:17|0|0|0|0||07/26/2012 16:08:17
38|9|home|26/07/2012 16:08:44|0|0|0|0||07/26/2012 16:08:44
39|9|home|26/07/2012 16:08:49|0|0|0|0||07/26/2012 16:08:49
40|9|home|26/07/2012 16:09:09|0|0|0|0||07/26/2012 16:09:09
<EOT>
This API is similar to “Obtaining Time and Attendance Events”. However, in this case, the Time and Attendance
events can be obtained for a specified date range.
Action
action=get
Syntax
http://<servername>/api.svc/v2/event-ta-date?action=get;<argument>=<value>...
User Rights
Parameters
If “field-name” is not
mentioned, then
The list of valid fields is Multiple field-names can be selected,
system should
mentioned in the each separated by “, (comma)”
field-name No consider configured
“Response Fields” e.g.:”indexno, userid, username,
“field-name” for the
section. orgid…”
respective template in
‘API Data Template’.
0 : inactive
Active Return users as per their active flag
1: active No 1
status.
2:all
0: Both
0 (when parameter is
event-status 1: allowed No
not provided)
2: denied
Response Fields
-
Designation ID DSGID 1-999999
M : Male
Gender GENDER F: Female -
NA : Not available
M : Married
Marital Status MRTLSTAT U : Unmarried -
NA : Not available
0 : Entry
Entry/Exit Type ENTRYEXITTYPE -
1 : Exit
1-255 (PANEL_DOOR_TYPE=8)
Door Controller ID DOORCONTROLLERID -
1-75 (All Others)
0 = Panel,
1 = Door V1,
2 = Panel Lite
3 = Door V2,
4 = NGT Direct Door,
5 = Wireless Direct Door
6 = Compact Direct Door
7 = PVR Direct Door
8 = Panel200 Enum 13 is reserved for
Panel/Door Type PANEL_DOOR_TYPE
9 = Vega Controller COSEC SAMAY Door V3
11 = ARC Controller
12 = Door V3
15 = Door FMX
18 = MODE
17 = ARC DC 200
19 = Door V4
20 = ARGO
21 = ARGO FACE
0=controller
1=USB
2=ESS
3=SMS This will indicate the event
Source event_src 4=PIM source to the cosec
5=Others software.
6=APP
11=Group FR-ESS
12=Group FR-APP
0 : denied
Access Allowed or Denied access_allowed -
1: allowed
When location is
calculated via GPS. This
GPS Latitude gps_ latitude 11 characters parameter will contain :
latitude
Example: -77.008112
When location is
calculated via GPS. This
GPS Longitude gps_longitude 11 characters parameter will contain :
longitude
Example: 38.889723
When location is
calculated via GSM. This
GSM Latitude gsm_latitude 11 characters
parameter will contain :
latitude
When location is
calculated via GSM. This
GSM Longitude gsm_longitude 11 characters
parameter will contain :
longitude
When location is
calculated via Wi-Fi. This
MAC Address mac_address 17 characters
parameter will contain :
MAC Address of source
Allowed Characters
A -Z
a-z
0-9
()
[]
_ (underscore)
- (Hyphen)
0 : Pending
Authorization Status Event_Auth_status
1 : Authorized
A-Z
a-z When Multi Language is
Reason punch-reason 0-9 On, Invalid Character set =
_- Set 1
<space>
()[].,/+!@$:*
Allowed Characters
A-Z,
Job Code job-code 15 Characters a-z
0-9
.-_()
Allowed Characters
A-Z
Job Name job-name 30 Characters a-z
0-9
-_.()[]
Example
This example presents a case where no time-attendance records are available for the specified date range.
Sample Request:
http://matrixserver/api.svc/v2/event-ta-date?action=get;date-range=01012011000000-02012011235959
Sample Response:
This can be used to get a specific number of Access Control events (All events other than Time and Attendance
events) in the required format.
Action
action=get
Syntax
http://<servername>/api.svc/v2/event-acs?action=get;<argument>=<value>...
User Right
User Rights
ESS Enabled.
Parameters
If “field-name” is not
mentioned, then
The list of valid fields is Multiple field-names can be selected,
system should
mentioned in the each separated by “, (comma)”
field-name No consider configured
“Response Fields” e.g.:”indexno, userid, username,
“field-name” for the
section. orgid…”
respective template in
‘API Data Template’.
If count is not
It’s the count up to which the data is
mentioned then
required. It shall be numeric digits.
system will send 999
e.g. index=50, and count=100, then
count numeric No (maximum value of
system should provide total 100 events,
count) events from
starts from index =50 up to index =149
given start point i.e.
index.
0 : inactive
Active Return users as per their active flag
1: active No 1
status.
2:all
0: Both
0 (when parameter is
event-status 1: allowed No
not provided)
2: denied
Response Fields
Allowed characters
A-Z
User ID USERID 15 characters. a-z
0-9
/_\\.@:
Allowed Characters
A-Z
User Name USERNAME 45 characters a-z
0-9
-_. ()[]
0 : Entry
Entry/Exit Type ENTRYEXITTYPE -
1 : Exit
1-255 (PANEL_DOOR_TYPE=8)
Door Controller ID DOORCONTROLLERID -
1-75 (All Others)
0 = Panel,
1 = Door V1,
2 = Panel Lite
3 = Door V2,
4 = NGT Direct Door,
5 = Wireless Direct Door
6 = Compact Direct Door
7 = PVR Direct Door
8 = Panel200 Enum-13 is reserved for
Panel/Door Type PANEL_DOOR_TYPE
9 = Vega Controller COSEC SAMAY Door V3
11 = ARC Controller
12 = Door V3
15 = Door FMX
18 = MODE
17 = ARC DC 200
19 = Door V4
20 = ARGO
21 = ARGO FACE
-
Designation ID DSGID 1-999999
0=controller
1=USB
2=ESS This will indicate the event
Source event_src 3=SMS source to the cosec
4=PIM software.
5=Others
6=APP
0 : denied
Access Allowed or Denied access_allowed -
1: allowed
When location is
calculated via GPS. This
GPS Latitude gps_ latitude 11 characters parameter will contain :
latitude
Example: -77.008312
When location is
calculated via GPS. This
GPS Longitude gps_longitude 11 characters parameter will contain :
longitude
Example: 38.889723
When location is
calculated via GSM. This
GSM Latitude gsm_latitude 11 characters
parameter will contain :
latitude
When location is
calculated via GSM. This
GSM Longitude gsm_longitude 11 characters
parameter will contain :
longitude
When location is
calculated via Wi-Fi. This
MAC Address mac_address 17 characters
parameter will contain :
MAC Address of source
Allowed Characters
A -Z
a-z
0-9
()
[]
_ (underscore)
- (Hyphen)
A-Z
a-z When Multi Language is
Reason punch-reason On, Invalid Character set =
0-9 Set 1
_-
<space>
()[].,/+!@$:*
Example
http://matrixserver/api.svc/v2/event-acs?action=get
Sample Response:
IndexNo|UserID|UserName|EventDateTime|EntryExitType|MasterControllerID|DoorControllerID|IDateTime
30904|555013|KRISHNANAND SHIVRATAN PAL|23/02/2013 12:40:08|0|48|1| 30905|555013|KRISHNANAND SHIVRATAN PAL|23/02/
2013 12:40:15|0|48|1|
30906|8515|KARANSINGH DILBAHADUR DHAMI|23/02/2013 12:41:26|0|48|1|
30907|8699|RAJIV RANJAN PRAKASH SINGH|23/02/2013 12:41:35|0|48|1|
30908|8515|KARANSINGH DILBAHADUR DHAMI|23/02/2013 12:42:05|0|48|1|
30909|8515|KARANSINGH DILBAHADUR DHAMI|23/02/2013 12:43:13|0|48|1| 30910|555013|KRISHNANAND SHIVRATAN PAL|23/02/
2013 12:44:48|0|48|1|
30911|8515|KARANSINGH DILBAHADUR DHAMI|23/02/2013 12:44:55|0|48|1|
30912|8699|RAJIV RANJAN PRAKASH SINGH|23/02/2013 12:46:29|0|48|1|
30913|8699|RAJIV RANJAN PRAKASH SINGH|23/02/2013 16:11:46|0|48|1|
30914|555013|KRISHNANAND SHIVRATAN PAL|25/02/2013 10:52:46|0|48|1|
This API is similar to “Obtaining Access Control Events”. However, in this case, the Access Control events can be
obtained for a specified date range.
Action
action=get
Syntax
http://<servername>/api.svc/v2/event-acs-date?action=get;<argument>=<value>...
User Rights
Parameters
If “field-name” is not
mentioned, then
The list of valid fields is Multiple field-names can be selected,
system should
mentioned in the each separated by “, (comma)”
field-name No consider configured
“Response Fields” e.g.:”indexno, userid, username,
“field-name” for the
section. orgid…”
respective template in
‘API Data Template’.
0 : inactive
Active Return users as per their active flag
1: active No 1
status.
2:all
0: Both
0 (when parameter is
event-status 1: allowed No
not provided)
2: denied
Response Fields
Allowed characters
A-Z
User ID USERID 15 characters. a-z
0-9
/_\\.@:
Allowed Characters
A-Z
User Name USERNAME 45 characters a-z
0-9
-_. ()[]
0 : Entry
Entry/Exit Type ENTRYEXITTYPE -
1 : Exit
1-255 (PANEL_DOOR_TYPE=8)
Door Controller ID DOORCONTROLLERID -
1-75 (All Others)
0 = Panel,
1 = Direct Door,
2 = Panel Lite
3 = Direct Door V2,
4 = NGT Direct Door,
5 = Wireless Direct Door
6 = Compact Direct Door
7 = PVR Direct Door
Enum-13 is reserved for
Panel/Door Type PANEL_DOOR_TYPE 8 = Panel200
COSEC SAMAY Door V3.
9 = Vega Controller
11 = ARC Controller
15 = Door FMX
18 = MODE
17 = ARC DC 200
19 = Door V4
20 = ARGO
21 = ARGO FACE
-
Designation ID DSGID 1-999999
0=controller
1=USB
2=ESS This will indicate the event
Source event_src 3=SMS source to the cosec
4=PIM software.
5=Others
6=APP
0 : denied
Access Allowed or Denied access_allowed -
1: allowed
When location is
calculated via GPS. This
GPS Latitude gps_ latitude 11 characters parameter will contain :
latitude
Example: -77.008212
When location is
calculated via GPS. This
GPS Longitude gps_longitude 11 characters parameter will contain :
longitude
Example: 38.889723
When location is
calculated via GSM. This
GSM Latitude gsm_latitude 11 characters
parameter will contain :
latitude
When location is
calculated via GSM. This
GSM Longitude gsm_longitude 11 characters
parameter will contain :
longitude
When location is
calculated via Wi-Fi. This
MAC Address mac_address 17 characters
parameter will contain :
MAC Address of source
Allowed Characters
A -Z
a-z
0-9
()
[]
_ (underscore)
- (Hyphen)
A-Z
a-z When Multi Language is
Reason punch-reason On, Invalid Character set =
0-9 Set 1
_-
<space>
()[].,/+!@$:*
Example
The following example illustrates a case where no records of access control events are present in the given date
range.
Sample Request:
http://matrixserver/api.svc/v2/event-acs-date?action=get;date-range=01012012000000-02012012235959
Sample Response:
IndexNo|UserID|UserName|EventDateTime|EntryExitType|MasterControllerID|DoorControllerID|IDateTime
1890|112|PARESH CHAUHAN|01/01/2012 08:39:29|0|4|1|01/01/2012 08:40:00
1921|443|BHARGAV M PATEL|02/01/2012 09:41:29|0|4|1|01/02/2012 09:41:32
1923|112|PARESH CHAUHAN|02/01/2012 09:42:25|0|4|1|01/02/2012 09:42:27
1924|621|patel vishal H|02/01/2012 09:42:28|0|4|1|01/02/2012 09:42:32
1925|521|PRAVINSINH GANPATSINH CHAUHAN|02/01/2012 09:42:34|0|4|1|01/02/2012 09:42:36
1926|489|KADIR I MANSURI|02/01/2012 09:42:37|0|4|1|01/02/2012 09:42:39
1927|424|VIMAL S TADVI|02/01/2012 09:42:40|0|4|1|01/02/2012 09:42:41
1928|684|JADAV MAYUR G|02/01/2012 09:42:46|0|4|1|01/02/2012 09:42:47
1929|449|CHINTAN A VARU|02/01/2012 09:42:50|0|4|1|01/02/2012 09:42:52
1930|644|Dhramesh Thakkar|02/01/2012 09:43:05|0|4|1|01/02/2012 09:43:07
1931|496|MILAN TRIVEDI|02/01/2012 09:43:11|0|4|1|01/02/2012 09:43:13
1932|515|KAMLESH KANUBHAI PARMAR|02/01/2012 09:43:26|0|4|1|01/02/2012 09:43:29
1933|498|RAVINDRA RAJPUT|02/01/2012 09:43:29|0|4|1|01/02/2012 09:43:33
1934|686|Saikh Sajid Usmanbhai|02/01/2012 09:43:33|0|4|1|01/02/2012 09:43:35
1935|514|BABU MANSUKHBHAI PALASH|02/01/2012 09:43:35|0|4|1|01/02/2012 09:43:38
1936|417|RAJESH P MACHHI|02/01/2012 09:44:07|0|4|1|01/02/2012 09:44:09
1937|434|KISHOR SOLANKI|02/01/2012 09:44:15|0|4|1|01/02/2012 09:44:18
1938|5|AMBALAL PADHIYAR|02/01/2012 09:44:24|0|4|1|01/02/2012 09:44:27
1940|4|DEVENDRA L MACHHI|02/01/2012 09:45:47|0|4|1|01/02/2012 09:45:49
This will be used to fetch the COSEC door, alarm and system events for a specified date range. The date should be
insertion date and all the events that are offline and yet to be inserted will be left out.
Action
action=get
Syntax
http://<servername>/api.svc/v2/event-others?action=get;<argument>=<value>...
User Rights
User Rights
ESS Disabled
Parameters
Response Fields
0: all (default)
1: door
Event Type type -
2: alarm
3. system
Events Reference
314 RTC
405 Enrolment
• The status changes are not registered as new events, as they are being updated against the current
event itself.
The events returned will be ordered according to the date-time of the event (edatetime).
This will be used to fetch the Visitor events for a specified date range.
Action
action = get
Syntax
http://<servername>/api.svc/v2/visitor-event?action=<get>;<argument>=<value>...
User Rights
User Rights
ESS Disabled
Parameters
Mandatory
System should provide all the events of the visitor that are
available in duration of that appointment period.
Not mandatory.
0-9 Provide this parameter to get events corresponding to
mobile-no + - () particular mobile-no.
Max length=20 characters When this parameter is provided, all events corresponding
to this mobile-no till date should be shown
Response
Allowed Characters
A-Z
Visitor Name visitor-name 40 characters a-z
0-9
-_. ()[]
Allowed Characters
Mobile Number mobile-no 20 characters 0-9
+ - ()
0: Entry
Entry/Exit Type entryexittype
1: Exit
0: denied
Access Allowed or Denied access_allowed
1: allowed
0=device
6= APP
This will indicate the event
Source event_src 7=station
source to the cosec software.
8=email
10=system
Max 30 alphanumeric
Device Name device_name
characters
Max 30 alphanumeric
Station Name station_name
characters
1-255 (PANEL_DOOR_TYPE
= 8)
Door Controller ID doorcontrollerid Door id
1-75 (All Others)
0 = Panel,
1 = Direct Door,
2 = Panel Lite
3 = Direct Door V2,
4 = NGT Direct Door,
5 = Wireless Direct Door
6 = Compact Direct Door
7 = PVR Direct Door
8= Panel-lite V2
9= Vega Controller Enum - 13 is reserved for
Panel/Door Type panel_door_type
11 = Arc Controller COSEC SAMAY Door V3.
12 = Door V3
14 = ARC IO 800
15 = Door FMX
16=Path V2
18 = MODE
17 = ARC DC 200
19 = Door V4
20 = ARGO
21 = ARGO FACE
This API can be used to send a command to a COSEC device from a third-party application. Certain commands
can be sent directly to devices to initiate specific actions. The following commands can be sent to a COSEC device
via API:
• Set Date-Time - Sends the current system date and time to the device.
• Normalize Door/Lock Door/Unlock Door - Sends the appropriate commands to the DOOR to reset the
door lock status.
• Delete FP - Sends command to delete the fingerprints (FP) from the fingerprint module of a device.
• Sync Credentials - Sends command to synchronize credentials from the PANEL to the DOORs. It is
recommended to first send the delete fingerprints command to the DOORs before starting the
synchronizing process for finger print templates.
• Clear All Alarms - Sends the command to clear all alarms configured on the COSEC system.
• Factory Defaults - Sends the command to default the device settings to the default factory settings.
• Delete Palms - Sends command to delete the palm templates from a palm vein reader device.
Action
action=command
Syntax
http://<servername>/api.svc/v2/device-commands?action=command;<argument>=<value>......
The Login User must have rights on the device to send a valid command.
User Rights
User Rights
ESS Disabled
1 to 65000
(panel, panel-lite) This is the device identification
device-id Yes -
1 to 65000 number.
(direct doors)
Here,
0 = Panel,
1 = Door V1,
2 = Panel Lite
3 = Door V2,
4 = NGT Direct Door,
0,1,2,3,4,5,6,7,8,9,11,12, 5 = Wireless Direct Door
14,15,18,19,17,20, 21 6 = Path Controller
device-type Yes -
7 = PVR Direct Door
8 = Panel200
9 = Vega Controller
11 = ARC Controller
12 = Door V3
14 = ARC IO 800
15 = Door FMX
18 = MODE
19 = Door V4
17 = ARC DC 200
20 = ARGO
21 = ARGO FACE
To specify a command.
Yes (If
time-interval 1-99 seconds command To specify the time interval.
type=11)
Yes (Only If
Access-zone 1-99 Forgiveness - For forgiveness =1, aceess-zone=0
=2)
Example
The following is an example of a command sent to a panel door for credentials synchronization:
Sample Request:
http://matrixserver/api.svc/v2/device-commands?action=command;device-id=1;device-type=0;Panel-door-
no=1;command-type=6;
Sample Response:
Now, in the next example, a command is sent to the same device to clear all alarms.
Sample Request:
http://matrixserver/api.svc/v2/device-commands?action=command;device-id=1;device-type=0;Panel-door-
no=1;command-type=7;
Sample Response:
Request the total count of users assigned on a device by specifying the device type and device ID.
Action
action=get
Syntax
http://<servername>/api.svc/v2/device-users?action=get;<argument>=<value>......
User Rights
User Rights
ESS Disabled
Parameters
1 to 65000
(panel, panel-lite)
device-id Yes - This is the device identification number.
1 to 65000
(direct doors)
Here,
0 = Panel,
1 = Door V1,
2 = Panel Lite
3 = Door V2,
4 = NGT Direct Door,
0,1,2,3,4,5,6,7,8,9,11,
5 = Wireless Direct Door
12,15,18,19,17,20, 21
device-type Yes - 6 = Path Controller
7 = PVR Direct Door
8 = Panel200
9 = Vega Controller
11 = ARC Controller
12 = Door V3
15 = Door FMX
18 = MODE
19 = Door V4
17 = ARC DC 200
20 = ARGO
21 = ARGO FACE
Example
The following is an example of a request sent to “matrixserver” to obtain the user count for a Direct Door V2 with
device-id=1,
Sample Request:
http://matrixserver/api.svc/v2/device-users?action=get;device-id=11,;device-type=3
Sample Response:
DeviceID|DeviceName|UserCount|TotalUserCapacity
11|RnD Basement V2|464|2000
<EOT>
The Login User must have rights on the device for which user count is to be fetched.
These APIs can be used to fetch as well as delete the notification messages for various updates related to the login
user such as leave approvals, leave application rejections, missing IN/OUT punches etc. The following functions
can be performed:
• Retrieving Notifications
• Deleting Notifications
Action
action=get
Syntax
http://<servername>/api.svc/v2/notifications?action=get;<argument>=<value>…
User Rights
User Rights
ESS Enabled.
Parameters
Response Fields
Allowed Characters
15 alphanumeric char.
A-Z
User ID user-id upto 15 characters
a-z
0-9
/_\\.@:
Allowed Characters
A-Z
Username user-name upto 45 characters a-z
0-9
-_. ()[]
Allowed Characters
A-Z
Short Name short-name max 15 alphanumeric characters a-z
0-9
-_. ()
1 = Leave Approved,
2 = Leave Rejected,
3 = Tour Approved,
4 = Tour Rejected,
5 = Leave Modification Approved,
6 = Leave Modification Rejected,
7= Leave Cancellation Approved,
8 = Leave Cancellation Rejected,
9 = Attendance Authorized,
10 = Attendance Correction
Approved,
11 = Attendance Correction
Rejected,
12 = COFF Approved,
13 = COFF Rejected,
14 = Missing IN Punch,
Type notification-type -
15 = Missing OUT Punch,
16 = Overtime Authorized,
17 = Tour Cancellation Approved,
18 = Tour Cancellation Rejected,
19 = Tour Modification Approved,
20 = Tour Modification Rejected,
21 = COFF Cancellation
Approved,
22 = COFF Cancellation
Rejected,
23 = Short Leave Approved,
24 = Short Leave Rejected,
25 = Official Leave Approved,
26 = Official Leave Rejected
28= Overtime Approved
29= Overtime Rejected
Example
Sample Request:
http://matrixserver/api.svc/v2/notifications?action=get;userid=1234
Sample Response:
user-id|user-name|short-name|notification-count|generation-date|generation-time|notification-type|message
1234|Harish Patel|Harish P|1|04/23/2014|17:45|10|Attendance Correction application for 07/03/2014 is Approved.
<EOT>
Action
action=delete
Syntax
http://<servername>/api.svc/v2/notifications?action=delete;<argument>=<value>…
User Rights
User Rights
ESS Enabled.
Parameters
This API enables the third party software to fetch the login user’s basic details.
Action
action=get
Syntax
http://<servername>/api.svc/v2/loginuser?action=get;<argument>=<value>…
User Rights
User Rights
ESS Enabled
Response Fields
Allowed Characters
A-Z
User ID user-id upto 15 characters a-z
0-9
/_\\.@:
Allowed Characters
A-Z
Username user-name upto 45 characters a-z
0-9
-_. ()[]
Allowed Characters
A-Z
User Short Name short-name max 15 alphanumeric characters a-z
0-9
-_. ()
1 = yes
Reporting In-charge reporting-in-charge -
0 = no
na
Gender gender male -
female
0: disabled
Enabled for ESS enabled -
1: enabled
upto 40 characters.
It will be blank of no IMEI
Allowed Characters: number is registered or if a
IMEI Number imei
registration request was
Alphanumeric rejected by System Admin.
-
imei-authorized=0 if a
registration request is in
pending state.
imei-authorized=1 if a
0: Pending registration request is in
1: Authorized authorized state.
2: Rejected imei-authorized=2 if a
3: Deleted (When IMEI is registration request is in
IMEI Authorized or not imei-authorized
authorized, but system admin rejected state.
removes it manually using the
COSEC Web application and It will be blank if no IMEI
saves it.) number is registered or
there is no request in
pending state or if a
registration request was
rejected by System Admin.
1 = allowed
Allow edit user details edit-user-details -
0 = not allowed
Basic
events Events
self-declaration self-declaration
health-records health-record
Time Attendance
E-Canteen
menu Menu
expenditure Expenditure
FVM
Reports
Group Details
Approval/Authorization
Overtime/C-OFF
overtime-authorization
Authorization
In-charge Permissions : <in- 1 = Yes
charge pages name> leave-approval 2 = No Leave Approval
attendance-correction-
Attendance Correction
authorization
Visitor Pre-Registration
visitor-preregistration-approval
Approval
Approval/Authorization
Format: VXXRXX.XX
Maximum 10 alphanumeric
COSEC Version cosec-version
characters For e.g. V06R01, V06R02,
V05R08.20
0 : Disabled
Punch Marking Via API punch-api -
1 : Enabled
Enabled/Disabled status of
0 : Disabled auto-attendance marking
Auto-Punch Marking auto-attendance
1 : Enabled feature.
0 : Disabled
Manual Punch Marking manual-punch -
1 : Enabled
0 : None
Location Data Mandatory from
location-mandatory 1 : Any Location -
Apps
2 : Configured Locations
0 : Disabled
Door Access Through API door-access-api
1 : Enabled
Maximum 2 alphanumeric
API security Key api-security-key
characters
0 : Disabled
FVM Flag FVM-enable
1 : Enabled
0: None
Job Assignment Type job-assignment-type 1: Fixed
2: Device Based
0: Server Timezone
Timezone for Punch Marking Punch-marking-timezone
1 : Local Timezone
0: Unauthorized Host
Authorized Host User auth-host-user 0 or 1
1: Authorized Host
If Enable FR/Punch
0 : None Marking Via API/Manual
1 : Attendance Punch Marking is disabled
Face Mandatory For Punch face-mandatory
2 : Access Control for a user, face-mandatory
3 : Both tag will be available only
for value 0 : None
1 : enabled
Capture Photo capture-photo
0 : disabled
• If T&A license is not available, “0” will be returned for the following pages:
C-OFF Approval
• If e-Canteen license is not available, then “0” will be returned for the following pages:
E-Canteen
Account Details
Menu
Expenditure
Transaction Correction
• If Visitor Management license is not available, then “0” will be returned for the following pages:
Basic Approval/Authorization
• If FVM license is not available, then “0” will be returned for the following pages.
Reports Approval/Authorization
• For an ESS user, who is not reporting-group in-charge, the following pages will always be marked as “0”.
Group Details
Group Summary
Daily Attendance
Member Events
Member Attendance
The above pages will be marked as 1, only if the login user is a reporting group in-charge, and T&A license
is available.
For the field Reporting In-charge, the system will allow all the configured new RIC in the Reporting Group
page for fetching the information.
Example
This example demonstrates a sample request fetching details of the login user in XML format, with details of the
ESS application pages on which the user has, or does not have access rights.
Sample Request:
http://matrixserver/api.svc/v2/loginuser?action=get;format=xml
<DocumentElement>
<LoginUserDetail>
<user-id>2455</user-id>
<user-name>JOBIN SAMUEL</user-name>
<short-name>JOBIN SAMUEL</short-name>
<reporting-in-charge>0</reporting-in-charge>
<gender>male</gender>
<enabled>1</enabled>
<imei>353345052067690</imei>
<imei-authorized>1</imei-authorized>
<attendance-via-ess>0</attendance-via-ess>
<edit-user-details>1</edit-user-details>
<location-mandatory>0</location-mandatory>
<auto-attendance>0</auto-attendance>
<attendance-period>0</attendance-period>
<month-start-end />
<events>1</events>
<holiday-schedule>1</holiday-schedule>
<user-basic-details>1</user-basic-details>
<visitor-preregistration>1</visitor-preregistration>
<daily-attendance>1</daily-attendance>
<attendance-summary>1</attendance-summary>
<attendance-details>1</attendance-details>
<shift-schedule>1</shift-schedule>
<short-leave>1</short-leave>
<attendance-correction>1</attendance-correction>
<leave-balance>1</leave-balance>
<leave-application>1</leave-application>
<tour-application>1</tour-application>
<coff-application>1</coff-application>
<account>1</account>
<menu>1</menu>
<expenditure>1</expenditure>
<transaction-correction>1</transaction-correction>
<group-summary>0</group-summary>
<member-daily-attendance>0</member-daily-attendance>
<member-events>0</member-events>
<member-attendance>0</member-attendance>
<attendance-authorization>0</attendance-authorization>
<short-leave-authorization>0</short-leave-authorization>
<overtime-authorization>0</overtime-authorization>
<leave-approval>0</leave-approval>
<tour-approval>0</tour-approval>
<attendance-correction-authorization>0</attendance-correction-authorization>
<coff-approval>0</coff-approval>
<visitor-preregistration-approval>0</visitor-preregistration-approval>
<cosec-version>V09R01</cosec-version>
</LoginUserDetail>
</DocumentElement>
Changing Password
This API can be used by an ESS user to change the login password.
Action
action=set
Syntax
http://<servername>/api.svc/v2/change-password?action=set;<argument>=<value>…
User Rights
User Rights
ESS Enabled
Parameters
Maximum 15
userid Yes - This is the ESS user’s ID.
characters
For this API, the request header should contain the user’s existing credentials.
For any subsequent API requests, the new password should be submitted.
Generating Password
This API shall be used to set a new password for an ESS user. A new password needs to be set in the following
situation:
• If user forgets his password, and requests server for a new password.
• If a password has not been set by the user.
Action
action=set
Syntax
http://<servername>/api.svc/v2/generate-password?action=set;<argument>=<value>…
User Rights
User Rights
ESS Disabled
For this API, the request header should contain following credentials :
username : MatrixAdmin
password : admin
Parameters
Maximum 15
userid Yes - This is the ESS user’s ID.
characters
This API enables you to retrieve the RSA encryption public key for password encryption from the COSEC server.
Action
action=get
Syntax
http://<servername>/api.svc/v2/encryption-key?action=get;<argument>=<value>...
User Rights
Not Applicable. No COSEC login credentials are required to use this API. Use:
userid = anonymous-user
password = anonymous.
Response Fields
This API can be used to register the IMEI number for any new mobile device on which ESS application needs to be
used.
Action
action=set
Syntax
http://<servername>/api.svc/v2/imei-registration?action=set;<argument>=<value>...
User Rights
User Rights
ESS Enabled.
Parameters
userid upto 15 characters Yes - This will be the login user’s ID.
upto 40 characters.
This will be the IMEI number of the
Allowed characters:
imei Yes - mobile device to be registered for
accessing ESS application.
Alphanumeric
-
This API can be used to send the Location master details as configured on COSEC server to COSEC mobile
applications. The location master will contain Latitude-Longitude, Wi-Fi and Bluetooth details which can uniquely
identify a location.
Action
action=get
Syntax
http://<servername>/api.svc/v2/location-master?action=get;<argument>=<value>...
User Rights
User Rights
ESS Enabled.
When Logged-IN User is System Account User, fetch all configured locations as per request.
1. If "Location Mandatory for Punch" is selected as 'None' or 'Any Location' against logged in user, fetch all
configured locations as per request.
2.If "Location Mandatory for Punch" is selected as 'None' or 'Any Location' or 'Assigned Locations Only'
against logged in user, return response will contain only those locations which are assigned to user.Also
locations belong to assigned location group(s). When a location belongs to multiple location groups, it will
be returned only once.
15 alphanumeric
Char. (for user)
A to Z Userid is to be passed through this
id No
a to z parameter.
0 to 9
/_\\.@:
Response Fields
6 alpha-numeric characters.
Code code
Allowed Characters
A-Z
Location Name
name a-z 50 characters
0-9
-_. ()[]
-180.0000 to
Longitude longitude 9 characters (max.)
180.0000
0 : GPS
1 : Wi-Fi
Type type
2 : BLE-Beacon
3 : BLE-Device
Allowed Characters
A-Z 10 alphanumeric characters
BLE Name ble-name
a-z (max.)
0-9
A-Z
a-z
Address address 0-9 125 chars
!@#$*()_-+[]\:
, . / and space
0 : Attendance
mode mode 1 : Access Control
2 : Both
Should support IP
IP of Panel if device= panel door
address or Domain
IP ip IP of Direct Door if device = direct
Name of Device upto
door
40 characters
This API can be used to send the COSEC Server Details to COSEC Mobile applications. The Server Details will
contain COSEC-Version and Server-Timestamp parameters.
Action
action=get
Syntax
http://<matrixserver>/api.svc/v2/server-details?action=<get>;<argument>=<value>...
User Rights
User Rights
ESS Enabled.
Response Fields
0: Off
Support Multi-Language Input Support-multi-language-input -
1: On
0: Left To Right
Input Alignment Input-alignment -
1: Right To Left
The following APIs enable the user to perform actions related to Field Visit Management -
Action=Get
• Getting Field Visit Schedule
Action=Set
Action=Delete
This API can be used to fetch the user's assigned Field Visit Schedule for specified date-range.
Action
action=get
Syntax
http://<matrixserver>/api.svc/v2/field-visit-schedule?action=<get>;<argument>=<value>...
User Rights
User Rights
ESS Enabled.
Parameters
date-range ddmmyyyy-ddmmyyyy - Current date records The period for which field visit schedule
records is to be requested.
Response Fields
Allowed Characters
A-Z
User ID user-id 15 characters a-z
0-9
/_\\.@:
Allowed Characters
A-Z
Username user-name 45 characters a-z
0-9
-_. ()[]
Allowed Characters
A-Z
Location Code location-code 6 characters
a-z
0-9
Allowed Characters
A-Z
Location Name location-name 50 characters a-z
0-9
-_. ()[]
Allowed Characters
Location Group ID location-group-id 6 characters
0-9
Allowed Characters
A-Z
Location Group Name location-group-name 50 characters a-z
0-9
-_. ()[]
Allowed Characters
A-Z
Remark remark 50 characters a-z
0-9
!@#$&*()_-+[]\:,./
Allowed Characters
A-Z
Scheduled By scheduled-by 10 characters a-z
0-9
/_\\.@:
0: Failure
Transaction Status status
1: Success
Example
Sample Request:
http://matrix-server/api.svc/v2/field-visit-schedule?action=get;userid=1234,5678;date-range=01092015-
02092015
This API shall be used to get the FVM user's FVM punches as per specified Process Date range.
Action
action=get
Syntax
http://<matrixserver>/api.svc/v2/field-visit-punch?action=<get>;<argument>=<value>...
User Rights
User Rights
ESS Enabled.
Parameters
date-range ddmmyyyy-ddmmyyyy - Current date records The period for which field visit schedule
records is to be requested.
Response Fields
Allowed Characters
A-Z
User ID user-id 15 characters a-z
0-9
/_\\.@:
Allowed Characters
A-Z
Username user-name 45 characters a-z
0-9
-_. ()[]
0-In
IO Type iotype
1-Out
Allowed Characters
A-Z
Location Code location-code 6 characters alpha-numeric
a-z
0-9
Allowed Characters
A-Z
Location Name location-name 50 characters a-z
0-9
-_. ()[]
When location is
calculated via GPS. This
Location GPS Latitude gps-latitude 11 characters parameter will contain :
latitude
Example: -77.008123
When location is
calculated via GPS. This
Location GPS Longitude gps-longitude 11 characters parameter will contain :
longitude
Example: -38.889712
When location is
calculated via GSM. This
Location GSM Latitude gsm-latitude 11 characters
parameter will contain :
latitude
When location is
calculated via GSM. This
Location GSM Longitude gsm-longitude 11 characters
parameter will contain :
longitude
When location is
calculated via Wi-Fi. This
Location MAC Address mac-address 17 characters
parameter will contain :
MAC Address of Source
Allowed Characters
0-9
A-Z
Comment comment 50 characters
a-z
!@#$*()_-+[]\:,./
and space
Allowed Characters
BLE Code ble-code 4 characters numeric
0-9
Example
Sample Request:
http://matrix-server/api.svc/v2/field-visit-punch?action=get;userid=1234;date-range=01092015-01102015
This can be used to get the FVM user's field application data for the specific date period.
Action
action=get
Syntax
http://<matrixserver>/api.svc/v2/field-visit-correction?action=<get>;<argument>=<value>...
User Rights
User Rights
Enabled.
The user must have rights on the either of the following pages:
System Account
FVM > Utilities > Field Visit Correction
FVM > Utilities > Field Visit Correction Authorization
Enabled.
The user must have rights on the either of the following ESS pages:
ESS
ESS > Approval/Authorization > Field Visit Correction Authorization
ESS > FVM > Field Visit Correction
Parameters
date-range ddmmyyyy-ddmmyyyy - Current date records The period for which correction
applications are to be fetched.
Response Fields
mm/dd/yyyy
Applied Date and Time applied-date
HH:MM:SS
Allowed characters
A-Z
User ID user-id 15 characters a-z
0-9
/_\\.@:
Allowed Characters
A-Z
User Name user-name 45 characters a-z
0-9
-_. ()[]
1: pending
Application Status application-status 2: approved
3: rejected
mm/dd/yyyy
Previous Punch Time previous-punch-time
HH:MM:SS
0: IN
Previous IO Type previous-iotype
1: OUT
Allowed Characters
A-Z
Previous Location Code previous-location-code 6 characters alpha-numeric
a-z
0-9
Allowed Characters
A-Z
Previous Location Name previous-location-name 50 characters a-z
0-9
-_. ()[]
When location is
calculated via GPS. This
Previous Location GPS
previous-gps-latitude 11 characters parameter will contain :
Latitude
latitude
Example: -77.008123
When location is
calculated via GPS. This
Previous Location GPS
previous-gps-longitude 11 characters parameter will contain :
Longitude
longitude
Example: 38.889712
When location is
Previous Location GSM calculated via GSM. This
previous-gsm-latitude 11 characters
Latitude parameter will contain :
latitude
When location is
Previous Location GSM calculated via GSM. This
previous-gsm-longitude 11 characters
Longitude parameter will contain :
longitude
When location is
Previous Location MAC calculated via Wi-Fi. This
previous-mac-address 17 characters
Address parameter will contain :
MAC Address of Source
Allowed Characters
A-Z
a-z
Previous Comment previous-comment 50 characters
0-9
-.,[]():@$!#*+/\_
[space]
mm/dd/yyyy
Changed Punch Time changed-punch-time
HH:MM:SS
0: IN
Changed IO Type changed-iotype
1: OUT
Allowed Characters
A-Z
Changed Location Code changed-location-code 6 characters alpha-numeric
a-z
0-9
Allowed Characters
A-Z
Changed Location Name changed-location-name 50 characters a-z
0-9
-_. ()[]
Allowed Characters
A-Z
a-z
Changed Comment changed-comment 50 characters
0-9
-.,[]():@$!#*+/\_
[space]
Allowed Characters
A-Z
a-z
Application Reason reason 50 characters
0-9
-.,[]():@$!#*+/\_
[space]
mm/dd/yyyy
Application Verdict Date Time verdict-date
HH:MM
Allowed Characters
A-Z
a-z
Application Approval Remark application-remark Max 50 chars
0-9
-.,[]():@$!#*+/\_
[space]
Allowed Characters
Previous BLE Code previous-ble-code 4 characters numeric
0-9
Max 15 chars
Allowed Characters
Final RIC ID final-ric A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Final RIC Name final-ric-name
a-z
0-9
-_. ()[]
Max 15 chars
Allowed Characters
Non-Final RIC ID nonfinal-ric A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC Name nonfinal-ric-name
a-z
0-9
-_. ()[]
1: pending
Non-Final RIC Verdict nonfinal -ric-verdict
2: authorized
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC Remark nonfinal-ric-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Non-Final RIC2 ID nonfinal-ric2 A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC2 Name nonfinal-ric2-name
a-z
0-9
-_. ()[]
1: pending
Non-Final RIC2 Verdict nonfinal-ric2-verdict
2: authorized
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC2 Remark nonfinal-ric2-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Non-Final RIC3 ID nonfinal-ric3 A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC3 Name nonfinal-ric3-name
a-z
0-9
-_. ()[]
1: pending
Non-Final RIC3 Verdict nonfinal-ric3-verdict
2: authorized
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC3 Remark nonfinal-ric3-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Non-Final RIC4 ID nonfinal-ric4 A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC4 Name nonfinal-ric4-name
a-z
0-9
-_. ()[]
1: pending
Non-Final RIC4 Verdict nonfinal-ric4-verdict
2: authorized
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC4 Remark nonfinal-ric4-remark
a-z
0-9
_.,()[]:@!#$*+/\
Sample Request:
http://192.168.104.12/cosec/api.svc/v2/field-visit-correction?action=get;user-filter=0;userid=FVM1;date-range=21052018-
25052018;Application-status=1
Sample Response:
application-id|applied-date|user-id|user-name|short-name|application-status|attendance-date|punch-index|previous-punch-
time|previous-iotype|previous-location-code|previous-location-name|previous-gps-latitude|previous-gps-longitude|previous-gsm-
latitude|previous-gsm-longitude|previous-mac-address|previous-comment|changed-punch-time|changed-iotype|changed-location-
code|changed-location-name|changed-comment|reason|verdict-date|verdict-by|application-remark|previous-ble-code
1|05/21/2018 14:46:58|FVM1|Jinu|Jinu|1|05/21/2018|1|05/21/2018 12:30:00|0|HO|Head Ofc|+22.2563|+073.1833|||||05/21/2018
12:35:00|0|HO|Head Ofc|Sample delivered|Applied Field Visit Correction||||
<EOT
Action
action=set
Syntax
http://<matrixserver>/api.svc/v2/field-visit-correction?action=<set>;<argument>=<value>...
User Rights
User Rights
Enabled.
The user must have rights on the either of the following pages:
System Account
FVM > Utilities > Field Visit Correction
FVM > Utilities > Field Visit Correction Authorization
Enabled.
The user must have rights on the either of the following ESS pages:
ESS
ESS > Approval/Authorization > Field Visit Correction Authorization
ESS > FVM > Field Visit Correction
Parameters
authorization-required 0: not required No 0 (Not required) Applicable for System Account User
1: required only.
Example1
Sample Request:
To apply for Field Visit correction application for a user from system account login mentioning the requirement of
authorization:
http://192.168.104.12/cosec/api.svc/v2/field-visit-correction?action=set;userid=FVM1;attendance-
date=12022018;punch-time=12022018143500;iotype=0;location-code=HO;authorization-required=1
Sample Response:
This API will be used by a COSEC reporting-incharge user to approve/reject the field visit correction applications submitted by a
particular user.
Action
action=set
Syntax
http://<matrixserver>/api.svc/v2/field-visit-correction-
authorization?action=<set>;<argument>=<value>...
User Rights
User Rights
Enabled.
System Account The user must have rights on the following page:
Enabled.
ESS If Login User is a reporting group in-charge and has the permissions on following page:
Parameters
Alphabets
Remark should not be beyond max limit
Numbers
_-()[].,/\ +!@$*
: and <space>
Sample Request:
http://192.168.104.12/cosec/api.svc/v2/field-visit-correction-authorization?action=set;
Userid=FVM1;application-id=1;Verdict=1;Remark=Correction Approved;
Sample Response:
The FVM correction application will be shown in Approved/Rejected section after the verdict is given.
Action
action=delete
Syntax
http://<matrixserver>/api.svc/v2/field-visit-correction?action=<delete>;<argument>=<value>...
Parameters
The following API enable the user to perform actions related to Job Processing and Costing. This is used to get list
of jobs as per existing Job master, process the job costing of user.
Action= Get
• Getting Jobs list
• Timesheet details
• Get Timesheet Correction Application
Action= Command
• Job Costing Process
Action= Set
• Timesheet Correction Application
• Timesheet Correction Authorization
This API is used to get list of Jobs as per existing Job Master.
Action
action=get
Syntax
http://<matrixserver>/api.svc/v2/job?action=<get/set>;<argument>=<value>...
User Rights
User Rights
Parameters
ID id 1 - 4294967295
Allowed Characters
A-Z,
Job Code job-code 10 characters (max) a-z
0-9
.-_()
Allowed Characters
A-Z
Job Name job-name 30 characters a-z
0-9
-_. ()[]
Allowed Characters
A-Z,
Phase Code phase-code 10 characters (max) a-z
0-9
.-_()
Allowed Characters
A-Z
Phase Name phase-name 30 characters a-z
0-9
-_. ()[]
Allowed Characters
A-Z,
Project Code project-code 10 characters (max) a-z
0-9
.-_()
Allowed Characters
A-Z
Project Name project-name 30 characters a-z
0-9
-_. ()[]
Allowed Characters
A-Z
Cost Centre Name cost-centre-name 30 characters a-z
0-9
-_. ()[]
0= no
Merge Jobs merge-jobs
1= yes
0 = no
Allowance allowance
1 = yes
This API is used to get the user's timesheet data for the specific date period.
Action
action= get
Syntax
http://<matrixserver>/api.svc/v2/timesheet?action=<get>;<argument>=<value>...
User Rights
User Rights
System Account Enabled If User has rights on any of the following Page.
JPC > Utilities> Timesheet Correction
JPC > Utilities> Timesheet Correction Authorization
ESS User Enabled if User has rights on any of the following Page.
ESS > Approval/Authorization > Timesheet Correction Authorization
ESS > Approval/Authorization > Award/Penalty Authorization
ESS > Job Costing > Timesheet Correction Application
Parameters
Response Fields
Allowed Characters
A-Z
User ID user-id upto 15 characters a-z
0-9
/_\\.@:
Allowed Characters
A-Z
Username user-name upto 45 characters a-z
0-9
-_. ()[]
Allowed Characters
A-Z,
Job Code job-code 10 Characters. (max) a-z
0-9
.-_()
Allowed Characters
A-Z,
Phase Code phase-code 10 Characters. (max) a-z
0-9
.-_()
Allowed Characters
A-Z,
Project Code project-code 10 Characters. (max) a-z
0-9
.-_()
0 - Un-Assigned Hours
1 - Job Hours
Transaction Type transaction-type
2-Out Time
3-Break Hours
0 - Award
Adjustment Type adjustment-type
1 - Penalty
Allowed Characters
A-Z
Remark remark 50 characters (max) a-z
0-9
_.,()[]:@!#$*+/\
4294967295 = Job
Reference ID selected =
None
Allowed Characters
A-Z
Job Name job-name 30 Characters a-z
0-9
-_.()[]
This API is used to get the user's timesheet correction application details of the user for the specific date period for
Transaction/Attendance Value = Applied.
Action
action= get
Syntax
http://<matrixserver>/api.svc/v2/timesheet-correction-application?action=<get>;<argument>=<value>...
User Rights
User Rights
System Account Enabled If User has rights on any of the following Page.
ESS User Enabled if User has rights on any of the following Page.
Parameters
The Timesheet Correction Application data will be fetched only if the user meets the following condition:
•User is Active
•User with Attendance Calculation Enabled.
•User with Job Processing & Costing Enabled.
Allowed Characters
A-Z
User ID user-id upto 15 characters a-z
0-9
/_\\.@:
Allowed Characters
A-Z
Username user-name upto 45 characters a-z
0-9
-_. ()[]
mm/dd/yyyy
Application Date Time application-date-time
HH:MM:SS
Allowed Characters
A-Z,
Project Code project-code 10 Characters. (max) a-z
0-9
.-_()
Allowed Characters
A-Z,
Phase Code phase-code 10 Characters. (max) a-z
0-9
.-_()
Allowed Characters
A-Z,
10 Characters. (max)
Job Code job-code a-z
0-9
.-_()
0 - Un-Assigned Hours
1 - Job Hours
Transaction Type transaction-type
2- Out Time
3- Break Hours
0 - Pending
Application Status application-status 1 - Approved
2 - Rejected
Allowed Characters
A-Z
Reason reason 50 characters (max) a-z
0-9
_.,()[]:@!#$*+/\
Allowed Characters
A-Z
Remark remark 50 characters (max) a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Final RIC ID final-ric A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Final RIC Name final-ric-name
a-z
0-9
-_. ()[]
MM/DD/YYYY
Final RIC Verdict Date Time final-ric-verdict-date
HH:MM
1: pending
Provides status of
Final RIC Verdict final-ric-verdict 2: approved
application.
3: rejected
Max 15 chars
Allowed Characters
Non-Final RIC ID nonfinal-ric A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC Name nonfinal-ric-name
a-z
0-9
-_. ()[]
1: pending
Non-Final RIC Verdict nonfinal-ric-verdict 2: approved
3: rejected
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC Remark nonfinal-ric-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Non-Final RIC2 ID nonfinal-ric2 A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC2 Name nonfinal-ric2-name
a-z
0-9
-_. ()[]
1: pending
Non-Final RIC2 Verdict nonfinal-ric2-verdict 2: approved
3: rejected
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC2 Remark nonfinal-ric2-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Non-Final RIC3 ID nonfinal-ric3 A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC3 Name nonfinal-ric3-name
a-z
0-9
-_. ()[]
1: pending
Non-Final RIC3 Verdict nonfinal-ric-verdict 2: approved
3: rejected
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC3 Remark nonfinal-ric3-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Non-Final RIC4 ID nonfinal-ric4 A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC4 Name nonfinal-ric4-name
a-z
0-9
-_. ()[]
1: pending
Non-Final RIC4 Verdict nonfinal-ric4-verdict 2: approved
3: rejected
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC4 Remark nonfinal-ric4-remark
a-z
0-9
_.,()[]:@!#$*+/\
4294967295 = Job
Reference ID selected =
None
Allowed Characters
A-Z
Job Name job-name 30 Characters a-z
0-9
-_.()[]
This API is used for Processing the Job Costing of the Users.
Action
action=command
Syntax
http://<matrixserver>/api.svc/v2/job-costing-process?action=<command>;<argument>=<value>...
User Rights
User Rights
Parameters
or
The process will be executed only if the user meets the following condition:
•User is Active
•User with Attendance Calculation Enable.
•User with Job Processing & Costing Enable.
This API is used for submitting the user's timesheet correction application of the user for the specific date period.
Action
action= set
Syntax
http://<matrixserver>/api.svc/v2/timesheet-correction-application?action=<set>;<argument>=<value>...
User Rights
User Rights
System Account Enabled If User has rights on any of the following Page.
ESS User Enabled if User has rights on any of the following Page.
Parameters
job-count 1-99999 No - -
adjustment-type 0 - Award No -
-
1 - Penalty
remark 50 Char No -
A-Z
a-z
0-9
NA if adjustment-type is not supplied.
!@$&()-_+[]:,./
space
reason 50 Char No -
A-Z
a-z
0-9 Applicable only for Login as ESS User.
space
authorization-required 0: not required No 0 (Not required) Applicable for System Account User
1: required only.
The Timesheet Correction Application will be made only if the user meets the following condition:
•User is Active
•User with Attendance Calculation Enabled.
•User with Job Processing & Costing Enabled.
Example1
Sample Request:
To apply for Timesheet correction application for a user to add the Job Code
http://192.168.104.12/cosec/api.svc/v2/timesheet-correction-
application?action=set;userid=JPC2;attendance-date=12022018;transaction-id=1;job-code=SRS
Sample Response:
Sample Request:
To apply for Timesheet correction application for a user to split the transaction along with the requirement of
authorization.
http://192.168.104.12/cosec/api.svc/v2/timesheet-correction-
application?action=set;userid=JPC2;attendance-date=12022018;transaction-id=1;job-code=SRS;correction-
type=1;split-date-time=120220181130;authorization-required=1
Sample Response:
The application will go to the reporting incharge or administrator for authorization. Once the application is approved,
the transaction will be split by the time mentioned in API as shown below.
Example3
Sample Request:
To apply for Timesheet correction application for a user to change the start and end time of transaction along with
the requirement of authorization.
http://192.168.104.12/cosec/api.svc/v2/timesheet-correction-
application?action=set;userid=JPC2;attendance-date=12022018;transaction-id=1;job-code=SRS;correction-
type=0; start-date-time=120220180930;end-date-time =120220181115;authorization-required=1
Sample Response:
This API is used for the authorization of Timesheet Correction Application & Job Splitting Application.
Action
action=set
Syntax
http://<matrixserver>/api.svc/v2/timesheet-correction-authorization?action=<set>;<argument>=<value>...
User Rights
User Rights
Parameters
Example1
Sample Request:
http://192.168.104.12/cosec/api.svc/v2/timesheet-correction-
authorization?action=set;userid=JPC2;application-id=2;verdict=1;
Sample Response:
The following API enable the user to perform actions related to Visitor Management. This is used to get list of
Vehicle types, Visitor types, Visit types as per the Visit components and APIs for Visitor pre-registration and
approval.
Action= Get
• Getting Vehicle Types
• Getting Visitor Types
• Getting Visit Types
Action= Set
• Visitor Pre-registration Application
Action= Update
• Updating Visitor Pre-registration Application
Action= Delete
• Deleting Visitor Pre-registration application
Action= Set
• Adding Additional Visitor details
Action= Update
• Updating Additional Visitor details
Action= Delete
• Deleting Additional Visitor details
The ESS user who is not authorized host user will be validated for accessing APIs concerned with
Seamless VMS.
Visitor Registration
Action= Set
Action= Get
• Visitor Registration
VMS Setting
Action= Get
• Getting VMS Setting
Action= Set
• Setting VMS Configuration
Visitor API
Action= Get
• Getting Visitor Details
Action= Set
• Set Visitor Details
Action= Delete
• Deleting Visitor Details
OTP Verification
Action= Command
• OTP Verification
This API is used to get the Vehicle types as defined in Visit components of VMS module.
Action
action=get
Syntax
http://<servername>/api.svc/v2/vehicle-type?action=<get>
User Rights
User Rights
System Account Enabled if User has rights on any one of the following Pages.
VMS > Visit Components
VMS > Pre-Registration
VMS > Pre-Registration Approval
Parameters
Response Fields
ID id 0 -9 Max 2 digits
0 = Not Default
Default default
1 = Default is set
Example1
Sample Request:
http://192.168.104.12/cosec/api.svc/v2/vehicle-type?action=get;
Sample Response:
id|name|default
1|None|0
2|2-Wheeler|1
3|4-Wheeler|0
4|3-Wheeler|0
<EOT>
This API is used to get the Visitor types as defined in Visit components of VMS module.
Action
action= get
Syntax
http://<servername>/api.svc/v2/visitor-type?action=<get>
User Rights
User Rights
System Account Enabled if User has rights on any one of the following Pages.
VMS > Visit Components
VMS > Pre-Registration
VMS > Pre-Registration Approval
Parameters
Response Fields
ID id 0 -9 Max 2 digits
0 = Not Default
Default default
1 = Default is set
Example1
http://192.168.104.12/cosec/api.svc/v2/visitor-type?action=get;
Sample Response:
id|name|color-code|default
1|General Visitor||1
2|Supplier||0
3|Interviewee||0
4|Media Personnel||0
5|Technical Personnel||0
6|Courier Personnel||0
7|Customer||0
8|Partner||0
<EOT>
This API is used to get the Visit types as defined in Visit components of VMS module.
Action
action=get
Syntax
http://<servername>/api.svc/v2/visit-type?action=<get>
User Rights
User Rights
System Account Enabled if User has rights on any one of the following Pages.
VMS > Visit Components
VMS > Pre-Registration
VMS > Pre-Registration Approval
Parameters
Response Fields
ID id 0 -9 Max 2 digits
0 = Not Default
Default default
1 = Default is set
Example1
Sample Request:
http://192.168.104.12/cosec/api.svc/v2/visit-type?action=get;
Sample Response:
id|name|default
1|Personal|1
2|Official|0
<EOT>
This API is used to get the visitor pre-registration details for the required date range and specified user filter & user
id.
Action
action=get
Syntax
http://<servername>/api.svc/v2/visitor-pre-registration?action=<get>;<argument>=<value>...
User Rights
User Rights
System Account Enabled if User has rights on any one of the following Pages.
VMS > Pre-Registration
VMS > Pre-Registration Approval
VMS > EPass Approval
Parameters
visitor-id
Not Applicable when Logged IN User is
0-9 No -
Visitor.
0: all
status 1: pending If status is not specified, then "All" is
No 0
2: approved considered by default.
3: rejected
0-9
8 digits (each dynamic- Argument dynamic-id will be ignored
dynamic-id No
id) when appointment-no is passed.
Response Fields
Allowed characters
A-Z
Host User ID host-id 15 characters a-z
0-9
/_\\.@:
Allowed Characters
A-Z
Host User Name host-name 45 characters a-z
0-9
-_. ()[]
0 = No (Not Set)
Send Notification To Visitor send-notification-to-visitor
1 = Yes (Set)
0 = Pending/Applied
Status status 1 = Approved
2 = Rejected
0 = Do Not Repeat
Repeat Mode repeat-mode 1 = Daily
2 = Weekly
1: Sunday
2: Monday
Return repeat days in
3: Tuesday
comma-separated format.
Repeat Days repeat-days 4: Wednesday
5: Thursday
i.e. repeat-days=1,3,5
6: Friday
7: Saturday
6 alpha-numeric
characters.
Location Code location-code If not available, return
blank.
11 characters (max.)
Latitude latitude -90.0000 to +90.0000 If not available, return
blank.
11 characters (max.)
Longitude longitude -180.0000 to +180.0000 If not available, return
blank.
60 Characters
Visitor Address address
30 Characters
Visitor-Country country
30 Characters
ID Proof 1 id-proof1
30 Characters
ID Proof 2 id-proof2
0 = Visitor
Initiated By initiated-by 1 = Host
0 = Visitor
Reschedule By reschedule-by
1 = Host
0 = Visitor
Verdict By verdict-by
1 = Host
0 = Pending
VisitorHostApproval visitor-host-approval 1 = Approved
2 = Rejected
Allowed Characters
A-Z
Cancellation Reason cancellation-reason a-z Max 50 chars.
0-9
_.,()[]:@!#$*+/\
Here,
For visitor valid values = 0 & 5
For Host valid values = 1,2,3,4
Allowed Characters
A-Z
Visit Profile Name visit-profile-name max 45 alphanumeric characters a-z
0-9
-_. ()[]
Allowed characters
A-Z
a-z
Visit State Change By visit-state-change-by 15 characters
0-9
/_\\.@:
0 - Pending
EPass Approval epass-approval 1 - Approved
2 - Rejected
Allowed characters
A-Z
Epass Approval By epass-approval-by a-z 15 characters
0-9
/_\\.@:
Allowed Characters
A-Z
Epass Remark epass-remark a-z Max 30 chars
0-9
_.,()[]:@!#$*+/\
Allowed Characters
A –Z
45 characters
Host Organization host-org a-z
0–9
( ) [ ]_-. /&,@‘[Space]
Allowed Characters
A –Z
Visitor Organization visitor-org a-z 45 characters
0–9
( ) [ ]_-. /&,@‘[Space]
Allowed Characters
A-Z
Location Name location-name a-z 50 characters
0-9
-_. ()[]
max 32 numeric
Host Personal Cell host-personal-cell
characters
max 20 numeric
Host Official Cell host-official-cell
characters
DD/MM/YY
Applied On application-date
HH:MM
Max 15 chars
Allowed Characters
Final RIC ID final-ric A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Final RIC Name final-ric-name
a-z
0-9
-_. ()[]
DD/MM/YYYY
Final RIC Verdict Date Time final-ric-verdict-date
HH:MM
1: pending
Provides status of
Final RIC Verdict final-ric-verdict 2: approved
application.
3: rejected
Max 30 chars
Allowed Characters
A-Z
Final RIC Remark final-ric-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Non-Final RIC ID nonfinal-ric A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC Name nonfinal-ric-name
a-z
0-9
-_. ()[]
1: pending
Non-Final RIC Verdict nonfina-ric-verdict 2: approved
3: rejected
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC Remark nonfinal-ric-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Non-Final RIC2 ID nonfinal-ric2 A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC2 Name nonfinal-ric2-name
a-z
0-9
-_. ()[]
1: pending
Non-Final RIC2 Verdict nonfinal-ric2-verdict 2: approved
3: rejected
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC2 Remark nonfinal-ric2-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Non-Final RIC3 ID nonfinal-ric3 A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC3 Name nonfinal-ric3-name
a-z
0-9
-_. ()[]
1: pending
Non-Final RIC3 Verdict nonfinal-ric3-verdict 2: approved
3: rejected
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC3 Remark nonfinal-ric3-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
Non-Final RIC4 ID nonfinal-ric4 A-Z
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC4 Name nonfinal-ric4-name
a-z
0-9
-_. ()[]
1: pending
Non-Final RIC4 Verdict nonfinal-ric4-verdict 2: approved
3: rejected
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC4 Remark nonfinal-ric4-remark
a-z
0-9
_.,()[]:@!#$*+/\
Format: VXXRXX.XX
Maximum 10 alphanumeric
COSEC Version cosec-version Example: V06R01 ,
characters V06R02 , V05R08.20
Sample Request:
To fetch visitor pre-registration details of the users for whom host user- id is specified.
http://192.168.104.12/cosec/api.svc/v2/visitor-pre-registration?action=get;user-id=1
Sample Response:
appointment-no|visit-date|visit-days|visitor-arrival-time|visiting-hours-per-day|visitor-name|organization-
name|mobile-no|email|visitor-type|visit-type|additional-visitor-count|host-id|host-name|purpose|send-
notification-to-visitor|status|vehicle-registration-no|vehicle-type|vehicle-model|vehicle-color
180112000001|01/16/
2018|1|19:30|02:00|Namrata|Infosys|9687624826|[email protected]|1|1|0|1|Chirag||1|1|GJ06FP7691|2||Bla
ck
<EOT>
Example2
Sample Request:
http://192.168.104.12/cosec/api.svc/v2/visitor-pre-registration?action=get;user-filter=1;user-id=101;
Sample Response:
appointment-no|visit-date|visit-days|visitor-arrival-time|visiting-hours-per-day|visitor-name|organization-
name|mobile-no|email|visitor-type|visit-type|additional-visitor-count|host-id|host-name|purpose|send-
notification-to-visitor|status|vehicle-registration-no|vehicle-type|vehicle-model|vehicle-color
180117000004|01/17/2018|1|17:00|01:00|Meena||9685243158||1|1|0|1|Chirag||0|1||2||
180117000003|01/17/2018|1|16:00|01:00|Rupal||9685243157||1|1|0|1|Chirag||0|1||2||
<EOT>
The Pre-registration applications are shown for the member users (Chirag) who are valid host user and who belong to the reporting
group with reporting incharge id (user id-101) which is used in the API.
Here User ID-101 is for reporting Incharge Khushbu and Chirag is the member of khushbu. So applications where Chirag is host user
will be returned in the API.
This API is used for applying the visitor pre-registration application for the required date and specified user id. The
Visitor Pre-Registration Application will set only if the user is an Authorized Host User.
Action
action= set
Syntax
http://<servername>/api.svc/v2/visitor-pre-registration?action=<set>;<argument>=<value>...
User Rights
Parameters
User Rights
System Account Enabled if User has rights on any one of the following Pages.
VMS > Pre-Registration
VMS > Pre-Registration Approval
VMS > EPass Approval
0 = Do Not No - N -
Repeat
repeat-mode 1 = Daily
2 = Weekly
location 0 =Select No 0 N
1=Configured
Location -
2 = Custom
Location
location-code 6 alpha-numeric No 0 NA
characters.
Mandatory only when location = 1.
latitude -90.0000 to No 0 N
Mandatory only when location = 2.
+90.0000
longitude -180.0000 to No 0 N
+180.0000 Mandatory only when location = 2.
visitor-name 200 characters Yes - Y (Set2) The name of the visitor. Mandatory field
if supplied mobile number is new.
additional- 0-99 No - N
Escort visitor
visitors
host-id 15 alphanumeric No-for ESS - N For ESS users: (Not Mandatory field)
Char. (for user) user
A to Z Yes- for SA 'host-id' should be login ESS user's ID.
a to z user If not supplied, logged In user id will be
0 to 9 set.
/_\\.@:
For SA users: (Mandatory field)
additional- 15 alphanumeric No - N
host Char. (for user)
A to Z
"Multiple hosts User's ID(s) with
a to z
comma-separated format.
0 to 9
i.e. additional-
/_\\.@:
host=1542,1421,1320,1528
Range: Maximum
99 Host Users
purpose 50 characters No - NA
0-9
A-Z
It is the purpose of visit.
a-z
<space>
!@$*()_-+/[]:.
vehicle- 15 Characters No - NA
registration-no A-Z
It is the vehicle number.
a-z
0-9
50 Characters
A-Z
vehicle- a-z
No NA It is the description of vehicle.
description 0-9
<space>
!@$^*()_-+/[].:
Note: If login user is System Account user, and an appointment is submitted using action= set. It will get
automatically approved. (Same as Web Page)
Example1
Sample Request:
To apply for visitor pre-registration through SA user for a valid host user.
http://192.168.104.12/cosec/api.svc/v2/visitor-pre-registration?action=set;visit-date=17012018;visit-
days=1;visitor-arrival-time=1600;visiting-hours-per-day=0100;visitor-name=Rupal;mobile-
no=9685243157;host-id=1;
Sample Response:
Example2
Sample Request:
To apply for visitor pre-registration for ESS user login who is a valid host user.
http://192.168.104.12/cosec/api.svc/v2/visitor-pre-registration?action=set;visit-date=17012018;visit-
days=1;visitor-arrival-time=1700;visiting-hours-per-day=0100;visitor-name=Meena;mobile-no=9685243158;
Sample Response:
The visitor Meena will be pre-registered with host user Id as 101. Because the ESS login ID was 101. You can see the reflection in
Visitor Management module> Pre-Registration.
Example3
Sample Request:
http://192.168.104.12/cosec/api.svc/v2/visitor-pre-registration?action=set;user-type=1;visit-
date=05122018;visit-until-date=31122018;visit-start-time=1100;visit-end-time=1600;visitor-
name=Naman;mobile-no=8766678909;
Sample Response:
Once the visitor is pre-registered successfully (Visitor initiated applications) then it will go to “Visit Approval” to the selected/default
host user.
This API is used for editing the visitor pre-registration application for the required date and specific user id.
Action
action= update
Syntax
http://<servername>/api.svc/v2/visitor-pre-registration?action=<update>;<argument>=<value>...
User Rights
User Rights
System Account Enabled if User has rights on any one of the following Pages.
VMS > Pre-Registration
Parameters
0 = Do Not No - N -
Repeat
repeat-mode 1 = Daily
2 = Weekly
location 0 =Select No 0 N
1=Configured
Not Applicable when Logged IN User is
Location
Visitor
2 = Custom
Location
location-code 6 alpha-numeric No 0 NA
characters.
Mandatory only when location = 1.
latitude -90.0000 to No 0 N
Mandatory only when location = 2.
+90.0000
longitude -180.0000 to No 0 N
+180.0000 Mandatory only when location = 2.
additional- 0-99 No - N
Escort visitor
visitors
additional- Allowed No - N
host characters
A-Z
a-z
0-9
"Multiple hosts User's ID(s) with
/_\\.@:
comma-separated format.
i.e. additional-
Range: Maximum
host=1542,1421,1320,1528
99 Host Users
purpose 50 characters No - NA
It is the purpose of visit.
vehicle- 15 Characters No - NA
registration-no A-Z
It is the vehicle number.
a-z
0-9
vehicle-
50 Characters No - NA It is the description of vehicle.
description
Example1
Sample Request:
http://192.168.104.12/cosec/api.svc/v2/visitor-pre-registration?action=update;appointment-
no=180117000005;visit-date=17012018;visit-days=1;visitor-arrival-time=1730;visiting-hours-per-
day=0100;visitor-name=Meena;mobile-no=9685243158;
Sample Response:
The arrival time of visitor Meena is updated from 17:00 to 17:30 hrs. You can see the reflection in Visitor Management module> Pre-
Registration.
Action
action= delete
Syntax
http://<servername>/api.svc/v2/visitor-pre-registration?action=<delete>;<argument>=<value>...
User Rights
User Rights
System Account Enabled if User has rights on any one of the following Pages.
VMS > Pre-Registration
Parameters
For Visitor:
Visitor can delete only those applications which are initiated by Visitor (Self) and are in pending/applied
state.
This API is used to get the additional visitors details in visitor pre-registration application.
Action
action=get
Syntax
http://<servername>/api.svc/v2/additional-visitors-details?action=<get>;<argument>=<value>...
User Rights
User Rights
System Account Enabled if User has rights on any one of the following Pages.
VMS > Pre-Registration
Parameters
Response Fields
M: Male
Gender gender
F: Female
This API is used to add the additional visitors details in visitor pre-registration application.
Action
action=set
Syntax
http://<servername>/api.svc/v2/additional-visitors-details?action=<set>;<argument>=<value>...
User Rights
User Rights
System Account Enabled if User has rights on any one of the following Pages.
VMS > Pre-Registration
Parameters
Multi
Argument Valid Values Mandatory Default Value Language Description
Support
gender Male - N
Yes Gender of the additional visitor
Female
Sample Request:
http://192.168.104.12/cosec/api.svc/v2/additional-visitors-details?action=set;appointment-
no=180117000005;name=Aditi;gender=Female;
Sample Response:
This API is used to edit the additional visitors details in visitor pre-registration application.
Action
action=update
Syntax
http://<servername>/api.svc/v2/additional-visitors-details?action=<update>;<argument>=<value>...
User Rights
User Rights
System Account Enabled if User has rights on any one of the following Pages.
VMS > Pre-Registration
Parameters
Multi-
Argument Valid Values Mandatory Default Value Language Description
Support
gender Male - N
No Gender of the additional visitor
Female
mobile-no Max 20 No - N
Mobile number of the additional visitor
Characters
This API is used to delete the additional visitors details in visitor pre-registration application.
Action
action=delete
Syntax
http://<servername>/api.svc/v2/additional-visitors-details?action=<delete>;<argument>=<value>...
User Rights
User Rights
System Account Enabled if User has rights on any one of the following Pages.
VMS > Pre-Registration
Parameters
This API is used for approving or rejecting the visitor pre-registration application. The Visitor Pre-Registration
Application will set only if the user is an Authorized Host User.
Action
action= set
Syntax
http://<servername>/api.svc/v2/visitor-pre-registration-approval?action=<set>;<argument>=<value>...
User Rights
User Rights
System Account Enabled if User has rights on any one of the following Pages.
VMS > Pre-Registration Approval
ESS User Enabled if User is RIC user and has rights on the following Pages.
ESS > Approval/Authorization > Pre-Registration Approval
Parameters
Multi
Default
Argument Valid Values Mandatory language Description
Value
Support
Multi
Default
Argument Valid Values Mandatory language Description
Value
Support
Example1
Sample Request:
http://192.168.104.12/cosec/api.svc/v2/visitor-pre-registration-approval?action=set;appointment-
no=180118000001;verdict=1;remark=Application approved
Sample Response:
This API is used for registering the visitor details. It is mandatory to create visitor profile before planning any visit.
So the Visitor Registration API will set details of the visitor.
Action
action= set
Syntax
http://<servername>/api.svc/v2/visitor-registration?action=<set>;<argument>=<value>...
License
System Account Enabled if User has rights on any one of the following Pages.
VMS > Pre-Registration
VMS > Frequent Visitor
ESS User Enabled if User has rights on any one of the following Pages.
ESS > Basic > Visitor Pre Registration
Visitor There should be no restrictions provided for Visitor. It should remain to work without any
authentication.
Parameters
Multilanguage
Argument Valid Values Mandatory Default Value Description
Support
Multilanguage
Argument Valid Values Mandatory Default Value Description
Support
Valid Characters:
A -Z,
a-z,
0 - 9,
#
!@$&.,/*()_-+[]:
<space>
60 Characters -
Valid Values:
A -Z,
address a-z, No Y(Set1) It is the address of visitor
0 - 9,
#
_- ()[].,/
+!@$:&*
<space>
Multilanguage
Argument Valid Values Mandatory Default Value Description
Support
pincode 10 Characters No - N
It is the pincode of visitor
date-of-birth ddmmyyyy No - N
It is date of birth of visitor
is-watchlist 0: No No N
1: Yes
A-Z
a-z
field<no>
0-9
Mandatory field, if 'Active' &
[]().-_ /
(where <no> will vary 'Mandatory' checkbox is
<Space>
from 1 to 10, the user No - NA checked for respective
has to enter any one custom fields in Global
If control type for
number here from 1 Policy.
respected custom
to 5)
fields is selected as
Date in Global
Policy:
ddmmyyyy
When Multi
Language is
enabled, Invalid
character set =
SET1
If OTP is generated for Email ID verification, return Email OTP = 1, otherwise return Email OTP = 0.
Example1
Following are some sample cases for this API:
Sample Request:
http://192.168.104.12/cosec/api.svc/v2/visitor-registration?action=set;visitor-name=Nishit;mobile-
no=9687624826;organization=Samsung;
Sample Response:
The Mobile OTP is generated which is used for verification of the visitor.
action= get
Mobile-number 20 Digits -
Valid Values:
0–9
-+()
Response
A-Z
a-z
Visitor Name visitor-name 200 Characters
0-9
-_. ()[]
0 to 9
Mobile No mobile-no 20 Digits
-+()
125 characters
45 Characters
Valid Characters:
A –Z,
Organization organization a-z, 45 Characters
0 – 9,
_- ()[].,/
+!@$:#&*)
45 Characters
Valid Characters:
A –Z,
Designation designation a-z, 45 Characters
0 – 9,
_- ()[].,/
+!@$:#&*)
60 Characters
Valid Values:
A –Z,
Address address 50 Characters
a-z,
0 – 9,
_- ()[].,/
+!@$:#&*)
30 Characters 30 Characters
A –Z,
ID Proof 1 Id-proof1 a-z,
0 – 9,
_- ()[].,/
+!@$:#&*)
30 Characters 30 Characters
A –Z,
ID Proof 2 id-proof2 a-z,
0 – 9,
_- ()[].,/
+!@$:#&*)
0=not generated --
Mobile OTP mobile-otp
1=generated
0=not generated --
Email OTP email-otp
1=generated
Example in xml:
<?xml version="1.0"
encoding="UTF-8" ?>
<field5>String</field5>
<field6>String</field6>
<uploaded-doc>60,61,64</
uploaded-doc>
This API is used to get details of authorized host user for visitor pre-registration request based on different
parameters.
action= get
Syntax
http://<servername>/api.svc/v2/authorized-host-user?action=<get>;<argument>=<value>...
License
User Rights
User Rights
System Account Enabled if User has rights on any one of the following Pages.
Visitor Management > Utilities > Authorized Host User
ESS User Enabled if User has rights on any one of the following Pages.
ESS > Basic > Visitor Pre Registration
ESS > Approval/Authorization > Pre-Registration Approval
Parameters
If search-
criteria=4, search-criteria = 2
minimum 1 0-9
characters.
search-criteria = 3
All Characters except few special
characters such as &, ', ", <, >, ; & # \
search-criteria = 4
Allowed Characters
A-Z
a-z
0-9
-_. ()[]
Response Fields
0: No
Default-Host default-host -
1: Yes
0-9
Official Mobile No official-mobile-no -
This API is used to get VMS configuration for HOST Users regarding auto transfer & auto approval configuration.
Action
action= get
Syntax
http://<servername>/api.svc/v2/vms-setting?action=<get>;<argument>=<value>...
License
User Rights
User Rights
System Account Enabled if User has rights on any one of the following Pages.
Visitor Management > Utilities > Visit Request Handling
ESS User Enabled if User has rights on any one of the following Pages.
ESS > Visitor Management > Visit Request Handling
Parameters
Response Fields
1: Enable
Auto Transfer auto-transfer -
0: Disabled
1: Enable
Auto Approval-Rejection auto-approval-rejection 0: Disabled -
Range: 0-999
Time in minutes.
Overlapping visit duration
Allow Overlap Time allow-overlap-time 0-9
must be within entered
time to auto approval.
This API is used to set VMS configuration for HOST Users regarding auto transfer & auto approval configuration.
Action
action= set
Syntax
http://<servername>/api.svc/v2/vms-setting?action=<set>;<argument>=<value>...
License
User Rights
User Rights
System Account Enabled if User has rights on any one of the following Pages.
Visitor Management > Utilities > Visit Request Handling
ESS User Enabled if User has rights on any one of the following Pages.
ESS > Visitor Management > Visit Request Handling
Parameters
Default Multilanguage
Argument Valid Values Mandatory Description
Value Support
auto-transfer 1: Enable No - N
-
0: Disabled
auto-approval- 1: Enable No - N
rejection 0: Disabled
Default Multilanguage
Argument Valid Values Mandatory Description
Value Support
This API is used to get Holidays / Unavailable Days for Host User for Visitor initiated Pre-Registration Application.
Action
action= get
Syntax
http://<servername>/api.svc/v2/host-unavailability-days?action=<get>;<argument>=<value>...
License
User Rights
User Rights
System Account Enabled if User has rights on any one of the following Pages.
Visitor Management > Utilities > Visit Request Handling
ESS User Enabled if User has rights on any one of the following Pages.
ESS > Visitor Management > Visit Request Handling
Parameters
Response Fields
Allowed Characters
A-Z 15 characters
User ID user-id a-z
0-9
/_\\.@:
Allowed Characters
A-Z
Name name a-z 45 characters
0-9
-_. ()[]
Allowed Characters:
Unavailability Reason unavailability-reason All Characters except few special Max 30 Characters
characters such as
&, ', ", <, >, ; & #
This API is used to set Holidays / Unavailable Days for Host User for Visitor initiated Pre-Registration Application.
Action
action= set
Syntax
http://<servername>/api.svc/v2/host-unavailability-days?action=<set>;<argument>=<value>...
License
User Rights
User Rights
System Account Enabled if User has rights on any one of the following Pages.
Visitor Management > Utilities > Visit Request Handling
ESS User Enabled if User has rights on any one of the following Pages.
ESS > Visitor Management > Visit Request Handling
Parameters
Multilanguage
Argument Valid Values Mandatory Default Value Description
Support
This API is used to update Holidays / Unavailable Days for Host User for Visitor initiated Pre-Registration
Application.
Action
action= update
Syntax
http://<servername>/api.svc/v2/host-unavailability-days?action=<update>;<argument>=<value>...
License
User Rights
User Rights
System Account Enabled if User has rights on any one of the following Pages.
Visitor Management > Utilities > Visit Request Handling
ESS User Enabled if User has rights on any one of the following Pages.
ESS > Visitor Management > Visit Request Handling
Parameters
Multilanguage
Argument Valid Values Mandatory Default Value Description
Support
0-9 Yes - N
srno
Max 2 Digits
Multilanguage
Argument Valid Values Mandatory Default Value Description
Support
This API is used to delete Holidays / Unavailable Days for Host User for Visitor initiated Pre-Registration
Application.
Action
action= delete
Syntax
http://<servername>/api.svc/v2/host-unavailability-days?action=<delete>;<argument>=<value>...
License
User Rights
User Rights
System Account Enabled if User has rights on any one of the following Pages.
Visitor Management > Utilities > Visit Request Handling
ESS User Enabled if User has rights on any one of the following Pages.
ESS > Visitor Management > Visit Request Handling
Parameters
Action
action= get
Syntax
http://<servername>/api.svc/v2/visitor?action=<get>;<argument>=<value>...
License
User Rights
User Rights
System Account Enabled if User has rights on any one of the following Pages.
VMS > Pre-Registration
VMS > Pre-Registration Approval
ESS User Enabled only for Action= Get and Set, if User has rights on any one of the following Pages.
ESS > Basic > Visitor Pre Registration
ESS > Approval/Authorization > Pre-Registration Approval
Parameters
search-criteria 1: All No 0
2: Mobile-No
Applicable only for visitor-filter = 1
3: Email-Id
4: Name
search-criteria = 3
All Characters except few special
characters such as &, ', ", <, >, ; & #
search-criteria = 4
Allowed Characters
A-Z
a-z
0-9
-_. ()[]
Response Fields
20 Digits
Mobile No mobile-no 0-9
30 Characters
Nationality nationality -
30 Characters
ID Proof 1 Id-proof1 -
30 Characters
ID Proof 2 id-proof2 -
If documents/images are
60: Field1 present in field1,2 and 5
then uploaded-doc should
61: Field2
contain value of field1,
62: Field3 field 2 and 5 be provided
Uploaded Doc uploaded-doc in respective field.
63: Field4 For Example in Jason:
"uploaded-doc":
64: Field5
"60,61,64"
Example in xml:
<?xml version="1.0"
encoding="UTF-8" ?>
<field5>String</field5>
<field6>String</field6>
<uploaded-
doc>60,61,64</uploaded-
doc>
Action
action= set
Syntax
http://<servername>/api.svc/v2/visitor?action=<set>;<argument>=<value>...
License
User Rights
User Rights
System Account Enabled if User has rights on any one of the following Pages.
VMS > Pre-Registration
VMS > Pre-Registration Approval
ESS User Enabled only for Action= Get and Set, if User has rights on any one of the following Pages.
ESS > Basic > Visitor Pre Registration
ESS > Approval/Authorization > Pre-Registration Approval
Parameters
Default Multilanguage
Argument Valid Values Mandatory Description
Value Support
Default Multilanguage
Argument Valid Values Mandatory Description
Value Support
Valid
Characters:
All Characters
except few
special
characters such
as
`~#%^*={}|\\;\"'<
>?
mobile-no 20 Digits No - NA
It is the Mobile number of the visitor.
Valid Values:
0-9
-+()
Default Multilanguage
Argument Valid Values Mandatory Description
Value Support
gender Male, No - NA
It is gender of visitor
Female
date-of-birth ddmmyyyy No - NA
It is date of birth of visitor
Default Multilanguage
Argument Valid Values Mandatory Description
Value Support
If control type
for respected
custom fields is
selected as
Textbox in
Global Policy:
Max 100
Alphanumeric
Characters
field<no> A-Z
a-z Mandatory field, if 'Active' & 'Mandatory'
(where <no> 0-9 checkbox is checked for respective
will vary from []().-_ / custom fields in Global Policy.
1 to 10, the <Space> No - NA
user has to When user-type=Visitor, the fields should
enter any one If control type not be mandatory regardless its value
number here for respected configured in global policy.
from 1 to 5) custom fields is
selected as
Date in Global
Policy:
ddmmyyyy
When Multi
Language is
enabled, Invalid
character set =
SET1
Action
action= delete
Syntax
http://<servername>/api.svc/v2/visitor?action=<delete>;<argument>=<value>...
License
User Rights
User Rights
System Account Enabled if User has rights on any one of the following Pages.
VMS > Pre-Registration
VMS > Pre-Registration Approval
Parameters
Action
action= Get
Syntax
http://<cosec_server>/api.svc/v2/visitor-profile?action=<get>;<argument>=<value>...
License
User Rights
User Rights
Parameters
Note:
If filter=1 is specified and multiple-ids are
passed or any enterprise group is passed,
out of which some of them are inactive,
then do not return those visitor profiles
and vice-versa should also be applicable.
Response Fields
Allowed Characters
A-Z
id Max 15 chars a-z
Id
0-9
/_.@: \
Allowed Characters
A-Z
Name name Max 45 Characters
a-z
0-9
-_. () []
A -Z
a-z
Full Name
0-9
()
[]
_ (underscore)
Full-name Max 200 chars - (Hyphen)
. (full Stop)
/
&
, (comma)
@
'(single quote)
[Space]
Max 15 chars
short-name short-name
Enable/disable visitor
1 – enable bypass bypass the finger
Bypass Finger bypass-finger
0 – disable bypass credential for any access
control feature/rule
Enable/disable visitor
1 – enable bypass bypass the palm credential
Bypass Palm bypass-palm
0 – disable bypass for any access control
feature/rule.
0= None
Enable Offline-Transaction enable-offline-transaction 1= Allow With Discount
2= Allow Without Discount
Action
action= set
Max 45 Characters
short-name should be as per User API No This is the short name field.
0 to 999999999999999
This is the access control system PIN
pin No
number of the Visitor.
Blank
0= unchecked 0= unchecked
allow-ecanteen No
1=checked 1=checked
0 = Prepaid
This parameter determines the Visitor’s
account-type 1= Postpaid No
Cafeteria account type.
OR
OR
OR
OR
OR
OR
OR
OR
OR
OR
OR
OR
OR
OR
OR
OR
OR
OR
OR
OR
Action
action= delete
Return success message in response on successful API execution (only when API has been executed
successfully)
This API is used to fetch the applied invited visitor application details.
Action
action= get
Syntax
http://<servername>/api.svc/v2/Invite-Visitor?action=<get>;<argument>=<value>...
License
COSEC Centra:
· System Account User: Basic (PLT) License + VMS
User Rights
User Rights
System Account Enabled if User has rights on any one of the following Pages.
VMS >Invite Visitor
ESS User Enabled if User has rights on any one of the following Pages.
ESS >Visitor Management > Invite Visitor
Parameters
invite-id 10 digit No -
-
(0-9)
user-filter=1
Applicable for login RIC and SA user.
date-range ddmmyyyy- No -
ddmmyyyy
Valid Values:
dd (Date): 01-31
mm (Month): 01-
12
yyyy (Year):
1900-2099
application-status 0:all No
1: pending
2: approved
3: rejected
4: accessed
5: link expired
Response Fields
A to Z
a to z
Host User ID host-id 15 characters
0 to 9
/_\\.@:
Allowed Characters
A-Z
Host User Name host-name 45 characters a-z
0-9
-_. ()[]
0 =None
repeat-mode 1=Daily Default is 0-None
2=Weekly
Max 15 chars
Allowed Characters
A-Z
Final RIC ID final-ric
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
a-z
Final RIC Name final-ric-name 0-9
-_. ()[]
MM/DD/YYYY
Final RIC Verdict Date Time final-ric-verdict-date
HH:MM
1: Applied
Final RIC Verdict final-ric-verdict 2: Approved
3: Rejected
Max 30 chars
Allowed Characters
A-Z
Final RIC Remark nonfinal-ric-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
A-Z
Non-Final RIC ID nonfinal-ric
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC Name nonfinal-ric-name
a-z
0-9
-_. ()[]
1: Applied
Non-Final RIC Verdict nonfinal-ric-verdict 2: Approved
3: Rejected
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC Remark nonfinal-ric-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
A-Z
Non-Final RIC2 ID nonfinal-ric2
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC2 Name nonfinal-ric2-name
a-z
0-9
-_. ()[]
1: Applied
Non-Final RIC2 Verdict nonfinal-ric2-verdict 2: Approved
3: Rejected
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC2 Remark nonfinal-ric2-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
A-Z
Non-Final RIC3 ID nonfinal-ric3
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC3 Name nonfinal-ric3-name
a-z
0-9
-_. ()[]
1: Applied
Non-Final RIC3 Verdict nonfinal-ric3-verdict 2: Approved
3: Rejected
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC3 Remark nonfinal-ric3-remark
a-z
0-9
_.,()[]:@!#$*+/\
Max 15 chars
Allowed Characters
A-Z
Non-Final RIC4 ID nonfinal-ric4
a-z
0-9
@_ / : .
Max 45 chars
Allowed Characters
A-Z
Non-Final RIC4 Name nonfinal-ric4-name
a-z
0-9
-_. ()[]
1: Applied
Non-Final RIC4 Verdict nonfinal-ric4-verdict 2: Approved
3: Rejected
Max 30 chars
Allowed Characters
A-Z
Non-Final RIC4 Remark nonfinal-ric4-remark
a-z
0-9
_.,()[]:@!#$*+/\
This API is used for host to generate an alert on the server to send the invite along with the configuration file to the
visitor.
Action
action= set
Syntax
http://<servername>/api.svc/v2/Invite-Visitor?action=<set>;<argument>=<value>...
License
COSEC Centra:
· System Account User: Basic (PLT) License + VMS
User Rights
User Rights
System Account Enabled if User has rights on any one of the following Pages.
VMS >Invite Visitor
ESS User Enabled if User has rights on any one of the following Pages.
ESS >Visitor Management > Invite Visitor
Parameters
Default Multilanguage
Argument Valid Values Mandatory Description
Value Support
Valid Charac-
ters:
A-Z
a-z
0-9
-_. ()[]
Default Multilanguage
Argument Valid Values Mandatory Description
Value Support
- + ()
visit-date ddmmyyyy No - N
The date for which application is being
Range: submitted.
Current Date to
31/12/2037
visit-until-date ddmmyyyy No - N
Range:
Current Date to
31/12/2037
repeat-mode 0 = Do Not No - N
Repeat
1 = Daily
2 = Weekly
visit-start-time hhmm No - N
Range:
00:00 – 23:59
visit-end-time hhmm No - N
Range:
00:00 – 23:59
additional 0-99 No - N
visitors
purpose 50 characters
(same as used
fro visitor pre- - Y If not supplied, then it should be ‘NULL’.
registration API
)
Example:
This API is used for host to approve / reject/transfer visit initiated or rescheduled by Visitor and for Visitor to
approve/reject Visit Initiated or rescheduled by Host.
Action
action= set
Syntax
http://<servername>/api.svc/v2/visitor-invites-approval?action=<set>;<argument>=<value>...
License
COSEC Centra:
· System Account User: Basic + VMS
User Rights
User Rights
System Account User Enabled if System account user has view and edit rights on
Visitor Management > Visit Approval
Parameters
Default Multilanguage
Argument Valid Values Mandatory Description
Value Support
appointment- Max 12 Digits Yes - N The user can select multiple appointment-
no no, each separated by ", (comma)"
0-9 e.g.:"171212000001, 171212000003,
171213000007…". For "Approve All" /
"Reject All"/"Transfer All" to Approve/
Reject/transfer multiple visitors invite
applications.
Default Multilanguage
Argument Valid Values Mandatory Description
Value Support
visit-location 0 : Select No 0 N
Applicable only when user-type = 0 and
1: Configured
verdict =1
2: custom
Range:
Maximum 99
Host Users
<space>
Default Multilanguage
Argument Valid Values Mandatory Description
Value Support
In this API, as we can add maximum upto 99 additional host users, there is a possibility that it will lead to
exceed maximum URL limit. So in such case server will throw an exception.
This API is used by the security (system account user) to give verdict on application which is in approved state for
allowing visitor to generate E-Pass.
Action
action= set
Syntax
http://<servername>/api.svc/v2/security-approval?action=<set>;<argument>=<value>...
License
User Rights
User Rights
Parameters
This API is used to update state of any visit. This API is applicable for both Host & visitor, any of them can update
possible Visit State.
Action
action= set
Syntax
http://<servername>/api.svc/v2/visit-state?action=<set>;<argument>=<value>...
License
User Rights
User Rights
System Account User (security) Enabled if User has VMS Utility rights
Parameters
Response:
When state-change = 0 and single appointment-no is passed, return visitor-profile-id and visitor-profile-name in
response on successful API execution.
Example: success: 1180100001: saved successfully. Visitor Profile ID = < visitor-profile-id>, Visitor Profile Name =
< visitor-profile-name>
This API is used to get the System Account user information of logged in user.
Action
action= get
Syntax
http://<servername>/api.svc/v2/system-account-user?action=<get>;<argument>=<value>...
License
Response Fields
If logged in system
account user has VMS
0 = Disabled
VMS Utility Rights vms-utility-rights Utility rights, then this
1 = Enabled
should return as 1,
otherwise 0.
Format: VXXRXX.XX
Maximum 10 alphanumeric
COSEC Version cosec-version Example: V06R01 ,
characters
V06R02 , V05R08.20
This API is used to verify the visitor for visitor registration and also to verify ESS user when he is trying to change/
set his account password.
Action
action= command
Syntax
http://<servername>/api.svc/v2/otp-verification?action=<command>;<argument>=<value>...
License
COSEC Centra:
• System Account User: Basic (PLT) License + VMS
• ESS User: BASIC + ESS + VMS
• Visitor User: Basic + VMS
• Apply license based on user-type defined below. If User-type=0, VMS license is not mandatory. If User-
type=1, VMS license is mandatory
User Rights
Parameters
type 0 = Verify No 0
1 = Resend
2= Validate
To verify the OTP or Resend the OTP
3= Resend for
validation
When 1-visitor
Consider for contact details verification
When the OTP verification for user-type=0 is successful update the value of the parameter “user verified for
password” from 1 to 0 again.
Example1
Following are some sample cases for this API:
Sample Request:
http://192.168.104.12/cosec/api.svc/v2/otp-verification?action=command;type=0;mobile-otp=434655;visitor-id=2;
Sample Response:
The generated token must be saved as it will be used as Password for Pre-registration of the visitor.
This API is used to fetch the visitor tenant identifier from Global Policy of COSEC Server.
Action
action= get
Syntax
http://<servername>/api.svc/v2/tenant-identifier?action=<get>;<argument>=<value>...
License
COSEC Centra:
• System Account User: Basic (PLT) License + VMS
• ESS User: BASIC + ESS + VMS
• Visitor User: Basic + VMS
User Rights
User Rights
Parameters
Response Fields
The following API enable the user to perform actions related to Contract Worker Management. This is used to get
list of Contractor, Work Order etc as per the requirement.
Contractor APIs
Worker APIs
Action
action=get
Syntax
http://<servername>/api.svc/v2/contractor?action=<get>
License
User Rights
User Rights
Parameters
Response Fields
Allowed Characters
A-Z
ID id Max 15 alphanumeric characters a-z
0-9
/_.@:
Allowed Characters
A-Z
a-z
Name name max 45 alphanumeric characters
0-9
<space>
-_. ()[]
A-Z
a-z
Address-1 address-1 30 chars 0-9
!*@$()_-+[]:,./
<Space>
A-Z
a-z
Address-2 address-2 30 chars 0-9
!*@$()_-+[]:,./
<Space>
A-Z
a-z
Street street 30 chars 0-9
!*@$()_-+[]:,./
<Space>
A-Z
a-z
City city 30 chars 0-9
!*@$()_-+[]:,./
<Space>
A-Z
a-z
State state 40 chars 0-9
!*@$()_-+[]:,./
<Space>
A-Z
a-z
Country country 20 chars 0-9
!*@$()_-+[]:,./
<Space>
0-9
Phone phone 30 chars +()-
Allowed Characters
A-Z
a-z
Contact Person 1 contact-person1 max 45 alphanumeric characters 0-9
<space>
-_. ()[]
0-9
Mobile mobile-1 32 characters +()-
Allowed Characters
A-Z
a-z
Contact Person 2 contact-person2 max 45 alphanumeric characters
0-9
<space>
-_. ()[]
0-9
Mobile mobile-2 32 characters +()-
A-Z
a-z
PF No. pf-no Max 30 Alphanumeric Characters 0-9
!*@$()_-+[]:,./
<Space>
A-Z
a-z
PAN No. pan Max 30 Alphanumeric Characters 0-9
!*@$()_-+[]:,./
<Space>
A-Z
a-z
Service Tax No. service-tax-no Max 30 Alphanumeric Characters 0-9
!*@$()_-+[]:,./
<Space>
A-Z
a-z
ESIC No. esic-no Max 31 Alphanumeric Characters 0-9
!*@$()_-+[]:,./
<Space>
A-Z
a-z
License No. license-no Max 30 Alphanumeric Characters 0-9
!*@$()_-+[]:,./
<Space>
0 : Not Blacklisted
Blacklisted Blacklisted
1 : Blacklisted
Max 50 chars
Valid Values :
A-Z
Blacklisted reason Blacklisted-reason a-z
0-9
[space]
!@$*()_-+\[],.:
Action
action= set
Syntax
http://<servername>/api.svc/v2/contractor?action=<set>
License
User Rights
User Rights
Parameters
A-Z
Address-1
a-z
0-9
!*@$()_-+[]:,./
<Space>
a-z
0-9
!*@$()_-+[]:,./
<Space>
A-Z
a-z
0-9
!*@$()_-+[]:,./
<Space>
A-Z
a-z Enter the Name of City
0-9
!*@$()_-+[]:,./
<Space>
A-Z
a-z
0-9
!*@$()_-+[]:,./
<Space>
A-Z
a-z
0-9
!*@$()_-+[]:,./
<Space>
mobile-2 max 32 No - N
numeric
characters The Mobile Number of the Contractor.
0-9
+()-
Action
action=delete
Syntax
http://<servername>/api.svc/v2/contractor?action=<get>
User Rights
User Rights
Parameters
15 chars
Allowed
Characters:
id A-Z Yes - -
a-z
0-9
/_.@:
Action
action= get
Syntax
http://<servername>/cosec/api.svc/v2/work-order?action=<get>
License
User Rights
User Rights
Parameters
Allowed Characters
A-Z
a-z
0-9
/_.@:
Response Fields
Allowed Characters
A-Z
a-z
Work Order id id Max 15 alphanumeric characters
0-9
/_.@:
Allowed Characters
A-Z
a-z
Name name max 45 alphanumeric characters
0-9
-_. ()[]
Allowed characters
Returns the ID of
Associated Contractor associated-contractor-id A-Z
contractor
a-z
0-9
/_.@:
Action
action= set
Syntax
http://<servername>/api.svc/v2/work-order?action=<set>
License
Parameters
Max 15
alphanumeric
This is the Work-order Id.
characters
Max 15 chars -
Allowed
prefix Characters No
A-Z
a-z
0-9
@_ / :
Zero-padding 0: unchecked No 1
1: checked
Allowed
name Characters Yes
A-Z
a-z
0-9
_-[].()
Max 3 chars -
work-order-type No -
1-999
ddmmyyyy -
ddmmyyyy -
Max 15 chars -
Allowed values:
associated-
A-Z Yes -
contractor-id
a-z
0-9
@_:./
Max 6 characters -
organization No -
1-999999
Max 6 characters -
branch No -
1-999999
Max 6 characters -
department No -
1-999999
A-Z -
a-z
Description 0-9 No -
@!$*()_-+[]:
, . / [space]
Action
action= delete
Syntax
http://<servername>/api.svc/v2/work-order?action=<delete>
License
User Rights
User Rights
Parameters
Max 15
alphanumeric
characters
Allowed
id Characters: Yes - -
A-Z
a-z
0-9
/_.@:
Action
action=get
Syntax
http://<servername>/api.svc/v2/worker?action=<get>
License
User Rights
User Rights
Parameters
Field-name field-1 No These are the fields that can be specified to fetch
field-2 worker's specific data.
field-3
field-4
Default value = 0.
Conditions:
1.Argument mentioned, but value not specified,
then ignore this parameter.
Note:
Response Fields
Allowed Characters
A-Z
Id id Max 15 alphanumeric characters a-z
0-9
/_.@:
0: Inactive
1 : Active
Active active 0 or 1 or 2
2 : Inactive and Revoke
Devices
Allowed Characters
A -Z
a-z
0-9
()
[]
_ (underscore)
Full-name full-name max200 alphanumeric characters - (Hyphen)
. (full Stop)
/
, (comma)
@
' (single quote)
[Space]
ddmmyyyy format
Leaving Date Leaving-date
Allowed characters
A-Z
a-z
Reason for Leaving Max 15 Alphanumeric Characters
Reason-for-leaving 0-9
!*@$()_-+[]:,./
<Space>
A-Z
a-z
0-9
Driving License Max 30 Alphanumeric Characters
driving-license !*@$()_-+[]:,./
<Space>
A-Z
a-z
Passport No. Max 30 Alphanumeric Characters
passport-no 0-9
!*@$()_-+[]:,./
<Space>
A-Z
a-z
Max 30 Alphanumeric Characters
PAN No. pan 0-9
!*@$()_-+[]:,./
<Space>
.A-Z
a-z
0-9
PF No pf-no Max 30 Alphanumeric Characters
!*@$()_-+[]:,./
<Space>
A-Z
a-z
.Max 30 Alphanumeric
ESI No esi-no 0-9
Characters
!*@$()_-+[]:,./
<Space>
A-Z
Voter ID voter-id max 10 alphanumeric characters a-z
0-9
A-Z
a-z
Visa No. visa-no Max 30 Alphanumeric Characters 0-9
!*@$()_-+[]:,./
<Space>
A-Z
a-z
20 chars
Nationality nationality 0-9
!*@$()_-+[]:,./
<Space>
A-Z
a-z
Qualification qualification 50 chars 0-9
!*@$()_-+[]:,./
<Space>
A-Z
a-z
Experience experience 50 chars 0-9
!*@$()_-+[]:,./
<Space>
NA
M
Gender gender
F
+NA,A+,A-,B+,B-,AB+,AB-,o+,o-
Blood Group blood-group ,A1-,A1+, A1B-, A1B+,A2-
,A2+,A2B-,A2B+,B1
A-Z
a-z
Father/Spouse Namefather-spouse-name 30 chars 0-9
!*@$()_-+[]:,./
<Space>
numeric characters + ( ) -
Personal Cell personal-cell max 32 numeric characters Comma for separting
multiple mobile nos.
alphanumeric characters
max 100 alphanumeric
Personal E-mail personal-email @-.
characters.
numeric characters + ( ) -
Comma for separting
Official Cell official-cell max 32 numeric characters
multiple mobile nos.
A-Z
a-z
Local Address1 local-address1 30 chars 0-9
!*@$()_-+[]:,./
<Space>
A-Z
a-z
Local State local-state 40 chars 0-9
!*@$()_-+[]:,./
<Space>
A-Z
a-z
0-9
Local Country local-country 20 chars
!*@$()_-+[]:,./
<Space>
A-Z
a-z
0-9
Permanent Address1 permanent-address1 30 chars
!*@$()_-+[]:,./
<Space>
A-Z
a-z
Permanent Address2 permanent-address2 30 chars 0-9
!*@$()_-+[]:,./
<Space>
A-Z
a-z
Permanent Street permanent-street 30 chars 0-9
!*@$()_-+[]:,./
<Space>
A-Z
a-z
Permanent City permanent-city 40 chars 0-9
!*@$()_-+[]:,./
<Space>
A-Z
a-z
Permanent State permanent-state 40 chars 0-9
!*@$()_-+[]:,./
<Space>
A-Z
a-z
Permanent Country permanent-country 20 chars 0-9
!*@$()_-+[]:,./
<Space>
1-999999
Section ID section
1-999999
Grade ID grade
customgroup1ID 1-999999
Custom group 1 ID
customgroup2ID
Custom group 2 ID 1-999999
1-999999
Custom group 3 ID customgroup3ID
Roaming-user-flg Roaming-user-flg 0 or 1
1 : enabled
Attendance Calculation attendance-calc
0 : disabled
1 to 99
Overtime Policy overtime-policy
Valid values
A-Z
Contractor ID ContractorID Max 15 chars a-z
0-9
@_\:.
Valid Values
A-Z
Work Order ID WorkorderID Max 15 chars a-z
0-9
@_\:.
0 : Disabled
Door Access Through API door-access-api
1 : Enabled
Max 50 chars
Valid Values :
A-Z
Blacklisted reason
Blacklisted-reason a-z
0-9
[space]
!@$*()_-+\[],.:
Valid Characters :
A-Z
Max 100 characters a-z
Custom Field 1 -10 field1-10
ddmmyyyy 0-9
space
[]().-_/
Action
action=set
Syntax
http://<servername>/api.svc/v2/worker?action=<set>
License
User Rights
User Rights
Parameters
Multi-
Language Default
Argument Valid Values Mandatory Description
Character Value
set
Auto- 1-15 N NA
generation-
serial-length
Multi-
Language Default
Argument Valid Values Mandatory Description
Character Value
set
If name /full
name is
supplied
This is the short name of worker Allowed
then first 15
Characters
characters
Max 15 A-Z
eliminating
short-name Alphanumeric No Set 2 a-z
invalid
Characters 0-9
values will
-
be set as
.
default
svalue of
short-name
Valid values:
!@#$
*()_-
max 20 +[] \
integration -
alphanumeric N NA .,
reference
characters /
A-Z
a-z
0-9
Multi-
Language Default
Argument Valid Values Mandatory Description
Character Value
set
birthday- 0=Unchecked
0 or 1 No N 0
message-flg 1=Checked
This is the
unique This is the joining date of the worker.
Reference
joining-date ddmmyyyy formate N Blank
code for Note: - joining-date should be higher than
every User. date-of-birth.
Yes (if
This is the date of leaving of the worker.
reason for
ddmmyyyy format
leaving-date leaving to be N blank
Note: - leaving-date shall not be lower than
configured)
joining-date.
Multi-
Language Default
Argument Valid Values Mandatory Description
Character Value
set
max 12 numeric
uan No N blank This is the UAN of the user
characters
Multi-
Language Default
Argument Valid Values Mandatory Description
Character Value
set
NA
M
gender No N NA This is the gender of the user.
F
+NA,A+,A-,B+,B-
,AB+,AB-,o+,o-
,A1-,A1+, A1B-, This is the blood group of the worker
blood-group No N NA
A1B+,A2-
,A2+,A2B-
,A2B+,B1
max 50
medical- This is the medical history of the worker
alphanumeric No Set 2 blank
history
characters
married,unmarried,
marital-status No N NA This is the marital status of the worker
na
max 30 numeric
official-phone No N blank numeric characters or -
characters
Multi-
Language Default
Argument Valid Values Mandatory Description
Character Value
set
No N blank
local-pin-code max 10 numeric
characters
A-Z
a-z
local-state 40 chars No Set 1 Blank 0-9
!*@$()_-+[]:,./
<Space>
A-Z
a-z
0-9
local-country 20 chars No Set 1 Blank
!*@$()_-+[]:,./
<Space>
A-Z
a-z
permanent- 0-9
30 chars No Set 1 Blank
address1 !*@$()_-+[]:,./
<Space>
A-Z
a-z
permanent-
30 chars No Set 1 Blank 0-9
address2
!*@$()_-+[]:,./
<Space>
Multi-
Language Default
Argument Valid Values Mandatory Description
Character Value
set
A-Z
a-z
permanent-
30 chars No Set 1 Blank 0-9
street
!*@$()_-+[]:,./
<Space>
A-Z
a-z
permanent-city 40 chars No Set 1 Blank 0-9
!*@$()_-+[]:,./
<Space>
A-Z
a-z
permanent-
40 chars No Set 1 Blank 0-9
state
!*@$()_-+[]:,./
<Space>
A-Z
a-z
permanent-
20 chars No Set 1 Blank 0-9
country
!*@$()_-+[]:,./
<Space>
Default orga-
nization of
respective
system
account user
who is creat-
ing/updating
worker
organization 1-999999 No N This is the ‘Organization’ of the worker.
OR
Default orga-
nization
defined in
Enterprise
structure
Default
branch of
respective
system
account user
who is creat-
ing/updating
worker This is the ‘branch’ of the worker.
branch 1-999999 No N
OR
Default
branch
defined in
Enterprise
structure
Multi-
Language Default
Argument Valid Values Mandatory Description
Character Value
set
Default
department
of respec-
tive system
account user
who is creat-
ing/updating
worker This is the ‘department’ of the worker.
department 1-999999 No N
OR
Default
department
defined in
Enterprise
structure
Default sec-
tion of
respective
system
account user
who is creat-
ing/updating
1-999999 worker This is the ‘section’ of the worker.
section No N
OR
Default sec-
tion defined
in Enter-
prise struc-
ture
Default cate-
gory of
respective
system
account user
who is creat-
ing/updating
worker This is the ‘category’ of the worker.
category 1-999999 No N
OR
Default cate-
gory defined
in Enter-
prise struc-
ture
Multi-
Language Default
Argument Valid Values Mandatory Description
Character Value
set
Default
grade of
respective
system
account user
who is creat-
ing/updating
1-999999 worker This is the ‘grade’ of the worker.
grade No N
OR
Default
grade
defined in
Enterprise
structure
Default des-
ignation of
respective
system
account user
who is creat-
ing/updating
worker This is the ‘designation’ of the worker.
designation 1-999999 No N
OR
Default des-
ignation
defined in
Enterprise
structure
Default cus-
tomgroup1id
of respec-
tive system
account user
who is creat-
ing/updating
customgroup 1-999999 worker This is the ‘custom-group 1’ of the worker.
N
1D
OR
Default cus-
tom group 1
defined in
Enterprise
structure
Multi-
Language Default
Argument Valid Values Mandatory Description
Character Value
set
Default cus-
tomgroup2id
of respec-
tive system
account user
who is creat-
ing/updating
customgroup 2 worker This is the ‘custom-group 2’ of the worker.
1-999999 N
ID
OR
Default cus-
tom group 2
defined in
Enterprise
structure
Default cus-
tomgroup3id
of respec-
tive system
account user
who is creat-
ing/updating
customgroup 3 1-999999 worker This is the ‘custom-group 3’ of the worker.
N
ID
OR
Default cus-
tom group 3
defined in
Enterprise
structure
roaming-user-
0 or 1 No N 0 This is for roaming worker
flg
Multi-
Language Default
Argument Valid Values Mandatory Description
Character Value
set
max 20 numeric
characters
card-1 No N
max 21 charac-
ters= 20 numeric +
comma
max 20 numeric
characters
card-2 No N
max 21 charac-
ters= 20 numeric +
comma
max 2 alpha-
Start Shift No N This is thestart shift of the worker
numeric characters
Holiday
1 to 99 No N This is the holiday schedule of the worker
Schedule
Multi-
Language Default
Argument Valid Values Mandatory Description
Character Value
set
Work
This is the assignment start period of work
Order's
Assignment- assigned to worker. If the entered start date is
ddmmyyyy N validity start
start date greater than work order's end date then fail
date
message will returned.
Work
This is the assignment period of work
Order's
Assignment- assigned to worker.If the entered end date is
ddmmyyyy validity end
end date less than current date then fail message will
date
be returned.
pin-authentica- 0 : Disabled
No N 0
tion 1 : Enabled
driving- ddmmyyyy
No N - This is the date of expiry of Driving License
license-expiry
passport-
expiry ddmmyyyy -
No N This is the date of expiry of Passport.
Max 50 Chars
A-Z
Blacklisted- a-z
This specifies the reason for being black-
reason 0-9 No - -
listed.
[space]
!@$*()_-+\[]
,.:
Multi-
Language Default
Argument Valid Values Mandatory Description
Character Value
set
Max 100
Alphanumeric
Characters:
A-Z
field <no>
a-z
0-9 This is to set value in custom fields.
(where <no>
will vary from 1 []().-_ /
<Space> If field is mandatory; and some value is
to 10, the user - -
already stored in DB for this field, then not
has to enter No
necessary to pass this argument in API
any one If control type for
syntax again
number here respeted custom
from 1 to 10) fields is selected
as Date in Global
Policy:
ddmmyyyy
When Multi
Language is
enabled, Invalid
character set =
SET1
Example:
success: 1060100001: saved successfully. Worker ID = <WorkerID>
If maximum limit in case of IDs is reached, for e.g., if auto – generation serial length=2 and zero-
padding =1, and all IDs from 00 to 99 are already existing, then return message : “failed: 1060203005
: Maximum limit reached for this configuration for ID creation”
If Contractor-id is updated and Work-order is set to ‘Null’, which further on set Assignment Start Date and
Assignment End Date as ‘NULL’.
While creating new worker, If active =0 is mentioned and any of the CWM related fields (Skill ID,
Contractor ID, Work order ID, Assignment Start Date, assignment end Date) is/are mentioned then return
message: “failed : 1060203002 : CWM related parameters cannot be added for inactive worker“
When ID is auto generated (by auto generate User ID flag in global policy) and maximum limit is reached,
then return message: “failed : 1060203005 : Maximum ID Creation limit reached by Auto Generation
process. ”
Action
action=delete
Syntax
http://<servername>/api.svc/v2/worker?action=<delete>
License
User Rights
User Rights
Parameters
Default
Argument Valid Values Mandatory Description
Value
id 15 chars yes This is worker id.If values other than the valid
Allowed values are entered, then fail message will be
Characters returned.
A-Z
a-z
0-9
/_.@:
This API is used to send the alert to the configured COSEC Server on completion of scheduled Integrate Process
as well as Retry Process.
Action = Command
This API is used to send the alert to the COSEC server after the completion of schedule process in Integrate.
Action
action= command
Syntax
http://<servername>/api.svc/v2/integrate-alert?action=<command>;<argument>=<value>...
User Rights
User Rights
Parameters
Yes
only if COSEC
It will fetch and send the total number
Integrate >Schedule>
Previously-failed-total 0-9(valid values) - of records that were failed in previous
Include Previously
scheduled process to COSEC server
Failed is enabled and
checked
Yes
It will fetch and send the number of
only if COSEC
records(that were failed in previous
Integrate >Schedule>
previous-succeeded 0-9(valid values) - scheduled process but successfully
Include Previously
transferred in current scheduled
Failed is enabled and
process) to COSEC server
checked
This API is a common API which can invoke multiple APIs from a single POST request.
Syntax
http://<servername>/api.svc/v2/multipleapi?
License Required
User Rights
User Rights
Parameters
0 = Host User / SA
User If value not supplied, default 0 will be
user-type No 0
1 = Visitor considered.
Every time a request is received the syntax, format and the supported authentication shall be validated prior to
generating a response. This chapter discusses the response structure of COSEC Web APIs. The API response
shall consist of the following:
• Response Message
• Response Code
Response Messages
The called HTTP request shall be parsed by the system before it returns an appropriate response depending on the
nature of success or failure. Some common response messages are as follows:
• If a request is successful:
Response Codes
Every COSEC API response message is accompanied by a 10 digit numeric response code. The response code is
structured as follows:
• API Code - Digits 1-3. Valid values: 000-999. Identifies the API (See Table).
• Action Code - Digits 4-5. Valid values: 00-99. Identifies the Action requested (See Table).
• Category Code - Digits 6-7. Valid values: 00-99. Identifies the category of response (See Table).
• Actual Response Code - Digits 8-10. Valid values: 000-999. Identifies the actual response (See Table).
none 000
attendance-daily 001
attendance-monthly 002
event-ta 003
event-ta-date 004
event-acs 005
event-acs-date 006
user 007
device 008
organization 009
branch 010
designation 011
section 012
department 013
category 014
grade 015
group-rename-list 016
template-list 017
template-details 018
import-template-list 019
import-template-details 020
events 021
accessroutemaster 022
accessroutedetails 023
site 024
event-others 025
device-commands 026
device-users 027
datatransfer 028
template-data 029
leave-balance 030
leave-group 031
leave-details 032
leave-application 033
leave-approval 034
holiday 035
group-members 036
attendance-correction 037
canteen-account-details 038
canteen-expenditure-summary 039
canteen-menus 040
canteen-menus-schedule 041
canteen-correction-application 042
shift-schedule 043
shift-details 044
notifications 045
loginuser 046
attendance-correction-approval 047
short-leave-entry 048
short-leave-authorization 049
attendance-authorization 050
ot-coff-authorization 051
encryption-key 052
coff-details 053
search-user 054
in-out-reasons 055
canteen-expenditure-details 056
change-password 058
imei-registration 059
coff-balance 060
monthly-process 061
Mandatory parameter is
01 003
Parameter missing
Wrong/Unexpected
Invalid Command 03 001
parameter Values
Restrictions or checks on
Invalid Command 03 002
parameter value
Parameter combination
Invalid Command 03 003
violation
Process Failure/Exception/
Invalid Command 03 008
Error
Example
Sample Request:
http://matrixserver/api.svc/v2/organization?action=set;code=Apex;name=Apex Industries
Sample Response:
In the following example, the API requests a user’s profile to be updated with ‘date of birth’. However the ‘id’
argument is left without a value.
Sample Request:
http://matrixserver/api.svc/v2/user?action=set;id=;date-of-birth=22061978
Sample Response:
• Response Messages accompanying a Response Code are descriptive and may vary or change
depending on the parameters, values etc. of the particular case in question. Third party applications
should use only Response codes for decision making.
• In each API response, a specific validation message may also appear depending on the API,
access rights, device rights etc. For e.g. “User is not a Reporting Group In-Charge”, “Insufficient
User Rights” or “Authorization not allowed for Dates later than current date” etc.
This shall be used to get server’s configured symptoms, their threshold values & warning message.
Action
action=get
Syntax
http://<servername>/api.svc/v2/symptoms?action=<get>
License Requirement:
COSEC Centra:
User Rights
User Rights
ESS Enabled
Response Field
Response should be the configured values in server at Admin, User, Temperature and Threshold Configuration. The
response will contain the following fields:
This shall be used to get the user’s declared Health Records data for the specific date-range, and to submit new Self-
Declaration for Temperature and Symptoms.
Action
Syntax
http://<servername>/api.svc/v2/health-declaration?action=<get/set/update>;<argument>=<value>...
License Requirement
ESS License. If license is not available, return message: “License not available for this API.”
COSEC Centra:
· ESS User: BASIC + ESS
If license is not available, return message: “License not available for this API.”
User Rights
User Rights
ESS Enabled if User has ESS enabled and has User Rights
on the following Page:
ESS >Health > Self Declaration
ESS > Health > Health Records
Note:
For ESS user:
The userid should be login user’s ID.
For a System Account user:
The userid can be any user’s id. If the
System account user has rights on
that user, return the records.
Otherwise, return message as per
mentioned below.
With comma separation, SA can
provide multiple user’s ID.
date-range ddmmyyyy-ddmmyyyy (From Date – The period for which the User Health
To Date) Records need to be fetched.
Valid Values: Not a mandatory field.
dd (Date): 01-31 If not mentioned, then by default the
mm (Month): 01-12 response will contain Health Records
for the current date.
yyyy (Year): 4 digits
Based on the value of supplied arguments, the API will return the health Data for the users, for selected date. The
response will contain the following fields:
Multi-language
Argument Valid Values Default View Description
character set
Format: ddmmyyyy
dd(Date): 01-31
mm(Month): 01-12
yyyy: Year
NOTE: Return success message in response on successful API execution (only when API has been executed
successfully)
Example:
Success: 1160200002: saved successfully.
Mandatory field.
tid max 10 numeric characters Mandatory field.
userid Max 15 chars Mandatory field.
An application will be identified, based on tid and
userid.
Source 2,5 Mobile Application needs to provide source ID while
sending UPDATE request to server.
The response will contain the actual validation as seen on the web page.
Example:
success: 1160300002: saved successfully
This shall be used to get the status of custom fields, for 3rd party applications as well as for APTA application.
Action
action= get
Syntax
http://<servername>/api.svc/v2/custom-field?action=<get>;<argument>=<value>...
License Requirement:
If license is not available, return message: “License not available for this API.”
User Rights
User Rights
ESS Enabled
Response Field:
1=field1
2=field2
3=field3
4=field4
5=field5
Field No. field-no
6=field6
7=field7
8=field8
9=field9
10=field10
0= Inactive
Active active
1= Active
A-Z
a-z
Field Name field-name Max 100 characters 0-999
[]().-_/
<Space>
Type
1 = Textbox
type
0= = Datepicker
This shall be used to submit new Mark Group Attendance application and to get or delete Mark Group Attendance
records from server via APTA or 3rd party application.
Syntax
http://<servername>/api.svc/v2/mark-group-attendance?action=<get/set/delete>;<argument>=<value>...
License Requirement:
User Rights
User Rights
ESS User Enabled if User is RIC user & has In-charge Permissions'
of Mark Group Attendance.
• GET APIs
• SET APIs
• DELETE APIs
Action
action= get
Response:
• No Group Attendance entry added by user, then return "No Record Found"
• If any Group Attendance entry added by user, then return id, name, and attendance detail like "in-out,
event-datetime, count, spfid, User-id's, source used in that attendance.
• For RIC User, the mark Group attendance added by him will be shown in the list. for SA, all mark group
attendance entries will be shown.
Example:
0=IN
In-out This is the IO type for the event.
1=OUT
numeric characters
Count Count of user for which event is generated
Max 3 digit
11= ESS
Source Source of the application
12= APP
Action
Action= set
Action
action= delete
This shall be used to request for FR Process on Image or to Update FR result on image via APTA or 3rd party
application.
Action
action= command
Syntax
http://<servername>/api.svc/v2/group-fr-process?action=<command/update >;<argument>=<value>...
License Requirement:
User Rights
User Rights
ESS User Enabled if User is RIC user & has In-charge Permissions'
of Mark Group Attendance.
The response will contain Face Count and list of Face ID, FR result, Face Co-ordinates and User ID in below
defined fields
0- Not recognized
fr-result 1- Not in your group Result of the face.
2- recognized
Example:
1 0 1,3,4,7
2 1 6,6,3,5
3 2 1001 2,5,7,4
action= update
15 alphanumeric Char.
A to Z
ID of the recognized user.
tag-user-id a to z
It is a mandatory field if fr-result=2
0 to 9
/_\\.@:
MATRIX COMSEC
Head Office:
394-GIDC, Makarpura, Vadodara - 390010, India.
Ph.: (+91)18002587747
E-mail: [email protected]
Website: www.MatrixSecuSol.com