Relationship

The relationships object defines the connection between the current resource and other related resources. Every member of the relationships object is responsible for representing a single reference.

A relationship object has to contain a data member, which can either be null or an empty array [] for empty to-one or to-many relationships, respectively. In contrast, it can either be a single resource identifier (type and ID) or an array of resource identifiers for non-empty to-one or to-many relationships, respectively.

Our API supports one-to-one, one-to-many, and many-to-many relationships, each of which is represented according to the above rules.

To fetch related resources, we provide an "include" query parameter in GET requests that allow you to retrieve multiple related resources within the same response. The response will contain an "included" key that holds the related resources.

In conclusion, the relationship object is the building block that connects different resources in our API.

{
  "type": "VirtualNuban",
  "id": "1234-anc_va",
  "attributes": {
   // ...
  },
  "relationships": { // relationships object
    "account": { // relationship object
      "data": { // resource linkage with single resource identifier
        "type": "DepositAccount",
        "id": "1235-anc_acc"
      }
    }
  }
}