Logo

Services & Tools

  • Phone Numbers
  • Voice
  • SMS
  • Cloud Phone System
  • Logs & Analytics
  • Identities & Addresses
  • Billing
  • Account Settings
  • Network Infrastructure
  • Glossary

Development Tools

  • API Documentation
    • Getting Started
    • Use Case Examples
    • Specification
      • Sorting
      • Pagination
      • Filters
      • Inclusion of Related Resources
        • Include a single related resource
        • Include multiple related resources
        • Include nested related resources
      • Headers
      • Assigning Related Resources
      • Error Objects
    • API Versioning
    • Version (Latest) 2022-05-10
    • Version 2021-12-15
    • Version 2021-04-19
    • Version 2017-09-18
  • Call Events

Integrations

  • Microsoft Teams Direct Routing
  • Amazon Chime SDK
  • Asterisk
  • Twilio
  • Avaya
  • Ribbon
  • Telinta
  • Zapier
  • Pabbly
  • Genesys Cloud CX
  • FreePBX
  • DIDWW Prometheus Exporter
DIDWW
  • API Documentation
  • Specification
  • Inclusion of Related Resources

Inclusion of Related Resources

The include parameter allows you to retrieve related resources in a single request. This is also known as side-loading and reduces the need for multiple API calls by returning related objects alongside the primary resource.

The response includes a top-level relationships object containing the related data.

Note

Using include reduces the number of requests needed to fetch related data and improves performance when working with linked resources.



Include a single related resource

You can include a single related resource by specifying it in the include parameter.

In this example, each DID record includes its associated voice_in_trunk resource. This allows you to retrieve additional details about related resources without sending a separate request:

http

GET /v3/dids?include=voice_in_trunk HTTP/1.1
Host: api.didww.com
Accept: application/vnd.api+json

curl

curl -i -X GET 'https://api.didww.com/v3/dids?include=voice_in_trunk' -H "Accept: application/vnd.api+json"


Include multiple related resources

You can include multiple related resources by separating them with commas.

In this example, both voice_in_trunk and did_group are included in the same request. The response returns each DID along with its trunk and DID group details in a single request:

http

GET /v3/dids?include=voice_in_trunk%2Cdid_group HTTP/1.1
Host: api.didww.com
Accept: application/vnd.api+json

curl

curl -i -X GET 'https://api.didww.com/v3/dids?include=voice_in_trunk%2Cdid_group' -H "Accept: application/vnd.api+json"


Include nested related resources

You can also include relationships of already-included objects.

In this example, the request includes voice_in_trunk and its related voice_in_trunk_group:

http

GET /v3/dids?include=voice_in_trunk%2Cvoice_in_trunk_group HTTP/1.1
Host: api.didww.com
Accept: application/vnd.api+json

curl

curl -i -X GET 'https://api.didww.com/v3/dids?include=voice_in_trunk%2Cvoice_in_trunk_group' -H "Accept: application/vnd.api+json"
Previous Next

© Copyright DIDWW Ireland Limited. Last updated on Aug 12, 2025.