# 通行记录上报

# 接口说明

host path method content-type
open.wecard.qq.com /cgi-bin/guard/device/report POST application/json

# 请求参数

{
  "access_token": "z8WH...R7Fd",
  "device_no": "MRC00001",
  "records": [
    {
      "card_number": "12345678",
      "physical_card_number": "7h5g0123",
      "pass": true,
      "mode": 1,
      "checked_at": 1608560621,
      "nonce": "abcdefg1234567"
    },
    {
      "card_number": "abcdefgh",
      "physical_card_number": "7h5g0124",
      "pass": false,
      "reason": "用户不在可通行名单中",
      "mode": 1,
      "checked_at": 1608560632,
      "nonce": "hijklmn7654321"
    },
    {
      "card_number": "87654321",
      "physical_card_number": "7h5g0125",
      "pass": false,
      "reason": "尚未到达当前用户可通行时间",
      "mode": 1,
      "checked_at": 1608560572,
      "nonce": "opqrstu1234567"
    }
  ]
}
参数 必填 类型 说明
access_token ✔️ string 接口请求凭证
device_no ✔️ string 门禁机具设备号
records ✔️ array 核验记录列表

# 核验记录

参数 必填 类型 说明
card_number ✔️ string 电子卡号
pass ✔️ bool 是否通过门禁核验
checked_at ✔️ int64 核验时的 unix 时间戳
nonce ✔️ string 随机噪声
physical_card_number string 实体卡号
reason string 拒绝原因,当pass值为false时,需要说明原因
mode int 登记方式,0-其他,1-刷码,2-刷脸,3-刷卡,4-扫码,5-刷指纹,6-刷掌

# 响应参数

{
  "code": 0,
  "message": ""
}