In some cases, it's possible to request a superset of data to be returned. These are labelled as Allowed Includes
in the documentation. Using this may save you from making a second API request to get more information.
In order to do this, add a URL parameter of include
to your request. For example, when requesting Reservations, it's possible to include data on the Guest without having to make separate HTTP requests by adding include=guest
as a URL parameter:
GET /reservations/c9bc3e39-4275-4199-944c-cf52079903f9?include=guest
This will embed the included resource in the API response, under an guest
key. For example:
{
"data": {
"id": "c9bc3e39-4275-4199-944c-cf52079903f9",
"platform_id": "AHDKVUCXXXM",
"guest": {
"email": "...",
"phone_numbers": ["..."],
"first_name": "...",
"last_name": "..."
}
}
}