目前支持回款、仓库、入库单、库存、发货单、信用等对象的数据接口。
请求路径:https://open.71360.com/cgi/crm/v2/data/create
请求方式:post+application/json 方式
参数 | 参数类型 | 必须 | 备注 |
---|---|---|---|
corpAccessToken | String | 是 | 企业应用访问公司合法性凭证 |
corpId | String | 是 | 企业ID |
currentOpenUserId | String | 是 | 当前操作人OpenUserID |
data | Map | 是 | 对象数据map |
data.object_data | Map | 是 | 对象数据map(和对象描述中字段一一对应) |
data.details | Map | 否 | 对象明细数据map(和对象描述中字段一一对应) |
请求包结构体示例:
{ "corpAccessToken": "CORP_ACCESS_TOKEN", "corpId": "CORP_ID", "currentOpenUserId": "FSUID_XXXXXX", "data": { "object_data": { "dataObjectApiName":"PaymentObj", "record_type": "default__c", "account_id": "2d58af2dbb4d4ecd931e80ef18xxxxxx", "payment_amount": 1, "payment_time": 1517328000000, "payment_term": "post", "notification_time": 1516982400000, "owner": [ "FSUID_7B8A3925E40FA68630C0D7E9C3XXXXXX" ], "attachment": [], "remark": "002测试" }, "details": { "OrderPaymentObj": [ { "order_id": "974789b4d13040fcbb9d0ae35cxxxxxx", "payment_amount": "1", "attachment": [], "remark": "1111", "record_type": "default__c" } ] } } }
{ "corpAccessToken": "CORP_ACCESS_TOKEN", "corpId": "CORP_ID", "currentOpenUserId": "FSUID_XXXXXX", "data": { "object_data": { "dataObjectApiName": "GoodsReceivedNoteObj", "goods_received_date": 1520438400000, "warehouse_id": "5ab9e468830bdbc390daebb7", "goods_received_type": "1", "remark": "openapi测试add", "owner": [ "FSUID_XXXXXX" ] }, "details": { "GoodsReceivedNoteProductObj": [ { "product_id": "a86b57c8065140d1ae2922679603ebe5", "unit": "只", "goods_received_amount": "10009", "object_describe_api_name": "GoodsReceivedNoteProductObj" }, { "product_id": "c8658c7ac31a4686904bb38752640281", "goods_received_amount": "856325", "remark": "OpenApi test", "object_describe_api_name": "GoodsReceivedNoteProductObj" } ] } } }
a)正确的Json返回结果示例:
{ "dataId": "5a9ce894f125ae9befxxxxxx", "errorCode": 0, "errorMessage": "OK", "errorDescription": "success" }
b)错误的Json返回示例:
{ "errorCode": 320002500, "errorMessage": "客户名称关联关系不存在" }
请求路径:https://open.71360.com/cgi/crm/v2/data/update
请求方式:post+application/json 方式
参数 | 参数类型 | 必须 | 备注 |
---|---|---|---|
corpAccessToken | String | 是 | 企业应用访问公司合法性凭证 |
corpId | String | 是 | 企业ID |
currentOpenUserId | String | 是 | 当前操作人OpenUserID |
data | Map | 是 | 对象数据map |
data.object_data | Map | 是 | 对象数据map(和对象描述中字段一一对应) |
data.details | Map | 否 | 对象明细数据map(和对象描述中字段一一对应) |
请求包结构体示例:
{ "corpAccessToken": "CORP_ACCESS_TOKEN", "corpId": "CORP_ID", "currentOpenUserId": "FSUID_XXXXXX", "data":{ "object_data":{ "dataObjectApiName":"PaymentObj", "remark":"测试更新003", "_id":"5a9ce894f125ae9befxxxxxx", "record_type":"default__c", "object_describe_id":"5a61892fab18973f90xxxxxx", "account_id":"2d58af2dbb4d4ecd931e80ef18xxxxxx", "payment_time":1517328000000, "payment_term":"2", "notification_time":1517241600000, "attachment":[ ], "version":"2" }, "details":{ "OrderPaymentObj":[ { "version":"1", "_id":"5a65ca1396a74c1a3bxxxxxx", "order_id":"974789b4d13040fcbb9d0ae35cxxxxxx", "payment_amount":"200.00", "object_describe_api_name":"OrderPaymentObj", "record_type":"default__c" }, { "version":"1", "_id":"5a65ca1396a74c1a3bxxxxxx", "order_id":"974789b4d13040fcbb9d0ae35cxxxxxx", "payment_amount":"100.00", "object_describe_api_name":"OrderPaymentObj", "record_type":"default__c" } ] } } }
{ "corpAccessToken": "CORP_ACCESS_TOKEN", "corpId": "CORP_ID", "currentOpenUserId": "FSUID_XXXXXX", "data": { "object_data": { "dataObjectApiName": "GoodsReceivedNoteObj", "_id": "5ac1e101830bdb5f9feb192f", "remark": "openapi测试update2", "owner": [ "FSUID_XXXXXX" ] }, "details": { "GoodsReceivedNoteProductObj": [ { "_id": "5ac1e102830bdb5f9feb1934" } ] } } }
参数 | 必须 | 说明 |
---|---|---|
errorCode | 是 | 返回码 |
errorMessage | 是 | 对返回码的文本描述内容 |
a)正确的Json返回结果示例:
{ "errorCode": 0, "errorMessage": "success" }
b)错误的Json返回示例:
{ "errorCode": 20016, "errorMessage": "corpAccessToken error" }
请求路径:https://open.71360.com/cgi/crm/v2/data/query
请求方式:post+application/json 方式
参数 | 参数类型 | 必须 | 备注 |
---|---|---|---|
corpAccessToken | String | 是 | 企业应用访问公司合法性凭证 |
corpId | String | 是 | 企业ID |
currentOpenUserId | String | 是 | 当前操作人OpenUserID |
data | 二级对象 | 是 | 查询条件 |
data.dataObjectApiName | String | 是 | 对象的api_name |
data.search_query_info | 三级对象 | 是 | 查询条件列表 |
data.search_query_info.limit | int | 是 | 获取数据条数,默认20,最大值为1000(自定义对象最大值为100) |
data.search_query_info.offset | int | 是 | 偏移量,从0开始、数值必须为limit的整数倍 |
data.search_query_info.filters | List | 是 | 过滤条件列表 |
data.search_query_info.filters.field_name | String | 是 | 字段名 |
data.search_query_info.filters.field_values | List | 是 | 取值范围 |
data.search_query_info.filters.operator | String | 是 | 支持操作 |
data.search_query_info.orders | List | 是 | 排序 |
data.search_query_info.orders.fieldName | String | 是 | 字段名 |
data.search_query_info.orders.isAsc | boolean | 是 | 如果是ture,按照升序排列,如果是false,则按照倒序排列 |
data.search_query_info.fieldProjection | List | 否 | 返回字段列表 |
参数 | 参数含义 | 参数 | 参数含义 |
---|---|---|---|
EQ | = | GT | > |
LT | GTE | >= | |
LTE | N | ||
LIKE | LIKE | NLIKE | NOT LIKE |
IS | IS | ISN | IS NOT |
IN | IN | NIN | NOT IN |
BETWEEN | BETWEEN | NBETWEEN | NOT BETWEEN |
STARTWITH | LIKE% | ENDWITH | %LIKE |
NEXISTS | NOT EXISTS | EXISTS | EXISTS |
CONTAINS | Array 包含 |
请求包结构体示例:
{ "corpAccessToken": "CORP_ACCESS_TOKEN", "corpId": "CORP_ID", "currentOpenUserId": "FSUID_XXXXXX", "data": { "dataObjectApiName": "PaymentObj", "search_query_info": { "limit": 5, "offset": 0, "filters": [ { "field_name": "owner", "field_values": [ "FSUID_7B8A3925E40FA68630C0D7E9C3XXXXXX" ], "operator": "IN" } ], "orders": [ { "fieldName": "payment_amount", "isAsc": false } ], "fieldProjection": ["_id","name"] } } }
参数 | 必须 | 说明 |
---|---|---|
data | 是 | 查询结果 |
data.total | 是 | 总记录数 |
data.offset | 是 | 获取数据条数,默认20,最大值为1000(自定义对象最大值为100) |
data.limit | 是 | 偏移量,从0开始、数值必须为limit的整数倍 |
data.dataList | 是 | 数据列表 |
errorCode | 是 | 返回码 |
errorMessage | 是 | 对返回码的文本描述内容 |
errorDescription | 是 | 对返回码的文本描述内容 |
a)正确的Json返回结果示例:
{ "data": { "total": 4, "offset": 0, "dataList": [ { "payment_time": 1517328000000, "remark": "测试更新02", "account_id__r": "测试", "is_deleted": false, "attachment": [], "order_data_id": "974789b4d13040fcbb9d0ae35cxxxxxx", "total_num": 4, "owner_department": "董事会", "owner": [ "FSUID_0253C6D7FC0E3A2CBB19F336CEXXXXXX" ], "lock_status": "0", "last_modified_time": 1519986766107, "create_time": 1519985373616, "payment_term": "2", "life_status": "normal", "payment_amount": "300.00", "last_modified_by": [ "FSUID_0253C6D7FC0E3A2CBB19F336CEXXXXXX" ], "created_by": [ "FSUID_7B8A3925E40FA68630C0D7E9C3XXXXXX" ], "record_type": "default__c", "notification_time": 1517241600000, "account_id": "2d58af2dbb4d4ecd931e80ef18xxxxxx", "name": "20180302-000004", "_id": "5a9922dd742c2ff572xxxxxx", "order_id": "20180302-000002" }, { "payment_time": 1521561600000, "account_id__r": "测试", "is_deleted": true, "attachment": [], "order_data_id": "974789b4d13040fcbb9d0ae35cxxxxxx,cff4ca67f38c49639df64f50d3xxxxxx", "total_num": 4, "owner_department": "董事会", "owner": [ "FSUID_7B8A3925E40FA68630C0D7E9C3XXXXXX" ], "lock_status": "0", "last_modified_time": 1519984004508, "create_time": 1519978401106, "life_status": "invalid", "payment_amount": "20.00", "last_modified_by": [ "FSUID_0253C6D7FC0E3A2CBB19F336CEXXXXXX" ], "created_by": [ "FSUID_7B8A3925E40FA68630C0D7E9C3XXXXXX" ], "record_type": "default__c", "account_id": "2d58af2dbb4d4ecd931e80ef18xxxxxx", "name": "20180302-000002", "_id": "5a9907a1f125ae0a1axxxxxx", "order_id": "20180302-000002,20180302-000001" } ], "limit": 5 }, "errorCode": 0, "errorMessage": "OK", "errorDescription": "success" }
b)错误的Json返回示例:
{ "errorCode": 10006, "errorMessage": "the parameter corpAccessToken is missing or illegal", "errorDescription": "缺少参数 或参数 不合法" }
请求路径:https://open.71360.com/cgi/crm/v2/data/get
请求方式:post+application/json 方式
参数 | 参数类型 | 必须 | 备注 |
---|---|---|---|
corpAccessToken | String | 是 | 企业应用访问公司合法性凭证 |
网站提交留言-隐私协议
感谢您浏览本网站相关信息!
1、本协议是用户(“您”)与本网站所订立的契约,为方便您深入了解业务及提交需求等,本网站将为您提供更加个性化的留言表单服务,您在提交留言表单时,我们可能会收集和使用您的相关信息。我们非常重视用户信息的保护,我们将按照法律法规要求,采取相应的安全保护措施。
2、除非您已充分阅读、理解并同意接受和遵守本协议,否则,请勿提交留言表单。 您如果继续提交即表示接受本协议,本协议即在您与本网站之间产生法律效应。