Basic Usage
Use theinclude parameter to specify related resources:
Available Includes
Companies
employeesdocuments
Employees
companydocuments
Documents
companyemployee
Nested Relations
Include nested relations using dot notation:Multiple Relations
Combine multiple includes with commas:Combining with Other Features
Includes can be used with filtering, sorting, and pagination:Response Format
When including relations, they appear as nested objects:Performance Considerations
- N+1 Query Prevention: Includes are optimized to prevent N+1 queries using eager loading
- Selective Loading: Only request relations you need:
- Limit Nesting Depth: Deep nesting can impact performance:
Best Practices
- Only include necessary relations
- Use filters with includes to limit data size
- Consider pagination when including one-to-many relations
- Cache responses with includes when possible
- Monitor query performance with includes

