Expansions
The _expand
parameter allows you to specify additional data components that are not included by default to maximize API performance.
Parameter | Description |
---|---|
_expand |
A list of attributes specifying additional data to return. |
Individual expansions vary, and are documented for every resource. Expansion availability is further governed by:
- Role. Some expansions may be available, for example, only when the API is accessed with a private role.
- Result set size. Larger or resource intensive expansions can only be specified when a single item is retrieved (i.e. data retrieval by ID or when
_limit=1
).
Using the Accounts API as an example, passing the _expand=Settings
parameter to /<API Version>/my/account
will cause the Settings
attribute to appear:
{
"D": {
"Success": true,
"Results": [
{
"Name": "Sample User",
"Id": "20000426173054342350000000",
"UserType": "Office",
/* Additional data omitted for brevity */
"Settings": {
"SearchRestriction": {
"MlsStatus": [
"A",
"P"
],
"PostalCode": null
}
}
]
}
}
Additionally, multiple expansions can be specified with a comma seperated list:
_expand=Photos,VirtualTours