getRecordsメソッド - 比較
目的
データの詳細を取得します。
リクエストURL
バージョン1.0:
https://crm.zoho.com/crm/private/xml/Leads/getRecords?authtoken=AuthToken&scope=crmapi
バージョン2.0:
URL: https://www.zohoapis.com/crm/v2/Leads
メソッド:GET
ヘッダー:Authorization=Zoho-oauthtoken {oauth_token}
リクエストパラメーター
バージョン1.0 | バージョン2.0 |
---|---|
authtoken=**** | Authorization=Zoho-oauthtoken ***** - ヘッダー |
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 are field API names |
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日付時刻形式) - ヘッダー |
newFormat | N/A |
version | N/A |
注:
- v1 APIの各row(
)は、v2 APIのレスポンスの各JSONObjectに相当します。
レスポンス例:
バージョン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 } ], }, ]} |
注:
- <FL val="Product Details"> in v1.0 API is "Product_Details" JSONArray in v2.0 API.
- 各商品の行(<product no="1">)は、Product_Details JSONArrayの各JSONObjectに相当します。
- <FL val="Line Tax">Sales Tax ===1:::0.44;;; Vat ===0.5:::0.22;;;</FL> in v1.0 is "line_tax" JSONArray in v2.0 API.
- <FL val="Tax"><![CDATA[2.23]]></FL> is equivalent to "$line_tax" JSONArray.
- <FL val="ACCOUNTID">1386586000002307022</FL><FL val="Account Name"><![CDATA[MSIT]]></FL> in v1.0 API is equivalent to "Account_Name": {"name": "MSIT","id": "1386586000002307022"} in v2.0 API.
問い合わせタブのレスポンス
バージョン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" }} ]} |
注:
- <FL val="Comments"><comment no="1">....</comment></FL> in v1.0 API comes as JSONArray like "Comments": [{..},{..}] in v2.0 API.
活動タブのレスポンス
バージョン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 JSONObjectのidに相当します。
- Contact Nameは、Who_Id JSONObjectのnameに相当します。
- SEMODULEは、$se_moduleに相当します。
- RELATEDTOIDは、What_Id JSONObjectのidに相当します。
- Related Toは、What_Id JSONObjectのnameに相当します。