Raden T41

Raden T41

Device Type

Table of Contents

Test Connection

command: test:connection

no params

Example Request:

{
  "device": {
    "host": "192.168.20.20",
    "type": "RadenT41",
    "password": "123"
  },
  "command": "test:connection"
}

Example Response:

HTTP/1.1 200 Ok

{
  "message": "Connection Successful"
}

Get Information

command: get:info

no params

Example Request:

{
  "device": {
    "host": "192.168.20.20",
    "type": "RadenT41",
    "password": "123"
  },
  "command": "get:info"
}

Example Response:

HTTP/1.1 200 Ok

{
  "info": {
    "adapter": true,
    "battery_level": 0,
    "battery": true,
    "cards": 1,
    "fingers": 95,
    "clockings": 6973,
    "id": "7b383834-6666-3837-352d-343337312d34",
    "name": "raden",
    "firmware": "1.0.38",
    "memory_available": 892480,
    "memory_size": 960504,
    "memory_used": 19232
  }
}

Users

Get Users

command: get:users

no params

Example Request:

{
  "device": {
    "host": "192.168.20.20",
    "type": "RadenT41",
    "password": "123"
  },
  "command": "get:users"
}

Example Response:

HTTP/1.1 200 Ok

{
  "users": [
    {
      "allow_card": true,
      "allow_code": false,
      "allow_finger": true,
      "code": 222,
      "first_name": "اردلان",
      "full_name": "آقای اردلان امینی",
      "last_name": "امینی",
      "sex": "male",
      "verify_card": false
    },
    ...
  ]
}

Set Users

command: set:users

Param Type Description
users User[] -

User

Param Type default Description
code Number - User’s identification code
first_name String - -
last_name String - -
[sex] male | female male User’s gender
[allow_finger] Boolean false Indicates permission for authentication this user by fingerprint
[allow_card] Boolean false Indicates permission for authentication this user by card
[allow_code] Boolean false Indicates permission for authentication this user by code
[verify_card] Boolean false Indicates require authenticate card before authentication by fingerprint
[username] String - -
[password] String - -
[shift_length] Number 0 -

Example Request:

{
  "device": {
    "host": "192.168.20.20",
    "type": "RadenT41",
    "password": "123"
  },
  "command": "set:users",
  "params": {
    "users": [
      {
        "code": 222,
        "first_name": "اردلان",
        "last_name": "امینی",
        "allow_finger": true,
      },
      ...
    ]
  }
}

Example Response:

HTTP/1.1 200 Ok

{
  "message": "SUCCESSFUL"
}

Remove Users

removes the given users from device, in case no param given it will remove all users

command: remove:users

Param Type Description
[users] Number[] Users identification codes

Example Request:

{
  "device": {
    "host": "192.168.20.20",
    "type": "RadenT41",
    "password": "123"
  },
  "command": "remove:users",
  "params": {
    "users": [222, ...]
  }
}

Example Response:

HTTP/1.1 200 Ok

{
  "message": "SUCCESSFUL"
}

Clockings

Get Clockings

command: get:clockings

Param Type default Description
[sended] Boolean false Get clockings that are already sent
[from] String - date or datetime (YYYY-MM-DD HH:mm:ss)
[to] String - date or datetime (YYYY-MM-DD HH:mm:ss)

Example Request:

{
  "device": {
    "host": "192.168.20.20",
    "type": "RadenT41",
    "password": "123"
  },
  "command": "get:clockings",
  "params": {
    "sended": true,
    "from": "2018-06-01",
    "to": "2018-06-17 23:59:59",
  }
}

Example Response:

HTTP/1.1 200 Ok

{
  "clockings": [
    {
      "changed": false,
      "code": 222,
      "datetime": "2017-12-16T13:14:37",
      "factor": 1,
      "id": 31762,
      "io": 1,
      "reason": 55
    },
    ...
  ]
}

Remove Clockings

removes the clockings from the device in the given time range, in case no params given it will remove all clockings

command: remove:clockings

Param Type Description
[from] String date or datetime (YYYY-MM-DD HH:mm:ss)
[to] String date or datetime (YYYY-MM-DD HH:mm:ss)

Example Request:

{
  "device": {
    "host": "192.168.20.20",
    "type": "RadenT41",
    "password": "123"
  },
  "command": "remove:clockings",
  "params": {
    "from": "2018-06-01",
    "to": "2018-06-17 23:59:59"
  }
}

Example Response:

HTTP/1.1 200 Ok

{
  "message": "SUCCESSFUL"
}

Mark Clockings

command: mark:clockings

Param Type Description
[clockings] Number[] Clockings ids

Example Request:

{
  "device": {
    "host": "192.168.20.20",
    "type": "RadenT41",
    "password": "123"
  },
  "command": "mark:clockings",
  "params": {
    "clockings": [31762, ...],
  }
}

