Power up your integrations with the enhanced API Designer!

We are thrilled to announce the significant enhancements we have made to the API Designer module.

These enhancements will empower you to build even more efficient and powerful custom APIs. They focus on improving bulk operations, expanding select API functionality, and enhancing the use of multiple field conditions.

Let's dive into the details of these enhancements:

Enhancement 1: Bulk Operation Support for UPDATE/UPSERT Records

API Designer: Bulk Operation Support

With the latest update, you can perform bulk operations for updating or upserting records. This enhancement allows you to create or update multiple records in a single request, making your API interactions efficient and time-saving.

Key Features:

  • Create API: Create multiple records in a single request by passing the parameter bulk="true". Related Document
  • Update API: Previously, you could update only one record per request. Now, you can update multiple records in a single request by matching the Where condition. Related Document

Bulk Record Limit: 50

Sample Use Case:

Contacts Module: Update multiple records of any field with a single request. For instance, you can update multiple contact records by matching specific conditions or creating new ones if they do not exist.


  

<?xml version="1.0"?>   <api method="post" module="Contacts">         <upsert bulk="true">             <where>                 <field name="mobile" condition="eq" value="@mobile"></field>              </where>             <update>               <record>                   <field name="mobile" value="@mobile"></field>                   <field name="email" value="@email" presence="optional"></field>                   <field name="lastname" value="@lastname" presence="optional"></field>               </record>             </update>             <create module="Contacts" bulk="true">                 <record>                   <field name="mobile" value="@mobile"></field>                   <field name="email" value="@email" presence="optional"></field>                   <field name="lastname" value="@lastname" presence="optional"></field>               </record>             </create>             <return>                 <field name="mobile"></field>                 <field name="email"></field>                 <field name="lastname"></field>             </return>         </upsert>     </api>


  

<?xml version="1.0"?>   <api method="post" module="Contacts">         <upsert bulk="true">             <where>                 <field name="mobile" condition="eq" value="@mobile"></field>              </where>             <update>               <record>                   <field name="mobile" value="@mobile"></field>                   <field name="email" value="@email" presence="optional"></field>                   <field name="lastname" value="@lastname" presence="optional"></field>               </record>             </update>             <create module="Contacts" bulk="true">                 <record>                   <field name="mobile" value="@mobile"></field>                   <field name="email" value="@email" presence="optional"></field>                   <field name="lastname" value="@lastname" presence="optional"></field>               </record>             </create>             <return>                 <field name="mobile"></field>                 <field name="email"></field>                 <field name="lastname"></field>             </return>         </upsert>     </api>

 

This enhancement streamlines your workflow, reducing the number of API calls required for bulk operations.

Enhancement 2: Select API to Support Returning Parent Module Fields

API Designer: Enhanced Select API

We have expanded the functionality of Select API to include fields from reference field modules. This enhancement enables you to fetch comprehensive data in a single request.

Key Features:

  • Previously, the Select API could only retrieve fields from the current module.
  • Now, you can select fields from reference field modules as well.

Sample Use Cases - Cases and Contacts Relationship (N:1):

  • Fetch case records along with the related contact's phone numbers.
  • Retrieve case records along with the contact's first and last names.
  • Get case records with the ‘Assigned To’ user's mobile number and full name.
 

This enhancement streamlines your workflow, reducing the number of API calls required for bulk operations.

Enhancement 2: Select API to Support Returning Parent Module Fields

API Designer: Enhanced Select API

We have expanded the functionality of Select API to include fields from reference field modules. This enhancement enables you to fetch comprehensive data in a single request.

Key Features:

  • Previously, the Select API could only retrieve fields from the current module.
  • Now, you can select fields from reference field modules as well.

Sample Use Cases - Cases and Contacts Relationship (N:1):

  • Fetch case records along with the related contact's phone numbers.
  • Retrieve case records along with the contact's first and last names.
  • Get case records with the ‘Assigned To’ user's mobile number and full name.

  

<?xml version="1.0"?> <api method="get">     <select module="Cases">         <record>             <field name="title"></field>             <field name="casestatus"></field>             <field name="assigned_user_id"></field>             <field name="createdtime"></field>             <field name="case_no"></field>             <field name="assigned_user_id" module="Users">                 <select>                     <field name="first_name"></field>                     <field name="last_name"></field>                     <field name="userlabel"></field>                 </select>             </field>             <field name="contact_id" module="Contacts">                 <select>                     <field name="firstname"></field>                     <field name="lastname"></field>                     <field name="mobile"></field>                 </select>             </field>             <field name="group_id" module="Groups">                 <select>                     <field name="groupname"></field>                 </select>             </field>         </record>         <where>             <field name="contact_id" module="Contacts">                 <select>                     <where>                         <field name="lastname" value="@name"></field>                     </where>                 </select>             </field>         </where>     </select> </api>


  

<?xml version="1.0"?> <api method="get">     <select module="Cases">         <record>             <field name="title"></field>             <field name="casestatus"></field>             <field name="assigned_user_id"></field>             <field name="createdtime"></field>             <field name="case_no"></field>             <field name="assigned_user_id" module="Users">                 <select>                     <field name="first_name"></field>                     <field name="last_name"></field>                     <field name="userlabel"></field>                 </select>             </field>             <field name="contact_id" module="Contacts">                 <select>                     <field name="firstname"></field>                     <field name="lastname"></field>                     <field name="mobile"></field>                 </select>             </field>             <field name="group_id" module="Groups">                 <select>                     <field name="groupname"></field>                 </select>             </field>         </record>         <where>             <field name="contact_id" module="Contacts">                 <select>                     <where>                         <field name="lastname" value="@name"></field>                     </where>                 </select>             </field>         </where>     </select> </api>

 

