Multi-Record Fetch – Including Table Lookup Relationships

Hi NW team,

I’m fetching data through the Data Fetch endpoint (multi-record fetch POST) and have two Header-Detail table structures:

nsFNFTExternalInvoices

  • nsFNFTExternalInvoiceHeader

  • nsFNFTExternalInvoiceDetail

nsFNFTCustomerInvoices

  • nsFNFTCustomerInvoiceHeader

  • nsFNFTCustomerInvoiceDetail

The nsFNFTCustomerInvoiceHeader table has a table lookup to nsFNFTExternalInvoiceHeader through the nsFNFTExternalInvoice column.

What I’d like to accomplish is to fetch both structures in a single API call (POST)

Currently, I’m making two separate API calls:

1. nsFNFTExternalInvoices

{
  "nwFilter": {
    "$and": [
      {
        "nsFNFTWorkOrderNumber": "00112328"
      }
    ]
  },
  "nwFields": "",
  "nwChildren": [
    {
      "nwTable": "nsFNFTExternalInvoiceDetail",
      "nwFields": ""
    }
  ]
}

2. nsFNFTCustomerInvoices

{
  "nwFilter": {
    "$and": [
      {
        "nsFNFTWorkOrderNumber": "00112328"
      }
    ]
  },
  "nwFields": "",
  "nwChildren": [
    {
      "nwTable": "nsFNFTCustomerInvoiceDetail",
      "nwFields": ""
    }
  ]
}

Is there a way to define/populate this table-lookup relationship in the nwChildren section so that I can retrieve the Customer Invoice structure and the related External Invoice structure in a single POST request?

Any guidance or example of the expected payload would be greatly appreciated. Thanks!

Nextworld today doesn’t support retrieving data from more than 1 table at a time, so the way you put it I don’t think there’s an option.

However defining a 4-way join table between these two given there’s a TL to relate the headers would be a different way of getting the data back from both in a single call potentially?