Including related records

The finance API supports JSON:API’s include parameter. You can use this to reduce the number of requests you send the to API by bundling related records into a single response. For example:

GET https://api.wisc.edu/finance/grants/GR000TEST?include=costCenters

…will return the attributes of fund GR000TEST, but also an included object that contains the cost centers that are related to that grant:

“included”: [
  {
    “attributes”:{
    “active”:true,
    “name”:”UWRVF | Accounting”
  },
  “id”:”CC001223″,
  “links”:{
    “self”:”https://api.wisc.edu/finance/costCenters/CC001223″
  },
  “type”:”costCenters”
  }
]

You can map these to the relationships using the ID and type.