Side Loading

Related resources can be included in a response by setting the include query parameter to a comma-delimited list of relationships. Nested relationships may also be included by using a period to chain together relationships. The resulting JSON will include collections for each type of resource and resources will have properties identifying their related resources. This is referred to as “side loading”. Below is an example of a request for contacts including related contact lists, lists, and organization.

Below is an example JSON body response to a GET request to:
api/3/contacts?include=contactLists.list,organization

{
   "contacts": [
       {
           "id": 1,
           "email": "[email protected]",
           "firstName": "John",
           "lastName": "Smith",
           "contactLists": [3,5],
           "organization": 7,
       }
   ],
   "contactLists": [
       {
           "id": 3,
           "list": 5
       },
       {
           "id": 6,
           "list": 10
       }
   ],
   "lists": [
       {
           "id": 5,
           "name": "Monthly Newsletter"
       },
       {
           "id": 10,
           "name": "Daily Deals"
       }
   ],
   "organization": [
       {
           "id": 7,
           "name": "ActiveCampaign"
       }
   ]
}