Chapter 5 Including Nested Resources
Resources often have associations with one another.
For instance a
Page has a
Brand, or a
Notice has many
Updates. Traditionally you would retrieve each of these using separate requests.
However we allow you to shortcut this by passing along an include parameter with any GET request which will include the associated resources in a single response.
curl -X GET https://api.sorryapp.com/v1/pages/:page_id \ -d include="brand" -H "Authorization: Bearer 0526ff9fdbb3ca728daa3d17781eac1a15a1c3f0917abc53
You can nest include requests with the dot property. For example, requesting
notices.updates on a page will include each of the
notices and all their respective
You can expand multiple objects at once by identifying multiple items in the include parameter separated by a comma such as