员工打卡
接口说明: 上传员工打卡记录。支持通过员工id进行打卡记录上传
请求方式:POST(HTTPS)
请求地址:https://api.xinrenxinshi.com/v5/attendance/clock
请求Header:
key | value |
---|---|
access_token | 获取的access_token的实际值 |
Query参数:
key | value |
---|---|
sign | 签名值 |
Body参数:
参数 | 类型 | 必传(Y/N) | 说明 |
---|---|---|---|
employeeId | String | Y | 员工id |
clockTime | Integer | Y | 打卡时间戳(精确到秒) |
longitude | Double | N | 经度(打卡位置) |
latitude | Double | N | 纬度(打卡位置) |
source | Integer | N | 打卡来源 ,1-考勤机打卡,2-其他来源,3-openApi打卡,4-外部系统打卡,5-门禁打卡。默认是考勤机打卡 |
remark | String | N | 备注,最大长度50个字符 |
timestamp | Long | Y | 请求时间戳(精确到毫秒) |
返回结果:
参数 | 类型 | 必传(Y/N) | 说明 |
---|---|---|---|
errcode | Integer | Y | 0成功,其他失败 |
errmsg | String | Y | 结果描述 |
请求示例(HTTPS):
https://api.xinrenxinshi.com/v5/attendance/clock?sign=nJHs0R%2F6cQs3nXIWIb8fySlinfE%3D
请求Body示例:
{
"latitude": 39.916527,
"employeeId": "805f8c65825b4c2fae96f64ffb7d6901",
"remark": "hello world",
"clockTime": 1606788556,
"source": 1,
"longitude": 116.397128,
"timestamp": 1606906407380
}
SDK请求示例(java):
AttendanceClockRequest request = new AttendanceClockRequest(access_token());
request.setEmployeeId("805f8c65825b4c2fae96f64ffb7d6901");
request.setClockTime(1606788556);
request.setLongitude(116.397128D);
request.setLatitude(39.916527D);
request.setRemark("hello world");
request.setSource(1);
OpenapiResponse<Void> response = XrxsAttendanceService.clock(request);
响应示例:
{
"errcode": 0,
"errmsg": "成功",
"data": null
}