CSPR.cloud REST API provides the possibility to include related entities in responses. An entity is called related if its identifier is present among the requested entity's properties. For example, the Deploy entity is related to the NFT Action entity because the latter has a deploy_hash property identifying the deploy that produced the action. Not all related entities can be included in responses; the ones that can are listed in the "Optional properties" section for the corresponding entity or endpoint page.
Related entities are included the same as other optional properties, using the includes query param. For the related entity to be added to the response, its name has to be specified in the list of includes.
Including related entities makes it possible to fetch the required data in one request, simplifying the integration and reducing latency, which is especially useful when processing paginated responses. Continuing the NFT Action and Deploy example, one may need to know the deploy caller account when processing the NFT Action data. By including the Deploy object in the NFT Action response, all the required information can be received in just one API call instead of requesting the deploy data for each NFT action in the list: