Are you using the Manipulate Company Data (API Filing) reference API? I have not used this API myself but I believe that in that case you would first create a transaction (for adding a filing / update) using the create endpoint. This returns a resource which includes an ID for that transaction - which seems to be the transaction id you are looking for.
However… I wonder what task you want to achieve? Do you want to file information (update or add details) on behalf of a company? In that case the “Manipulate Company Data (API Filing) reference” seems the right one.
OR - are you wanting to find information on any of the companies which are already registered - and not make filings or update data for a company? In that case you would use a completely different API - for example the Companies House public data API. A note if you do try that API: it uses a different method of authorization from the other API e.g. the public data API uses a different “username and password” and uses http basic, not OAuth2.