Return Related Data as an ID Only, or in Full
There are two ways to return the data related to an order, such as the customer who placed it. A reference returns just the related data's id, like order.customer_id; if the client needs more, it fetches the customer with a separate request.
Embedding returns the related data in full, like order.customer: { id, name }. If the client almost always needs the order and the customer together, this saves an extra request.
?include=customer lets the client ask for the customer to be embedded on each request, so the server doesn't have to always choose one way.
An API designer avoids nesting embeds several levels deep. If the server embeds a customer in an order, that customer's orders in the customer, and their items in those orders, the response it returns grows without bound, and the same data can even appear inside itself. So the server usually embeds only one level, and the client fetches anything deeper with another request.
Choose between embedding related data and returning a reference for a given case, and explain why deeply nested responses are avoided.
An order list screen shows each order's total and the customer's name, and is fetched often. Which fits better, a reference or an embed for the customer?