POST
说明
api说明信息:
返回满足条件的记录总数
成功返回:
{
"resp": "succ",
"result": {
"total_results": 3654
}
}
失败返回:
{
"resp":"fail",
"error_code":"4001",
"msg":"xxxxxxxxxxxx"
}
|
POST
说明
api说明信息:
字段列表参见:http://wiki.dev.shopex.cn/index.php?title=dataplatform_datastructure 基本信息表(customerinfo)
调用示例:
http://openapi.ishopex.cn/api/dccrm/customer/dirty
pageindex=1&dirtykeys=basic_customertype%3B&pagesize=1
成功返回:
{
"msg_id": "51629016C0A83D2D8021A0080F96CB20",
"resp": "succ",
"result": {
"customers": [
{
"basic_address": "上海市浦东银霄路100弄6号402室",
"basic_city": 310100,
"basic_country": "",
"basic_customername": "王东威",
"basic_customertype": 0,
"basic_district": 0,
"basic_enterprisetel": "",
"basic_enterprisetype": 0,
"basic_enterpriseweibo": "",
"basic_enterpriseweixin": "",
"basic_establishdate": 0,
"basic_intelitsys": 0,
"basic_islisted": 0,
"basic_province": 310000,
"basic_registeredcapital": 0.0,
"basic_website": "http://www.flyhuo.com",
"basic_zipcode": 201204,
"business_brand": "",
"business_employees": 0,
"business_industry": 0,
"business_mode": 0,
"business_oneyearturnover": 0,
"business_storesnum": 0,
"clue_source": 0,
"contact_age": 0,
"contact_email": "wangdongwei1972@gmail.com",
"contact_iskeycontact": 0,
"contact_isknowproduct": 0,
"contact_isuseproduct": 0,
"contact_knowway": "",
"contact_makingauthority": 0,
"contact_msn": "",
"contact_name": "王东威",
"contact_personshopexid": "",
"contact_phone": "13917455367",
"contact_product": 0,
"contact_qq": "",
"contact_sex": 0,
"contact_tel": "",
"contact_wangwang": "",
"contact_weibo": "",
"contact_weixin": "",
"customerinfo_createdate": 0,
"customerinfo_createperson": "",
"customerinfo_id": 10,
"customerinfo_remark": "13",
"customerinfo_source": 5,
"customerinfo_sourceid": "1716",
"customerinfo_updatedate": 0,
"customerinfo_updateperson": "",
"user_account": "",
"user_accountamount": 0.0,
"user_followinfo": "",
"user_opentime": 0,
"user_shopexid": "110110619801"
}
],
"pageindex": 1,
"pagesize": 1,
"total": 228903
}
}
失败返回:
{
"resp":"fail",
"error_code":"4001",
"msg":"xxxxxxxxxxxx"
}
|
POST
说明
api说明信息:
对搜索出来的若干客户,我们可以把他们打一个tag.
如果idlist不为空,那么将idlist指定的那些客户打上tag.
如果where不为空,那么将sql的where过滤出来的客户们打上tag.
如果idlist和where同为空,或同为不空,则报错
调用示例:
json=
{
'tagname': 'tag13',
'tagprefix': 'lazyboy',
'idlist':'',
'filters': [
{"field_name":"customerid","opertator": "<", "value":"40"}
]
}
或
json=
{
'tagname': 'tag13',
'tagprefix': 'lazyboy',
'idlist':'1;2;4;5;6',
'filters': ''
}
成功返回:
{
"msg_id": "5152A0A37F0000018E2DB5D64FE07D0F",
"resp": "succ",
"result": {
"tag_id": 9
}
}
失败返回:
{
"error_code": "",
"msg": "tag名称已存在,不能重复创建",
"msg_id": "5152A07F7F000001B2EE7B5801FE8710",
"resp": "fail"
}
|
POST
说明
api说明信息:
- basic_customername: 客户名称
- contact_email: email邮箱
- contact_phone:手机
- contact_tel:电话
- customerinfo_source: 数据来源, 例如,营收平台、turobocrm、用户中心、etc
- customerinfo_sourceid: 该客户在原有系统中的唯一标识
以上是必要字段.
完整数据结构信息参见:http://wiki.dev.shopex.cn/index.php?title=dataplatform_datastructure
基本信息表(customerinfo)
调用示例:
http://openapi.ishopex.cn/dccrm/customer/insert
{
"customerinfo_id":17,
"basic_customername":"上海商派网络科技有限公司",
"basic_customertype":"个人",
"basic_country":"中国",
"basic_province":"上海市",
"basic_city":"上海市",
"basic_district":"徐汇区",
"basic_address":"上海市徐汇区桂林路396号2号楼",
"basic_zipcode":"200233",
"basic_islisted":"否",
"basic_enterprisetel":"021-33251818",
"basic_enterpriseweibo":"http://weibo.com/shopexec",
"basic_enterpriseweixin":"",
"basic_website":"http://www.shopex.cn",
"basic_enterprisetype":"",
"basic_intelitsys":"",
"basic_establishdate":"",
"basic_registeredcapital":"",
"business_industry":"",
"business_oneyearturnover":"",
"business_employees":"",
"business_brand":"",
"business_mode":"",
"business_storesnum":"",
"contact_name":"",
"contact_phone":"",
"contact_tel":"",
"contact_qq":"",
"contact_msn":""
"contact_wangwang":"",
"contact_weibo":"",
"contact_weixin":"",
"contact_age":"",
"contact_sex":"",
"contact_email":"admin@shopex.cn",
"contact_isuseproduct":"",
"contact_isknowproduct":"",
"ontact_product":"",
"contact_knowway":"",
"contact_iskeycontact":"",
"contact_makingauthority":"",
"contact_personshopexid":"",
"clue_source":"",
"user_account":"",
"user_shopexid":"",
"user_accountamount":"",
"user_opentime":"",
"user_followinfo":"",
"customerinfo_remark":"",
"customerinfo_createperson":"",
"customerinfo_createdate":"",
"customerinfo_updateperson":"",
"customerinfo_updatedate":"",
"customerinfo_source":"",
"customerinfo_sourceid":""
}
成功返回:
{
"msg_id": "51529DA17F000001F25030E7DB56D75E",
"resp": "succ",
"result": {
"customerinfo_id": 4
}
}
失败返回:
{
"resp":"fail",
"error_code":"4001",
"msg":"xxxxxxxxxxxx"
}
[rev] => 57
[mtime] => 1366100600
)
)
|
POST
说明
api说明信息:
字段列表参见:http://wiki.dev.shopex.cn/index.php?title=dataplatform_datastructure 基本信息表(customerinfo)
调用示例:
http://openapi.ishopex.cn/api/dccrm/customer/query
proplist=name;tel;email&where=email%20like%20'%.shopex.cn'&orderby=name&pageindex=2&pagesize=40
成功返回:
{
"resp": "succ",
"result": {
"pageindex": 10,
"pagesize": 50,
"customers": [
{
"email": "test1@shopex.cn",
"name": "客户1",
"tel": "18621908423"
},
{
"email": "test2@shopex.cn",
"name": "客户2",
"tel": "18621908424"
}
]
}
}
失败返回:
{
"resp":"fail",
"error_code":"4001",
"msg":"xxxxxxxxxxxx"
}
|
POST
说明
api说明信息:
字段列表参见:http://wiki.dev.shopex.cn/index.php?title=dataplatform_datastructure 基本信息表(customerinfo)
查询时,按json所有字段全匹配来进行搜索。
1. 查询客户信息,如果不存在就创建一条.
2. 如果查询到多条客户信息,则只返回第一条
例如下面调用示例中,会搜索出"contact_phone"为"18600826821",同时"contact_wangwang"为"wangwang1"的客户信息。
如果该例中查询不到记录,那么会创建一个新的客户,"contact_phone"为"18600826821","contact_wangwang"为"wangwang1"。
这样新创建客户的属性会比较少,该客户信息可以调用客户的修改接口来追加其它属性。
调用示例:
http://openapi.ishopex.cn/api/dccrm/customer/queryid_ensure
{
"contact_phone":"18600826821",
"contact_wangwang":"wangwang1"
}
成功返回:
{
"resp": "succ",
"result": {
"customerinfo_id": "2341414"
}
}
失败返回:
{
"resp":"fail",
"error_code":"4001",
"msg":"xxxxxxxxxxxx"
}
|
POST
说明
api说明信息:
完整数据结构信息参见:http://wiki.dev.shopex.cn/index.php?title=dataplatform_datastructure
基本信息表(customerinfo)
调用示例:
http://openapi.ishopex.cn/api/dccrm/customer/update
{
"customerinfo_id":17,
"basic_customername":"上海商派网络科技有限公司",
"basic_customertype":"个人",
"basic_country":"中国",
"basic_province":"上海市",
"basic_city":"上海市",
"basic_district":"徐汇区",
"basic_address":"上海市徐汇区桂林路396号2号楼",
"basic_zipcode":"200233",
"basic_islisted":"否",
"basic_enterprisetel":"021-33251818",
"basic_enterpriseweibo":"http://weibo.com/shopexec",
"basic_enterpriseweixin":"",
"basic_website":"http://www.shopex.cn",
"basic_enterprisetype":"",
"basic_intelitsys":"",
"basic_establishdate":"",
"basic_registeredcapital":"",
"business_industry":"",
"business_oneyearturnover":"",
"business_employees":"",
"business_brand":"",
"business_mode":"",
"business_storesnum":"",
"contact_name":"",
"contact_phone":"",
"contact_tel":"",
"contact_qq":"",
"contact_msn":""
"contact_wangwang":"",
"contact_weibo":"",
"contact_weixin":"",
"contact_age":"",
"contact_sex":"",
"contact_email":"admin@shopex.cn",
"contact_isuseproduct":"",
"contact_isknowproduct":"",
"ontact_product":"",
"contact_knowway":"",
"contact_iskeycontact":"",
"contact_makingauthority":"",
"contact_personshopexid":"",
"clue_source":"",
"user_account":"",
"user_shopexid":"",
"user_accountamount":"",
"user_opentime":"",
"user_followinfo":"",
"customerinfo_remark":"",
"customerinfo_createperson":"",
"customerinfo_createdate":"",
"customerinfo_updateperson":"",
"customerinfo_updatedate":"",
"customerinfo_source":"",
"customerinfo_sourceid":""
}
成功返回:
{
"msg_id": "51529DA17F000001F25030E7DB56D75E",
"resp": "succ",
"result": {
}
}
失败返回:
{
"resp":"fail",
"error_code":"4001",
"msg":"xxxxxxxxxxxx"
}
|
POST
说明
api说明信息:
对搜索出来的若干客户,我们可以把他们打一个tag.
如果idlist不为空,那么将idlist指定的那些客户打上tag.
如果where不为空,那么将sql的where过滤出来的客户们打上tag.
如果idlist和where同为空,或同为不空,则报错
调用示例:
json=
{
'tagname': 'tag13',
'tagprefix': 'lazyboy',
'idlist':'',
'filters': [
{"field_name":"customerid","opertator": "<", "value":"40"}
]
}
或
json=
{
'tagname': 'tag13',
'tagprefix': 'lazyboy',
'idlist':'1;2;4;5;6',
'filters': ''
}
成功返回:
{
"msg_id": "5152A0A37F0000018E2DB5D64FE07D0F",
"resp": "succ",
"result": {
"tag_id": 9
}
}
失败返回:
{
"error_code": "",
"msg": "tag名称已存在,不能重复创建",
"msg_id": "5152A07F7F000001B2EE7B5801FE8710",
"resp": "fail"
}
|
|
POST
说明
api说明信息:
如果指定tag不存在,则报错
成功返回:
{
"resp":"succ"
}
失败返回:
{
"resp":"fail",
"error_code":"4001",
"msg":"xxxxxxxxxxxx"
}
|
POST
说明
api说明信息:
如果该客户无此tag不存在,则报错
成功返回:
{
"resp":"succ"
}
失败返回:
{
"error_code": "",
"msg": "tag不存在",
"msg_id": "5152A0F67F000001557C47631CA0A137",
"resp": "fail"
}
|
POST
说明
api说明信息:
如果指定的tag没有找到,那么报错
调用示例:
http://openapi.ishopex.cn/api/dccrm/tag/fetch
成功返回:
{
"msg_id": "5152A1A57F000001714BB7326AB1434A",
"resp": "succ",
"result": {
"customers": [
{
"basic_customername": "重庆罗斯科技有限公司",
"basic_province": "重庆",
"customerinfo_createdate": 0,
"customerinfo_id": 8
},
{
"basic_customername": "厦门市志必达信息科技有限公司",
"basic_province": "福建",
"customerinfo_createdate": 0,
"customerinfo_id": 9
},
{
"basic_customername": "王东威",
"basic_province": "上海",
"customerinfo_createdate": 0,
"customerinfo_id": 10
},
{
"basic_customername": "苏州新诚园艺材料有限公司",
"basic_province": "江苏",
"customerinfo_createdate": 0,
"customerinfo_id": 11
}
],
"pageindex": 1,
"pagesize": 50,
"total": 4
}
}
失败返回:
{
"error_code": "",
"msg": "tag不存在",
"msg_id": "5152A0F67F000001557C47631CA0A137",
"resp": "fail"
}
|
POST
说明
api说明信息:
如果taglist中指定的tag数少于两个, 那么直接返回成功。
字段列表参见:http://wiki.dev.shopex.cn/index.php?title=dataplatform_datastructure 基本信息表(customerinfo)
调用示例:
http://openapi.ishopex.cn/api/dccrm/tag/intersect
成功返回:
{
"msg_id": "5152A1A57F000001714BB7326AB1434A",
"resp": "succ",
"result": {
"customers": [
{
"basic_customername": "重庆罗斯科技有限公司",
"basic_province": "重庆",
"customerinfo_createdate": 0,
"customerinfo_id": 8
},
{
"basic_customername": "厦门市志必达信息科技有限公司",
"basic_province": "福建",
"customerinfo_createdate": 0,
"customerinfo_id": 9
},
{
"basic_customername": "王东威",
"basic_province": "上海",
"customerinfo_createdate": 0,
"customerinfo_id": 10
},
{
"basic_customername": "苏州新诚园艺材料有限公司",
"basic_province": "江苏",
"customerinfo_createdate": 0,
"customerinfo_id": 11
}
],
"pageindex": 1,
"pagesize": 50,
"total": 4
}
}
失败返回:
{
"resp":"fail",
"error_code":"4001",
"msg":"xxxxxxxxxxxx"
}
|
POST
说明
api说明信息:
该方法没有输入参数. 返回的tag列表以分号分隔
成功返回:
{
"msg_id": "5152A12C7F00000162EDFD14696E680D",
"resp": "succ",
"result": {
"tags": [
"tag3",
"tag7",
"tag4",
"tag6",
"tag8",
"tag2",
"tag1"
]
}
}
失败返回:
{
"resp":"fail",
"error_code":"4001",
"msg":"xxxxxxxxxxxx"
}
|