Méthode getRecords - Comparaison
Objectif
Obtenir les détails d'un enregistrement.
URL de demande
Version 1.0 :
https://crm.zoho.com/crm/private/xml/Leads/getRecords?authtoken=AuthToken&scope=crmapi
Version 2.0 :
URL : https://www.zohoapis.com/crm/v2/Leads
Méthode : GET
En-tête : Authorization=Zoho-oauthtoken {oauth_token}
Paramètres de requête
Version 1.0 | Version 2.0 |
---|---|
authtoken=**** | Authorization=Zoho-oauthtoken ***** - comme En-tête. |
scope=crmapi | S/O |
selectColumns==Leads(First Name,Last Name,Email,Company,Campaign Source) | fields=First_Name,Last_Name,Email,Company First_Name,Last_Name,Email,Company sont des noms d'API de champ |
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 (horodatage au format ISO 8601) - comme En-tête. |
newFormat | S/O |
version | S/O |
Remarque :
- Chaque ligne (
) dans la v1 de l'API est équivalente à chaque JSONObject de la réponse de la v2 de l'API
Exemples de réponses :
Réponse dans la version 1.0 | Réponse dans la version 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 }]} |
Réponse du module des stocks
Version 1.0 | Version 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 } ], }, ]} |
Remarque :
- <FL val="Product Details"> dans l'API v1.0 est le JSONArray "Product_Details" dans l'API v2.0.
- Chaque ligne de produit (<product no="1">) est équivalente à chaque JSONObject dans le JSONArray Product_Details.
- <FL val="Line Tax">Sales Tax ===1:::0.44;;; Vat ===0.5:::0.22;;;</FL> dans la v1.0 est le JSONArray "line_tax" dans l'API v2.0.
- <FL val="Tax"><![CDATA[2.23]]></FL> est équivalent au JSONArray "$line_tax".
- <FL val="ACCOUNTID">1386586000002307022</FL><FL val="Account Name"><![CDATA[MSIT]]></FL> dans l'API v1.0 est équivalent à "Account_Name": {"name": "MSIT","id": "1386586000002307022"} dans l'API v2.0.
Réponse du module des dossiers
Version 1.0 | Version 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" }} ]} |
Remarque :
- <FL val="Comments"><comment no="1">....</comment></FL> dans l'API v1.0 devient un JSONArray comme "Comments": [{..},{..}] dans l'API v2.0.
Réponse du module des activités
Version 1.0 | Version 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" } |
Remarque :
- CONTACTID est équivalent à l'id dans le JSONObject Who_Id.
- Contact Name est équivalent au nom dans le JSONObject Who_Id.
- SEMODULE est équivalent à $se_module.
- RELATEDTOID est équivalent à l'id dans le JSONObject What_Id.
- Related To est équivalent au nom dans le JSONObject What_Id.