文档中心 商家授权 商家同步授权企业的离职员工

商家同步授权企业的离职员工

1.使用场景

商家授权的企业员工离职时需要同步到商家

2.时序图

调用首次无需传递sync_key,后续增量同步离职员工时需要使用上次同步的sync_key,所以建议调用方保存好每次的调用返回的sync_key。

同步数据

3.接口调用说明

请求URL

https://openapi.guanaitong.tech/seller/employee/quit/sync

HTTP请求方式

POST

输入参数说明

(1)私有参数

参数名称 是否必须 参数类型 长度限制 描述
enterprise_open_id string 32 商家授权的企业id
sync_key string - 首次同步无需传递,后面增量同步必传
请求示例
GET /seller/employee/quit/sync HTTP/1.1
Host: openapi.guanaitong.tech

enterprise_open_id=1100w23042374828djffe8wfewef00032&sync_key=8u37efb2927d828af22f592134e893248069u34d
返回参数说明
参数名称 参数类型 描述
corp_code string 员工工号
name string 员工姓名
mobile_area string 手机区号
mobile string 手机号
正确返回示例
{
    "code": 0,
    "data": {
        "sync_key": "7c222fb2927d828af22f592134e8932480637c0d",
        "has_more": false,
        "data": [{
            "corp_code":"A002",
            "name":"李四",
            "mobile_area":86,
            "mobile":"13022222222"
        },{
            "corp_code":"A001",
            "name":"张三",
            "mobile_area":86,
            "mobile":"13011111111"
        },{},...{}]
    },
    "msg": "OK"
}
错误返回示例
{
    "code":1000210017,
    "data":null,
    "msg":"redirect url not found!"
}