使用CRM API,请先阅读并遵守以下规范使用API。
所有参数均是小写,以GET或POST方式请求,JSON格式返回,所有日期返回/提交格式为:yyyy-MM-dd HH:mm:ss,如:2019-03-26 20:07:31。
后面每一个功能都需要提交API验证参数,返回结果也在此基础上,故后面的所有功能说明中涉及API验证机制的说明就省略了,要获取API验证信息说明的请至权限校验查阅。
适用于所有接口的所有返回信息
| code | 信息 |
|---|---|
| 10000 | 验证通过 |
| 10001 | 您提交的IP被禁止 |
| 10002 | 您无权使用API |
| 10003 | 时间戳错误 |
| 10004 | 验证串错误 |
| 10005 | 身份验证失败 |
| 10006 | 非法访问 |
为了保障您的账户安全, 将进行以下几项措施:
| /api/auth |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时根据不同接口返回不同类型的数据 |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
string url = "/api/auth?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" + checksum;
// 采用GET方式提交
string result = Get(url);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口获取用户数、已建用户数、到期时间、客户总数、每用户客户数、产品分类数、产品总数、每分类产品数、订单审核开关、公司电话校验开关、公共客户启用开关
| /api/system |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时根据不同接口返回不同类型的数据 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| client_count | 客户总数 | 整型 | |
| company_phone_verify_status | 公司电话校验开关 | 整型 | 0-不校验唯一,1-校验唯一 |
| expire_time | 过期日期 | 字符串 | |
| order_audit_status | 订单审核开关 | 整型 | 0-订单不需要审核,1-订单需要审核 |
| product_category_count | 产品分类数 | 整型 | |
| product_category_counts | 分类排序 | 集合 | product_category_counts |
| product_count | 产品总数 | 整型 | |
| public_client_status | 公共客户启用开关 | 整型 | 1-启用,0-不启用 |
| use_user_count | 已建用户数 | 整型 | |
| user_client_counts | 每用户客户数 | 集合 | user_client_counts |
| user_count | 用户数 | 整型 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| product_category_id | 产品分类id | 整型 | |
| product_category_name | 产品分类名称 | 字符串 | |
| product_count | 产品数 | 整型 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| client_count | 客户数 | 整型 | |
| user_id | 用户id | 整型 | |
| user_profile | 用户头像 | 字符串 | |
| user_realname | 用户姓名 | 字符串 | |
| user_username | 用户账号 | 字符串 |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
string url = "/api/system?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" + checksum;
// 采用GET方式提交
string result = Get(url);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口查询用户存不存在,获取指定用户信息
| /api/user/get |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| account | 用户账号 | 字符串 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明或“用户不存在”,成功时返回用户信息 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| account | 用户账号 | 字符串 | |
| add_time | 用户添加时间 | 字符串 | |
| department_id | 部门id | 整型 | |
| department_name | 部门名称 | 字符串 | |
| 字符串 | 电子邮箱账号 | ||
| id | 用户id | 整型 | |
| memo | 备注 | 字符串 | |
| mobile | 手机号 | 字符串 | |
| positions | 所在职位 | 集合 | positions |
| profile | 头像 | 字符串 | |
| QQ账号 | 字符串 | ||
| realname | 姓名 | 字符串 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| id | 职位id | 整型 | |
| name | 职位名称 | 字符串 | |
| parent_id | 上级职位id | 整型 | 没有上级则为空 |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
string account = "用户账号";
string url = "/api/user/get?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" + checksum + "&account=" + account;
// 采用GET方式提交
string result = Get(url);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口添加用户信息
| /api/user/add |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| account | 用户账号 | 字符串 | |
| password | 用户密码 | 字符串 | md5后提交 |
| realname | 用户姓名 | 字符串 | |
| mobile | 手机号码 | 字符串 | 用户手机号码 |
| department_id | 部门id | 字符串 | 可通过 部门列表 获取得到部门id |
| 字符串 | QQ账号 | ||
| 字符串 | 邮箱账号 | ||
| memo | 备注 | 字符串 | |
| position_ids | 职位id | 整型集合 | 可通过 职位列表 获取得到职位id |
| profile | 头像 | 字节流 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时返回添加的用户id |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
string account = "账号";
string password = MD5("密码");
string realname = "姓名";
string mobile = "手机";
int department_id = "部门id";
string qq = "QQ";
string email = "email";
string memo = "备注";
string position_ids = "职位id";
byte[] profile = System.IO.File.ReadAllBytes("头像路径");
string url = "/api/user/add?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" + checksum;
string data = "account=" + account + "&password=" + password + "&realname=" + realname + "&mobile=" + mobile + "&department_id=" + department_id + "&qq=" + qq + "&email=" + email + "&memo=" + memo + "&position_ids" + position_ids;
// 采用POST方式提交
string result = Post(url, data, profile);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口修改用户信息
| /api/user/edit |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| id | 用户id | 整型 | 可从用户列表获取 |
| account | 用户账号 | 字符串 | |
| realname | 用户姓名 | 字符串 | |
| mobile | 手机号码 | 字符串 | 用户手机号码 |
| department_id | 部门id | 字符串 | 可通过 部门列表 获取得到部门id |
| 字符串 | QQ账号 | ||
| 字符串 | 邮箱账号 | ||
| memo | 备注 | 字符串 | |
| position_ids | 职位id | 整型集合 | 可通过 职位列表 获取得到职位id |
| profile | 头像 | 字节流 | 不传入不修改 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时返回用户id |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
string account = "账号";
string realname = "姓名";
string mobile = "手机";
int department_id = "部门id";
string qq = "QQ";
string email = "email";
string memo = "备注";
string position_ids = "职位id";
byte[] profile = System.IO.File.ReadAllBytes("头像路径");
string url = "/api/user/edit?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" +checksum;
string data = "account=" + account + "&realname=" + realname + "&mobile=" + mobile + "&department_id=" + department_id + "&qq=" + qq + "&email=" + email + "&memo=" + memo + "&position_ids" + position_ids;
// 采用POST方式提交
string result = Post(url, data, profile);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口禁用用户,禁止用户登录
| /api/user/disable |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| id | 用户id | 整型 | 可选,用户id和用户账号至少输入一个 |
| account | 用户账号 | 字符串 | 可选,用户id和用户账号至少输入一个 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时根据不同接口返回不同类型的数据 |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string userId = "用户id";
string account = "用户账号";
string checksum = MD5(prefix + username + MD5(password) + otime);
string url = "/api/user/disable?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" +checksum + "&id=" + userId + "&account=" + account;
// 采用GET方式提交
string result = Get(url);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口启用用户,允许用户登录
| /api/user/enable |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| id | 用户id | 整型 | 可选,用户id和用户账号至少输入一个 |
| account | 用户账号 | 字符串 | 可选,用户id和用户账号至少输入一个 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时根据不同接口返回不同类型的数据 |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
string userId = "用户id";
string account = "用户账号";
string url = "/api/user/enable?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" +checksum + "&id= + userId + "&account=" + account;
// 采用GET方式提交
string result = Get(url);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口修改用户密码
| /api/user/password |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| id | 用户id | 整型 | 可选,用户id和用户账号至少输入一个 |
| account | 用户账号 | 字符串 | 可选,用户id和用户账号至少输入一个 |
| password | 密码 | 字符串 | 修改后的密码,md5后提交 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时根据不同接口返回不同类型的数据 |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
string userId = "用户id";
string account = "用户账号";
password = MD5("用户密码");
string url = "/api/user/password?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" +checksum + "&id=" + userId + "&account=" + account + "&password=" + password;
// 采用GET方式提交
string result = Get(url);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口获取用户列表,用户id、姓名、电话、QQ、微信、头像、所属部门、所属职位等
| /api/user/list |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时根据不同接口返回不同类型的数据 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| account | 账号 | 字符串 | |
| add_time | 添加时间 | 字符串 | |
| department_id | 部门id | 整型 | |
| department_name | 部门名称 | 字符串 | |
| 字符串 | 电子邮箱账号 | ||
| enable | 启用状态 | 整型 | 0-禁用,1-启用 |
| id | 用户id | 整型 | |
| memo | 备注 | 字符串 | |
| mobile | 手机号 | 字符串 | |
| nikename | 显示名称 | 字符串 | |
| 字符串 | |||
| position_ids | 职位id | 整型集合 | |
| profile | 头像 | 字符串 | |
| realname | 姓名 | 字符串 | |
| isdeleted | 是否无效 | 整型 | 1-是,0-否 |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
string url = "/api/user/list?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" +checksum;
// 采用GET方式提交
string result = Get(url);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口修改用户所属职位
| /api/user/position |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| id | 用户id | 整型 | 可选,用户id和用户账号至少输入一个 |
| account | 用户账号 | 字符串 | 可选,用户id和用户账号至少输入一个 |
| position_ids | 职位id | 字符串 | 职位id集合,逗号分隔 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时根据不同接口返回不同类型的数据 |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
string userId = "用户id";
string account = "用户账号";
string positionIds = "职位id";
string url = "/api/user/position?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" +checksum + "&id=" + userId + "&account=" + account + "&position_ids=" + positionIds;
// 采用GET方式提交
string result = Get(url);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口修改单点登陆
| /api/user/login |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| account | 用户账号 | 字符串 | 登陆用户名 |
| password | 密码 | 字符串 | md5(验证串+md5(您的密码)) |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时为跳转地址(base64加密后的字符串) |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
string account = "用户账号";
password = md5(验证串+md5(您的密码));
string url = "/api/user/login?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" +checksum + "&account=" + account + "&password=" + password;
// 采用GET方式提交
string result = Get(url);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口获取用户的未读消息总数
| /api/user/unreadreminder |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| account | 用户账号 | 字符串 | 登陆用户名 |
| password | 密码 | 字符串 | md5(验证串+md5(您的密码)) |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时(UnreadNoteCount表示未读站内消息总数,UnReadRemindCount表未读事务提醒总数) |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
string account = "用户账号";
password = md5(验证串+md5(您的密码));
string url = "/api/user/unreadreminder?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" +checksum + "&account=" + account + "&password=" + password;
// 采用GET方式提交
string result = Get(url);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口获取部门列表
| /api/department/list |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| type | 返回数据格式 | 整型 | 0-返回列表,1-返回树形列表 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时返回部门列表 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| children | 子部门 | 类集合 | departments,当type为1且有子部门时有值 |
| id | 部门id | 整型 | |
| name | 部门名称 | 字符串 | |
| parent_id | 父级id | 整型 | |
| sort | 序号 | 整型 |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
string url = "/api/department/list?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" + checksum;
// 采用GET方式提交
string result = Get(url);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口获取职位列表
| /api/position/list |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| type | 返回数据格式 | 整型 | 0-返回列表,1-返回树形列表 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时根据不同接口返回不同类型的数据 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| children | 下级职位 | 类集合 | positions,当type为1且有下级职位时有值 |
| id | 职位id | 整型 | |
| level | 职位类型 | 整型 | 1-管理员,2-部门经理,3-销售专员 |
| name | 职位名称 | 字符串 | |
| parent_id | 父级id | 整型 |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
string url = "/api/position/list?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" + checksum;
// 采用GET方式提交
string result = Get(url);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口查询客户是否存在,取得客户信息
| /api/client/get |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| name | 客户名称 | 字符串 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明或“客户不存在”,成功时返回客户信息 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| add_time | 添加时间 | 字符串 | |
| address | 地址 | 字符串 | |
| corporation | 公司法人 | 字符串 | |
| 字符串 | |||
| get_time | 获取时间 | 字符串 | |
| id | 客户id | 整型 | |
| industry | 行业 | 字符串 | |
| intention_id | 意向id | 整型 | |
| intention_name | 意向名称 | 整型 | |
| is_deal | 是否成交 | 整型 | 0-未成交,1-已成交 |
| landline | 座机 | 字符串 | |
| name | 客户名称 | 字符串 | |
| next_visit_time | 下次回访时间 | 字符串 | |
| phone | 手机 | 字符串 | |
| 字符串 | |||
| region_code | 所在地 | 整型 | regions.csv |
| remark | 备注 | 字符串 | |
| scale | 公司规模 | 字符串 | |
| source | 来源 | 字符串 | |
| stage | 阶段 | 整型 | 默认为:0-资质审查,1-需求分析,2-价值建议,3-确定决策者,4-提案或报价,5-谈判或复审,6-赢单关闭,7-丢单关闭,8-因竞争丢单关闭,9-丢单线索,10-成交 |
| user_id | 所属用户 | 字符串 | 为空表示为公共客户 |
| visiting_info | 回访信息 | 字符串 | |
| website | 公司网址 | 字符串 | |
| 微信 | 字符串 |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
string name = "客户名称";
string url = "/api/client/get?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" +checksum + "&name=" + name;
// 采用GET方式提交
string result = Get(url);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口添加客户
| /api/client/add |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| name | 客户名称 | 字符串 | |
| corporation | 公司法人 | 字符串 | |
| website | 公司网址 | 字符串 | |
| scale | 公司规模 | 字符串 | |
| source | 来源 | 字符串 | |
| industry | 行业 | 字符串 | |
| region_code | 客户所在地 | 字符串 | regions.csv |
| address | 地址 | 字符串 | |
| landline | 座机 | 字符串 | |
| phone | 手机 | 字符串 | |
| 字符串 | |||
| 微信 | 字符串 | ||
| 字符串 | |||
| intention_id | 意向id | 字符串 | 可从意向列表获取 |
| stage | 阶段 | 整型 | 默认为:0-资质审查,1-需求分析,2-价值建议,3-确定决策者,4-提案或报价,5-谈判或复审,6-赢单关闭,7-丢单关闭,8-因竞争丢单关闭,9-丢单线索,10-成交 |
| remark | 备注 | 字符串 | |
| next_visit_time | 下次回访时间 | 字符串 | |
| profile | 头像 | 字节流 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时返回客户id |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
string url = "/api/client/add?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" +checksum;
// 采用GET方式提交
string result = Get(url);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口修改客户信息
| /api/client/edit |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| id | 客户id | 整型 | |
| name | 客户名称 | 字符串 | |
| corporation | 公司法人 | 字符串 | |
| website | 公司网址 | 字符串 | |
| scale | 公司规模 | 字符串 | |
| source | 来源 | 字符串 | |
| industry | 行业 | 字符串 | |
| region_code | 客户所在地 | 整型 | regions.csv |
| address | 地址 | 字符串 | |
| landline | 座机 | 字符串 | |
| phone | 手机 | 字符串 | |
| 字符串 | |||
| 微信 | 字符串 | ||
| 字符串 | |||
| intention_id | 意向id | 整型 | 可从意向列表获取 |
| stage | 阶段 | 整型 | 默认为:0-资质审查,1-需求分析,2-价值建议,3-确定决策者,4-提案或报价,5-谈判或复审,6-赢单关闭,7-丢单关闭,8-因竞争丢单关闭,9-丢单线索,10-成交 |
| remark | 备注 | 字符串 | |
| next_visit_time | 下次回访时间 | 字符串 | |
| profile | 头像 | 字节流 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时返回客户id |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
int id = "客户id";
string name = "客户名称";
string corporation = "公司法人";
string website = "公司网址";
string scale = "公司规模";
string source = "来源";
string industry = "行业";
int regionCode = "客户所在地";
string address = "地址";
string landline = "座机";
string phone = "手机";
string qq = "qq";
string wechat = "微信";
string email = "email";
int intentionId = "意向id";
int stage = "阶段";
string remark = "备注";
string nextVisitTime = "下次回访时间";
byte[] profile = System.IO.File.ReadAllBytes("头像路径");
string url = "/api/client/edit?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" +checksum;
string data = "id=" + id + "&name=" + name + "&corporation=" + corporation + "&website=" + website + "&scale=" + scale + "&source=" + source + "&industry=" + industry + "®ion_code=" + regionCode + "&address=" + address + "&landline=" + landline + "&phone=" + phone + "&qq=" + qq + "&wechat=" + wechat + "&email=" + email + "&intention_id=" + intentionId + "&stage=" + stage + "&remark=" + remark + "&next_visit_time=" + nextVisitTime;
// 采用Post方式提交
string result = Post(url, data, profile);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口修改客户业务阶段
| /api/client/stage |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| id | 客户id | 整型 | |
| stage | 阶段 | 整型 | 默认为:0-资质审查,1-需求分析,2-价值建议,3-确定决策者,4-提案或报价,5-谈判或复审,6-赢单关闭,7-丢单关闭,8-因竞争丢单关闭,9-丢单线索,10-成交 |
| stage_name | 阶段名称 | 整型 | 为空则不修改 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时根据不同接口返回不同类型的数据 |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
int id = "客户id";
int stage = "阶段";
string stageName = "阶段名称";
string url = "/api/client/stage?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" +checksum + "&id=" + id + "&stage=" + stage + "&stage_name=" + stageName;
// 采用GET方式提交
string result = Get(url);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口获取意向列表
| /api/client/intention |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时根据不同接口返回不同类型的数据 |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
string url = "/api/client/intention?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" +checksum;
// 采用GET方式提交
string result = Get(url);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口获取产品分类
| /api/product/category_list |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| type | 返回数据格式 | 整型 | 0-返回列表,1-返回树形列表 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时根据不同接口返回不同类型的数据 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| children | 下级产品分类 | 类集合 | categories,当type为1且有下级时有值 |
| id | 产品分类id | 整型 | |
| name | 产品分类名称 | 字符串 | |
| parent_id | 上级产品分类id | 整型 |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
int type = 0;
string url = "/api/product/category_list?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" +checksum + "&type=" + type;
// 采用GET方式提交
string result = Get(url);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口导入产品分类
| /api/product/category_import |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| type | 导入选项 | 字符串 | 0-增量数据:存在的覆盖,不存在的新建 1-全数据:清空已有,全部新建 |
| data | 导入数据 | 字符串 | json格式,如:[{"name":"地毯","parent_name":""},{"name":"门厅","parent_name":"地毯"}] |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时返回导入的数据 |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
int type = 0;
string data = "导入数据";
string url = "/api/product/category_import?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" +checksum + "&type=" + type;
// 采用POST方式提交
string result = Post(url, "data=" + data);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口获取产品列表
| /api/product/list |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时根据不同接口返回不同类型的数据 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| id | 产品id | 整型 | |
| name | 产品名称 | 字符串 | |
| specification | 产品型号 | 字符串 | |
| price | 单价 | 整型 | |
| state | 状态 | 整型 | 0-启动,1-停止,2-删除 |
| memo | 备注 | 字符串 | |
| add_time | 添加时间 | 字符串 | |
| categroy_id | 产品分类id | 整型 | |
| profile | 产品图片 | 字符串 | |
| standard | 规格 | 字符串 |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
string url = "/api/product/list?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" +checksum;
// 采用GET方式提交
string result = Get(url);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口导入产品
| /api/product/import |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| type | 导入选项 | 字符串 | 0-增量数据:存在的覆盖,不存在的新建 1-全数据:清空已有,全部新建 (导入的数据分类若不存在,则新建分类) |
| data | 导入数据 | 字符串 | json格式,如:[{"name":"地毯客厅简约现代","specification":"200*300CM","price":399.00,"profile":null,"state":2,"memo":"","category_name":"客厅","standard":null}] |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时返回导入的产品数据 |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
int type = 0;
string data = "导入数据";
string url = "/api/product/import?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" +checksum + "&type=" + type;
// 采用POST方式提交
string result = Post(url, "data=" + data);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口新增订单
| /api/order/add |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| order_num | 订单编号 | 字符串 | 为空则自动生成 |
| memo | 备注 | 字符串 | |
| finish_time | 完成时间 | 字符串 | |
| seller_id | 销售人员id | 整型 | |
| client_id | 客户id | 整型 | |
| is_final | 是否已终审 | 整型 | 0-否,1-是 |
| auditflow_id | 审核流程id | 整型 | |
| is_lock | 是否锁定 | 整型 | 0-否,1-是 |
| product | 产品 | 字符串 | json格式,如:[{"product_id",1,"count":1,"unit_price":399.00}] |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时返回订单id |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
string orderNum = "订单编号";
string memo = "备注";
string finishTime = "完成时间";
int sellerId = 销售人员id;
int clientId = 客户id;
int isFinal = 是否已终审;
int auditflowId = 审核流程id
int isLock =是否锁定;
string product = "json格式";
string url = "/api/order/add?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" +checksum;
string data = "order_num=" + orderNum + "&memo=" + memo + "&finish_time=" + finishTime + "&seller_id=" + sellerId + "&client_id=" + clientId + "&is_final=" + isFinal + "&auditflow_id=" + auditflowId + "&=is_lock" + isLock + "&product=" + product;
// 采用POST方式提交
string result = Post(url, data);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口获取订单详情
| /api/order/get |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| id | 订单id | 整型 | 可选,订单id和订单编号必需输入一个 |
| order_num | 订单编号 | 整型 | 可选,订单id和订单编号必需输入一个 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时根据不同接口返回不同类型的数据 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| add_time | 添加时间 | 字符串 | |
| audit_flow_id | 审核流程id | 整型 | |
| audit_opinion | 审核意见 | 整型 | |
| audit_state | 审核状态 | 整型 | 0-未审核,1-已审核,2-审核不通过 |
| audit_time | 审核时间 | 字符串 | |
| audit_user_id | 审核人员id | 整型 | |
| client_id | 客户id | 整型 | |
| contracts | 关联合同列表 | 类 | contracts |
| current_audit_num | 当前审核序号 | 整型 | |
| current_node_num | 当前流程节点序号 | 整型 | |
| finish_time | 订单完成时间 | 字符串 | |
| id | 订单id | 整型 | |
| is_final | 是否已终审 | 整型 | 0-否,1-是 |
| is_lock | 是否锁定 | 整型 | 0-否,1-是 |
| memo | 备注 | 整型 | |
| money | 金额 | 整型 | |
| order_details | 订单详情 | 类 | order_details |
| order_num | 订单号 | 字符串 | |
| seller_id | 销售人员id | 整型 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| id | 合同id | 整型 | |
| num | 合同编号 | 字符串 | |
| name | 合同名称 | 字符串 | |
| add_time | 添加时间 | 字符串 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| count | 数量 | 整型 | |
| id | 订单详情id | 整型 | |
| money | 金额 | 整型 | |
| product_id | 产品id | 整型 | |
| unit_price | 单价 | 整型 |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
int id = 订单id;
string orderNum = "订单编号";
string url = "/api/order/get?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" +checksum + "&id=" + id + "&order_num=" + orderNum;
// 采用GET方式提交
string result = Get(url);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口删除订单
| /api/order/delete |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| id | 订单id | 整型 | 可选,订单id和订单编号必需输入一个 |
| order_num | 订单编号 | 整型 | .可选,订单id和订单编号必需输入一个 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时根据不同接口返回不同类型的数据 |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
int id = 订单id;
string orderNum = "订单编号";
string url = "/api/order/delete?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" +checksum + "&id=" + id + "&order_num=" + orderNum;
// 采用GET方式提交
string result = Get(url);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口获取自定义列表
| /api/custom/get |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时根据不同接口返回不同类型的数据 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| id | 自定义表id | 整型 | |
| name | 自定义表名称 | 字符串 | |
| columns | 自定义表字段 | 类 | columns |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| checktype | 校验格式 | 整型 | 0不校验,1正整数,2纯字母,3日期(格式为YYYY-MM-DD),4日期(格式为YYYY-MM-DD HH:mm),5电子邮箱,6纯数字 |
| id | 字段id | 整型 | |
| is_default | 是否默认字段 | 整型 | 0-否,1-是 |
| is_expout | 是否导出 | 整型 | 0-否,1-是 |
| is_list | 是否列表显示 | 整型 | 0-否,1-是 |
| is_search | 是否搜索栏显示 | 整型 | 0-否,1-是 |
| maxlength | 最大长度 | 整型 | |
| minlength | 最小长度 | 整型 | |
| name | 字段名称 | 字符串 | |
| notnull | 不允许为空 | 整型 | 0-否,1-是 |
| searchtype | 搜索方式 | 整型 | 0绝对匹配,1模糊匹配,2区间匹配 |
| sort | 显示顺序 | 整型 | |
| type | 录入方式 | 整型 | 1文本框 ,2下拉框,3自动获取系统时间(修改数据时更新),4自动获取系统时间(修改数据时不更新),5自动获取系统登录人的Id(修改数据时更新),6自动获取系统登录人的Id(修改数据时不更新),7自动获取系统登录人的部门Id,8绑定客户,9绑定订单,10绑定产品,11绑定合同,12绑定文档 |
| unique | 是否唯一 | 整型 | 0-否,1-是 |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
string url = "/api/custom/get?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" +checksum;
// 采用GET方式提交
string result = Get(url);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口添加自定义列表
| /api/custom/add |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| name | 自定义表名称 | 字符串 | |
| columns | 自定义表字段数据 | 字符串 | json格式,如:[{"checktype":0,"columntype":0,"is_default":false,"is_expout":false,"is_list":false,"is_search":false,"maxlength":0,"minlength":0,"name":null,"notnull":false,"searchtype":0,"sort":0,"unique":false}] |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时返回自定义表id |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
string name = "自定义表名称";
string columns = "自定义表字段数据";
string url = "/api/custom/add?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" +checksum;
string data = "name=" + name + "&columns=" + columns;
// 采用POST方式提交
string result = Post(url, data);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口获取日历日程列表
| /api/calendar/get |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时根据不同接口返回不同类型的数据 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| Id | 日历日程表id | 整型 | |
| Content | 日历日程表内容 | 字符串 | |
| transactor | 日历日程表办理人 | 类 | transactor |
| touser | 日历日程表分享人 | 类 | touser |
| user | 日历日程表创建人 | 类 | user |
| RemindType | 提醒时间 | 整型 | 0-不提醒;1-准时;2-提前10分钟;3-提前30分钟;4-提前60分钟;5-提前1小时;6-提前2小时;7-提前6小时;8-提前1天 |
| Level | 日程紧急程度 | 整型 | 0-一般;1-重要;2-紧急 |
| RepeatType | 重复类型 | 整型 | 0-不重复;1-每日;2-每周;3-每月 |
| RepeatDay | 重复间隔 | 整型 | |
| RepeatEndType | 重复结束方式 | 整型 | 0-从不;1-次数;2-日期 |
| RepeatEndValue | 重复结束值 | 字符串 | 0-次数值;或者 2019-4-2 14:49-日期 |
| StartTime | 开始时间 | 字符串 | |
| EndTime | 结束时间 | 字符串 | |
| Remark | 备注 | 字符串 | |
| RepeatId | 重复日程关联id | 整型 | null:没有关联 |
| AddTime | 创建时间 | 字符串 | |
| files | 附件 | 类 | files |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| Id | 字段id | 整型 | |
| RealName | 真实姓名 | 字符串 | |
| NikeName | 昵称 | 字符串 | |
| UserName | 用户名 | 字符串 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| Id | 字段id | 整型 | |
| FileName | 文件名称 | 字符串 | |
| Path | 文件路径 | 字符串 |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
string url = "/api/calendar/get?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" +checksum;
// 采用GET方式提交
string result = Get(url);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口添加日历日程
| /api/calendar/add |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| content | 内容 | 字符串 | |
| transactor | 办理人字段数据 | 字符串 | 办理日历日程的用户id集合(多个id之间用,分割);可从查询用户获取 |
| touser | 分享人字段数据 | 字符串 | 分享日历日程的用户id集合(多个id之间用,分割);可从查询用户获取 |
| starttime | 开始时间 | 字符串 | 格式:2019-05-31 09:50 |
| endtime | 结束时间 | 字符串 | 格式:2019-05-31 09:50 |
| remindtype | 提醒时间类型 | 整形 | 默认为:0-不提醒;1-准时;2-提前10分钟;3-提前30分钟;4-提前60分钟;5-提前1小时;6-提前2小时;7-提前6小时;8-提前1天; |
| level | 紧急程度 | 整形 | 默认为:0-一般;1-重要;2-紧急 |
| repeattype | 重复类型 | 整形 | 默认为:0-不重复;1-每日;2-每周;3-每月 |
| repeatday | 重复间隔 | 整形 | |
| repeatendtype | 结束方式 | 整形 | 默认为:0-从不;1-次数;2-日期 |
| repeatendvalue | 结束值 | 字符串 | 0-次数值;或者 2019-4-2 14:49-日期 |
| remark | 备注 | 字符串 | |
| files | 附件 | 字节流 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时返回自定义表id |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
string content = "内容";
string transactor = "办理人字段数据";
string touser = "分享人字段数据";
string starttime = "开始时间";
string endtime = "结束时间";
string remindtype = "提醒时间类型";
string level = "紧急程度";
string repeattype = "重复类型";
string repeatday = "重复间隔";
string repeatendtype = "结束方式";
string repeatendvalue = "结束值";
string remark = "备注";
string file = "附件";
string url = "/api/calendar/add?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" +checksum;
string data = "content=" + content + "&transactor=" + transactor+"touser=" + touser + "&starttime=" + starttime+"endtime=" + endtime + "&remindtype=" + remindtype+"level=" + level + "&repeattype=" + repeattype+ "&repeatday=" + repeatday+"repeatendtype=" + repeatendtype + "&repeatendvalue=" + repeatendvalue+"remark=" + remark;
// 采用POST方式提交
string result = Post(url, data);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口编辑日历日程
| /api/calendar/edit |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| id | 日历日程id | 整形 | |
| content | 内容 | 字符串 | |
| transactor | 办理人字段数据 | 字符串 | 办理日历日程的用户id集合(多个id之间用,分割);可从查询用户获取 |
| touser | 分享人字段数据 | 字符串 | 分享日历日程的用户id集合(多个id之间用,分割);可从查询用户获取 |
| starttime | 开始时间 | 字符串 | 格式:2019-05-31 09:50 |
| endtime | 结束时间 | 字符串 | 格式:2019-05-31 09:50 |
| remindtype | 提醒时间类型 | 整形 | 默认为:0-不提醒;1-准时;2-提前10分钟;3-提前30分钟;4-提前60分钟;5-提前1小时;6-提前2小时;7-提前6小时;8-提前1天; |
| level | 紧急程度 | 整形 | 默认为:0-一般;1-重要;2-紧急 |
| repeattype | 重复类型 | 整形 | 默认为:0-不重复;1-每日;2-每周;3-每月 |
| repeatday | 重复间隔 | 整形 | |
| repeatendtype | 结束方式 | 整形 | 默认为:0-从不;1-次数;2-日期 |
| repeatendvalue | 结束值 | 字符串 | 0-次数值;或者 2019-4-2 14:49-日期 |
| remark | 备注 | 字符串 | |
| files | 附件 | 字节流 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时返回自定义表id |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
string id = "id";
string content = "内容";
string transactor = "办理人字段数据";
string touser = "分享人字段数据";
string starttime = "开始时间";
string endtime = "结束时间";
string remindtype = "提醒时间类型";
string level = "紧急程度";
string repeattype = "重复类型";
string repeatday = "重复间隔";
string repeatendtype = "结束方式";
string repeatendvalue = "结束值";
string remark = "备注";
string file = "附件";
string url = "/api/calendar/edit?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" +checksum;
string data = "id=" + id + "content=" + content + "&transactor=" + transactor+"touser=" + touser + "&starttime=" + starttime+"endtime=" + endtime + "&remindtype=" + remindtype+"level=" + level + "&repeattype=" + repeattype+ "&repeatday=" + repeatday+"repeatendtype=" + repeatendtype + "&repeatendvalue=" + repeatendvalue+"remark=" + remark;
// 采用POST方式提交
string result = Post(url, data);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口删除日历日程
| /api/calendar/delete |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| id | 日历日程id | 整形 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时返回自定义表id |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
string id = "id";
string url = "/api/calendar/delete?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" +checksum;
string data = "id=" + id ;
// 采用POST方式提交
string result = Post(url, data);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口获取工作报告列表
| /api/workreport/get |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| id | 工作报告id | 整形 | |
| uid | 用户id | 整形 | 可从查询用户获取 |
| type | 类型 | 整形 | 0-全部,1-日报,2-周报,3-月报,4-季报,5-年中报告,6-年度报告 |
| key | 工作报告内容 | 字符串 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时根据不同接口返回不同类型的数据 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| id | 工作报告id | 整型 | |
| type | 类型 | 整型 | 1-日报,2-周报,3-月报,4-季报,5-年中报告,6-年度报告 |
| type_time | 报告类型时间 | 字符串 | |
| time_start | 报告类型开始时间 | 字符串 | |
| time_end | 报告类型结束时间 | 字符串 | |
| user_id | 创建人id | 整型 | |
| name | 创建人名称 | 字符串 | |
| content | 内容 | 字符串 |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
string id ="工作报告id";
string uid ="用户id";
string type ="类型";
string key ="工作报告内容";
string url = "/api/workreport/get?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" +checksum+"&id=" + id + "&uid=" +uid+"&type=" + type + "&key=" +key;
// 采用GET方式提交
string result = Get(url);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口添加工作报告
| /api/workreport/add |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| uid | 用户id | 整形 | 可从查询用户获取 |
| type | 类型 | 整型 | 1-日报,2-周报,3-月报,4-季报,5-年中报告,6-年度报告 |
| year | 年份 | 整型 | 范围[2000,当前年份] |
| month | 月份 | 整型 | 范围[1,12] |
| week | 周 | 整型 | 范围[1,53] |
| day | 天 | 整型 | 范围[1,31] |
| season | 季度 | 整型 | 范围[1,4] |
| title | 标题 | 字符串 | |
| content | 内容 | 字符串 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时返回自定义表id |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
string uid = "用户id";
string type = "类型";
string year = "年份";
string month = "月份";
string week = "周数";
string day = "天数";
string season = "季度数";
string title = "标题";
string content = "内容";
string id = "0";
string release = "1";
string url = "/api/workreport/add?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" +checksum;
string data = "uid=" + uid +"type=" + type + "&year=" + year+"month=" + month + "&week=" + week+"day=" + day + "&season=" + season+"title=" + title + "&content=" + content+ "&id=" + id+"release=" + release;
// 采用POST方式提交
string result = Post(url, data);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口获取薪资列表
| /api/salary/list |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| userid | 用户id | 整型 | 即用户的唯一编号 |
| name | 用户姓名 | 字符串 | 用户的姓名 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时返回薪资列表的数组 |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
string userid ="用户id";
string name ="用户姓名";
string url = "/api/salary/list?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" +checksum+"&userid=" + userid + "&name=" +name;
// 采用GET方式提交
string result = Get(url);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口获取假期类型列表
| /api/attendance/holidaytype |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时根据不同接口返回不同类型的数据 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| id | 假期类型id | 整型 | |
| accumulate | 累积到下一周期 | 布尔型 | true-是,false-否 |
| day | 初始天数 | 整型 | |
| effective | 立即生效 | 布尔型 | true-是,false-次年生效 |
| enable | 是否启用 | 布尔型 | true-是,false-否 |
| limitday | 限制请假天数 | 布尔型 | true-是,false-否 |
| name | 假期名称 | 字符串 | |
| paid | 是否带薪 | 布尔型 | true-是,false-否 |
| period | 假期周期 | 整型 | |
| plus | 每年添加的天数 | 整型 | |
| remark | 备注 | 字符串 | |
| time | 添加时间 | 字符串 | |
| type | 假期日 | 整型 | 0-工作日,1-自然日 |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
string url = "/api/attendance/holidaytype?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" + checksum;
// 采用GET方式提交
string result = Get(url);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口获取请假模块列表
| /api/attendance/modulelist |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时根据不同接口返回不同类型的数据 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| id | 模块id | 整型 | |
| add_time | 添加时间 | 字符串 | |
| audit | 是否需要审核 | 布尔型 | true-是,false-否 |
| name | 模块名称 | 字符串 | |
| update_time | 更新时间 | 字符串 |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
string url = "/api/attendance/modulelist?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" + checksum;
// 采用GET方式提交
string result = Get(url);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口获取请假模块详情
| /api/attendance/module |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| id | 模块id | 整型 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时根据不同接口返回不同类型的数据 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| id | 元素编号 | 整型 | |
| name | 元素名称 | 字符串 | |
| type | 元素类型 | 整型 | 1-文本框,2-下拉框,3-单选框,4-多选框 |
| option | 选项 | 类 | 当元素类型为2、3、4时有效,格式:{"id":0,"name":""} |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
int moduleId = 模块id;
string url = "/api/attendance/module?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" + checksum + "&id=" + moduleId;
// 采用GET方式提交
string result = Get(url);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口新增请假申请
| /api/attendance/apply |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| id | 模块id | 整型 | |
| uid | 申请用户id | 整型 | |
| data | 请求数据 | 字符串 | 通过获取请假模块详情接口,并上传数据,格式:[{"id":1,"value":""},{"id":2,"value":""},...],id为元素id,value为设置值 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时返回添加请假申请的id |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
int moduleId = 模块id;
int userId = 用户id;
string data = "数据";
string url = "/api/attendance/module?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" + checksum + "&id=" + moduleId + "&uid=" + userId + "&data=" + data;
// 采用GET方式提交
string result = Get(url);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口获取请假审核结果
| /api/attendance/applyresult |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| id | 请假id | 整型 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 0-待审核,1-通过,2-审核中,3-未通过 |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
int applyId = 请假id;
string url = "/api/attendance/applyresult?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" + checksum + "&id=" + applyId;
// 采用GET方式提交
string result = Get(url);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口进行外部打卡签到
| /api/attendance/checkin |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| uid | 签到用户id | 整型 | |
| ip | ip地址 | 字符串 | |
| lat | 纬度 | 浮点型 | |
| lng | 经度 | 浮点型 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时根据不同接口返回不同类型的数据 |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
int uid = 用户id;
string ip = "ip地址";
double lat = 纬度;
double lng = 经度;
string url = "/api/attendance/checkin?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" + checksum + "&uid=" + uid + "&ip=" + ip + "&lat=" + lat + "&lng=" + lng;
// 采用GET方式提交
string result = Get(url);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口获取用户考勤情况
| /api/attendance/info |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| uid | 用户id | 整型 | 可选 |
| name | 用户名 | 字符串 | 可选 |
| year | 年份 | 整型 | |
| month | 月份 | 整型 | |
| day | 天数 | 整型 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时根据不同接口返回不同类型的数据 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| id | 用户id | 整型 | |
| name | 用户名 | 字符串 | |
| dname | 部门 | 字符串 | |
| profile | 用户头像 | 字符串 | |
| scheduling | 排班名称 | 字符串 | |
| scheduling_sort | 排班序号 | 字符串 | |
| workday | 工作日 | 整型 | 0-未设置,1-上班,2-假期 |
| checkin | 签到时间 | 字符串 | |
| checkout | 签退时间 | 字符串 | |
| late_minute | 迟到时间 | 浮点型 | |
| workhour | 工时 | 浮点型 | |
| result | 考勤结果 | 字符串 |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
int uid = 用户id;
string name = "用户名";
int year = 年份;
int month = 月份;
int day = 天数;
string url = "/api/attendance/info?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" + checksum + "&uid=" + uid + "&name=" + name + "&year=" + year + "&month=" + month + "&day=" + day;
// 采用GET方式提交
string result = Get(url);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}
您可以通过接口获取用户考勤统计
| /api/attendance/stats |
|---|
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| prefix | 产品名称 | 字符串 | 即域名前缀 |
| username | 用户名 | 字符串 | 管理员用户名 |
| otime | 提交时间 | 字符串 | 即您提交到API接口时的当前时间戳。 若您提交时为2019年1月5日09点59分55秒112毫秒,则提交时间值为20190105095955112 |
| checksum | 验证串 | 字符串 | md5(prefix+username+md5(您的密码)+otime) |
| uid | 用户id | 整型 | 可选 |
| name | 用户名 | 字符串 | 可选 |
| year | 年份 | 整型 | |
| month | 月份 | 整型 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| action | 接口动作名称 | 字符串 | api |
| status | 处理结果 | 字符串 | success:成功;failed:失败 |
| message | 返回数据 | 字符串 | 失败时为错误说明,成功时根据不同接口返回不同类型的数据 |
| 参数 | 名称 | 类型 | 说明 |
|---|---|---|---|
| id | 用户id | 整型 | |
| name | 用户名 | 字符串 | |
| dname | 部门 | 字符串 | |
| profile | 用户头像 | 字符串 | |
| workday | 应出勤天数 | 整型 | |
| realday | 实际出勤天数 | 整型 | |
| abnormal | 异常天数 | 整型 | |
| lateday | 迟到天数 | 浮点型 | |
| latetime | 迟到天数 | 整型 | |
| offearly | 早退次数 | 整型 | |
| unoff | 未签退次数 | 整型 | |
| completion | 旷工次数 | 整型 | |
| leave | 请假天数 | 整型 | |
| overtime | 加班天数 | 整型 | |
| outday | 外出天数 | 整型 | |
| trip | 出差天数 | 整型 | |
| calibration | 校准次数 | 整型 |
/*
* 账户校验接口.net代码范例
* 本范例中采用控制台程序实现
* modified: 2019-03-26
*/
// 主程序
static void Main(string[] args)
{
// 参数
string prefix = "域名前缀";
string username = "您的用户名";
string password = "您的密码";
string otime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
string checksum = MD5(prefix + username + MD5(password) + otime);
int uid = 用户id;
string name = "用户名";
int year = 年份;
int month = 月份;
string url = "/api/attendance/stats?prefix=" + prefix + "&username=" + username + "&otime=" + otime + "&checksum=" + checksum + "&uid=" + uid + "&name=" + name + "&year=" + year + "&month=" + month;
// 采用GET方式提交
string result = Get(url);
// 接口采用json格式返回数据
if (!string.IsNullOrEmpty(result))
{
ResultData obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(result);
result =string.IsNullOrEmpty(obj.message)?(obj.status== "success" ? "成功":"失败"):obj.message ;
}
Console.WriteLine(result);
Console.ReadKey();
}