Codelayer API Documentation

  • Introduction

    • General Information
  • API Reference

    • Fetch

      • Account Group
      • Account Heads
      • Firm Details
      • Purchase
      • Sales Invoice
      • Stock Item
      • UOM
      • Vouchers
    • Purchase

      • Purchase Invoice
    • Sales

      • Invoice
      • StockItem
      • UOM
    • System

      • Authentication
    • Accounts

      • Account Group
      • Account Heads
      • Firm Details
      • Vouchers
    • Response Codes
Codelayer API Documentation
Authentication

Authentication Module

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
client_id String 3 30 M CTPL Client ID as provided by application server.
username String 6 30 M test_user Username used to authenticatie
password String 6 30 M secret_password The password for the username.
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
{
    "client_id": "CTPL",
    "username": "test_user",
    "password": "secret_password",
    "ver": "1.0.0.0"
}
Sample Success Response
{
    "key": "QH7LlQ3wQMK9oYEKjeG5QOIVJQT4emeq",
    "e": 200,
    "msg": "Success"
}
Sample Failure Responses
{
    "e": 400,
    "msg": "Bad Request."
}
{
    "e": 401,
    "msg": "Invalid authentication credentials."
}
{
    "e": 503,
    "msg": "Service unavailable."
}