# 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:

[[DIDWW-API-EXAMPLE-START]]

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"
```

[[DIDWW-API-EXAMPLE-END]]

---

## Include multiple related resources

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

In this example, the request includes the DID's `voice_in_trunk` resource together with the related
`voice_in_trunk_group` in a single request.

[[DIDWW-API-EXAMPLE-START]]

http

```
GET /v3/dids?include=voice_in_trunk.voice_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.voice_in_trunk_group' -H "Accept: application/vnd.api+json"
```

[[DIDWW-API-EXAMPLE-END]]

---

## 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`:

[[DIDWW-API-EXAMPLE-START]]

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"
```

[[DIDWW-API-EXAMPLE-END]]

On this page
