How to get items list on Sales Invoice ERP NEXT REST API by filtering with company

The API Call below works by returning all the item related to sales invoices:
URL: {{base_url}}/api/resource/Sales Invoice Item?fields=[“*”]&parent=Sales Invoice

The A.P.I. Call below works by returning all the sales invoices related to a company:
URL: {{base_url}}/api/resource/Sales Invoice?filters=[[“company”, “=”, “Company Name”]]

The A.P.I. Call below fails If I try to return all the item related to sales invoices for a specific company:
URL: {{base_url}}/api/resource/:doctype?fields=[“*”]&parent=Sales Invoice&filters=[[“company”, “=”, “Company Name”]]

I get the error:

{
“exc_type”: “DataError”,
“exception”: “frappe.exceptions.DataError: Field not permitted in query: company”
}