If you want to retrieve the invoices of a specific project through the Invoice endpoint, you need to filter the invoice list on the invoiceDetails.projectId field. The URL for the GET request would be as follows:
{{baseUrl}}/invoice?where="invoiceDetails.projectId='{{Project ID}}'"
where {{Project ID}} is the unique identifier (GUID) of the project.