This enhancement allows you to access detailed and interconnected data, simplifying the data retrieval processes.

Enhancement 3: Added Support for Multiple Field Conditions in the Where Clause

API Designer: Advanced Where Clause

With this update, you can use multiple fields in the Where condition of your Select queries. This enhancement provides greater flexibility and precision in filtering your data.

Key Features:

  • Multiple Field Conditions: Add more than one field from the current module or reference field modules in the where condition.
  • Glue Parameter: Use the glue parameter (glue="or" or glue="and") to combine multiple conditions.

Sample Use Cases - Simple Module:

  • Add conditions on ‘Sales Stage’ and ‘Lead Source’ with glue="or".
  • Include reference fields in the Where condition, such as contact_id and related_to.
 

This enhancement allows you to access detailed and interconnected data, simplifying the data retrieval processes.

Enhancement 3: Added Support for Multiple Field Conditions in the Where Clause

API Designer: Advanced Where Clause

With this update, you can use multiple fields in the Where condition of your Select queries. This enhancement provides greater flexibility and precision in filtering your data.

Key Features:

  • Multiple Field Conditions: Add more than one field from the current module or reference field modules in the where condition.
  • Glue Parameter: Use the glue parameter (glue="or" or glue="and") to combine multiple conditions.

Sample Use Cases - Simple Module:

  • Add conditions on ‘Sales Stage’ and ‘Lead Source’ with glue="or".
  • Include reference fields in the Where condition, such as contact_id and related_to.

  

<?xml version="1.0"?> <api method="get">     <select module="Potentials">         <record>             <field name="potentialname"></field>             <field name="amount"></field>             <field name="assigned_user_id"></field>             <field name="createdtime"></field>         </record>         <where glue="or">             <field name="sales_stage" value="@sales_stage" presence="optional"></field>             <field name="leadsource" value="@leadsource" presence="optional"></field>         </where>     </select> </api>


  

<?xml version="1.0"?> <api method="get">     <select module="Potentials">         <record>             <field name="potentialname"></field>             <field name="amount"></field>             <field name="assigned_user_id"></field>             <field name="createdtime"></field>         </record>         <where glue="or">             <field name="sales_stage" value="@sales_stage" presence="optional"></field>             <field name="leadsource" value="@leadsource" presence="optional"></field>         </where>     </select> </api>

 

Complex example: You can also add conditions involving reference fields from related modules. For instance:

  • Relationships: There is a relationship (N:1) between Deals and Contacts, as well as between Deals and Accounts.
  • Combined Conditions: Add conditions on contact_id and related_to using glue="or". If either one or both parameter values match, the response will be returned.

 

Complex example: You can also add conditions involving reference fields from related modules. For instance:

  • Relationships: There is a relationship (N:1) between Deals and Contacts, as well as between Deals and Accounts.
  • Combined Conditions: Add conditions on contact_id and related_to using glue="or". If either one or both parameter values match, the response will be returned.


  

<?xml version="1.0"?> <api method="get">     <select module="Potentials">         <record>             <field name="potentialname"></field>             <field name="amount"></field>             <field name="assigned_user_id"></field>             <field name="createdtime"></field>         </record>         <where glue="OR">               <field name="contact_id" module="Contacts">                   <select>                       <where>                           <field name="mobile" condition="eq" value="@mobile" presence="optional"></field>                       </where>                     </select>               </field>               <field name="related_to" module="Accounts">                     <select>                         <where>                             <field name="phone" condition="eq" value="@phone" presence="optional"></field>                         </where>                     </select>                 </field>             </where>     </select> </api>


  

<?xml version="1.0"?> <api method="get">     <select module="Potentials">         <record>             <field name="potentialname"></field>             <field name="amount"></field>             <field name="assigned_user_id"></field>             <field name="createdtime"></field>         </record>         <where glue="OR">               <field name="contact_id" module="Contacts">                   <select>                       <where>                           <field name="mobile" condition="eq" value="@mobile" presence="optional"></field>                       </where>                     </select>               </field>               <field name="related_to" module="Accounts">                     <select>                         <where>                             <field name="phone" condition="eq" value="@phone" presence="optional"></field>                         </where>                     </select>                 </field>             </where>     </select> </api>

 

This enhancement gives you the ability to create more complex and refined queries, ensuring you retrieve exactly the data you need.

We believe these enhancements will significantly improve your experience with our API Designer module, making it more versatile and powerful. We encourage you to explore these new features and see how they can benefit your development projects.

Stay tuned for more updates.

Happy coding!

 

This enhancement gives you the ability to create more complex and refined queries, ensuring you retrieve exactly the data you need.

We believe these enhancements will significantly improve your experience with our API Designer module, making it more versatile and powerful. We encourage you to explore these new features and see how they can benefit your development projects.

Stay tuned for more updates.

Happy coding!

 
 

Sign up to receive the latest updates!