# Where to find transaction\_id required for Documents API?

**URL:** <http://forum.companieshouse.gov.uk/t/where-to-find-transaction-id-required-for-documents-api/453>\
**Category:** Information\
**Created:** [February 12, 2016, 11:16am UTC](http://forum.companieshouse.gov.uk/t/where-to-find-transaction-id-required-for-documents-api/453 "2016-02-12T11:16:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ian\_havelock](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/i/90ced4/32.png) [@ian\_havelock](http://forum.companieshouse.gov.uk/u/ian_havelock)\
**Post date:** [February 12, 2016, 11:16am UTC](http://forum.companieshouse.gov.uk/t/where-to-find-transaction-id-required-for-documents-api/453/1 "2016-02-12T11:16:57Z")

</div>

Hi,

As per the documentation for [https://developer.companieshouse.gov.uk/api/docs/company/company\_number/filing-history/transaction\_id/getFilingHistoryItem.html](https://developer.companieshouse.gov.uk/api/docs/company/company_number/filing-history/transaction_id/getFilingHistoryItem.html), 2 pieces of information are required: the company number and the transaction\_id. However, the documentation doesn’t mention anywhere that I can see, where this transaction id is to be found? Is it returned as part of some other endpoint?

Kind Regards,  
Ian

---

<div class="post-metadata">

**Author:** ![ash](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/a/f19dbf/32.png) [@ash](http://forum.companieshouse.gov.uk/u/ash)\
**Post date:** [February 17, 2016, 10:19am UTC](http://forum.companieshouse.gov.uk/t/where-to-find-transaction-id-required-for-documents-api/453/2 "2016-02-17T10:19:50Z")

</div>

Check these:

> **[Get the filing history of the company](https://developer.company-information.service.gov.uk/api/docs/company/company_number/filing-history/getFilingHistoryList.html)**

> **[filingHistoryList resource](https://developer.company-information.service.gov.uk/api/docs/company/company_number/filing-history/filingHistoryList-resource.html)**

It’s non-optional part of the item returned when you list a file history that acts as a unique identifier for that item.

---

<div class="post-metadata">

**Author:** ![csmith](http://forum.companieshouse.gov.uk/user_avatar/forum.companieshouse.gov.uk/csmith/32/8_2.png) [@csmith](http://forum.companieshouse.gov.uk/u/csmith)\
**Post date:** [February 27, 2016, 6:25pm UTC](http://forum.companieshouse.gov.uk/t/where-to-find-transaction-id-required-for-documents-api/453/3 "2016-02-27T18:25:23Z")

</div>

We would recommend you use the document\_metadata link returned by the filing history resource, instead of manipulating the API URL yourself. Every resource for a company should be discoverable from the company profile resource, however we are aware that some are missing due to an oversight early on in development. This is in the process of being corrected.

Please take a look at the following post, particularly my response (two or three replies in) for an explanation of the issues with URL manipulation:

> [@Help with Document API & Fetch a Document](http://forum.aws.chdev.org/t/help-with-document-api-fetch-a-document/255/3):
>
> A note for step (2): A client should be following links.document\_metadata URL of the filing history to get to a document, and not have to construct URL’s on the fly. Should we change the ID encoding, then client’s that construct their own URLs will break. So, in the short term, take the links.document\_metadata URL from the filing history, and append /content onto the end. This will return the default PDF, but if PDF is not available, you’ll have to deal with the failure. Calling the document\_m…

Regards  
Chris
