Inquiry concerning the Companies House Document API

It seems from the Companies House API docs that one can only retrieve the company documents only if they have the Document IDs for particular documents.
It seems there is no clear way of retrieving the Document IDs per company. Our intention is to use the API to get documents for various companies.

Is there an API endpoint that can list all documents given a company name? Or an endpoint that returns an array of Document IDs given
a company name or number?

have you read the documentation for filing history
https://developer-specs.company-information.service.gov.uk/companies-house-public-data-api/reference/filing-history
the following post may help