Expanding Responses

Many object allow you to request additional information as an expanded response by using the expand request parameter.
This parameter is available on all all API requests, and applies to the response of that request only.

In many cases, an object contains the ID of a related object in its response properties.
For example, a Payment might have an associated Debt ID.
You can expand these objects in line with the expand request parameter.
The expandable label in this documentation indicates ID fields that you can expand into objects.

Performing deep expansions on numerous list requests might result in slower response times.

You can expand multiple objects at the same time by identifying multiple items in the expand array.

curl https://api.ophelos.com/payments?expand[]=debt
  -H "Authorization: Bearer sk_prod_H4x0rN0t4R3alAPiK3y"
{
  "id": "pay_123",
  "object": "payment",
  ...
  "debt": {
    "id": "debt_123",
    "object": "debt",
    ...
  }
}