Example Response:

HTTP/1.1 200 Ok

{
  "message": "SUCCESSFUL"
}

Cards

Get Cards

gets the cards for given users from device, in case no param given it will get all cards

command: get:cards

Param Type Description
[users] Number[] Users identification codes

Example Request:

{
  "device": {
    "host": "192.168.20.20",
    "type": "RadenT41",
    "password": "123"
  },
  "command": "get:cards",
  "params": {
    "users": [222, ...],
  }
}

Example Response:

HTTP/1.1 200 Ok

{
  "cards": [
    {
      "card_id": "{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}",
      "code": 222,
      "id": 3,
      "last_update": "2017-02-20T12:25:44"
    },
    ...
  ]
}

Set Cards

command: set:cards

Param Type Description
cards Card[] -

Card

Param Type Description
code Number User’s identification code
card_id String -
last_update String datetime

Example Request:

{
  "device": {
    "host": "192.168.20.20",
    "type": "RadenT41",
    "password": "123"
  },
  "command": "set:cards",
  "params": {
    "cards": [
      {
        "card_id": "{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}",
        "code": 222,
        "last_update": "2017-02-20 12:25:44"
      },
      ...
    ]
  }
}

Example Response:

HTTP/1.1 200 Ok

{
  "message": "SUCCESSFUL"
}

Remove Cards

removes the cards for the given users from device, in case no param given it will remove all cards

command: remove:cards

Param Type Description
[users] Number[] Users identification codes

Example Request:

{
  "device": {
    "host": "192.168.20.20",
    "type": "RadenT41",
    "password": "123"
  },
  "command": "remove:cards",
  "params": {
    "users": [222, ...]
  }
}

Example Response:

HTTP/1.1 200 Ok

{
  "message": "SUCCESSFUL"
}

Mark Cards

command: mark:cards

Param Type Description
cards Number[] Cards ids

Example Request:

{
  "device": {
    "host": "192.168.20.20",
    "type": "RadenT41",
    "password": "123"
  },
  "command": "mark:cards",
  "params": {
    "cards": [3, ...]
  }
}

Example Response:

HTTP/1.1 200 Ok

{
  "message": "SUCCESSFUL"
}

Register Cards

command: register:card

Param Type Description
user Number User Identification code

Example Request:

{
  "device": {
    "host": "192.168.20.20",
    "type": "RadenT41",
    "password": "123"
  },
  "command": "register:card",
  "params": {
    "user": 222
  }
}

Example Response:

HTTP/1.1 200 Ok

{
  "message": "SUCCESSFUL"
}

Fingerprints

Get Fingerprints

gets the fingerprints for given users from device, in case no param given it will get all fingerprints

command: get:fingerprints

Param Type Description
[users] Number[] Users identification codes

Example Request:

{
  "device": {
    "host": "192.168.20.20",
    "type": "RadenT41",
    "password": "123"
  },
  "command": "get:fingerprints",
  "params": {
    "users": [222, ...],
  }
}

Example Response:

HTTP/1.1 200 Ok

{
  "fingerprints": [
    {
      "code": 222,
      "finger_id": 1,
      "finger_number": 1,
      "finger_template": "xxxx...",
      "id": 381
    },
    ...
  ]
}

Set Fingerprints

command: set:fingerprints

Param Type Description
fingerprints Fingerprint[] -

Fingerprint

Param Type Description
code Number User’s identification code
finger_number Number -
finger_template String -

Example Request:

{
  "device": {
    "host": "192.168.20.20",
    "type": "RadenT41",
    "password": "123"
  },
  "command": "set:fingerprints",
  "params": {
    "fingerprints": [
      {
        "code": 222,
        "finger_number": 6,
        "finger_template": "xxx...",
      },
      ...
    ],
  }
}

Example Response:

HTTP/1.1 200 Ok

{
  "message": "SUCCESSFUL"
}

Remove Fingerprints

removes the fingerprints for given users from device, in case no param given it will remove all fingerprints

command: remove:fingerprints

Param Type Description
[users] Number[] Users identification codes

Example Request:

{
  "device": {
    "host": "192.168.20.20",
    "type": "RadenT41",
    "password": "123"
  },
  "command": "remove:fingerprints",
  "params": {
    "users": [222, ...],
  }
}

Example Response:

HTTP/1.1 200 Ok

{
  "message": "SUCCESSFUL"
}

Mark Fingerprints

command: mark:fingerprints

Param Type Description
fingerprints Number[] fingerprints ids

Example Request:

{
  "device": {
    "host": "192.168.20.20",
    "type": "RadenT41",
    "password": "123"
  },
  "command": "mark:fingerprints",
  "params": {
    "fingerprints": [381, ...]
  }
}

Example Response:

HTTP/1.1 200 Ok

{
  "message": "SUCCESSFUL"
}

