Codelayer API Documentation

  • Introduction

    • General
    • Version History
  • API Reference

    • System

      • License request
      • Register Device
      • Authentication
      • Settings
    • HR Details

      • Employee Attendance
      • Employee Leave Summary
      • Employee List
      • Employee Payrevision
      • Employee Payroll
      • Employee Relieving
      • Employee TDS Calculated
      • Employee TDS Deducted
      • Employee Transfer
      • Employees Edited
    • Estate

      • Labor

        • Details
        • Register Face
      • Sync

        • Download Face File
        • Get Labor
        • Get Tasks
        • Post Muster
      • Authentication
      • Firm List
    • FrontOffice Poabs

      • Gatepass Save
    • Response Codes
Codelayer API Documentation
Authentication

Authenticates a user to the API using user name and password. On successful authentication a key is provided. For any further communication to the API the provided key must be used. This key expire/timeout. On such situations the application has to get another key by re-authentication to the API.

URL

system/auth

Method

POST

Request Media type

application/json

Response Media type

application/json

Request Parameters
Parameter Data Type Min Max M/O Sample Value Comments
key String 32 32 M 5DlvaS6K4HstYcKZ2ghTylceb0GFKQt4 Key obtained from authentiaction.
username String 1 64 M testuser This is the username provided to login to the API
password String 1 64 M testpassword This is the password provided to login to the API
imei String 14 16 M 352099001761481 IMEI of the accessing device.
ver String 7 16 M 1.0.0.0 Application version of the client. Current supported version is 1.0.0.0

 

Response Values
Name Data Type Min Length Max Length M/O Sample Value Comments
key String 32 32 M QH7LlQ3wQMK9oYEKjeG5QOIVJQT4emeq This key to be used for all API calls (256 bit)

 

Sample Request
{
    "key": "QH7LlQ3wQMK9oYEKjeG5QOIVJQT4emeq",
    "username": "testuser",
    "password": "testpassword",
    "imei": "352099001761481",
    "ver": "1.0.0.0"
}
Sample Success Response
{
    "key": "QH7LlQ3wQMK9oYEKjeG5QOIVJQT4emeq",
    "e": 200,
    "msg": "Success"
}
Sample Failure Responses
{
    "e": 401,
    "msg": "Invalid authentication credentials."
}