Retrieving Contract and PO related items with the API?

We have a need to create reports that combine data from Contracts and their related Purchase Orders.  We aren't able to get this natively in SWSD, so we have been trying to pull the data down with the API and build a report based on that.  We're running into a wall in that both Contracts and Purchase Orders don't seem to list their related items in the returned JSON.

Is there a way to get the POs related to a Contract or vice versa using the objects returned from the API? It would save us hours of manually combing through data every month to be able to access the related IDs.

  • I couldn't find any documentation on this so I went digging until I found how it's being managed in their own UI.  Leaving the answer here in case anyone else ends up needing this info.

    Purchase Orders related to a Contract:


    Contracts related to a Purchase Order: