getRecords 方法 - 对比
用途
获取一个记录的详细信息。
请求URL
版本 1.0:
https://crm.zoho.com.cn/crm/private/xml/Leads/getRecords?authtoken=AuthToken&scope=crmapi
版本 2.0:
URL: https://www.zohoapis.com.cn/crm/v2/Leads
Method: GET
Header: Authorization=Zoho-oauthtoken {oauth_token}
请求参数
版本 1.0 | 版本 2.0 |
---|---|
authtoken=**** | Authorization=Zoho-oauthtoken ***** - 作为一个 Header. |
scope=crmapi | N/A |
selectColumns==Leads(First Name,Last Name,Email,Company,Campaign Source) | fields=First_Name,Last_Name,Email,Company First_Name,Last_Name,Email,Company 是字段 API 名称 |
fromIndex=1&toIndex=20 | page=1&per_page=20 |
sortColumnString=Last Name | sort_by=Last_Name |
sortOrderString=asc | sort_order=asc |
lastModifiedTime=2010-04-21 11:09:23 | If-Modified-Since=2010-04-21T11:09:23+05:30 (ISO 8601 Date time format) - 作为一个 Header. |
newFormat | N/A |
version | N/A |
备注:
- V 1.0 API中的每一行(
)都等于V 2.0 API响应中的每个JSON 对象
样本响应:
版本 1.0 响应 | 版本 2.0 响应 |
---|---|
<?xml version="1.0" encoding="UTF-8" ?> <response uri="/crm/private/xml/Leads/getRecords"> <result> <Leads> <row no="1"> <FL val="LEADID">1386586000002576001</FL> <FL val="SMOWNERID">1386586000000078001</FL> <FL val="Lead Owner"><![CDATA[Bruce Wills]]></FL> <FL val="Last Name"><![CDATA[WorkFlow_test]]></FL> <FL val="No of Employees"><![CDATA[0]]></FL> <FL val="Annual Revenue"><![CDATA[0]]></FL> <FL val="SMCREATORID">1386586000000078001</FL> <FL val="Created By"><![CDATA[Bruce Wills]]></FL> <FL val="MODIFIEDBY">1386586000000078001</FL> <FL val="Modified By"><![CDATA[Bruce Wills]]></FL> <FL val="Created Time"><![CDATA[2018-03-27 14:51:19]]></FL> <FL val="Modified Time"><![CDATA[2018-03-27 14:51:19]]></FL> <FL val="Full Name"><![CDATA[WorkFlow_test]]></FL> <FL val="Country"><![CDATA[India]]></FL> <FL val="Email Opt Out"><![CDATA[false]]></FL> <FL val="Currency"><![CDATA[INR]]></FL> <FL val="Exchange Rate"><![CDATA[1.000000000]]></FL> <FL val="Last Activity Time"><![CDATA[2018-03-27 14:51:19]]></FL> <FL val="Score"><![CDATA[0]]></FL> <FL val="Positive Score"><![CDATA[0]]></FL> <FL val="Negative Score"><![CDATA[0]]></FL> <FL val="Checkbox 1"><![CDATA[false]]></FL> <FL val="Auto-Number 1"><![CDATA[LEAD53N]]></FL> <FL val="Formula 1"><![CDATA[0]]></FL> <FL val="Positive Touch Point Score"><![CDATA[0]]></FL> <FL val="Touch Point Score"><![CDATA[0]]></FL> <FL val="Negative Touch Point Score"><![CDATA[0]]></FL> </row> </Leads> </result> </response> | { "data": [ { "Owner": { "name": "Bruce Wills", "id": "1386586000000078001" }, "Company": null, "Email": null, "$currency_symbol": "₹", "Single_Line_2": null, "Visitor_Score": null, "Total_Quantity": null, "Last_Activity_Time": "2018-03-27T14:51:19+05:30", "Industry": null, "$converted": false, "$process_flow": false, "URL_1": null, "Exchange_Rate": 1, "Date_1": null, "Currency": "INR", "Street": null, "Zip_Code": null, "id": "1386586000002576001", "$approved": true, "Grand_Total": null, "$approval": { "delegate": false, "approve": false, "reject": false, "resubmit": false }, "Days_Visited": null, "First_Visited_URL": null, "Negative_Touch_Point_Score": 0, "Created_Time": "2018-03-27T14:51:19+05:30", "$followed": false, "$editable": true, "City": null, "No_of_Employees": 0, "Positive_Touch_Point_Score": 0, "Number_1": null, "Score": 0, "Negative_Score": 0, "State": null, "Email_1": null, "Country": "India", "Phone_1": null, "Last_Visited_Time": null, "Multi_Select_1": [], "Created_By": { "name": "Bruce Wills", "id": "1386586000000078001" }, "Annual_Revenue": 0, "Secondary_Email": null, "Checkbox_1": false, "Currency_1": null, "Touch_Point_Score": 0, "Positive_Score": 0, "Description": null, "Decimal_1": null, "Multi_Line_1": null, "Number_Of_Chats": null, "Rating": null, "Website": null, "Twitter": null, "Average_Time_Spent_Minutes": null, "Salutation": null, "First_Name": null, "Full_Name": "WorkFlow_test", "Lead_Status": null, "Modified_By": { "name": "Bruce Wills", "id": "1386586000000078001" }, "Skype_ID": null, "Phone": null, "Email_Opt_Out": false, "Date_Time_1": null, "Long_Integer_1": null, "Designation": null, "Modified_Time": "2018-03-27T14:51:19+05:30", "Percent_1": null, "$converted_detail": {}, "Mobile": null, "First_Visited_Time": null, "Last_Name": "WorkFlow_test", "Layout": { "name": "Standard", "id": "1386586000000343003" }, "Auto_Number_1": "LEAD53N", "Referrer": null, "Lead_Source": null, "Formula_1": 0, "Tag": [], "Fax": null }]} |
库存模块的响应
版本 1.0 | 版本 2.0 |
---|---|
<?xml version="1.0" encoding="UTF-8" ?> <response uri="/crm/private/xml/Invoices/getRecords"> <result> <Invoices> <row no="1"> <FL val="ACCOUNTID">1386586000002307022</FL> <FL val="Account Name"><![CDATA[MSIT]]></FL> <FL val="Tax"><![CDATA[2.23]]></FL> <FL val="Adjustment"><![CDATA[0]]></FL> <FL val="Grand Total"><![CDATA[46.89]]></FL> <FL val="Product Details">> <product no="1"> <FL val="Product Id">1386586000000097001</FL> <FL val="Product Name"><![CDATA[C Programming]]></FL> <FL val="Unit Price">22.0</FL> <FL val="Quantity">2.0</FL> <FL val="Quantity in Stock">898.0</FL> <FL val="Total">44.00</FL> <FL val="Discount">0.00</FL> <FL val="Total After Discount">44.0</FL> <FL val="List Price">22.00</FL> <FL val="Net Total">44.66</FL> <FL val="Tax">0.66</FL> <FL val="Line Tax">Sales Tax===1:::0.44;;; Vat ===0.5:::0.22;;;</FL> </product> </FL> <FL val="Discount"><![CDATA[0]]></FL> <FL val="Currency"><![CDATA[INR]]></FL> <FL val="Exchange Rate"><![CDATA[1.000000000]]></FL> </row> </Invoices> </result> </response> | { "data": [ { "Owner": { "name": "Bruce Wills", "id": "1386586000000078001" }, "Discount": 0, "Tax": 2.23, "Account_Name": { "name": "MSIT", "id": "1386586000002307022" }, "id": "1386586000002581073", "Grand_Total": 46.89, "Product_Details": [ { "product": { "Product_Code": "C", "Currency": "INR", "name": "C Programming", "id": "1386586000000097001" }, "quantity": 2, "Discount": 0, "total_after_discount": 44, "net_total": 44.66, "book": null, "Tax": 0.66, "list_price": 22, "unit_price": 22, "quantity_in_stock": 898, "total": 44, "id": "1386586000002581075", "product_description": null, "line_tax": [ { "percentage": 1, "name": "Sales Tax", "value": 0.44 }, { "percentage": 0.5, "name": "Vat", "value": 0.22 } ] } ], "$line_tax": [ { "percentage": 2, "name": "Sales Tax", "value": 0.89 }, { "percentage": 3, "name": "Vat", "value": 1.34 } ], }, ]} |
备注:
- API V1 中的<FL val="Product Details"> 就等于 API V2 中的JSON 数组 "Product_Details" 。
- 每个产品行(<product no="1">) 就等于 Product_Details JSON 数组 中的每个 JSON 对象。
- API V1 中的<FL val="Line Tax">Sales Tax ===1:::0.44;;; Vat ===0.5:::0.22;;;</FL> 就是 API V2中的 "line_tax" JSON 数组。
- <FL val="Tax"><![CDATA[2.23]]></FL> 就等于 "$line_tax" JSON 数组。
- API V1 中的<FL val="ACCOUNTID">1386586000002307022</FL><FL val="Account Name"><![CDATA[MSIT]]></FL> 就等于API V2中的 "Account_Name": {"name": "MSIT","id": "1386586000002307022"} 。
服务支持模块的响应
版本 1.0 | 版本 2.0 |
---|---|
<?xml version="1.0" encoding="UTF-8" ?> <response uri="/crm/private/xml/Invoices/getRecords"> <result> <Cases> <row no="1"> <FL val="CASEID">1386586000002581001</FL> --- <FL val="Subject"><![CDATA[test]]></FL> <FL val="No of comments"><![CDATA[2]]></FL> <FL val="Comments"> <comment no="1"> <FL val="Comment Content"><![CDATA[Nice one,goodgoing.x]]> </FL> <FL val="Commented By"><![CDATA[Bruce Wills]]></FL> <FL val="Commented Time">2018-03-28 10:02:04</FL> </comment> <comment no="2"> <FL val="Comment Content"><![CDATA[great awesome stuff]]> </FL> <FL val="Commented By"><![CDATA[Bruce Wills]]></FL> <FL val="Commented Time">2018-03-28 10:01:52</FL> </comment> </FL> </row> </Invoices> </result> </response> | { "data": [ { "No_of_comments": 2, "id": "1386586000002581001" "Comments": [ { "commented_by": "Bruce Wills", "commented_time": "2018-03-28T10:01:52+05:30", "comment_content": "Nice one,goodgoing.x", "id": "1386586000002581008", }, { "commented_by": "Bruce Wills", "commented_time": "2018-03-28T10:02:04+05:30", "comment_content": "great awesome stuff", "id": "1386586000002581013" } ], "Subject": "test", "Type": null, "Tag": [], "Created_By": { "name": "Bruce Wills", "id": "1386586000000078001" }} ]} |
备注:
- API V1 中的<FL val="Comments"><comment no="1">....</comment></FL> 就像 API V2 中的JSON 数组 "Comments": [{..},{..}] 。
活动模块的响应
版本 1.0 | 版本 2.0 |
---|---|
<FL val="CONTACTID"><![CDATA[1386586000002379006]]></FL> <FL val="Contact Name"><![CDATA[con2]]></FL> <FL val="SEMODULE"><![CDATA[Accounts]]></FL> <FL val="RELATEDTOID"><![CDATA[1386586000001570009]]></FL> <FL val="Related To"><![CDATA[MSIT]]></FL> | "Who_Id": { "name": "con2", "id": "1386586000002379006" }, "$se_module": "Accounts", "What_Id": { "name": "MSIT", "id": "1386586000001570009" } |
备注:
- CONTACTID 等于 Who_Id JSON 对象中的ID。
- Contact Name 等于 Who_Id JSON 对象中的名称。
- SEMODULE 等于 $se_module。
- RELATEDTOID 等于 What_Id JSON 对象中的ID。
- Related To 等于 What_Id JSON 对象中的名称。