Skip to content

Instantly share code, notes, and snippets.

@dubeyji10
Created August 1, 2022 06:43
Show Gist options
  • Select an option

  • Save dubeyji10/ac1db36402000edf376cb7f49e63f276 to your computer and use it in GitHub Desktop.

Select an option

Save dubeyji10/ac1db36402000edf376cb7f49e63f276 to your computer and use it in GitHub Desktop.

Revisions

  1. dubeyji10 created this gist Aug 1, 2022.
    285 changes: 285 additions & 0 deletions apiCallsReport.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,285 @@
    ## API Calls test cases and report
    ### After using response from get users api (https://www.zohoapis.in/crm/v2.1/users)
    #### Following test cases for insertion of record with owner assignment were performed



    <table>
    <thead>
    <th>REQUEST TYPE</th>
    <th>REQUEST URL</th>
    <th>REQUEST BODY</th>
    <th>REQUEST RESPONSE</th>
    </thead>
    <tr>
    <td>POST</td>
    <td>https://www.zohoapis.in/crm/v2.1/Leads</td>
    <td>
    <code>
    {
    "data": [
    {
    "Owner": {
    "name": "Nitisha Chawla"
    },
    "Company": "Dummy",
    "time_to": "2022-08-01",
    "Email": "[email protected]",
    "report_type": "Sample Report Dummy",
    "user_id": "nitisha70701",
    "Annual_Revenue": null,
    "Full_Name": "(lead) - HS Code 2704 & 2701",
    "Last_Name": "(lead) - HS Code 2704 & 2701",
    "Layout": {
    "name": "LeadsExportGenius",
    "id": "348201000000237745"
    },
    }
    ],
    "trigger": [
    "approval",
    "workflow",
    "blueprint"
    ]
    }
    </code>
    </td>
    <td>
    <code>
    {
    "data": [
    {
    "code": "EXPECTED_FIELD_MISSING",
    "details": {
    "expected_fields": [
    {
    "api_name": "id",
    "json_path": "$.data[0].Owner.id"
    },
    {
    "api_name": "email",
    "json_path": "$.data[0].Owner.email"
    }
    ]
    },
    "message": "Specify atleast one field",
    "status": "error"
    }
    ]
    }
    </code>
    </td>
    </tr>
    <tr>
    <td>POST</td>
    <td>https://www.zohoapis.in/crm/v2.1/Leads</td>
    <td>
    <code>
    {
    "data": [
    {
    "Owner": {
    "name": "Nitisha Chawla",
    "id": "270924000000253094",
    "email": "[email protected]"
    },
    "Company": "Dummy",
    "time_to": "2022-08-01",
    "Email": "[email protected]",
    "report_type": "Sample Report Dummy",
    "user_id": "nitisha70701",
    "Annual_Revenue": null,
    "Full_Name": "(lead) - HS Code 2704 & 2701",
    "Last_Name": "(lead) - HS Code 2704 & 2701",
    "Layout": {
    "name": "LeadsExportGenius",
    "id": "348201000000237745"
    },
    }
    ],
    "trigger": [
    "approval",
    "workflow",
    "blueprint"
    ]
    }
    </code>
    </td>
    <td>
    <code>
    {
    "data": [
    {
    "code": "INVALID_DATA",
    "details": {
    "api_name": "id",
    "json_path": "$.data[0].Owner.id"
    },
    "message": "invalid data",
    "status": "error"
    }
    ]
    }
    </code>
    </td>
    </tr>
    <tr>
    <td>POST</td>
    <td>https://www.zohoapis.in/crm/v2.1/Leads</td>
    <td>
    <code>
    {
    "data": [
    {
    "Owner": {
    "name": "Nitisha Chawla",
    "id": 270924000000253094,
    "email": "[email protected]"
    },
    "Company": "Dummy",
    "time_to": "2022-08-01",
    "Email": "[email protected]",
    "report_type": "Sample Report Dummy",
    "user_id": "nitisha70701",
    "Annual_Revenue": null,
    "Full_Name": "(lead) - HS Code 2704 & 2701",
    "Last_Name": "(lead) - HS Code 2704 & 2701",
    "Layout": {
    "name": "LeadsExportGenius",
    "id": "348201000000237745"
    },
    }
    ],
    "trigger": [
    "approval",
    "workflow",
    "blueprint"
    ]
    }
    </code>
    </td>
    <td>
    <code>
    {
    "data": [
    {
    "code": "INVALID_DATA",
    "details": {
    "api_name": "id",
    "json_path": "$.data[0].Owner.id"
    },
    "message": "invalid data",
    "status": "error"
    }
    ]
    }
    </code>
    </td>
    </tr>
    <tr>
    <td>POST</td>
    <td>https://www.zohoapis.in/crm/v2.1/Leads</td>
    <td>
    <code>
    {
    "data": [
    {
    "Owner": {
    "name": "Nitisha Chawla",
    "id": "270924000000263001",
    "email": "[email protected]"
    },
    "Company": "Dummy",
    "time_to": "2022-08-01",
    "Email": "[email protected]",
    "report_type": "Sample Report Dummy",
    "user_id": "nitisha70701",
    "Annual_Revenue": null,
    "Full_Name": "(lead) - HS Code 2704 & 2701",
    "Last_Name": "(lead) - HS Code 2704 & 2701",
    "Layout": {
    "name": "LeadsExportGenius",
    "id": "348201000000237745"
    },
    }
    ],
    "trigger": [
    "approval",
    "workflow",
    "blueprint"
    ]
    }
    </code>
    </td>
    <td>
    <code>
    {
    "data": [
    {
    "code": "INVALID_DATA",
    "details": {
    "api_name": "id",
    "json_path": "$.data[0].Owner.id"
    },
    "message": "invalid data",
    "status": "error"
    }
    ]
    }
    </code>
    </td>
    </tr>
    <tr>
    <td>POST</td>
    <td>https://www.zohoapis.in/crm/v2.1/Leads</td>
    <td>
    <code>
    {
    "data": [
    {
    "Owner": {
    "name": "Nitisha Chawla",
    "id": 270924000000263001,
    "email": "[email protected]"
    },
    "Company": "Dummy",
    "time_to": "2022-08-01",
    "Email": "[email protected]",
    "report_type": "Sample Report Dummy",
    "user_id": "nitisha70701",
    "Annual_Revenue": null,
    "Full_Name": "(lead) - HS Code 2704 & 2701",
    "Last_Name": "(lead) - HS Code 2704 & 2701",
    "Layout": {
    "name": "LeadsExportGenius",
    "id": "348201000000237745"
    },
    }
    ],
    "trigger": [
    "approval",
    "workflow",
    "blueprint"
    ]
    }
    </code>
    </td>
    <td>
    <code>
    {
    "data": [
    {
    "code": "INVALID_DATA",
    "details": {
    "api_name": "id",
    "json_path": "$.data[0].Owner.id"
    },
    "message": "invalid data",
    "status": "error"
    }
    ]
    }
    </code>
    </td>
    </tr>
    </table>