Meals

Set Meals

command: set:meals

Param Type Description
meals Meal[] -

Meal

Param Type Description
meal_id Number -
name String -
due_time String time in HH:mm format

Example Request:

{
  "device": {
    "host": "192.168.20.20",
    "type": "RadenT41",
    "password": "123"
  },
  "command": "set:meals",
  "params": {
    "meals": [
      {
        "meal_id": 128,
        "name": "صبحانه",
        "due_time": "07:00",
      },
      ...
    ],
  }
}

Example Response:

HTTP/1.1 200 Ok

{
  "message": "SUCCESSFUL"
}

Foods

Get Foods

gets the foods for given users from device, in case no param given it will get all foods

command: get:foods

Param Type Description  
[meal_id] Number[] -  
[from] String - date or datetime (YYYY-MM-DD HH:mm:ss)
[to] String - date or datetime (YYYY-MM-DD HH:mm:ss)

Example Request:

{
  "device": {
    "host": "192.168.20.20",
    "type": "RadenT41",
    "password": "123"
  },
  "command": "get:foods",
  "params": {
    "meal_id": 128,
  }
}

Example Response:

HTTP/1.1 200 Ok

{
  "foods": [
    {
      "code" : 222,
      "datetime" : "2014-11-18T15:43:05",
      "id" : 1,
      "meal_id" : 1
    },
    ...
  ]
}

Set Foods

command: set:foods

Param Type Description
foods Food[] -

Food

Param Type Description
code Number User’s identification code
meal_id Number -
datetime String datetime (YYYY-MM-DD HH:mm:ss)

Example Request:

{
  "device": {
    "host": "192.168.20.20",
    "type": "RadenT41",
    "password": "123"
  },
  "command": "set:foods",
  "params": {
    "foods": [
      {
        "code" : 222,
        "datetime" : "2018-06-18 15:43:05",
        "meal_id" : 128
      },
      ...
    ],
  }
}

Example Response:

HTTP/1.1 200 Ok

{
  "message": "SUCCESSFUL"
}

Remove Foods

removes the foods for given users from device, in case no param given it will remove all foods

command: remove:foods

Param Type Description
[from] String date or datetime (YYYY-MM-DD HH:mm:ss)
[to] String date or datetime (YYYY-MM-DD HH:mm:ss)

Example Request:

{
  "device": {
    "host": "192.168.20.20",
    "type": "RadenT41",
    "password": "123"
  },
  "command": "remove:foods"
}

Example Response:

HTTP/1.1 200 Ok

{
  "message": "SUCCESSFUL"
}

Mark Foods

command: mark:foods

This command is used for mark reserved food meal as sent on device.

Param Type Description
foods Number[] foods ids

Example Request:

{
  "device": {
    "host": "192.168.20.20",
    "type": "RadenT41",
    "password": "123"
  },
  "command": "mark:foods",
  "params": {
    "foods": [1, ...]
  }
}

Example Response:

HTTP/1.1 200 Ok

{
  "message": "SUCCESSFUL"
}

Passwords

Set Menu Password

command: set:menu_password

Param Type Description
password String only numbers, 4 digits

Example Request:

{
  "device": {
    "host": "192.168.20.20",
    "type": "RadenT41",
    "password": "123"
  },
  "command": "set:menu_password",
  "params": {
    "password": "0000",
  }
}

Example Response:

HTTP/1.1 200 Ok

{
  "message": "SUCCESSFUL"
}

Set Usb Password

command: set:usb_password

Param Type Description
password String only numbers, 4 digits

Example Request:

{
  "device": {
    "host": "192.168.20.20",
    "type": "RadenT41",
    "password": "123"
  },
  "command": "set:usb_password",
  "params": {
    "password": "0000",
  }
}

Example Response:

HTTP/1.1 200 Ok

{
  "message": "SUCCESSFUL"
}

Set Power Password

command: set:power_password

Param Type Description
password String only numbers, 4 digits

Example Request:

{
  "device": {
    "host": "192.168.20.20",
    "type": "RadenT41",
    "password": "123"
  },
  "command": "set:power_password",
  "params": {
    "password": "0000",
  }
}

Example Response:

HTTP/1.1 200 Ok

{
  "message": "SUCCESSFUL"
}

Settings

Get Settings

gets the settings for given users from device, in case no param given it will get all settings

command: get:settings

no params

Example Request:

{
  "device": {
    "host": "192.168.20.20",
    "type": "RadenT41",
    "password": "123"
  },
  "command": "get:settings"
}

Example Response:

HTTP/1.1 200 Ok

{
  "settings": {
    "action_time_list": [],
    "alarm_mode": 1,
    "day_light_saving_info": "3,21,9,21,60",
    "device_mode": 0,
    "device_name": "raden",
    "firmware": "1.0.38",
    "func_key_access_list": [
      {
        "has_access": true,
        "key_code": 48
      },
      {
        "has_access": false,
        "key_code": 49
      },
      {
        "has_access": true,
        "key_code": 50
      },
      {
        "has_access": true,
        "key_code": 51
      },
      {
        "has_access": true,
        "key_code": 52
      },
      {
        "has_access": true,
        "key_code": 53
      },
      {
        "has_access": true,
        "key_code": 54
      },
      {
        "has_access": true,
        "key_code": 55
      },
      {
        "has_access": true,
        "key_code": 56
      },
      {
        "has_access": true,
        "key_code": 57
      }
    ],
    "network_info_list": [
      {
        "ap_addr": "eth0",
        "gateway": "",
        "interface": 0,
        "ip": "172.254.0.1",
        "is_dhcp": false,
        "name": "eth0",
        "netmask": "255.255.255.0",
        "password": ""
      },
      ...
    ],
    "show_presents_info": true,
    "sync_server_activate": 1,
    "sync_server_ip": "192.168.020.001",
    "volume": 91
  }
}

Set Settings

command: set:settings

Param Type Description
[device_mode] 0 | 1 | 2 | 3 0: clock in & out, 1: just clock in, 2: just clock out, 3: indeterminate
[alarm_mode] 0 | 1 0: melody, 1: voice
[volume] Number between 37 & 135615936
[show_presents_info] Boolean -
[sync_server_activate] Boolean -
[enable_shift_length] Boolean -
[sync_server_ip] String -
[day_light_saving_info] String -
[key_access_list] Key Access[] -
[network_info_list] Network Info[] -

Key Access

Param Type Description
code Number between 48 & 57
access Boolean -

Network Info

Param Type Default Description
name String - -
interface_id Number - -
ap_addr String - -
password String - -
[dhcp] Boolean false -
[ip] String - -
[netmask] String 255.255.255.0 -
[gateway] String - -

Example Request:

{
  "device": {
    "host": "192.168.20.20",
    "type": "RadenT41",
    "password": "123"
  },
  "command": "set:settings",
  "params": {
    "settings": {
      "action_time_list": [],
      "alarm_mode": 1,
      "day_light_saving_info": "3,21,9,21,60",
      "device_mode": 0,
      "device_name": "raden",
      "firmware": "1.0.38",
      "func_key_access_list": [
        {
          "has_access": true,
          "key_code": 48
        },
        {
          "has_access": false,
          "key_code": 49
        },
        {
          "has_access": true,
          "key_code": 50
        },
        {
          "has_access": true,
          "key_code": 51
        },
        {
          "has_access": true,
          "key_code": 52
        },
        {
          "has_access": true,
          "key_code": 53
        },
        {
          "has_access": true,
          "key_code": 54
        },
        {
          "has_access": true,
          "key_code": 55
        },
        {
          "has_access": true,
          "key_code": 56
        },
        {
          "has_access": true,
          "key_code": 57
        }
      ],
      "network_info_list": [
        {
          "ap_addr": "eth0",
          "gateway": "",
          "interface": 0,
          "ip": "172.254.0.1",
          "is_dhcp": false,
          "name": "eth0",
          "netmask": "255.255.255.0",
          "password": ""
        },
        ...
      ],
      "show_presents_info": true,
      "sync_server_activate": 1,
      "sync_server_ip": "192.168.020.001",
      "volume": 91
    },
  }
}

Example Response:

HTTP/1.1 200 Ok

{
  "message": "SUCCESSFUL"
}

Set Datetime

command: set:datetime

Param Type Default Description
[datetime] String now YYYY-MM-DD HH:mm:ss

Example Request:

{
  "device": {
    "host": "192.168.20.20",
    "type": "RadenT41",
    "password": "123"
  },
  "command": "set:datetime"
}

Example Response:

HTTP/1.1 200 Ok

{
  "message": "SUCCESSFUL"
}

Get Accesspoints

command: get:accesspoints

no params

Example Request:

{
  "device": {
    "host": "192.168.20.20",
    "type": "RadenT41",
    "password": "123"
  },
  "command": "get:accesspoints"
}

Example Response:

HTTP/1.1 200 Ok

{
  "accesspoints": [
    {
      "ap_addr": "xx:xx:xx:xx:xx:xx",
      "auth_mode": "WPA2PSK",
      "channel": x,
      "encrypt_type": "TKIPAES",
      "encryption_key": xxxxxxx,
      "is_connected": true,
      "name": "JGP",
      "network_type": "Master"
    },
    ...
  ]
}

Reset Presents

command: reset:presents

no params

Example Request:

{
  "device": {
    "host": "192.168.20.20",
    "type": "RadenT41",
    "password": "123"
  },
  "command": "reset:presents"
}

Example Response:

HTTP/1.1 200 Ok

{
  "message": "SUCCESSFUL"
}